Class: Structure::Grapevine
- Inherits:
-
Thor
- Object
- Thor
- Structure::Grapevine
- Includes:
- Thor::Actions
- Defined in:
- lib/grapevine/structure/grapevine.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
8 9 10 |
# File 'lib/grapevine/structure/grapevine.rb', line 8 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#add_api_version ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/grapevine/structure/grapevine.rb', line 24 def add_api_version if Dir.exists?(information_path) version = "v#{api_version}" Dir.mkdir("#{information_path}/#{version}") template(source, destination(version), opts_with_version(version)) else p "it looks like you're not inside a grapevine project" end end |
#new(app_name) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/grapevine/structure/grapevine.rb', line 15 def new(app_name) = "new <AppName> --withdb sequel|activerecord --dbms pg|mysql2", "create a new app, --withdb is optional" p if .include?(:withdb) && withdb([:witdb]) == '' a = dbms([:dbms]) Structure::GrapevineSkeleton.start([app_name, withdb([:withdb]), dbms([:dbms])]) end |