spree_quick_cart 2.1.3 → 2.1.4

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: 9df8ef37583492e95c7bbe55d71d16695539b6a5
4
- data.tar.gz: b94ebd79718a5e77f20654e46d78a0ee9d936309
3
+ metadata.gz: 2fff99b1eea2df38985b6adb5325ad5d01c61869
4
+ data.tar.gz: 0dd3725f1bafb29478e139673f0e775113e20eaa
5
5
  SHA512:
6
- metadata.gz: a711ed5b9660739e40023b7fc774e79dbc71ec9e7cfae30c6bc089b83a89459b6d6c9bc1830380d3790d3a3a98abb057fbc75895410ae9ac938be667997e9014
7
- data.tar.gz: 914b85c495bc9e95ac68893e55109631775ca9f20e9c3c91ad9bc95211ce142861e4477d20cbcd5a2e8e97a4f8f95a2aa2a30fe8c6cadd3dda57859c3b1a0375
6
+ metadata.gz: 4edf75ad6b3d548b1555cdbaa2ec7b70f2efae08c4ac6e18bb29fab518302d2809acddc28816ecb2b3dc7b743e293f825c2edfea4170d0400445cf89d9ff038b
7
+ data.tar.gz: 84d682f4315d2395cb72c35e4fcf784c58e7a5fe01c4c6274bef218c87e575722f65461e0e922ceabdccad50500b8173c1807967c7cf65915ca8a6905933ca0e
@@ -0,0 +1,11 @@
1
+ Spree::Api::OrdersController.class_eval do
2
+
3
+ def current
4
+ if session[:order_id]
5
+ @current_order = Spree::Order.find(session[:order_id])
6
+ else
7
+ @current_order = nil
8
+ end
9
+ end
10
+
11
+ end
@@ -0,0 +1,3 @@
1
+ object @current_order
2
+ extends "spree/api/orders/order"
3
+
@@ -1,7 +1,7 @@
1
1
  .quick-add-to-cart-form
2
2
  - order = current_order(true)
3
3
  %span.current-order-path(style="display:none")
4
- = api_order_path(order.number)
4
+ = api_current_order_path
5
5
  = form_tag api_order_line_items_path(order.number), method: :post do
6
6
  .fields
7
7
  = hidden_field_tag "order_token", order.token
data/config/routes.rb ADDED
@@ -0,0 +1,5 @@
1
+ Spree::Core::Engine.routes.append do
2
+ namespace :api do
3
+ get '/current_order', to: 'orders#current'
4
+ end
5
+ end
@@ -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.3'
5
+ s.version = '2.1.4'
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'
@@ -17,6 +17,7 @@ Gem::Specification.new do |s|
17
17
 
18
18
  s.add_dependency 'spree_core', '~> 2.1.3'
19
19
  s.add_dependency 'spree_frontend', '~> 2.1.3'
20
+ s.add_dependency 'spree_backend', '~> 2.1.3'
20
21
  s.add_dependency 'spree_api', '~> 2.1.3'
21
22
 
22
23
  s.add_development_dependency 'capybara', '~> 2.1'
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.3
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francisco Trindade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-19 00:00:00.000000000 Z
11
+ date: 2013-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: 2.1.3
41
+ - !ruby/object:Gem::Dependency
42
+ name: spree_backend
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 2.1.3
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 2.1.3
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: spree_api
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -194,10 +208,13 @@ files:
194
208
  - app/assets/javascripts/store/spree_quick_cart.js
195
209
  - app/assets/stylesheets/store/quick_cart.scss
196
210
  - app/assets/stylesheets/store/spree_quick_cart.css
211
+ - app/controllers/spree/api/orders_controller_decorator.rb
197
212
  - app/overrides/quick_cart_add_button.rb
213
+ - app/views/spree/api/orders/current.rabl
198
214
  - app/views/spree/shared/_quick_cart_add_button.haml
199
215
  - bin/rails
200
216
  - config/locales/en.yml
217
+ - config/routes.rb
201
218
  - lib/generators/spree_quick_cart/install/install_generator.rb
202
219
  - lib/spree_quick_cart.rb
203
220
  - lib/spree_quick_cart/engine.rb