spree_cmd 1.2.0.rc1 → 1.2.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/spree_cmd.rb CHANGED
@@ -4,16 +4,17 @@ require 'thor/group'
4
4
  module SpreeCmd
5
5
  class Command
6
6
 
7
- if ARGV.first == 'version'
8
- puts Gem.loaded_specs['spree_cmd'].version
9
- elsif ARGV.first == 'extension'
10
- ARGV.shift
11
- require 'spree_cmd/extension'
12
- SpreeCmd::Extension.start
13
- else
14
- ARGV.shift
15
- require 'spree_cmd/installer'
16
- SpreeCmd::Installer.start
7
+ case ARGV.first
8
+ when 'version' || '-v' || '--version'
9
+ puts Gem.loaded_specs['spree_cmd'].version
10
+ when 'extension'
11
+ ARGV.shift
12
+ require 'spree_cmd/extension'
13
+ SpreeCmd::Extension.start
14
+ else
15
+ ARGV.shift
16
+ require 'spree_cmd/installer'
17
+ SpreeCmd::Installer.start
17
18
  end
18
19
  end
19
- end
20
+ end
@@ -51,7 +51,7 @@ module SpreeCmd
51
51
  end
52
52
 
53
53
  def spree_version
54
- '1.2.0.rc1'
54
+ '1.2.0.rc2'
55
55
  end
56
56
 
57
57
  def use_prefix(prefix)
@@ -1,4 +1,5 @@
1
1
  require 'rbconfig'
2
+ require 'active_support/core_ext/string'
2
3
 
3
4
  module SpreeCmd
4
5
 
@@ -64,6 +65,12 @@ module SpreeCmd
64
65
  def ask_questions
65
66
  @install_default_gateways = ask_with_default('Would you like to install the default gateways?')
66
67
  @install_default_auth = ask_with_default('Would you like to install the default authentication system?')
68
+ unless @install_default_auth
69
+ @user_class = ask("What is the name of the class representing users within your application? [User]")
70
+ if @user_class.blank?
71
+ @user_class = "User"
72
+ end
73
+ end
67
74
 
68
75
  if options[:skip_install_data]
69
76
  @run_migrations = false
@@ -94,7 +101,7 @@ module SpreeCmd
94
101
  end
95
102
 
96
103
  if @install_default_auth
97
- gem :spree_auth_devise, :git => "git://github.com/radar/spree_auth_devise"
104
+ gem :spree_auth_devise, :git => "git://github.com/spree/spree_auth_devise"
98
105
  end
99
106
 
100
107
  run 'bundle install', :capture => true
@@ -106,6 +113,7 @@ module SpreeCmd
106
113
  spree_options << "--migrate=#{@run_migrations}"
107
114
  spree_options << "--seed=#{@load_seed_data}"
108
115
  spree_options << "--sample=#{@load_sample_data}"
116
+ spree_options << "--user_class=#{@user_class}"
109
117
  spree_options << "--auto_accept" if options[:auto_accept]
110
118
 
111
119
  inside @app_path do
@@ -181,10 +189,16 @@ module SpreeCmd
181
189
  end
182
190
 
183
191
  def image_magick_installed?
192
+ cmd = 'identify -version'
193
+ if RUBY_PLATFORM =~ /mswin/ #windows
194
+ cmd += " >nul"
195
+ else
196
+ cmd += " >/dev/null"
197
+ end
184
198
  # true if command executed succesfully
185
199
  # false for non zero exit status
186
200
  # nil if command execution fails
187
- system('identify -version')
201
+ system(cmd)
188
202
  end
189
203
  end
190
204
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_cmd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0.rc1
4
+ version: 1.2.0.rc2
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-09 00:00:00.000000000 Z
12
+ date: 2012-08-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -96,7 +96,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
96
  version: '0'
97
97
  segments:
98
98
  - 0
99
- hash: -3038474117322682252
99
+ hash: 3532538520875852145
100
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  none: false
102
102
  requirements: