gemã®ãªãªã¼ã¹ãã¨ã£ã¦ãç°¡åã«ãã RTask ãä½ãã¾ãã
Gemifyããã¾ãã«ç´ æ´ãããã®ã§ããããªã«ç°¡åã«gemãä½ããã®ãªãã°ãgemã®ãªãªã¼ã¹ã ã£ã¦ç°¡åã§ãªããã°ãªããªãã ãããã¨æãã¾ãããããã§RubyForgeã¸ã®ãªãªã¼ã¹ãã¨ã£ã¦ãã¨ã£ã¦ãç°¡åã«è¡ãªãããã® RTask ã¨ããã©ã¤ãã©ãª/ãã¼ã«ãä½æãã¾ããã
http://github.com/keita/rtask/tree/master
ã¤ã³ã¹ãã¼ã«
ãã®ããã¸ã§ã¯ãã¯RubyForgeã«ç³è«ããã°ãããªã®ã§ã¾ã æ¿èªãéãã¦ãã¾ããã®ã§ãæ®å¿µãªããã¾ã gemããªãªã¼ã¹ã§ãã¦ããªãã®ã§ãããçæ§ãã覧ã«ãªãé ã«ã¯æ¬¡ã®ããã«ãã¦ã¤ã³ã¹ãã¼ã«ãåºæ¥ãããã«ãªã£ã¦ãããã®ã¨æãã¾ãã
% sudo gem install rtask
ãªãªã¼ã¹ã¾ã§ã®æé
RTask ã®ä½¿ãæ¹ã¯æ¬¡ã®ããã«ãªãã¾ãã
ã¾ã rubyforge ã³ãã³ã㧠login ãªã©ãæ¸ã¾ãã¦ããã¾ãããã®è¾ºã®è¨å®ã¯NewGemãããã¾ã§ä½¿ã£ããã¨ã®ãã人ã¯æ¢ã«æ¸ã¾ãã¦ãããã¨æãã¾ãã
次ã«ãgemifyã®è¨å®ãè¡ãªãã.gemified ãã¡ã¤ã«ãä½æãã¦ããã¾ãããã®æé ã¯ãGemify ã¯ã¨ã£ã¦ãã¨ã£ã¦ãç´ æ´ãããã¨æãã¾ãï¼ããã覧ä¸ããããã ãããã§ã¯"b"ã§gemãä½ã£ã¦ããã¦ãä½ã£ã¦ãããªãã¦ãçµæ§ã§ãã
ããã§ä¸æºåãæ´ãã¾ãããã¾ãã¯ããã±ã¼ã¸ãä½æãã¾ãã
% rtask -p # ããã㯠rtask --package
ããã§ãæå ã«ã¯ #{package_name}-#{version}.gem åã³ .tgz ãªããã±ã¼ã¸ãä½æããã¦ããã¨æãã¾ããããã§ãªãªã¼ã¹ãããã¼ã¸ã§ã³ãç®ã§ç¢ºèªãã¦ããã¦ä¸ãããã§ã¯æå¾ã®ä»ä¸ãã§ãã
% rtask -r # ããã㯠rtask --release
ããã§ãªãªã¼ã¹ä½æ¥ãå®äºãã¾ãããrubyforge, gemify ã³ãã³ããé¤ãã°ããã£ãäºåã³ãã³ããæã¡è¾¼ãã ãã§ãªãªã¼ã¹å®äºã§ãï¼ç°¡åï¼
Rakefileã«ä»è¾¼ã
以ä¸ã§RTaskã«ãããªãªã¼ã¹ä½æ¥ã¯çµãããªã®ã§ãããããããä½æ¥ãRakeã使ã£ã¦è¡ãªãããå ´åãããã¨æãã¾ãããã£ã¡ã®æ¹ãç°¡åã§ããããã£ã¨è²ã ãªãã¨ãåºæ¥ã¾ãã
ã¾ããRakefileã«æ¬¡ã®ããã«æ¸ãã¦ããã¾ãã
require "rubygems" require "rtask" RTask.new
ããããã¨ã
% rake -T rake clean # Remove any temporary products. rake clobber # Remove any generated file. rake clobber_rdoc # Remove rdoc products rake gem # Create the gem package rake publish # Upload API documentation rake rdoc # Build the rdoc HTML Files rake release # Release new gem version rake rerdoc # Force a rebuild of the RDOC files rake tgz # Create the tgz package
ã®ããã« task ã追å ããã¾ãããªãªã¼ã¹ã®æé 㯠rake gem tgz ã®æ¬¡ã« rake release ããã ãã§ãããã¯å ç¨ã¨ã»ã¨ãã©å¤ããã¾ããããã ããRakeçã§ã¯APIããã¥ã¡ã³ããä½æããã®ãç°¡åã§ãã
% rake rdoc
ã¨ããã¨ãhtmlã¨ãããã£ã¬ã¯ããªãä½æãããã¾ã
% rake publish
ã¨ããã¨ãããã¸ã§ã¯ãã®ãã¼ã ã«APIããã¥ã¡ã³ããã¢ãããã¼ããã¾ãããããªãããã¥ã¡ã³ãã®å ¬éã¾ã§ç°¡åã§ãã以ä¸ã§ããä½ããä½ã¾ã§ç°¡åã§ããï¼
ã¡ãªã¿ã«
RTask 㯠Release Task ã縮ãããã®ã§ããæåã¯ãã®ã¾ã¾ReleaseTasksã¨ãããååã«ããããã¨æã£ããã§ãããã©ãããããããã¼ã«ã欲ãã人ã¯é¢åããããå±ããã«éããªãããä¸æåã§ãçãæ¹ãè¯ãã ããã¨æã£ã¦RTaskã«ãªãã¾ãããgemããã±ã¼ã¸ã®ã¢ãããã¼ããé¢åãªäººã¯æ¯é使ã£ã¦ã¿ã¦ä¸ãããã¾ã ã¾ã èåããªãã¼ã«ãªã®ã§ç´°ããã¨ããã§ä¸åãããããã¨æãã¾ãããå°å³ã«æ¹è¯ãã¦è¡ãäºå®ã§ãã®ã§ããªã«ã¨ãããããã