spree_cmd 1.2.0.rc1 → 1.2.0.rc2
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/lib/spree_cmd.rb +12 -11
- data/lib/spree_cmd/extension.rb +1 -1
- data/lib/spree_cmd/installer.rb +16 -2
- metadata +3 -3
data/lib/spree_cmd.rb
CHANGED
|
@@ -4,16 +4,17 @@ require 'thor/group'
|
|
|
4
4
|
module SpreeCmd
|
|
5
5
|
class Command
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
data/lib/spree_cmd/extension.rb
CHANGED
data/lib/spree_cmd/installer.rb
CHANGED
|
@@ -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/
|
|
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(
|
|
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.
|
|
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-
|
|
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:
|
|
99
|
+
hash: 3532538520875852145
|
|
100
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
none: false
|
|
102
102
|
requirements:
|