lib/rails/generators/ripple_generator.rb in ripple-0.8.2 vs lib/rails/generators/ripple_generator.rb in ripple-0.8.3
- old
+ new
@@ -12,15 +12,29 @@
# See the License for the specific language governing permissions and
# limitations under the License.
require "rails/generators/named_base"
require "rails/generators/active_model"
+class RippleGenerator < ::Rails::Generators::Base
+ def create_ripple
+ invoke "ripple:configuration"
+ invoke "ripple:js"
+ invoke "ripple:test"
+ end
+end
+
module Ripple
# ActiveModel generators for use in a Rails project.
module Generators
# @private
- class Base < ::Rails::Generators::NamedBase
+ class Base < ::Rails::Generators::Base
+ def self.source_root
+ @_ripple_source_root ||=
+ File.expand_path("../#{base_name}/#{generator_name}/templates", __FILE__)
+ end
+ end
+ class NamedBase < ::Rails::Generators::NamedBase
def self.source_root
@_ripple_source_root ||=
File.expand_path("../#{base_name}/#{generator_name}/templates", __FILE__)
end
end