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.
Files changed (3) hide show
  1. data/bin/spree +7 -2
  2. data/lib/spree_cmd/version.rb +1 -1
  3. 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} (y/n) [#{default}]"
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
@@ -1,3 +1,3 @@
1
1
  module SpreeCmd
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_cmd
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chris Mar