Class: Gemsmith::Skeletons::RailsSkeleton

Inherits:
BaseSkeleton show all
Defined in:
lib/gemsmith/skeletons/rails_skeleton.rb

Instance Method Summary collapse

Methods inherited from BaseSkeleton

#create, #initialize, #method_missing, #respond_to?, run

Constructor Details

This class inherits a constructor from Gemsmith::Skeletons::BaseSkeleton

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Gemsmith::Skeletons::BaseSkeleton

Instance Method Details

#create_engineObject



4
5
6
# File 'lib/gemsmith/skeletons/rails_skeleton.rb', line 4

def create_engine
  system "rails plugin new #{template_options.fetch :gem_name} #{engine_options}"
end

#create_generator_filesObject



8
9
10
11
12
13
14
# File 'lib/gemsmith/skeletons/rails_skeleton.rb', line 8

def create_generator_files
  empty_directory "#{generator_root}/templates"
  template "#{generator_root}/install/install_generator.rb.tt", template_options
  template "#{generator_root}/install/USAGE.tt", template_options
  template "#{generator_root}/upgrade/upgrade_generator.rb.tt", template_options
  template "#{generator_root}/upgrade/USAGE.tt", template_options
end

#create_travis_gemfilesObject



16
17
18
19
20
# File 'lib/gemsmith/skeletons/rails_skeleton.rb', line 16

def create_travis_gemfiles
  if template_options[:travis]
    template "%gem_name%/gemfiles/rails-4.1.x.gemfile.tt", template_options
  end
end