spree_cmd 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/spree +7 -2
- data/lib/spree_cmd/version.rb +1 -1
- metadata +3 -3
data/bin/spree
CHANGED
@@ -9,7 +9,7 @@ module SpreeCmd
|
|
9
9
|
|
10
10
|
desc "Creates a new rails project with a spree store"
|
11
11
|
argument :new_or_install, :desc => 'new project_name or install existing_project'
|
12
|
-
argument :app_path, :type => :string, :desc => 'rails app_path'
|
12
|
+
argument :app_path, :type => :string, :desc => 'rails app_path', :default => '.'
|
13
13
|
|
14
14
|
class_option :auto_accept, :type => :boolean, :aliases => '-A', :desc => "Answer yes to all prompts"
|
15
15
|
|
@@ -30,6 +30,11 @@ module SpreeCmd
|
|
30
30
|
else
|
31
31
|
@spree_gem_options = {}
|
32
32
|
end
|
33
|
+
|
34
|
+
if @new_or_install == 'new' && @app_path == '.'
|
35
|
+
say "ERROR: Must provide store name when using new"
|
36
|
+
exit(1)
|
37
|
+
end
|
33
38
|
end
|
34
39
|
|
35
40
|
def ask_questions
|
@@ -115,7 +120,7 @@ module SpreeCmd
|
|
115
120
|
|
116
121
|
valid = false
|
117
122
|
until valid
|
118
|
-
response = ask "#{message} (
|
123
|
+
response = ask "#{message} (yes/no) [#{default}]"
|
119
124
|
response = default if response.empty?
|
120
125
|
valid = (response =~ /\Ay(?:es)?|no?\Z/i)
|
121
126
|
end
|
data/lib/spree_cmd/version.rb
CHANGED
metadata
CHANGED