effective_orders 3.1.6 → 3.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/config/effective_orders_manifest.js +3 -0
- data/app/controllers/effective/orders_controller.rb +1 -1
- data/app/models/effective/cart.rb +2 -1
- data/app/models/effective/customer.rb +1 -1
- data/app/models/effective/order_item.rb +1 -1
- data/app/models/effective/providers/moneris_charge.rb +2 -1
- data/app/models/{validators/effective → effective}/sold_out_validator.rb +0 -0
- data/lib/effective_orders/engine.rb +5 -1
- data/lib/effective_orders/version.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 031a1810c8fc9ae6aa2909a0ee16cf73ad9b90b6a0aee17a353aafa033a39d7a
|
4
|
+
data.tar.gz: 652fad3647b97f20d0f950fa9da4d989111eee33f98d5110ce9b70aa421208e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1c8c8e6b0554a22e6a091ab4ba206a33e66ef775172961df346b10ac5898b0d16a04d7d1469cef3dc3bc77ec5b8137e6cb2b349c690eb46c67eb0d4c9bf78cc
|
7
|
+
data.tar.gz: c4187ce976881522ac9c45448c0c2f58cb8cb18211f8254f33e8e8dc1e9bfcee075e61e58e0dab36a375506f450665bb80888ae1a7b95a3e561754b35ea9336b
|
@@ -19,7 +19,7 @@ module Effective
|
|
19
19
|
|
20
20
|
layout (EffectiveOrders.layout.kind_of?(Hash) ? EffectiveOrders.layout[:orders] : EffectiveOrders.layout)
|
21
21
|
|
22
|
-
before_action :authenticate_user!, except: [:ccbill_postback, :free, :paypal_postback, :pretend]
|
22
|
+
before_action :authenticate_user!, except: [:ccbill_postback, :free, :moneris_postback, :paypal_postback, :pretend]
|
23
23
|
before_action :set_page_title, except: [:show]
|
24
24
|
|
25
25
|
# This is the entry point for any Checkout button
|
@@ -2,7 +2,8 @@ module Effective
|
|
2
2
|
class Cart < ActiveRecord::Base
|
3
3
|
self.table_name = EffectiveOrders.carts_table_name.to_s
|
4
4
|
|
5
|
-
|
5
|
+
# Optional. We want non-logged-in users to have carts too.
|
6
|
+
belongs_to :user, optional: true
|
6
7
|
has_many :cart_items, -> { includes(:purchasable).order(:updated_at) }, dependent: :delete_all, class_name: 'Effective::CartItem'
|
7
8
|
|
8
9
|
accepts_nested_attributes_for :cart_items
|
@@ -32,7 +32,7 @@ module Effective
|
|
32
32
|
validates :stripe_customer_id, presence: true
|
33
33
|
validates :status, if: -> { stripe_subscription_id.present? }, inclusion: { in: %w(active past_due) }
|
34
34
|
|
35
|
-
def self.
|
35
|
+
def self.for_buyer(user)
|
36
36
|
Effective::Customer.where(user: user).first_or_initialize
|
37
37
|
end
|
38
38
|
|
@@ -4,7 +4,7 @@ module Effective
|
|
4
4
|
|
5
5
|
belongs_to :order, class_name: 'Effective::Order'
|
6
6
|
belongs_to :purchasable, polymorphic: true
|
7
|
-
belongs_to :seller, class_name: 'User'
|
7
|
+
belongs_to :seller, class_name: 'User', optional: true
|
8
8
|
|
9
9
|
delegate :purchased_download_url, to: :purchasable
|
10
10
|
delegate :purchased?, :declined?, to: :order
|
@@ -104,7 +104,8 @@ module Effective
|
|
104
104
|
def order_id
|
105
105
|
[
|
106
106
|
order.to_param,
|
107
|
-
(order.billing_name.to_s.parameterize.presence if EffectiveOrders.moneris[:include_billing_name_in_order_id])
|
107
|
+
(order.billing_name.to_s.parameterize.presence if EffectiveOrders.moneris[:include_billing_name_in_order_id]),
|
108
|
+
Time.zone.now.to_i
|
108
109
|
].compact.join('-')
|
109
110
|
end
|
110
111
|
|
File without changes
|
@@ -2,7 +2,7 @@ module EffectiveOrders
|
|
2
2
|
class Engine < ::Rails::Engine
|
3
3
|
engine_name 'effective_orders'
|
4
4
|
|
5
|
-
config.autoload_paths += Dir["#{config.root}/app/models/**/"]
|
5
|
+
#config.autoload_paths += Dir["#{config.root}/app/models/**/"]
|
6
6
|
|
7
7
|
# Include acts_as_addressable concern and allow any ActiveRecord object to call it
|
8
8
|
initializer 'effective_orders.active_record' do |app|
|
@@ -18,6 +18,10 @@ module EffectiveOrders
|
|
18
18
|
eval File.read("#{config.root}/config/effective_orders.rb")
|
19
19
|
end
|
20
20
|
|
21
|
+
initializer 'effective_orders.assets' do |app|
|
22
|
+
app.config.assets.precompile += ['effective_orders_manifest.js', 'effective_orders/*']
|
23
|
+
end
|
24
|
+
|
21
25
|
# Set up mail delivering config option
|
22
26
|
initializer 'effective_orders.mailer', after: :load_config_initializers do |app|
|
23
27
|
deliver_method = Rails.gem_version >= Gem::Version.new('4.2') ? :deliver_now : :deliver
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_orders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -119,6 +119,7 @@ files:
|
|
119
119
|
- MIT-LICENSE
|
120
120
|
- README.md
|
121
121
|
- Rakefile
|
122
|
+
- app/assets/config/effective_orders_manifest.js
|
122
123
|
- app/assets/images/effective_orders/stripe_connect.png
|
123
124
|
- app/assets/javascripts/effective_orders.js
|
124
125
|
- app/assets/javascripts/effective_orders/customers.js.coffee
|
@@ -169,10 +170,10 @@ files:
|
|
169
170
|
- app/models/effective/providers/ccbill_postback.rb
|
170
171
|
- app/models/effective/providers/moneris_charge.rb
|
171
172
|
- app/models/effective/providers/stripe_charge.rb
|
173
|
+
- app/models/effective/sold_out_validator.rb
|
172
174
|
- app/models/effective/subscripter.rb
|
173
175
|
- app/models/effective/subscription.rb
|
174
176
|
- app/models/effective/tax_rate_calculator.rb
|
175
|
-
- app/models/validators/effective/sold_out_validator.rb
|
176
177
|
- app/views/admin/customers/_actions.html.haml
|
177
178
|
- app/views/admin/customers/index.html.haml
|
178
179
|
- app/views/admin/customers/show.html.haml
|
@@ -255,7 +256,7 @@ homepage: https://github.com/code-and-effect/effective_orders
|
|
255
256
|
licenses:
|
256
257
|
- MIT
|
257
258
|
metadata: {}
|
258
|
-
post_install_message:
|
259
|
+
post_install_message:
|
259
260
|
rdoc_options: []
|
260
261
|
require_paths:
|
261
262
|
- lib
|
@@ -270,8 +271,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
270
271
|
- !ruby/object:Gem::Version
|
271
272
|
version: '0'
|
272
273
|
requirements: []
|
273
|
-
rubygems_version: 3.
|
274
|
-
signing_key:
|
274
|
+
rubygems_version: 3.1.2
|
275
|
+
signing_key:
|
275
276
|
specification_version: 4
|
276
277
|
summary: Quickly build an online store with carts, orders, automatic email receipts
|
277
278
|
and payment collection via Stripe, StripeConnect, PayPal and Moneris.
|