RubyCocoaããµã¤ã¼ã®gemã«ããã
ã ãã¶åããèãã¦ããRubyCocoaããµã¤ã¼ã®gemã«ãããã¨ã«ææ¦ãã¦ã¿ããã¢ããªç¨ã®.frameworkã¯ã¾ã æãä»ãã¦ãªããã©ãæ¡å¼µã©ã¤ãã©ãªã®ã»ãã¯`rake test`ãå ¨é¨éãã¨ãã¾ã§ããã
-ç¾ç¶ã®èª²é¡
ä»ã®RubyCocoaã¯ã»ã¨ãã©å ¨é¨ã®æ©è½ãRubyCocoa.frameworkã®ã»ãã«å ¥ã£ã¦ããã®ã§ãrubyã¹ã¯ãªãããã使ãå ´åã«ãå¿ ããã¬ã¼ã ã¯ã¼ã¯ã®é ç½®ãå¿ è¦ã«ãªãããã¬ã¼ã ã¯ã¼ã¯ã¯ç¹å®ã®ãã¼ã¸ã§ã³ã»æ§æã®librubyã«ãªã³ã¯ãã¦ãã¡ãã£ã¨ããã¹ã¯ãªããæ¸ãã¨ãããããããªãã¼ã¸ã§ã³ã§æ¤è¨¼ãããã¨ãã«ãã£ããæéããããã
ç®æ¨ã¯ãããªã¨ããã
- `gem "rubycocoa"`ã§rubycocoaã®ã¹ã¯ãªãããæ¸ããããã«ããã
- bundler/rakeãã¼ã¹ã®éçºãã§ããããã«ããã
ä½æ¥ã®æµãï¼ããã¾ã§ï¼
ã¨ããããã`bundle gem --ext`ã§æ°è¦ã«ç¨æãããã®ã«ãframework/src, test/ã®ãã¡ã¤ã«ãå ¥ãã¦è©¦ãã¦ã¿ã¦ãåé¡ãå¤æ´ç¹ãæ´ãåºãã
ãã©ãç«ã£ãã®ã§ãå®éã®ãªãã¸ããªã§ãã©ã³ãåã£ã¦ä½æ¥ã
- bundleã®çæãã¡ã¤ã«ã追å
- ã½ã¼ã¹ãã¡ã¤ã«ã移å
- æ¡å¼µã©ã¤ãã©ãªã®ã³ã³ãã¤ã«ãextconf.rbã«ãä»»ãã«
- ãã¹ãã調æ´
- minitestããtest-unitã«
- ãã¡ã¤ã«åãtest_*.rbãã*_test.rbã«å¤æ´ã(çæãããRakefileã®å½¢å¼ã«åãããï¼
- testãã£ã¬ã¯ããªã§å®è¡ãããã¨ãæ³å®ããç¸å¯¾ãã¹ã¾ããã®å¯¾å¿ã
- çµæçã«ãããªããªã£ããã¡ã¤ã«ãæ´çã
ã ããã1æ¥åããããæã£ãããç°¡åã«å¯¾å¿ã§ããå°è±¡ã
ä»å¾ã®äºå®
æ®ã£ã¦ãRubyCocoa.frameworkã¯ãNSBundleã§rubycocoa.bundleããã¼ããã¦ãdlopenããåæåé¢æ°ãå¼ã³åºãã¿ãããªæãã«ãªãäºå®ã.frameworkèªä½ã¯librubyã«ãªã³ã¯ããªãå½¢å¼ã«ãã¦ãå ´åã«ãã£ã¦ã¯è¤æ°ã®ãã¼ã¸ã§ã³ã®rubycocoa.bundleã使ãåãã§ããããã«æºåãã¦ããã