LoginSignup
2
2

More than 5 years have passed since last update.

複数のRailsプロジェクトの共通機能をgemに書き出す

Last updated at Posted at 2014-02-16

はじめに

プロジェクト間の重複を無くしたい。
gemに切り出すのが良いと考えられる。
ただし、プロジェクトに依存しているのでRubyGemsには公開しない。

jewelerは使うのか

Jeweler: Craft the perfect RubyGem
https://github.com/technicalpickles/jeweler

なのでおそらく不要

どうやって作るのか

以下を読めば作れる。

The Basics of Creating Rails Plugins
http://guides.rubyonrails.org/plugins.html

よく使う、gemを落としてきて中を見て参考にするの効果的と思われる。

--mountablオプションは何なのか

使いやすくなった Rails 3.1 の Engine
http://d.hatena.ne.jp/passingloop/20110801/p1

たぶん、Rails Engine作るやつ

Getting Started with Engines
http://guides.rubyonrails.org/engines.html

気になったら読んで下さい。

Rspecでテストする

bundle gem sideci_api -t

で作るとrspecでテストできるtemplateが出来るらしい。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2