spree_quick_cart 2.1.8 → 2.1.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 73c39bf28c1272c47c993f9c4dc87b1507729a1c
4
- data.tar.gz: fd1a061cd2fc5350e48efb41d290eadde307585a
3
+ metadata.gz: ed8ce8dec38e0e4632b1ebbf9240f559260cd25c
4
+ data.tar.gz: cffe750f5f6ee97ed080864aada024423942b3df
5
5
  SHA512:
6
- metadata.gz: 5bc527cba8ec89527241be417acd97d42648aed2babd286fb6a09cc3b9b2d805481dc252e4e8f7551dfd3327bde14cfbf9cfd230db7c076152a00277c84927d2
7
- data.tar.gz: 5e430f14589d8b03301fde8640d6cd0cea91d563ad6b85e436740bb64ad60a24019c99e6a976801b33a834fc104db1178d13dc69c3e8bfac416a5e75396f60a0
6
+ metadata.gz: b7904acc857709adf57b27ae9745903b2c6ee92feb9ecd33cfc6034b725f7338c4f241384b6bbe5832dbf1c62017f7ae91b96a6b778416f60ea37fc82bb74e72
7
+ data.tar.gz: 28c423f90086bef2fd7dd80802f6f5c76f441ae5fa00318e730544c04a232565926b6ca4a7f440065f3a8607f3c2064f817003ed41817048e34d811533a4205e
@@ -1,11 +1,10 @@
1
1
  Spree::Api::OrdersController.class_eval do
2
2
 
3
+ include Spree::Core::ControllerHelpers::Order
4
+
3
5
  def current
4
- if session[:order_id]
5
- @current_order = Spree::Order.find(session[:order_id])
6
- else
7
- @current_order = nil
8
- end
6
+ current_order
7
+ render :current
9
8
  end
10
9
 
11
10
  end
@@ -0,0 +1,10 @@
1
+ object @current_order
2
+
3
+ attributes *order_attributes
4
+ node(:display_item_total) { |o| o.display_item_total.to_s }
5
+ node(:total_quantity) { |o| o.line_items.sum(:quantity) }
6
+ node(:display_tax_total) { |o| o.display_tax_total }
7
+ node(:display_total) { |o| o.display_total.to_s }
8
+ node(:display_ship_total) { |o| o.display_ship_total }
9
+ node(:token) { |o| o.token }
10
+ node(:checkout_steps) { |o| o.checkout_steps }
@@ -1,3 +1,11 @@
1
1
  object @current_order
2
- extends "spree/api/orders/order"
2
+
3
+ attributes *order_attributes
4
+ node(:display_item_total) { |o| o.display_item_total.to_s }
5
+ node(:total_quantity) { |o| o.line_items.sum(:quantity) }
6
+ node(:display_tax_total) { |o| o.display_tax_total }
7
+ node(:display_total) { |o| o.display_total.to_s }
8
+ node(:display_ship_total) { |o| o.display_ship_total }
9
+ node(:token) { |o| o.token }
10
+ node(:checkout_steps) { |o| o.checkout_steps }
3
11
 
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  s.platform = Gem::Platform::RUBY
4
4
  s.name = 'spree_quick_cart'
5
- s.version = '2.1.8'
5
+ s.version = '2.1.9'
6
6
  s.summary = 'Insert add to cart button in product index page'
7
7
  s.description = 'Adds js quick add to cart button to product catalogue'
8
8
  s.required_ruby_version = '>= 2.0.0'
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.add_dependency 'spree_frontend', '~> 2.1.3'
20
20
  s.add_dependency 'spree_backend', '~> 2.1.3'
21
21
  s.add_dependency 'spree_api', '~> 2.1.3'
22
+ s.add_dependency 'rabl'
22
23
 
23
24
  s.add_development_dependency 'capybara', '~> 2.1'
24
25
  s.add_development_dependency 'coffee-rails'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_quick_cart
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.8
4
+ version: 2.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francisco Trindade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-26 00:00:00.000000000 Z
11
+ date: 2014-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: 2.1.3
69
+ - !ruby/object:Gem::Dependency
70
+ name: rabl
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: capybara
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -210,6 +224,7 @@ files:
210
224
  - app/assets/stylesheets/store/spree_quick_cart.css
211
225
  - app/controllers/spree/api/orders_controller_decorator.rb
212
226
  - app/overrides/quick_cart_add_button.rb
227
+ - app/views/spree/api/base/current.rabl
213
228
  - app/views/spree/api/orders/current.rabl
214
229
  - app/views/spree/shared/_quick_cart_add_button.haml
215
230
  - bin/rails