stall 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +41 -3
- data/app/assets/javascripts/stall/add-to-cart-form.coffee +55 -3
- data/app/assets/javascripts/stall/addresses-fields.coffee +17 -0
- data/app/assets/javascripts/stall/remote-sign-in-form.coffee +55 -0
- data/app/assets/javascripts/stall.coffee +3 -1
- data/app/controllers/stall/application_controller.rb +1 -1
- data/app/controllers/stall/carts_controller.rb +1 -3
- data/app/controllers/stall/checkout/steps_controller.rb +18 -1
- data/app/helpers/stall/checkout_helper.rb +7 -8
- data/app/helpers/stall/customers_helper.rb +25 -0
- data/app/models/stall/models/cart.rb +2 -0
- data/app/models/stall/models/customer.rb +20 -0
- data/app/models/stall/models/product_list.rb +13 -0
- data/app/views/checkout/steps/_informations.html.haml +24 -35
- data/app/views/checkout/steps/_payment.html.haml +1 -45
- data/app/views/checkout/steps/_shipping_method.html.haml +0 -1
- data/app/views/stall/addresses/_fields.html.haml +16 -0
- data/app/views/stall/addresses/_nested_fields.html.haml +14 -0
- data/app/views/stall/carts/_cart.html.haml +45 -0
- data/app/views/stall/carts/show.html.haml +2 -2
- data/app/views/stall/customers/_fields.html.haml +32 -0
- data/app/views/stall/customers/_sign_in.html.haml +20 -0
- data/app/views/stall/line_items/_form.html.haml +2 -2
- data/app/views/stall/payments/_fields.html.haml +2 -0
- data/app/views/stall/shared/mailers/_cart.html.haml +31 -29
- data/app/views/stall/shipments/_fields.html.haml +2 -0
- data/config/locales/stall.fr.yml +35 -8
- data/lib/generators/stall/checkout/step/templates/step.rb.erb +9 -0
- data/lib/generators/stall/checkout/wizard/templates/wizard.rb.erb +1 -1
- data/lib/generators/stall/install/install_generator.rb +6 -0
- data/lib/generators/stall/install/templates/initializer.rb +10 -1
- data/lib/generators/stall/view/view_generator.rb +38 -0
- data/lib/stall/addressable.rb +2 -0
- data/lib/stall/addresses/copier_base.rb +24 -0
- data/lib/stall/addresses/copy_source_to_target.rb +45 -0
- data/lib/stall/addresses/prefill_target_from_source.rb +29 -0
- data/lib/stall/addresses.rb +9 -0
- data/lib/stall/cart_helper.rb +14 -1
- data/lib/stall/checkout/informations_checkout_step.rb +133 -14
- data/lib/stall/checkout/payment_checkout_step.rb +21 -1
- data/lib/stall/checkout/step.rb +22 -15
- data/lib/stall/checkout/step_form.rb +22 -8
- data/lib/stall/config.rb +17 -3
- data/lib/stall/engine.rb +6 -0
- data/lib/stall/payable.rb +9 -0
- data/lib/stall/payments/gateway.rb +16 -6
- data/lib/stall/payments/urls_config.rb +2 -2
- data/lib/stall/rails/routing_mapper.rb +4 -6
- data/lib/stall/routes.rb +4 -1
- data/lib/stall/sellable.rb +13 -3
- data/lib/stall/version.rb +1 -1
- data/lib/stall.rb +1 -0
- metadata +25 -6
- data/lib/stall/checkout/payment_method_checkout_step.rb +0 -9
- data/lib/stall/checkout/shipping_method_checkout_step.rb +0 -21
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stall
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vala
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '4.2'
|
20
|
+
- - "<="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '6.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '4.2'
|
30
|
+
- - "<="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '6.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: coffee-rails
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -288,7 +294,9 @@ files:
|
|
288
294
|
- Rakefile
|
289
295
|
- app/assets/javascripts/stall.coffee
|
290
296
|
- app/assets/javascripts/stall/add-to-cart-form.coffee
|
297
|
+
- app/assets/javascripts/stall/addresses-fields.coffee
|
291
298
|
- app/assets/javascripts/stall/cart-form.coffee
|
299
|
+
- app/assets/javascripts/stall/remote-sign-in-form.coffee
|
292
300
|
- app/assets/stylesheets/stall/application.css
|
293
301
|
- app/assets/stylesheets/stall/carts.css
|
294
302
|
- app/controllers/stall/application_controller.rb
|
@@ -300,6 +308,7 @@ files:
|
|
300
308
|
- app/helpers/stall/add_to_cart_helper.rb
|
301
309
|
- app/helpers/stall/application_helper.rb
|
302
310
|
- app/helpers/stall/checkout_helper.rb
|
311
|
+
- app/helpers/stall/customers_helper.rb
|
303
312
|
- app/helpers/stall/payments_helper.rb
|
304
313
|
- app/mailers/stall/admin_mailer.rb
|
305
314
|
- app/mailers/stall/base_mailer.rb
|
@@ -338,15 +347,22 @@ files:
|
|
338
347
|
- app/views/checkout/steps/_payment_return.html.haml
|
339
348
|
- app/views/checkout/steps/_shipping_method.html.haml
|
340
349
|
- app/views/layouts/stall/application.html.erb
|
350
|
+
- app/views/stall/addresses/_fields.html.haml
|
351
|
+
- app/views/stall/addresses/_nested_fields.html.haml
|
341
352
|
- app/views/stall/admin_mailer/order_paid_email.html.haml
|
353
|
+
- app/views/stall/carts/_cart.html.haml
|
342
354
|
- app/views/stall/carts/show.html.haml
|
343
355
|
- app/views/stall/checkout/steps/show.html.haml
|
344
356
|
- app/views/stall/customer_mailer/order_paid_email.html.haml
|
357
|
+
- app/views/stall/customers/_fields.html.haml
|
358
|
+
- app/views/stall/customers/_sign_in.html.haml
|
345
359
|
- app/views/stall/line_items/_add_error.html.haml
|
346
360
|
- app/views/stall/line_items/_added.html.haml
|
347
361
|
- app/views/stall/line_items/_form.html.haml
|
362
|
+
- app/views/stall/payments/_fields.html.haml
|
348
363
|
- app/views/stall/shared/mailers/_address.html.haml
|
349
364
|
- app/views/stall/shared/mailers/_cart.html.haml
|
365
|
+
- app/views/stall/shipments/_fields.html.haml
|
350
366
|
- config/locales/stall.en.yml
|
351
367
|
- config/locales/stall.fr.yml
|
352
368
|
- db/migrate/20151103154313_create_stall_line_items.rb
|
@@ -380,16 +396,19 @@ files:
|
|
380
396
|
- lib/generators/stall/service/templates/service.rb.erb
|
381
397
|
- lib/generators/stall/shipping/calculator/calculator_generator.rb
|
382
398
|
- lib/generators/stall/shipping/calculator/templates/calculator.rb.erb
|
399
|
+
- lib/generators/stall/view/view_generator.rb
|
383
400
|
- lib/stall.rb
|
384
401
|
- lib/stall/addressable.rb
|
402
|
+
- lib/stall/addresses.rb
|
403
|
+
- lib/stall/addresses/copier_base.rb
|
404
|
+
- lib/stall/addresses/copy_source_to_target.rb
|
405
|
+
- lib/stall/addresses/prefill_target_from_source.rb
|
385
406
|
- lib/stall/cart_helper.rb
|
386
407
|
- lib/stall/carts_cleaner.rb
|
387
408
|
- lib/stall/checkout.rb
|
388
409
|
- lib/stall/checkout/informations_checkout_step.rb
|
389
410
|
- lib/stall/checkout/payment_checkout_step.rb
|
390
|
-
- lib/stall/checkout/payment_method_checkout_step.rb
|
391
411
|
- lib/stall/checkout/payment_return_checkout_step.rb
|
392
|
-
- lib/stall/checkout/shipping_method_checkout_step.rb
|
393
412
|
- lib/stall/checkout/step.rb
|
394
413
|
- lib/stall/checkout/step_form.rb
|
395
414
|
- lib/stall/checkout/wizard.rb
|
@@ -1,21 +0,0 @@
|
|
1
|
-
module Stall
|
2
|
-
module Checkout
|
3
|
-
class ShippingMethodCheckoutStep < Stall::Checkout::Step
|
4
|
-
def prepare
|
5
|
-
cart.build_shipment unless cart.shipment
|
6
|
-
end
|
7
|
-
|
8
|
-
def process
|
9
|
-
super
|
10
|
-
calculate_shipping_fee!
|
11
|
-
end
|
12
|
-
|
13
|
-
private
|
14
|
-
|
15
|
-
def calculate_shipping_fee!
|
16
|
-
service_class = Stall.config.service_for(:shipping_fee_calculator)
|
17
|
-
service_class.new(cart).call
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|