RubyMotionのアップデートした
2.0のリリースからちょっと経ってしまいましたがアップデートしました。
いっぱいあったので、Google先生に訳してもらいました。
~$ sudo motion update Password: Connecting to the server... Downloading software update... ######################################################################## 100.0% Installing software update... Software update installed. = RubyMotion 2.0 = * Added OSX development support. Use `motion create --template=osx' to create an OSX project. Use `rake -T' inside to see the available tasks and `rake config' to see the application config variables. RubyMotion OSX apps are built for both i386 and x86_64 architectures and can support OSX v10.7 and v10.8 as deployment targets. Check out the HipByte/RubyMotionSamples repository on GitHub for sample code and the devcenter for documentation. * Added command-line plugin system, which lets developers extend the `/usr/bin/motion' command-line tool with new commands (ex. `motion foo'). Builtin commands have been extracted as plugins and 3rd-party plugins can be created inside the `~/Library/RubyMotion/command' directory. * Added a RubyMotion gem project template. Use `motion create --template=gem' to create one and check `rake -T' inside to see the available tasks. * Added project templates system (usage: `motion create --template=xxx'). RubyMotion comes with 3 templates: `ios' (default), `osx' and `gem'. 3rd-party project templates can be created inside the `~/Library/RubyMotion/template' directory. * Deprecated `require "motion/project"' in project Rakefiles. Existing iOS projects should now require `motion/project/template/ios' instead. We preserve compatibility for now but please do migrate. * Added the `motion account' command to open the license account page. * Added the `WeakRef' class to create weak references. Usage is `WeakRef.new(obj)' and follows CRuby's WeakRef stdlib class. Passed references will not be retained. Use with caution as sending a message to a WeakRef object whose reference has been prematurely collected will cause a runtime crash. The `WeakRef' class will be replaced by a no-op once the runtime is able to deal with cyclic references. * Improved the detection of file dependencies to handle absolute paths. Thanks to Clay Allsopp for the patch (pull request #82). * Improved the build system by using a separate build directory for source files that resides outside of the project (ex. gems) in order to reduce the compilation time. * Fixed a bug where a crash would happen when calling a method defined using #define_method that was contained in an extended module or in an inherited class that includes a module. * Fixed a bug where a crash would happen when trying to override the `drawMapRect:zoomScale:inContext:' method in a MKOverlayView subclass. * Improve `rake spec' to display an error message if there are no spec files in the `spec' project directory. * Fixed a bug where trying to set a constant inside another constant that is not a Module object would not raise an exception (ex. `A=42; A::B=42'). * Fixed a bug where Module#include? would not be raising an exception if the receiver was not a Module object. * Fixed a bug where `return' on a yielded block that used `ensure' would not work. * Fixed a bug where `catch' and `throw' would not work on an iOS device. * Fixed a bug where a crash would happen when using a variadic method from the Cocos2D framework. * Fixed a bug where a memory leak would happen when creating an object and passing an arbitrary expression to the initializer method. * Fixed a bug in build system where a "stack level too deep" exception could happen. * Fixed a bug when detecting file dependencies where classes or modules defined using the `XXX::YYY' syntax could not be properly parsed. * Fixed a limitation in Struct where creating a struct with more than 10 fields was not possible. We moved the limit to 100 fields. * Fixed a limitation in the dispatcher where dynamically sending a message or yielding a block with more than 10 arguments was not possible. We moved the limit to 100 arguments. * Fixed a bug in the REPL where it would get corrupted when receiving too much input from the evaluator (ex. when using auto-completion). * Fixed a bug where a compilation error would happen when parsing a BridgeSupport structure that included a very large field. * Improved the `motion ri' command to honor the $PAGER environment variable. * Improved the `app.vendor_project' method to honor the :bridgesupport_cflags and :bridgesupport_exceptions options, which will be appropriately passed to the BridgeSupport generator. Thanks to Juan Karam for the patch. * RubyMotion is one year old! Thanks all for your support. |\ _,,,---,,_ /,`.-'`' -. ;-;;,_ |,4- ) )-,_..;\ ( `'-' '---''(_/--' `-'\_) (See the `/Library/RubyMotion/NEWS' file for all changes.) ~$
上記の雑な日本語訳
- OSX開発のサポートを追加しました。
motion create --template=osxでOSXのプロジェクトを生成します。
内部の利用可能なタスクを表示するには、 `rake-T 'を使用して、アプリケーションのconfig変数を参照するには、 `rake config 'をしようする。 RubyMotion OSXのアプリはi386とx86_64の両方のアーキテクチャで構築され、OSX v10.7とv10.8をデプロイメント対象としてサポートしています。
githubのHipByte / RubyMotionSamplesにサンプルコードとdevcenterためのドキュメントがリポジトリにあがっています、チェックを。
- 開発者が 新しいコマンドを使用して、コマンドラインツール(例:`motion foo')の拡張を許容するコマンドラインプラグインシステムを追加。
組み込みコマンドは、プラグインとして抽出され、サードパーティのプラグインは`~/Library/RubyMotion/command'ディレクトリ内に作成される。
- RubyMotion gem project templateを追加しました。
`motion create --template=gem'コマンドを使用することでプロジェクトを生成でき、利用可能なタスクを表示するには、 `rake-T 'コマンドで確認してください。-プロジェクトテンプレートシステムを追加(使用法:`motion create --template=xxx')
RubyMotionは3テンプレートが付属しています。:`IOS '(デフォルト)、` OSX'と `gem 'です。
サードパーティのプロジェクトテンプレートは、内部で作成することができます。 `~/Library/RubyMotion/template'ディレクトリ。
既存のiOSプロジェクトは代わりに require`motion/project/template/ios 'する必要があります。
我々今の互換性を維持するが、移行はしないでください。
- ライセンスアカウントのページを開く、 `moiton account 'コマンドを追加しました。
- 弱参照を作成する、 `WeakRef 'クラスを追加しました。
使用方法は
WeakRef.new(obj) 'とCRubyのWeakRef stdlibクラスを追加する。
渡された参照は保持されません。
参照を早まって受け取ったWeakRefオブジェクトへメッセージを送信するときランタイムクラッシュを引き起こすので慎重に使用して下さい。
`WeakRef 'クラスは無操作に置き換えられると、一度ランタイムが循環参照に対処することができます。
- 絶対パスを処理するファイルの依存関係の検出を改善しました。
Clay Allsoppのパッチのおかげ(pull request#82)。
- プロジェクトの外側に存在するソース(例えば gems)ごとに別々のビルドディレクトリを使用するときのコンパイル時間の短縮。
- 拡張モジュールまたはモジュールを含む継承クラスが含まれているメソッドを定義し、呼んだ際にクラッシュしてしまうバグを修正。
- MKOverlayViewのサブクラスで `drawMapRect:zoomScale:inContext:`メソッドをoverride使用としたときにクラッシュするバグを修正。
- プロジェクトディレクトリにspecディレクトリが存在しない場合に`rake spec`コマンド時にエラーメッセージを表示。
- 定数内に別のモジュールオブジェクトでない定数をセット使用としたときに、が例外を投げないバグを修正(例. `A=42; A::B=42')。
- Module#includeがレシーバがモジュールオブジェクトではない時に例外を投げないバグを修正しました。
- ensureを使ったブロックに書いてあるreturnが働かなかったバグを修正
- `catch 'と`throw'がiOSデバイス上で動作しないバグを修正しました。
- Cocos2D frameworkから可変個引数のメソッドを使用する場合にクラッシュが起こるバグを修正
- オブジェクトを作成するときや初期化メソッドに任意の式を渡す際にメモリリークが起こるバグを修正。
- "stack level too deep"例外が発生していたバグを修正
- `XXX :: YYY 'の構文で定義したクラスyモジュールのファイルの依存関係を検出したときに適切にパース出来ないバグを修正。
- 10以上のフィールドで作成される構造体の生成の制限を修正しました。制限を100にしました。
- 動的なメッセージ送信や10以上の引数をとるblockの生成の際のdispatcherの制限問題を修正。100に修正。
- REPL使用時、評価者からあまりに多くの入力を受信したときに破損してしまうバグを修正(例. 自動補完使用時)。
- 非常に大規模なフィールドが含まれていたBridgeSupport構造を解析するときにコンパイルエラーが発生するバグを修正しました
- $PAGER環境変数をより評価するために `motion ri 'コマンドを改善しました。
- `app.vendor_project 'メソッド
BridgeSupport generatorに適切に渡される:bridgesupport_cflagsや:bridgesupport_exceptionsのオプション,が評価されるように改善。
Juan Karamのpatchに感謝します。
- RubyMotionは1歳です!あなたのサポートすべてに感謝します。
以下、RubyMotion2.0が発表されたあとの公式ブログの雑な日本語訳
RubyMotionは2.0になり、OS Xのサポート、テンプレートとプラグインの機能を得ました。
我々はRubyMotionを立ち上げて以来、ちょうど1年となります。
これは正しいですが、RubyMotionは1歳です!
私たちは、今年我々の最愛のユーザーによって報告された無数のバグを修正して35のソフトウェアアップデートをした。それは、月平均で約3回のアップデートだ!
我々は静的ライブラリを作成、(シミュレータとデバイスの両方での)デバッグサポート、APIリファレンスドキュメントブラウザ、ファイルの依存関係の自動解決、などの重要な機能を出荷しました。また、Appleの発表後、iOS 6.0と新しいiPhone 5アーキテクチャのサポートをリリースしました。
我々はRubyMotionコミュニティがそんなに速く成長すると予期していなかった。わずか1年で、我々は徹底的なラッパー群、プロのスクリーンキャスト、2冊の本を得て、私たちのカンファレンスを開催した!
我々は今、他のプラットフォームをターゲットにする、本質的にツールチェーンの上に新しい革新的な機能を導入するだけでなく、私たちのロードマップの第二段階へと集中する時期だと考えています。
今日、我々は最初2.xリリースします。我々はまだ我々のロードマップをクリアするには、道路のかなりのビットを持っているが、我々は正しい道であると信じています。
OS Xのサポート
RubyMotionは現在のMacのアプリケーション開発を支援している。あなたが既に知っている同じツールチェインを使用してOS Xのアプリを作成することができます。
私たちは、OS Xアプリケーション開発のために、静的コンパイラ、コマンドラインインターフェイスと対話型シェルを(REPL)移植しました!
RubyMotion OS Xアプリケーションが静的にIntelの32ビットおよび64ビットアーキテクチャにコンパイルされ、私たちのカスタムARC-風のメモリ管理システム、重量未満2メガバイトを含め、任意のサードパーティ製の依存関係を実行する必要はありません。
ビルドシステムは、デプロイメント·ターゲットとしてOS X v10.7およびv10.8をサポートしており、配布用アーカイブrakeタスクが含まれています。サードパーティのプロジェクトが新しいmotion-cocoapods gemを使って提供することができます。
我々の開発センターのドキュメントはOS X用にアップデートされました。
また、サンプル·コードのリポジトリもいくつか追加しましたのでチェックアウトしてみて下さい!
我々はあまりにもいくつかを貢献すること自由に感じて、すぐにより多くのサンプルを追加していく予定です。
最後に、我々はまた、Bubblewrap、teacup、Joyboxなどの人気RubyMotionライブラリはOS Xに移植されていることを報告させていただきます。
他のライブラリも徐々に、この新しいプラットフォームに移植されることを願っています。
ご存知かもしれませんが、RubyMotionはMacRubyの、我々はアップルで、2006年に開始したMac用のRubyの実装の改良版です。
我々は一年前RubyMotionを立ち上げたときにMacRubyの愛好家の多くは、私たちを支持し、RubyMotion OS Xサポートは、1日目以来、年間一貫した機能を要求されています。
今日、OS XのサポートはすべてRubyMotionユーザに、無料でリリースされます。これは、あなたのサポートへの感謝のしるしとして君たちへの私たちの誕生日の贈り物です!
プロジェクトテンプレート
RubyMotionは現在、新しいプロジェクトを作成するときにユーザーがコマンドを作成する動きのテンプレートの引数に値を渡すことで、テンプレートを選択したように機能を公開します。
それぞれRubyMotion iOSの、OS XまたはRubyGemプロジェクトを作成しますIOS(デフォルト)、OSXとgem、:RubyMotionは3組み込みテンプレートが付属しています。
たとえば、Helloという名前の新しいOS Xプロジェクトを作成するには:
$ motion create --template=osx Hello Create Hello Create Hello/app/app_delegate.rb Create Hello/app/menu.rb Create Hello/Rakefile Create Hello/resources/Credits.rtf Create Hello/spec/main_spec.rb 3rd-party templates can also be installed into the ~/Library/RubyMotion/template directory.
私たちは、特定の統合コードを含む豊かなプロジェクトテンプレートを提供するために、システムを利用するために特定のRubyMotion宝石を期待しています例として、Joyboxチームがゲームskelettonを含むテンプレートを作ることを検討している。
コマンドラインプラグイン
同様に、テンプレートシステムに、RubyMotionは現在のプラグインを使用して、モーションコマンドラインツールに新しいコマンドを追加する方法を公開します。
このような作成、更新、サポート、里などの組み込みコマンドは、プラグインとして抽出された。サードパーティのコマンドも~/Library/ RubyMotion/commandディレクトリにインストールすることができます。
RubyMotion gemは例えばカスタムコードジェネレータのように、自信のアクションにモーションコマンドを拡張することができます。
共通のビルドディレクトリ
ビルドシステムは、外部のプロジェクトファイル(例えばgems)をコンパイルするときに、共通のビルドディレクトリを使用するように改善されました。
このことは、毎回のプロジェクト構成の変更、または複数のRubyMotionプロジェクトが同じgemを使用しているたびに再コンパイルされないので、ビルド時間の短縮になります。
弱参照
RubyMotionはここに、ユーザーが弱参照を作成できる方法を公開します。便宜上の理由から、我々はまた、標準のRubyライブラリに存在するWeakRefクラスを実装しました。
弱参照は、循環参照を防ぐために使用することができる。良い例は、デリゲートパターンを実施しています。
class MyController def initialize(delegate) @delegate = WeakRef.new(delegate) end def do_something # ... @delegate.did_something end end
オブジェクトが保持されていないWeakRef.newに渡され、WeakRefオブジェクトに送信されるすべてのメッセージは、渡されたオブジェクトに転送されます。
パフォーマンス上の理由から、WeakRefオブジェクトは、メソッドディスパッチャによって早期に認識される。 RubyMotionでWeakRefクラスはサブクラス化することはできません。
RubyMotionのメモリ管理システムは、将来的に循環参照に対処できることを期待する。このケースでは、WeakRefクラスは無操作に置き換えられます。
OSXサポートしたので、OSXのHelloプロジェクトをビルドしてみた。