Sha256: 9bf0e74358ab30cd5fba1be332141dfafff9ead8bcb3da2c5293ff6fc0e2198c
Contents?: true
Size: 872 Bytes
Versions: 1
Compression:
Stored size: 872 Bytes
Contents
module Install module Draper def self.included(thor) thor.class_eval do desc 'add_draper_gem', 'Add draper gem to Gemfile and run bundler' def add_draper_gem insert_into_file 'Gemfile', after: "gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]\n" do <<-CODE gem 'draper' CODE end run 'bundle install' end desc 'create_draper_application_decorator', 'Generate draper application decorator' def create_draper_application_decorator copy_file 'rails/app/decorators/application_decorator.rb', 'app/decorators/application_decorator.rb' end desc 'setup_draper', 'Install draper gem' def setup_draper add_draper_gem create_draper_application_decorator end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
myrails-7.0.0 | lib/myrails/modules/draper.rb |