spree_core 0.70.1 → 0.70.2
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/admin/products_controller.rb +1 -1
- data/app/helpers/admin/product_groups_helper.rb +1 -1
- data/app/models/product_scope.rb +1 -1
- data/app/views/admin/product_groups/_product_scope.html.erb +1 -1
- data/app/views/admin/product_groups/edit.html.erb +2 -2
- data/lib/generators/spree/dummy/dummy_generator.rb +2 -1
- data/lib/generators/spree/site/site_generator.rb +7 -1
- data/lib/scopes.rb +1 -1
- data/lib/scopes/product.rb +1 -1
- data/lib/spree_core/railtie.rb +1 -1
- data/lib/spree_core/testing_support/common_rake.rb +10 -4
- data/lib/spree_core/version.rb +1 -1
- metadata +77 -69
@@ -4,7 +4,7 @@ module Admin::ProductGroupsHelper
|
|
4
4
|
def product_scope_field(product_scope, i)
|
5
5
|
value = (product_scope.arguments || [])[i]
|
6
6
|
name = "product_group[product_scopes_attributes][][arguments][]"
|
7
|
-
helper_method_for_scope = Scopes::Product::ATTRIBUTE_HELPER_METHODS[product_scope.name.to_sym] || :text_field_tag
|
7
|
+
helper_method_for_scope = ::Scopes::Product::ATTRIBUTE_HELPER_METHODS[product_scope.name.to_sym] || :text_field_tag
|
8
8
|
send(helper_method_for_scope, name, value)
|
9
9
|
end
|
10
10
|
|
data/app/models/product_scope.rb
CHANGED
@@ -41,7 +41,7 @@ class ProductScope < ActiveRecord::Base
|
|
41
41
|
|
42
42
|
before_validation(:on => :create) {
|
43
43
|
# Add default empty arguments so scope validates and errors aren't caused when previewing it
|
44
|
-
if name && args = Scopes::Product.arguments_for_scope_name(name)
|
44
|
+
if name && args = ::Scopes::Product.arguments_for_scope_name(name)
|
45
45
|
self.arguments ||= ['']*args.length
|
46
46
|
end
|
47
47
|
}
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<% end %>
|
7
7
|
</td>
|
8
8
|
<td data-hook="arguments">
|
9
|
-
<% if arguments = Scopes::Product.arguments_for_scope_name(product_scope.name.strip) %>
|
9
|
+
<% if arguments = ::Scopes::Product.arguments_for_scope_name(product_scope.name.strip) %>
|
10
10
|
<table><tr>
|
11
11
|
<% arguments.each_with_index do |argument, i| %>
|
12
12
|
<td>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
<%= f.field_container :order_scope do %>
|
16
16
|
<%= f.label :order_scope, t(:sort_ordering) %><br />
|
17
|
-
<%= f.select(:order_scope, Scopes::Product::ORDERING.collect{|p| [ t(:name, :scope =>[:product_scopes, :scopes, p]), p.to_s ] }) %>
|
17
|
+
<%= f.select(:order_scope, ::Scopes::Product::ORDERING.collect{|p| [ t(:name, :scope =>[:product_scopes, :scopes, p]), p.to_s ] }) %>
|
18
18
|
<% end %>
|
19
19
|
|
20
20
|
<table id="product_scopes" data-hook>
|
@@ -29,7 +29,7 @@
|
|
29
29
|
<%
|
30
30
|
options =
|
31
31
|
grouped_options_for_select(
|
32
|
-
Scopes::Product::SCOPES.map do |group_name, scopes|
|
32
|
+
::Scopes::Product::SCOPES.map do |group_name, scopes|
|
33
33
|
[
|
34
34
|
t(:name, :scope => [:product_scopes, :groups, group_name]),
|
35
35
|
scopes.keys.map do |scope_name|
|
@@ -28,6 +28,7 @@ module Spree
|
|
28
28
|
opts[:skip_bundle] = true
|
29
29
|
opts[:old_style_hash] = true
|
30
30
|
|
31
|
+
puts "Generating dummy Rails application..."
|
31
32
|
invoke Rails::Generators::AppGenerator,
|
32
33
|
[ File.expand_path(dummy_path, destination_root) ], opts
|
33
34
|
end
|
@@ -90,7 +91,7 @@ module Spree
|
|
90
91
|
end
|
91
92
|
|
92
93
|
def remove_directory_if_exists(path)
|
93
|
-
|
94
|
+
remove_dir(path) if File.directory?(path)
|
94
95
|
end
|
95
96
|
|
96
97
|
def gemfile_path
|
@@ -90,7 +90,13 @@ SpreeAuth::Engine.load_seed if defined?(SpreeAuth)
|
|
90
90
|
end
|
91
91
|
|
92
92
|
def install_migrations
|
93
|
-
|
93
|
+
puts "Copying migrations..."
|
94
|
+
cmd = 'bundle exec rake railties:install:migrations'
|
95
|
+
silence_stream(STDOUT) do
|
96
|
+
silence_warnings do
|
97
|
+
run cmd
|
98
|
+
end
|
99
|
+
end
|
94
100
|
end
|
95
101
|
|
96
102
|
end
|
data/lib/scopes.rb
CHANGED
data/lib/scopes/product.rb
CHANGED
data/lib/spree_core/railtie.rb
CHANGED
@@ -56,7 +56,7 @@ module SpreeCore
|
|
56
56
|
|
57
57
|
# sets the manifests / assets to be precompiled
|
58
58
|
initializer "spree.assets.precompile" do |app|
|
59
|
-
app.config.assets.precompile += ['store/all.*', 'admin/all.*', 'admin/spree_dash.*', 'admin/orders/edit_form.js', 'jqPlot/excanvas.min.js', 'admin/images/new.js']
|
59
|
+
app.config.assets.precompile += ['store/all.*', 'admin/all.*', 'admin/spree_dash.*', 'admin/orders/edit_form.js', 'jqPlot/excanvas.min.js', 'admin/images/new.js', 'jquery.jstree/themes/apple/*']
|
60
60
|
end
|
61
61
|
|
62
62
|
# turn off asset debugging since that kills performance in development mode
|
@@ -3,10 +3,16 @@ namespace :common do
|
|
3
3
|
task :test_app do
|
4
4
|
require "#{ENV['LIB_NAME']}"
|
5
5
|
|
6
|
-
Spree::DummyGenerator.start ["--lib_name=#{ENV['LIB_NAME']}", "--database=#{ENV['DB_NAME']}"]
|
7
|
-
Spree::SiteGenerator.start ["--lib_name=#{ENV['LIB_NAME']}"]
|
8
|
-
|
6
|
+
Spree::DummyGenerator.start ["--lib_name=#{ENV['LIB_NAME']}", "--database=#{ENV['DB_NAME']}", "--quiet"]
|
7
|
+
Spree::SiteGenerator.start ["--lib_name=#{ENV['LIB_NAME']}", "--quiet"]
|
8
|
+
puts "Setting up dummy database..."
|
9
9
|
cmd = "bundle exec rake db:drop db:create db:migrate db:seed RAILS_ENV=test AUTO_ACCEPT=true"
|
10
|
-
|
10
|
+
if RUBY_PLATFORM =~ /mswin/ #windows
|
11
|
+
cmd += " >nul"
|
12
|
+
else
|
13
|
+
cmd += " >/dev/null"
|
14
|
+
end
|
15
|
+
|
16
|
+
system(cmd)
|
11
17
|
end
|
12
18
|
end
|
data/lib/spree_core/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 259
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 70
|
9
|
-
-
|
10
|
-
version: 0.70.
|
9
|
+
- 2
|
10
|
+
version: 0.70.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sean Schofield
|
@@ -15,10 +15,12 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-11-18 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
|
-
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
22
24
|
none: false
|
23
25
|
requirements:
|
24
26
|
- - "="
|
@@ -29,12 +31,12 @@ dependencies:
|
|
29
31
|
- 1
|
30
32
|
- 4
|
31
33
|
version: 0.1.4
|
32
|
-
|
33
|
-
type: :runtime
|
34
|
-
prerelease: false
|
34
|
+
version_requirements: *id001
|
35
35
|
name: acts_as_list
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
|
-
|
37
|
+
type: :runtime
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
40
|
none: false
|
39
41
|
requirements:
|
40
42
|
- - "="
|
@@ -45,12 +47,12 @@ dependencies:
|
|
45
47
|
- 6
|
46
48
|
- 8
|
47
49
|
version: 1.6.8
|
48
|
-
|
49
|
-
type: :runtime
|
50
|
-
prerelease: false
|
50
|
+
version_requirements: *id002
|
51
51
|
name: nested_set
|
52
52
|
- !ruby/object:Gem::Dependency
|
53
|
-
|
53
|
+
type: :runtime
|
54
|
+
prerelease: false
|
55
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
54
56
|
none: false
|
55
57
|
requirements:
|
56
58
|
- - "="
|
@@ -61,12 +63,12 @@ dependencies:
|
|
61
63
|
- 1
|
62
64
|
- 1
|
63
65
|
version: 0.1.1
|
64
|
-
|
65
|
-
type: :runtime
|
66
|
-
prerelease: false
|
66
|
+
version_requirements: *id003
|
67
67
|
name: rd_find_by_param
|
68
68
|
- !ruby/object:Gem::Dependency
|
69
|
-
|
69
|
+
type: :runtime
|
70
|
+
prerelease: false
|
71
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
70
72
|
none: false
|
71
73
|
requirements:
|
72
74
|
- - ">="
|
@@ -77,28 +79,28 @@ dependencies:
|
|
77
79
|
- 0
|
78
80
|
- 14
|
79
81
|
version: 1.0.14
|
80
|
-
|
81
|
-
type: :runtime
|
82
|
-
prerelease: false
|
82
|
+
version_requirements: *id004
|
83
83
|
name: jquery-rails
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
|
-
|
85
|
+
type: :runtime
|
86
|
+
prerelease: false
|
87
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
86
88
|
none: false
|
87
89
|
requirements:
|
88
90
|
- - "="
|
89
91
|
- !ruby/object:Gem::Version
|
90
|
-
hash:
|
92
|
+
hash: 11
|
91
93
|
segments:
|
92
94
|
- 1
|
93
|
-
-
|
94
|
-
-
|
95
|
-
version: 1.
|
96
|
-
|
97
|
-
type: :runtime
|
98
|
-
prerelease: false
|
95
|
+
- 6
|
96
|
+
- 2
|
97
|
+
version: 1.6.2
|
98
|
+
version_requirements: *id005
|
99
99
|
name: highline
|
100
100
|
- !ruby/object:Gem::Dependency
|
101
|
-
|
101
|
+
type: :runtime
|
102
|
+
prerelease: false
|
103
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
102
104
|
none: false
|
103
105
|
requirements:
|
104
106
|
- - "="
|
@@ -109,12 +111,12 @@ dependencies:
|
|
109
111
|
- 0
|
110
112
|
- 3
|
111
113
|
version: 1.0.3
|
112
|
-
|
113
|
-
type: :runtime
|
114
|
-
prerelease: false
|
114
|
+
version_requirements: *id006
|
115
115
|
name: stringex
|
116
116
|
- !ruby/object:Gem::Dependency
|
117
|
-
|
117
|
+
type: :runtime
|
118
|
+
prerelease: false
|
119
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
118
120
|
none: false
|
119
121
|
requirements:
|
120
122
|
- - "="
|
@@ -125,12 +127,12 @@ dependencies:
|
|
125
127
|
- 0
|
126
128
|
- 1
|
127
129
|
version: 1.0.1
|
128
|
-
|
129
|
-
type: :runtime
|
130
|
-
prerelease: false
|
130
|
+
version_requirements: *id007
|
131
131
|
name: state_machine
|
132
132
|
- !ruby/object:Gem::Dependency
|
133
|
-
|
133
|
+
type: :runtime
|
134
|
+
prerelease: false
|
135
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
134
136
|
none: false
|
135
137
|
requirements:
|
136
138
|
- - "="
|
@@ -141,12 +143,12 @@ dependencies:
|
|
141
143
|
- 0
|
142
144
|
- 0
|
143
145
|
version: 1.0.0
|
144
|
-
|
145
|
-
type: :runtime
|
146
|
-
prerelease: false
|
146
|
+
version_requirements: *id008
|
147
147
|
name: faker
|
148
148
|
- !ruby/object:Gem::Dependency
|
149
|
-
|
149
|
+
type: :runtime
|
150
|
+
prerelease: false
|
151
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
150
152
|
none: false
|
151
153
|
requirements:
|
152
154
|
- - "="
|
@@ -157,12 +159,12 @@ dependencies:
|
|
157
159
|
- 4
|
158
160
|
- 1
|
159
161
|
version: 2.4.1
|
160
|
-
|
161
|
-
type: :runtime
|
162
|
-
prerelease: false
|
162
|
+
version_requirements: *id009
|
163
163
|
name: paperclip
|
164
164
|
- !ruby/object:Gem::Dependency
|
165
|
-
|
165
|
+
type: :runtime
|
166
|
+
prerelease: false
|
167
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
166
168
|
none: false
|
167
169
|
requirements:
|
168
170
|
- - ">="
|
@@ -171,12 +173,12 @@ dependencies:
|
|
171
173
|
segments:
|
172
174
|
- 0
|
173
175
|
version: "0"
|
174
|
-
|
175
|
-
type: :runtime
|
176
|
-
prerelease: false
|
176
|
+
version_requirements: *id010
|
177
177
|
name: rd_resource_controller
|
178
178
|
- !ruby/object:Gem::Dependency
|
179
|
-
|
179
|
+
type: :runtime
|
180
|
+
prerelease: false
|
181
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
180
182
|
none: false
|
181
183
|
requirements:
|
182
184
|
- - "="
|
@@ -187,12 +189,12 @@ dependencies:
|
|
187
189
|
- 1
|
188
190
|
- 1
|
189
191
|
version: 1.1.1
|
190
|
-
|
191
|
-
type: :runtime
|
192
|
-
prerelease: false
|
192
|
+
version_requirements: *id011
|
193
193
|
name: meta_search
|
194
194
|
- !ruby/object:Gem::Dependency
|
195
|
-
|
195
|
+
type: :runtime
|
196
|
+
prerelease: false
|
197
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
196
198
|
none: false
|
197
199
|
requirements:
|
198
200
|
- - "="
|
@@ -203,15 +205,15 @@ dependencies:
|
|
203
205
|
- 17
|
204
206
|
- 0
|
205
207
|
version: 1.17.0
|
206
|
-
|
207
|
-
type: :runtime
|
208
|
-
prerelease: false
|
208
|
+
version_requirements: *id012
|
209
209
|
name: activemerchant
|
210
210
|
- !ruby/object:Gem::Dependency
|
211
|
-
|
211
|
+
type: :runtime
|
212
|
+
prerelease: false
|
213
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
212
214
|
none: false
|
213
215
|
requirements:
|
214
|
-
- - "
|
216
|
+
- - ">="
|
215
217
|
- !ruby/object:Gem::Version
|
216
218
|
hash: 1
|
217
219
|
segments:
|
@@ -219,12 +221,20 @@ dependencies:
|
|
219
221
|
- 1
|
220
222
|
- 1
|
221
223
|
version: 3.1.1
|
222
|
-
|
223
|
-
|
224
|
-
|
224
|
+
- - <=
|
225
|
+
- !ruby/object:Gem::Version
|
226
|
+
hash: 7
|
227
|
+
segments:
|
228
|
+
- 3
|
229
|
+
- 1
|
230
|
+
- 2
|
231
|
+
version: 3.1.2
|
232
|
+
version_requirements: *id013
|
225
233
|
name: rails
|
226
234
|
- !ruby/object:Gem::Dependency
|
227
|
-
|
235
|
+
type: :runtime
|
236
|
+
prerelease: false
|
237
|
+
requirement: &id014 !ruby/object:Gem::Requirement
|
228
238
|
none: false
|
229
239
|
requirements:
|
230
240
|
- - ">="
|
@@ -235,12 +245,12 @@ dependencies:
|
|
235
245
|
- 12
|
236
246
|
- 4
|
237
247
|
version: 0.12.4
|
238
|
-
|
239
|
-
type: :runtime
|
240
|
-
prerelease: false
|
248
|
+
version_requirements: *id014
|
241
249
|
name: kaminari
|
242
250
|
- !ruby/object:Gem::Dependency
|
243
|
-
|
251
|
+
type: :runtime
|
252
|
+
prerelease: false
|
253
|
+
requirement: &id015 !ruby/object:Gem::Requirement
|
244
254
|
none: false
|
245
255
|
requirements:
|
246
256
|
- - ">="
|
@@ -251,9 +261,7 @@ dependencies:
|
|
251
261
|
- 7
|
252
262
|
- 0
|
253
263
|
version: 0.7.0
|
254
|
-
|
255
|
-
type: :runtime
|
256
|
-
prerelease: false
|
264
|
+
version_requirements: *id015
|
257
265
|
name: deface
|
258
266
|
description: Required dependency for Spree
|
259
267
|
email: sean@railsdog.com
|