spree_core 1.0.0.rc4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/stylesheets/store/screen.css.scss +27 -4
- data/app/models/spree/calculator/{price_bucket.rb → price_sack.rb} +2 -2
- data/app/models/spree/order.rb +5 -1
- data/app/models/spree/payment.rb +9 -3
- data/app/models/spree/payment_method/check.rb +4 -0
- data/app/models/spree/payment_method.rb +4 -0
- data/app/models/spree/preference.rb +45 -14
- data/app/models/spree/preferences/preferable.rb +25 -0
- data/app/models/spree/preferences/preferable_class_methods.rb +2 -13
- data/app/models/spree/preferences/store.rb +8 -6
- data/app/models/spree/product.rb +7 -2
- data/app/models/spree/product_group.rb +3 -9
- data/app/views/spree/admin/product_groups/edit.html.erb +7 -1
- data/app/views/spree/admin/product_scopes/create.js.erb +3 -0
- data/app/views/spree/admin/variants/index.html.erb +3 -1
- data/config/initializers/check_for_orphaned_preferences.rb +6 -0
- data/config/locales/en.yml +2 -1
- data/db/migrate/20120119024710_new_preferences.rb +19 -29
- data/lib/spree/core/engine.rb +1 -1
- data/lib/spree/core/preference_rescue.rb +21 -0
- data/lib/spree/core/user_banners.rb +1 -1
- data/lib/spree/core/version.rb +1 -1
- metadata +37 -33
- data/app/views/spree/admin/product_groups/update.js.erb +0 -12
@@ -585,6 +585,7 @@ mark {background-color: $c_colored; color: white; font-style: italic; font-weigh
|
|
585
585
|
text-align: center;
|
586
586
|
border: 1px solid $c_border;
|
587
587
|
margin-top: 23px;
|
588
|
+
margin-left: 0;
|
588
589
|
|
589
590
|
h3 {
|
590
591
|
text-transform: uppercase;
|
@@ -816,13 +817,31 @@ mark {background-color: $c_colored; color: white; font-style: italic; font-weigh
|
|
816
817
|
================================================== */
|
817
818
|
|
818
819
|
/* Smaller than standard 960 (devices and browsers) */
|
819
|
-
@media only screen and (max-width: 959px) {
|
820
|
+
@media only screen and (max-width: 959px) {
|
821
|
+
|
822
|
+
}
|
820
823
|
|
821
824
|
/* Tablet Portrait size to standard 960 (devices and browsers) */
|
822
|
-
@media only screen and (min-width: 768px) and (max-width: 959px) {
|
825
|
+
@media only screen and (min-width: 768px) and (max-width: 959px) {
|
826
|
+
.container {
|
827
|
+
padding-left: 10px;
|
828
|
+
width: 758px;
|
829
|
+
}
|
830
|
+
footer#footer {
|
831
|
+
width: 748px;
|
832
|
+
}
|
833
|
+
p[data-hook="use_billing"] {
|
834
|
+
margin-top: -15px;
|
835
|
+
}
|
836
|
+
}
|
823
837
|
|
824
838
|
/* All Mobile Sizes (devices and browser) */
|
825
|
-
@media only screen and (max-width: 767px) {
|
839
|
+
@media only screen and (max-width: 767px) {
|
840
|
+
|
841
|
+
html {
|
842
|
+
-webkit-text-size-adjust: none;
|
843
|
+
}
|
844
|
+
|
826
845
|
nav#taxonomies {
|
827
846
|
text-align: center;
|
828
847
|
|
@@ -861,7 +880,11 @@ mark {background-color: $c_colored; color: white; font-style: italic; font-weigh
|
|
861
880
|
|
862
881
|
/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */
|
863
882
|
@media only screen and (min-width: 480px) and (max-width: 767px) {
|
864
|
-
|
883
|
+
|
884
|
+
footer#footer {
|
885
|
+
width: auto !important;
|
886
|
+
}
|
887
|
+
|
865
888
|
input, select {
|
866
889
|
vertical-align: baseline !important;
|
867
890
|
}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
module Spree
|
2
|
-
class Calculator::
|
2
|
+
class Calculator::PriceSack < Calculator
|
3
3
|
preference :minimal_amount, :decimal, :default => 0
|
4
4
|
preference :normal_amount, :decimal, :default => 0
|
5
5
|
preference :discount_amount, :decimal, :default => 0
|
6
6
|
|
7
7
|
def self.description
|
8
|
-
I18n.t(:
|
8
|
+
I18n.t(:price_sack)
|
9
9
|
end
|
10
10
|
|
11
11
|
# as object we always get line items, as calculable we have Coupon, ShippingMethod
|
data/app/models/spree/order.rb
CHANGED
@@ -56,7 +56,7 @@ module Spree
|
|
56
56
|
self.update_hooks.add(hook)
|
57
57
|
end
|
58
58
|
|
59
|
-
# For compatiblity with Calculator::
|
59
|
+
# For compatiblity with Calculator::PriceSack
|
60
60
|
def amount
|
61
61
|
line_items.map(&:amount).sum
|
62
62
|
end
|
@@ -128,6 +128,10 @@ module Spree
|
|
128
128
|
end
|
129
129
|
end
|
130
130
|
|
131
|
+
before_transition :to => ['delivery'] do |order|
|
132
|
+
order.shipments.each { |s| s.destroy unless s.shipping_method.available_to_order?(order) }
|
133
|
+
end
|
134
|
+
|
131
135
|
after_transition :to => 'complete', :do => :finalize!
|
132
136
|
after_transition :to => 'delivery', :do => :create_tax_charge!
|
133
137
|
after_transition :to => 'payment', :do => :create_shipment!
|
data/app/models/spree/payment.rb
CHANGED
@@ -72,9 +72,15 @@ module Spree
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def process!
|
75
|
-
if
|
76
|
-
|
77
|
-
|
75
|
+
if payment_method && payment_method.source_required?
|
76
|
+
if source
|
77
|
+
if !processing? && source.respond_to?(:process!)
|
78
|
+
started_processing!
|
79
|
+
source.process!(self) # source is responsible for updating the payment state when it's done processing
|
80
|
+
end
|
81
|
+
else
|
82
|
+
raise Core::GatewayError.new(I18n.t(:payment_processing_failed))
|
83
|
+
end
|
78
84
|
end
|
79
85
|
end
|
80
86
|
|
@@ -1,31 +1,62 @@
|
|
1
1
|
class Spree::Preference < ActiveRecord::Base
|
2
2
|
|
3
3
|
validates :key, :presence => true
|
4
|
+
validates :value, :presence => true
|
5
|
+
validates :value_type, :presence => true
|
4
6
|
|
5
|
-
|
6
|
-
self[:value] = value
|
7
|
-
self[:value_type] = value.class.name
|
8
|
-
end
|
7
|
+
scope :valid, where(Spree::Preference.arel_table[:key].not_eq(nil)).where(Spree::Preference.arel_table[:value_type].not_eq(nil))
|
9
8
|
|
9
|
+
# The type conversions here should match
|
10
|
+
# the ones in spree::preferences::preferrable#convert_preference_value
|
10
11
|
def value
|
11
|
-
|
12
|
+
if self[:value_type].present?
|
13
|
+
case self[:value_type].to_sym
|
14
|
+
when :string
|
15
|
+
self[:value].to_s
|
16
|
+
when :password
|
17
|
+
self[:value].to_s
|
18
|
+
when :decimal
|
19
|
+
BigDecimal.new(self[:value].to_s).round(2, BigDecimal::ROUND_HALF_UP)
|
20
|
+
when :integer
|
21
|
+
self[:value].to_i
|
22
|
+
when :boolean
|
23
|
+
(self[:value].to_s =~ /^t/i) != nil
|
24
|
+
end
|
25
|
+
else
|
26
|
+
self[:value]
|
27
|
+
end
|
28
|
+
end
|
12
29
|
|
13
|
-
|
30
|
+
def raw_value
|
31
|
+
self[:value]
|
32
|
+
end
|
33
|
+
|
34
|
+
# For the rc releases of 1.0, we stored the object class names, this converts
|
35
|
+
# to preferences definition types. This code should eventually be removed.
|
36
|
+
# it is called during the load_preferences of the Preferences::Store
|
37
|
+
def self.convert_old_value_types(preference)
|
38
|
+
return unless [Symbol.to_s, Fixnum.to_s, Bignum.to_s,
|
39
|
+
Float.to_s, TrueClass.to_s, FalseClass.to_s].include? preference.value_type
|
40
|
+
|
41
|
+
case preference.value_type
|
14
42
|
when Symbol.to_s
|
15
|
-
|
43
|
+
preference.value_type = 'string'
|
16
44
|
when Fixnum.to_s
|
17
|
-
|
45
|
+
preference.value_type = 'integer'
|
18
46
|
when Bignum.to_s
|
19
|
-
|
47
|
+
preference.value_type = 'integer'
|
48
|
+
preference.value = preference.value.to_f.to_i
|
20
49
|
when Float.to_s
|
21
|
-
|
50
|
+
preference.value_type = 'decimal'
|
22
51
|
when TrueClass.to_s
|
23
|
-
|
52
|
+
preference.value_type = 'boolean'
|
53
|
+
preference.value = "true"
|
24
54
|
when FalseClass.to_s
|
25
|
-
|
26
|
-
|
27
|
-
self[:value]
|
55
|
+
preference.value_type = 'boolean'
|
56
|
+
preference.value = "false"
|
28
57
|
end
|
58
|
+
|
59
|
+
preference.save
|
29
60
|
end
|
30
61
|
|
31
62
|
end
|
@@ -104,6 +104,31 @@ module Spree::Preferences::Preferable
|
|
104
104
|
@pending_preferences[name]
|
105
105
|
end
|
106
106
|
|
107
|
+
def convert_preference_value(value, type)
|
108
|
+
case type
|
109
|
+
when :string
|
110
|
+
value.to_s
|
111
|
+
when :password
|
112
|
+
value.to_s
|
113
|
+
when :decimal
|
114
|
+
BigDecimal.new(value.to_s).round(2, BigDecimal::ROUND_HALF_UP)
|
115
|
+
when :integer
|
116
|
+
value.to_i
|
117
|
+
when :boolean
|
118
|
+
if value.is_a?(FalseClass) ||
|
119
|
+
value.nil? ||
|
120
|
+
value == 0 ||
|
121
|
+
value =~ /^(f|false|0)$/i ||
|
122
|
+
(value.respond_to? :empty? and value.empty?)
|
123
|
+
false
|
124
|
+
else
|
125
|
+
true
|
126
|
+
end
|
127
|
+
else
|
128
|
+
value
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
107
132
|
def preference_store
|
108
133
|
Spree::Preferences::Store.instance
|
109
134
|
end
|
@@ -23,20 +23,9 @@ module Spree::Preferences
|
|
23
23
|
alias_method prefers_getter_method(name), preference_getter_method(name)
|
24
24
|
|
25
25
|
define_method preference_setter_method(name) do |value|
|
26
|
-
|
27
|
-
# Convert them to their correct values here
|
28
|
-
if type == :boolean && !value.is_a?(TrueClass) && !value.is_a?(FalseClass)
|
29
|
-
value = value.downcase if value.respond_to? :downcase
|
30
|
-
case value
|
31
|
-
when 0, '0', 'false', 'f', "", []
|
32
|
-
value = false
|
33
|
-
else
|
34
|
-
value = true
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
26
|
+
value = convert_preference_value(value, type)
|
38
27
|
if preference_cache_key(name)
|
39
|
-
preference_store.set preference_cache_key(name), value
|
28
|
+
preference_store.set preference_cache_key(name), value, type
|
40
29
|
else
|
41
30
|
add_pending_preference(name, value)
|
42
31
|
end
|
@@ -17,16 +17,16 @@ module Spree::Preferences
|
|
17
17
|
load_preferences
|
18
18
|
end
|
19
19
|
|
20
|
-
def set(key, value)
|
20
|
+
def set(key, value, type)
|
21
21
|
@cache.write(key, value)
|
22
|
-
persist(key, value)
|
22
|
+
persist(key, value, type)
|
23
23
|
end
|
24
24
|
|
25
25
|
def exist?(key)
|
26
26
|
@cache.exist? key
|
27
27
|
end
|
28
28
|
|
29
|
-
def get(key
|
29
|
+
def get(key)
|
30
30
|
@cache.read(key)
|
31
31
|
end
|
32
32
|
|
@@ -37,11 +37,12 @@ module Spree::Preferences
|
|
37
37
|
|
38
38
|
private
|
39
39
|
|
40
|
-
def persist(cache_key, value)
|
40
|
+
def persist(cache_key, value, type)
|
41
41
|
return unless should_persist?
|
42
42
|
|
43
43
|
preference = Spree::Preference.find_or_initialize_by_key(cache_key)
|
44
44
|
preference.value = value
|
45
|
+
preference.value_type = type
|
45
46
|
preference.save
|
46
47
|
end
|
47
48
|
|
@@ -55,8 +56,9 @@ module Spree::Preferences
|
|
55
56
|
def load_preferences
|
56
57
|
return unless should_persist?
|
57
58
|
|
58
|
-
Spree::Preference.
|
59
|
-
|
59
|
+
Spree::Preference.valid.each do |p|
|
60
|
+
Spree::Preference.convert_old_value_types(p) # see comment
|
61
|
+
@cache.write(p.key, p.value)
|
60
62
|
end
|
61
63
|
end
|
62
64
|
|
data/app/models/spree/product.rb
CHANGED
@@ -78,8 +78,7 @@ module Spree
|
|
78
78
|
end
|
79
79
|
|
80
80
|
def to_param
|
81
|
-
|
82
|
-
name.to_url
|
81
|
+
permalink.present? ? permalink : (permalink_was || name.to_s.to_url)
|
83
82
|
end
|
84
83
|
|
85
84
|
# returns true if the product has any variants (the master variant is not a member of the variants array)
|
@@ -185,6 +184,12 @@ module Spree
|
|
185
184
|
self.where([where_str, values.map { |value| "%#{value}%" } * fields.size].flatten)
|
186
185
|
end
|
187
186
|
|
187
|
+
def empty_option_values?
|
188
|
+
options.empty? || options.any? do |opt|
|
189
|
+
opt.option_type.option_values.empty?
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
188
193
|
private
|
189
194
|
def recalculate_count_on_hand
|
190
195
|
product_count_on_hand = has_variants? ?
|
@@ -28,7 +28,7 @@
|
|
28
28
|
#
|
29
29
|
module Spree
|
30
30
|
class ProductGroup < ActiveRecord::Base
|
31
|
-
validates :name, :presence => true
|
31
|
+
validates :name, :permalink, :presence => true
|
32
32
|
validates_associated :product_scopes
|
33
33
|
|
34
34
|
after_save :update_memberships
|
@@ -153,13 +153,10 @@ module Spree
|
|
153
153
|
result
|
154
154
|
end
|
155
155
|
|
156
|
-
|
157
|
-
|
158
|
-
name.to_s.to_url
|
156
|
+
def to_param
|
157
|
+
permalink.present? ? permalink : (permalink_was || name.to_s.to_url)
|
159
158
|
end
|
160
159
|
|
161
|
-
alias_method :to_url, :permalink
|
162
|
-
|
163
160
|
def update_memberships
|
164
161
|
# wipe everything directly to avoid expensive in-rails sorting
|
165
162
|
ActiveRecord::Base.connection.execute "DELETE FROM spree_product_groups_products WHERE product_group_id = #{self.id}"
|
@@ -178,9 +175,6 @@ module Spree
|
|
178
175
|
"<Spree::ProductGroup" + (id && "[#{id}]").to_s + ":'#{to_url}'>"
|
179
176
|
end
|
180
177
|
|
181
|
-
def to_param
|
182
|
-
self.permalink
|
183
|
-
end
|
184
178
|
|
185
179
|
def order_scope
|
186
180
|
if scope = product_scopes.detect {|s| s.is_ordering?}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<fieldset id="product_group_forms_container" data-hook>
|
6
6
|
|
7
|
-
<%= form_for [:admin, @product_group], :html => { :id => 'product-group-form', :method => :put
|
7
|
+
<%= form_for [:admin, @product_group], :html => { :id => 'product-group-form', :method => :put } do |f| %>
|
8
8
|
|
9
9
|
<%= f.field_container :name do %>
|
10
10
|
<%= f.label :name, t(:name) %><br />
|
@@ -12,6 +12,12 @@
|
|
12
12
|
<%= f.error_message_on :name %>
|
13
13
|
<% end %>
|
14
14
|
|
15
|
+
<%= f.field_container :permalink do %>
|
16
|
+
<%= f.label :permalink, t(:permalink) %><br />
|
17
|
+
<%= f.text_field :permalink %>
|
18
|
+
<%= f.error_message_on :permalink %>
|
19
|
+
<% end %>
|
20
|
+
|
15
21
|
<%= f.field_container :order_scope do %>
|
16
22
|
<%= f.label :order_scope, t(:sort_ordering) %><br />
|
17
23
|
<%= f.select(:order_scope, Spree::Product.simple_scopes.collect{|p| [ t(:name, :scope =>[:product_scopes, :scopes, p]), p.to_s ] }) %>
|
@@ -1,3 +1,6 @@
|
|
1
1
|
$('#product_scopes').append('<%= escape_javascript( render('spree/admin/product_groups/product_scope', :product_scope => @product_scope) ) %>');
|
2
2
|
$('#<%= dom_id @product_scope %>').hide();
|
3
3
|
$('#<%= dom_id @product_scope %>').fadeIn();
|
4
|
+
if(!$('.token-input-list').is('*')){
|
5
|
+
$('.tokeninput.products').productPicker();
|
6
|
+
}
|
@@ -36,11 +36,13 @@
|
|
36
36
|
<% end %>
|
37
37
|
</table>
|
38
38
|
|
39
|
-
<% if @product.
|
39
|
+
<% if @product.empty_option_values? %>
|
40
40
|
|
41
41
|
<p class='first_add_option_types' data-hook="first_add_option_types">
|
42
42
|
<%= t(:to_add_variants_you_must_first_define) %>
|
43
43
|
<%= link_to t(:option_types), selected_admin_product_option_types_url(@product) %>
|
44
|
+
<%= t(:and) %>
|
45
|
+
<%= link_to t(:option_values), admin_option_types_url %>
|
44
46
|
</p>
|
45
47
|
|
46
48
|
<% else %>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
begin
|
2
|
+
ActiveRecord::Base.connection.execute("select owner_id, owner_type, name, value from spree_preferences where `key` is null").each do |pref|
|
3
|
+
warn "[WARNING] Orphaned preference `#{pref[2]}` with value `#{pref[3]}` for #{pref[1]} with id of: #{pref[0]}, you should reset the preference value manually."
|
4
|
+
end
|
5
|
+
rescue
|
6
|
+
end
|
data/config/locales/en.yml
CHANGED
@@ -252,6 +252,7 @@ en:
|
|
252
252
|
alternative_phone: Alternative Phone
|
253
253
|
amount: Amount
|
254
254
|
analytics_trackers: Analytics Trackers
|
255
|
+
and: and
|
255
256
|
apply: "Apply"
|
256
257
|
are_you_sure: "Are you sure?"
|
257
258
|
are_you_sure_category: "Are you sure you want to delete this category?"
|
@@ -672,7 +673,7 @@ en:
|
|
672
673
|
preview: Preview
|
673
674
|
previous: Previous
|
674
675
|
price: Price
|
675
|
-
|
676
|
+
price_sack: Price Sack
|
676
677
|
price_range: Price Range
|
677
678
|
problem_authorizing_card: "Problem authorizing credit card"
|
678
679
|
problem_capturing_card: "Problem capturing credit card"
|
@@ -1,15 +1,14 @@
|
|
1
|
-
|
1
|
+
require 'spree/core/preference_rescue'
|
2
2
|
|
3
|
-
|
4
|
-
set_table_name "spree_preferences"
|
5
|
-
belongs_to :owner, :polymorphic => true
|
6
|
-
end
|
3
|
+
class NewPreferences < ActiveRecord::Migration
|
7
4
|
|
8
5
|
def up
|
9
6
|
add_column :spree_preferences, :key, :string
|
10
7
|
add_column :spree_preferences, :value_type, :string
|
11
8
|
add_index :spree_preferences, :key, :unique => true
|
12
9
|
|
10
|
+
remove_index :spree_preferences, :name => 'ix_prefs_on_owner_attr_pref'
|
11
|
+
|
13
12
|
# remove old constraints for migration
|
14
13
|
change_column :spree_preferences, :name, :string, :null => true
|
15
14
|
change_column :spree_preferences, :owner_id, :integer, :null => true
|
@@ -17,32 +16,23 @@ class NewPreferences < ActiveRecord::Migration
|
|
17
16
|
change_column :spree_preferences, :group_id, :integer, :null => true
|
18
17
|
change_column :spree_preferences, :group_type, :string, :null => true
|
19
18
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
end
|
33
|
-
|
34
|
-
unless old_pref.owner_type == "Spree::Activator" || old_pref.owner_type == "Spree::PromotionRule"
|
35
|
-
say "Migrating preference #{old_pref.name}"
|
36
|
-
owner.set_preference old_pref.name, old_pref.value
|
37
|
-
end
|
38
|
-
rescue => e
|
39
|
-
say "Skipping setting preference #{old_pref.owner_type}::#{old_pref.name}"
|
40
|
-
end
|
19
|
+
cfgs = execute("select id, type from spree_configurations").to_a
|
20
|
+
execute("select id, owner_id, name from spree_preferences where owner_type = 'Spree::Configuration'").each do |pref|
|
21
|
+
configuration = cfgs.detect { |c| c[0].to_s == pref[1].to_s }
|
22
|
+
|
23
|
+
value_type = configuration[1].constantize.new.send "preferred_#{pref[2]}_type" rescue 'string'
|
24
|
+
|
25
|
+
execute "UPDATE spree_preferences set `key` = '#{configuration[1].underscore}/#{pref[2]}', `value_type` = '#{value_type}' where id = #{pref[0]}" rescue nil
|
26
|
+
end
|
27
|
+
|
28
|
+
# remove orphaned calculator preferences
|
29
|
+
Spree::Preference.where(:owner_type => 'Spree::Calculator').each do |preference|
|
30
|
+
preference.destroy unless Spree::Calculator.exists? preference.owner_id
|
41
31
|
end
|
42
32
|
|
43
|
-
|
44
|
-
Spree::Preference.where(:key => nil).delete_all
|
33
|
+
Spree::PreferenceRescue.try
|
45
34
|
|
35
|
+
Spree::Preference.where(:value_type => nil).update_all(:value_type => 'string')
|
46
36
|
end
|
47
37
|
|
48
38
|
def down
|
@@ -55,4 +45,4 @@ class NewPreferences < ActiveRecord::Migration
|
|
55
45
|
add_column :spree_preferences, :group_id, :integer
|
56
46
|
add_column :spree_preferences, :group_type, :string
|
57
47
|
end
|
58
|
-
end
|
48
|
+
end
|
data/lib/spree/core/engine.rb
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
module Spree
|
2
|
+
class OldPrefs < ActiveRecord::Base
|
3
|
+
set_table_name "spree_preferences"
|
4
|
+
belongs_to :owner, :polymorphic => true
|
5
|
+
attr_accessor :owner_klass
|
6
|
+
end
|
7
|
+
|
8
|
+
class PreferenceRescue
|
9
|
+
def self.try
|
10
|
+
OldPrefs.where(:key => nil).each do |old_pref|
|
11
|
+
next unless owner = (old_pref.owner rescue nil)
|
12
|
+
unless old_pref.owner_type == "Spree::Activator" || old_pref.owner_type == "Spree::Configuration"
|
13
|
+
old_pref.key = [owner.class.name, old_pref.name, owner.id].join('::').underscore
|
14
|
+
old_pref.value_type = owner.preference_type(old_pref.name)
|
15
|
+
puts "Migrating Preference: #{old_pref.key}"
|
16
|
+
old_pref.save
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/spree/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.0
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Sean Schofield
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
12
|
+
date: 2012-02-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: acts_as_list
|
16
|
-
requirement: &
|
16
|
+
requirement: &70236783733120 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - =
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.1.4
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70236783733120
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: nested_set
|
27
|
-
requirement: &
|
27
|
+
requirement: &70236783732040 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - =
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.6.8
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70236783732040
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: jquery-rails
|
38
|
-
requirement: &
|
38
|
+
requirement: &70236783765860 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -46,10 +46,10 @@ dependencies:
|
|
46
46
|
version: 1.0.19
|
47
47
|
type: :runtime
|
48
48
|
prerelease: false
|
49
|
-
version_requirements: *
|
49
|
+
version_requirements: *70236783765860
|
50
50
|
- !ruby/object:Gem::Dependency
|
51
51
|
name: highline
|
52
|
-
requirement: &
|
52
|
+
requirement: &70236783764200 !ruby/object:Gem::Requirement
|
53
53
|
none: false
|
54
54
|
requirements:
|
55
55
|
- - =
|
@@ -57,10 +57,10 @@ dependencies:
|
|
57
57
|
version: 1.6.8
|
58
58
|
type: :runtime
|
59
59
|
prerelease: false
|
60
|
-
version_requirements: *
|
60
|
+
version_requirements: *70236783764200
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: state_machine
|
63
|
-
requirement: &
|
63
|
+
requirement: &70236783763600 !ruby/object:Gem::Requirement
|
64
64
|
none: false
|
65
65
|
requirements:
|
66
66
|
- - =
|
@@ -68,10 +68,10 @@ dependencies:
|
|
68
68
|
version: 1.1.1
|
69
69
|
type: :runtime
|
70
70
|
prerelease: false
|
71
|
-
version_requirements: *
|
71
|
+
version_requirements: *70236783763600
|
72
72
|
- !ruby/object:Gem::Dependency
|
73
73
|
name: ffaker
|
74
|
-
requirement: &
|
74
|
+
requirement: &70236783762880 !ruby/object:Gem::Requirement
|
75
75
|
none: false
|
76
76
|
requirements:
|
77
77
|
- - ~>
|
@@ -79,10 +79,10 @@ dependencies:
|
|
79
79
|
version: 1.12.0
|
80
80
|
type: :runtime
|
81
81
|
prerelease: false
|
82
|
-
version_requirements: *
|
82
|
+
version_requirements: *70236783762880
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: paperclip
|
85
|
-
requirement: &
|
85
|
+
requirement: &70236783762380 !ruby/object:Gem::Requirement
|
86
86
|
none: false
|
87
87
|
requirements:
|
88
88
|
- - =
|
@@ -90,10 +90,10 @@ dependencies:
|
|
90
90
|
version: 2.5.0
|
91
91
|
type: :runtime
|
92
92
|
prerelease: false
|
93
|
-
version_requirements: *
|
93
|
+
version_requirements: *70236783762380
|
94
94
|
- !ruby/object:Gem::Dependency
|
95
95
|
name: meta_search
|
96
|
-
requirement: &
|
96
|
+
requirement: &70236783761800 !ruby/object:Gem::Requirement
|
97
97
|
none: false
|
98
98
|
requirements:
|
99
99
|
- - =
|
@@ -101,10 +101,10 @@ dependencies:
|
|
101
101
|
version: 1.1.1
|
102
102
|
type: :runtime
|
103
103
|
prerelease: false
|
104
|
-
version_requirements: *
|
104
|
+
version_requirements: *70236783761800
|
105
105
|
- !ruby/object:Gem::Dependency
|
106
106
|
name: activemerchant
|
107
|
-
requirement: &
|
107
|
+
requirement: &70236783761200 !ruby/object:Gem::Requirement
|
108
108
|
none: false
|
109
109
|
requirements:
|
110
110
|
- - =
|
@@ -112,10 +112,10 @@ dependencies:
|
|
112
112
|
version: 1.20.1
|
113
113
|
type: :runtime
|
114
114
|
prerelease: false
|
115
|
-
version_requirements: *
|
115
|
+
version_requirements: *70236783761200
|
116
116
|
- !ruby/object:Gem::Dependency
|
117
117
|
name: rails
|
118
|
-
requirement: &
|
118
|
+
requirement: &70236783760640 !ruby/object:Gem::Requirement
|
119
119
|
none: false
|
120
120
|
requirements:
|
121
121
|
- - ! '>='
|
@@ -126,10 +126,10 @@ dependencies:
|
|
126
126
|
version: 3.1.3
|
127
127
|
type: :runtime
|
128
128
|
prerelease: false
|
129
|
-
version_requirements: *
|
129
|
+
version_requirements: *70236783760640
|
130
130
|
- !ruby/object:Gem::Dependency
|
131
131
|
name: kaminari
|
132
|
-
requirement: &
|
132
|
+
requirement: &70236783759600 !ruby/object:Gem::Requirement
|
133
133
|
none: false
|
134
134
|
requirements:
|
135
135
|
- - ! '>='
|
@@ -137,10 +137,10 @@ dependencies:
|
|
137
137
|
version: 0.13.0
|
138
138
|
type: :runtime
|
139
139
|
prerelease: false
|
140
|
-
version_requirements: *
|
140
|
+
version_requirements: *70236783759600
|
141
141
|
- !ruby/object:Gem::Dependency
|
142
142
|
name: deface
|
143
|
-
requirement: &
|
143
|
+
requirement: &70236783758860 !ruby/object:Gem::Requirement
|
144
144
|
none: false
|
145
145
|
requirements:
|
146
146
|
- - ! '>='
|
@@ -148,10 +148,10 @@ dependencies:
|
|
148
148
|
version: 0.7.2
|
149
149
|
type: :runtime
|
150
150
|
prerelease: false
|
151
|
-
version_requirements: *
|
151
|
+
version_requirements: *70236783758860
|
152
152
|
- !ruby/object:Gem::Dependency
|
153
153
|
name: stringex
|
154
|
-
requirement: &
|
154
|
+
requirement: &70236783752940 !ruby/object:Gem::Requirement
|
155
155
|
none: false
|
156
156
|
requirements:
|
157
157
|
- - ~>
|
@@ -159,7 +159,7 @@ dependencies:
|
|
159
159
|
version: 1.3.0
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
|
-
version_requirements: *
|
162
|
+
version_requirements: *70236783752940
|
163
163
|
description: Required dependency for Spree
|
164
164
|
email: sean@spreecommerce.com
|
165
165
|
executables: []
|
@@ -394,7 +394,7 @@ files:
|
|
394
394
|
- app/models/spree/calculator/flat_rate.rb
|
395
395
|
- app/models/spree/calculator/flexi_rate.rb
|
396
396
|
- app/models/spree/calculator/per_item.rb
|
397
|
-
- app/models/spree/calculator/
|
397
|
+
- app/models/spree/calculator/price_sack.rb
|
398
398
|
- app/models/spree/calculator.rb
|
399
399
|
- app/models/spree/configuration.rb
|
400
400
|
- app/models/spree/country.rb
|
@@ -509,7 +509,6 @@ files:
|
|
509
509
|
- app/views/spree/admin/product_groups/index.html.erb
|
510
510
|
- app/views/spree/admin/product_groups/new.html.erb
|
511
511
|
- app/views/spree/admin/product_groups/show.html.erb
|
512
|
-
- app/views/spree/admin/product_groups/update.js.erb
|
513
512
|
- app/views/spree/admin/product_properties/_product_property_fields.html.erb
|
514
513
|
- app/views/spree/admin/product_properties/index.html.erb
|
515
514
|
- app/views/spree/admin/product_scopes/create.js.erb
|
@@ -671,6 +670,7 @@ files:
|
|
671
670
|
- app/views/spree/taxons/_taxon.html.erb
|
672
671
|
- app/views/spree/taxons/show.html.erb
|
673
672
|
- app/views/spree/test_mailer/test_email.text.erb
|
673
|
+
- config/initializers/check_for_orphaned_preferences.rb
|
674
674
|
- config/initializers/deprecation_checker.rb
|
675
675
|
- config/initializers/form_builder.rb
|
676
676
|
- config/initializers/rails_3_1.rb
|
@@ -714,6 +714,7 @@ files:
|
|
714
714
|
- lib/spree/core/middleware/redirect_legacy_product_url.rb
|
715
715
|
- lib/spree/core/middleware/seo_assist.rb
|
716
716
|
- lib/spree/core/permalinks.rb
|
717
|
+
- lib/spree/core/preference_rescue.rb
|
717
718
|
- lib/spree/core/respond_with.rb
|
718
719
|
- lib/spree/core/responder.rb
|
719
720
|
- lib/spree/core/scopes.rb
|
@@ -967,9 +968,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
967
968
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
968
969
|
none: false
|
969
970
|
requirements:
|
970
|
-
- - ! '
|
971
|
+
- - ! '>='
|
971
972
|
- !ruby/object:Gem::Version
|
972
|
-
version:
|
973
|
+
version: '0'
|
974
|
+
segments:
|
975
|
+
- 0
|
976
|
+
hash: 360601115106515255
|
973
977
|
requirements:
|
974
978
|
- none
|
975
979
|
rubyforge_project: spree_core
|
@@ -1,12 +0,0 @@
|
|
1
|
-
$('#preview_container').html('<%= escape_javascript( render('spree/admin/product_groups/preview') ) %>');
|
2
|
-
<% notice = flash[:notice] %>
|
3
|
-
<% flash.delete(:notice) %>
|
4
|
-
flash_notice = jQuery('.flash.notice');
|
5
|
-
if (flash_notice.length > 0) {
|
6
|
-
flash_notice.html('<%= notice %>');
|
7
|
-
} else {
|
8
|
-
$('#content h1').before('<div class="flash notice"><%= notice %></div>');
|
9
|
-
}
|
10
|
-
|
11
|
-
//set form action in case permalink changes
|
12
|
-
$('form#product-group-form').attr('action', '<%= url_for([:admin, @product_group]) %>');
|