Class: HappySeed::Cli

Inherits:
Thor
  • Object
show all
Defined in:
lib/happy_seed/cli.rb

Instance Method Summary collapse

Instance Method Details

#engine(*args) ⇒ Object



24
25
26
27
28
# File 'lib/happy_seed/cli.rb', line 24

def engine( *args )
  require 'generators/happy_seed/plugin/plugin_generator'
  ARGV << "--mountable"
  HappySeed::Generators::PluginGenerator.start
end

#plugin(*args) ⇒ Object



18
19
20
21
# File 'lib/happy_seed/cli.rb', line 18

def plugin( *args )
  require 'generators/happy_seed/plugin/plugin_generator'
  HappySeed::Generators::PluginGenerator.start
end

#rails(*args) ⇒ Object



12
13
14
15
# File 'lib/happy_seed/cli.rb', line 12

def rails( *args )
  seedrb = gem_file_path( "happy_seed.rb")
  system "rails new -m #{seedrb} #{args.join( " " )} --skip-turbolinks --skip-test-unit"
end

#referenceObject



43
44
45
# File 'lib/happy_seed/cli.rb', line 43

def reference    
  puts File.read( File.expand_path( "../../happy_seed.txt", File.dirname( __FILE__ ) ) )   
end

#static(name) ⇒ Object



31
32
33
34
# File 'lib/happy_seed/cli.rb', line 31

def static( name )
  require 'generators/happy_seed/static/static_generator'
  HappySeed::Generators::StaticGenerator.start
end

#static_blog(name) ⇒ Object



37
38
39
40
# File 'lib/happy_seed/cli.rb', line 37

def static_blog( name )
  require 'generators/happy_seed/static_blog/static_blog_generator'
  HappySeed::Generators::StaticBlogGenerator.start
end

#versionObject



7
8
9
# File 'lib/happy_seed/cli.rb', line 7

def version
  puts "You are running seed version #{HappySeed::VERSION}"
end