You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
ã¯ããã« å®éã«éç¨ãã¦ããæã«éåæã«ãã¦ãã主ãªå¦çã¯ä¸è¨ã®ãããªãã®ãããã¾ãã iOS Android ã® push éç¥ã®éä¿¡å¦ç ãã°ã®ä½æ æ§ã ãªå¤é¨ API ã®å¼ã³åºã éåæã§æ´æ°ãã¦ãåé¡ãªããã¼ã¿ã®æ´æ° Sidekiq is ãªã« sidekiqã¯éåæå¦çãå®ç¾ãã gem ä»ã«ã Ruby ã§éåæå¦çãå®ç¾ã§ããæå㪠gem ã«ã¯ resque ã delayed_job çãããã sidekiq.org Enterpriseççãããã¾ããã ä»åã¯OSSçã使ç¨ãã¦ããåæã§ã®ã話ãã§ãã ä»ã®éåæå¦çãå¯è½ãª gem ã¨ã®ç°¡åãªæ¯è¼ FAQ · mperham/sidekiq Wiki · GitHub ãã®å 容ã¯çµæ§çå®ãèªã£ã¦ãããã¨ãæè¿ç¥ã£ã Sidekiq Redis ãã«ãã¹ã¬ãã ãªãã©ã¤å¦çãã ãããããªããã·ã¥ãã¼ã Resque
client = Marvelite::API::Client.new( :public_key => 'abcd1234', :private_key => '5678efgh') # fetch a list of characters client.characters client.characters(:name => 'Spider-Man') client.characters(:limit => 10, :offset => 400, :orderBy => 'name') # fetch a single character client.character(1009610) client.character('Spider-Man') # fetch a list of comics client.comics client.comics(:format => 'gra
Thorã§ã¿ã¹ã¯ãæ¸ãã¨ãã®ã¡ã½ãããæ®éã®Rubyã®ããã«ã¯å¼ã¹ã¾ããã ããã§ããã£ã±ããã¹ãã¯æ¸ãããã®ã§Thorã®specãããããè¦ã¦ããããã¾ããã # encoding: utf-8 require "rubygems" require "thor" require "rspec" require "stringio" class Sample < Thor desc "name", "sample name" def name puts "pochi" end end describe Sample do it "should display 'pochi'" do capture(:stdout) { Sample.new.invoke("name") }.strip.should == "pochi" end end
ActiveJobã®ããã¯ã¨ã³ãã¨ãæ°¸ç¶åå ã¨ãã¦Redisã好ã¾ããçç±Rails 4.2ã§ãActiveJobã¨ããã¯ã©ã¹ãå°å ¥ããã¾ããã ãã以åãããRailsã§éåæå¦çãè¡ãéã«ã¯ResqueãSidekiqãDelayed Jobãªã©ãåºã使ããã¦ãã¾ãããã ActiveJobã¯ã¸ã§ããè¨è¿°ããããã®ã¤ã³ã¿ãã§ã¼ã¹ãæ½è±¡åãã¦ã ã¸ã§ãã®å®è£ ãå¤ãããã¨ç¡ãã¸ã§ãã©ã³ãã¼ãåãæ¿ãããã¨ãå¯è½ã«ãããã®ã§ãã ãªãActiveJobã«ããã¦ã¯ãããã¯ã¨ã³ããæå®ããªããã°ã¸ã§ãã¯éåæå®è¡ãããã¨ãã¦ãå³åº§ã«å®è¡ããã¾ãã Rails 4.2.0æç¹ã§ã¯ãActiveJobã®ããã¯ã¨ã³ãã¨ãã¦ä»¥ä¸ã®ãã¼ã¸ã«ãã9ã¤ã®ããããã使ç¨ã§ãã¾ãã ActiveJob::QueueAdapters Backburner Delayed Job Qu Que queue_class
bundle gemã§gemã©ã¤ãã©ãªã®ã²ãªå½¢ãä½æã§ãã ãã®ä¸ã§ã-b ãªãã·ã§ã³ãä»ããã¨å®è¡ãã¡ã¤ã«ç¨ã®binãã£ã¬ã¯ããªãä½æããããããããBundler 1.8ç³»ãã㯠bin ãã£ã¬ã¯ããªã¯ binstubç¨ï¼ã§è¯ãã®ããªï¼ã®setupãconsoleã¹ã¯ãªããçï¼-bãä»ããªãã¦ãçæãããï¼ãé ç½®ãããgemã©ã¤ãã©ãªã®å®è¡ãã¡ã¤ã«ç¨ã¨ã㦠exe ãã£ã¬ã¯ããªãç¨æãããããã«ãªãã 1.7.9 㨠1.8.3ã§ã®ç¢ºèª 1.7.9 㧠bundle gem ããã¸ã§ã¯ãå -b -t ããçµæ â /tmp tree baz baz âââ Gemfile âââ LICENSE.txt âââ README.md âââ Rakefile âââ baz.gemspec âââ bin â  âââ baz âââ lib â  âââ baz â  â Â
ãã¼ãã³ã°ã®æã®ãã¤ãã³ã¨ã¢ã³ãã¼ã¹ã³ã¢ã®ä½¿ãåãããèªåã®ä¸ã§ææ§ãªã¨ããããã£ãã®ã§ã¡ã¢ã è¨èªããã¬ã¼ã ã¯ã¼ã¯ã«ãã£ã¦è²ã ããããããã¾ãããã以ä¸ãRuby(gem)ã®å ´åã§ãã Eric Hodelæ°ã®æ¨å¥¨ãããã¼ãã³ã°ã«ã¼ã« RubyGemsã®ä½è ãEric Hodelæ°ã¯èªèº«ã®ããã°ã§æ¬¡ã®ããã«æ¨å¥¨ãã¦ãã¾ãã How to Name Gems Here is my STRONG recommendation on how to name gems: Use underscores ã»fancy_require ã»newrelic_rpm ã»ruby_parser This matches the file the user will require and makes it easier for the user to start using your gem. gem i
å ¬ç§å«ãã¦2å¹´éã§ãã¶ã30å以ä¸ã¯gemãä½ã£ã¦ã¾ããããªãã¨ãªãä½å¾ã¯ãããã®ã®ãããããã¨ã¯èª°ãæãã¦ãããªãã£ãæ°ãããã®ã§æ®ãã¦ããã¾ã ã¢ã³ãã¼ã¹ã³ã¢ã¨ãã¤ãã³ã使ãåãã gemãä½ã第ä¸æ©ã¯ bundle gem <ä½ãããgemã®åå> ã£ã¦ããã¨æãã¾ãããåèªåºåãã§ããã°ã¢ã³ã¹ã³ããã¼ã ã¹ãã¼ã¹ã®åºåãã ã£ãããã¤ãã³ã使ãã¾ã ã¢ã³ãã¼ã¹ã³ã¢åºåã $ bundle gem go_princess_precure Creating gem 'go_princess_precure'... create go_princess_precure/Gemfile create go_princess_precure/.gitignore create go_princess_precure/lib/go_princess_precure.rb create go_pri
ãã¼ã¹ã«ããã使ãã https://github.com/holli/auto_strip_attributes gem "auto_strip_attributes", "~> 2.0" ã§ãããã ãã ã¨å ¨è§ã¹ãã¼ã¹ã«ã¯å¯¾å¿ãã¦ãªããã©ããããã好ããªå¦çãæãããã£ã«ã¿ã¼æ©è½ãããã®ã§ããã使ããã£ã¦ãããããã使ãã¨ããå¥ã«stripãããªãã¦ããªãã§ããããªãã£ã¦ãããã config/initializers/auto_strip_attributes.rb AutoStripAttributes::Config.setup do set_filter strip_zenkaku: false do |value| value.gsub(/(^(\s|ã)+)|((\s|ã)+$)/, '') unless value.nil? or !value.kind_of?(Strin
Strip#stripã使ãã ãã§ã¯åè§ã¹ãã¼ã¹ã¨ãæ¹è¡æåããåãé¤ããªãã®ã§ãbefore_validationæã«å ¨è§ã¹ãã¼ã¹ãåãé¤ãæ¹æ³ãèããã ã¡ãªã¿ã« Ruby 㯠2.1.2ãRails 㯠4.1.0 ãåæã«æ¸ãã¦ã¾ãã auto_strip_attributes ã®å°å ¥ auto_strip_attributesã¨ãã gem ããã£ãã®ã§ã¨ãããã使ã£ã¦ã¿ãã Gemfile ã«æ¸ãã¦ãbundle installããã gem "auto_strip_attributes", "~> 2.0" ãããã£ã¦ä½¿ãã£ã½ãã class User < ActiveRecord::Base # Normal usage where " aaa bbb\t " changes to "aaa bbb" auto_strip_attributes :nick, :commen
2. æ¬è³æã«ã¤ãã¦ ï½ æ¬è³æã¯ã社å åå¼·ä¼ã®è£å©è³æã§ã ï½ å¤é¨åãã«æ¸ããã¦ããªãè¨è¿°ãªã©ãããã¾ã ï½ è³æã ãã§ãã¹ã¦ä¼ãããããªé æ ®ã¯ããã¦ãã¾ãã ï½ æ¬è³æã®åãæ±ãã«ã¤ãã¦ ï½ åé å¸çã®ãç¸è«ã¯ [email protected] ã¾ã§ãé¡ããã¾ãã 4. ãªãGemãèªãã®ã ï½ èªåã§å®å ¨ã確èªã§ãã ï½ Gemã¯ç¡ä¿è¨¼ ï½ è©³ããæåãææ¡ã§ãã ï½ ä¸é¢¨å¤ãã£ããã¨ãå®ç¾ã§ããã調ã¹ãã ï½ ããã¥ã¡ã³ãã¯å®ç§ã§ã¯ãªã ï½ ãã©ãã«è§£æ±ºã§ãã ï½ ãã©ãã¯ããã¯ã¹ã«æ¯ãåããããã¨ããªããªã ï½ åå¼·ã«ãªã ï½ ç¥ç好å¥å¿ ï½ OSSã¯é«å質ãªã³ã¼ããå¤ã 5. ãªãGemãèªãã®ã ï½ ã¬ãã«0 ï½ Gemã使ããªã ï½ ã¬ãã«1 ï½ è§£èª¬ãµã¤ããã³ããããªããåºæ¬çãªæ©è½ã使ãã ï½ ã¬ãã«2 ï½ READMEããªãã¡ã¬ã³ã¹ãèªãã§ã»ã¨ãã©ã®æ©è½ã使ã ã ï½
ãããªãèªã¿å§ãã¦ãããã®ã§ãããäºåã«è»½ãæºåãã¦ããã¨èªã¿ããããªãã¾ãã èªã¿ããã½ã¼ã¹ã³ã¼ãããã¦ã³ãã¼ã bundle install --path vendor/bundle æ¤ç´¢ç¨ã®ã¤ã³ããã¯ã¹ãè²¼ã èªã bgm.rbãä¾ã«èª¬æãã¾ãã èªã¿ããã½ã¼ã¹ã³ã¼ãããã¦ã³ãã¼ã hitode909/bgm $ git clone git@github.com:hitode909/bgm.git $ cd bgm bundle install --path vendor/bundle $ bundle install --path vendor/bundle . . Installing json 1.8.2 Installing multi_xml 0.5.5 Installing httparty 0.13.3 Installing itunes-search-api 0.1.
ããã«ã¡ã¯ãé´æ¨ã§ãã Rails ã®ä¾¿å©ãªã©ã¤ãã©ãªãã·ãªã¼ãºã§ãç´¹ä»ãã¦ã¿ããã¨æãã¾ãã ä»åã¯ãN+1 åé¡ããæ¤åºãã¦ãããã©ã¤ãã©ãªãbullet ã§ãã bullet (http://github.com/flyerhzm/bullet) N+1 åé¡ N+1 åé¡ã¨ã¯ãOR ãããã¼ã使ç¨ãã¦ããã¨ãã«çºçããã¡ãªåé¡ã§ãã ä½ãã®ä¸è¦§ç»é¢ãä½æãã¦ããã¨ãã«ã ä¸è¦§ã«è¡¨ç¤ºãããã¼ã¿ãåå¾ããããã« SELECT ã 1 åå®è¡ï¼N ã¬ã³ã¼ãè¿ãããï¼ åãã¼ã¿ã®é¢é£ãã¼ã¿ãåå¾ããããã« SELECT ã N åå®è¡ ãã¼ã¿ãã¼ã¹ã¢ã¯ã»ã¹ï¼SELECTï¼ãåè¨ N+1 åãå®è¡ãããï¼JOIN ã㦠1 åã® SQL ã§åå¾ããæ¹ãå¹ççï¼ ã¨ãããã®ã§ãã å ·ä½çãªã³ã¼ãã§èãã¦ã¿ã¾ãããã ä¾ã¨ãã¦åºèã®ä¸è¦§ç»é¢ãä½æãã¦ããã¨ãã¾ãã é¢ä¿ããã¢ãã«ã¯ä»¥ä¸ã®éãã§ã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}