effective_orders 4.0.0beta3 → 4.0.0beta4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 41a725b2c451424ab930ca84057bfa76d9404a14
4
- data.tar.gz: 90b4af7a1be8ad14966a6449b14620271677bb1f
3
+ metadata.gz: c4c93ba62efdec37fd8c277afca2a28090303b8c
4
+ data.tar.gz: 8e89c28503192d4373aca8b13762ab8fede41744
5
5
  SHA512:
6
- metadata.gz: ca7e090b0167792643e3a9d56d4c25d1127e30a7fa84a33df06c96c762a832633aefed1fca2074b37cc28511a1159ad4880f5a09b1501e1e76884c0028269ad7
7
- data.tar.gz: a0cd6b57b48f61aef840cdff2339bac7ec5ff9bf5cf0846121535ffb88e719d30a0f4436eed781e7ca44ab2deeb298b7e5c0df3d8a850a6b6ee9d1e6dbecdc10
6
+ metadata.gz: 5013c1845227a4117f94eb1a7f414b0fa048ecf8e617da3dd82eee2ad16326246edc726877eb898ba0b97ccc739f8909373126d4b1162cb122f393a68bbc0ee3
7
+ data.tar.gz: 51328fba62557431d4ed163a67bb9c61996cb38cff150fb8706c9398b55aef69139b1264bcd1dac3028dba64583bf5833f4daa7695ca6a56d519566404d38d81
@@ -47,7 +47,7 @@ module EffectiveOrdersHelper
47
47
  when :paypal
48
48
  'Checkout with PayPal'
49
49
  when :pretend
50
- EffectiveOrders.pretend_purchase_in_production_enabled ? 'Purchase Order' : 'Purchase Order (development only)'
50
+ 'Purchase Order (skip payment processor)'
51
51
  when :refund
52
52
  'Complete Refund'
53
53
  when :stripe
@@ -30,10 +30,8 @@
30
30
  - if EffectiveOrders.cheque? && order.user == current_user
31
31
  = render partial: '/effective/orders/cheque/form', locals: provider_locals
32
32
 
33
- - if EffectiveOrders.pretend? && Rails.env.production? && EffectiveOrders.pretend_purchase_in_production_message.present?
34
- %br
35
- %p= EffectiveOrders.pretend_purchase_in_production_message
36
-
33
+ - if EffectiveOrders.pretend? && EffectiveOrders.pretend_message.present?
34
+ %p.text-right= EffectiveOrders.pretend_message
37
35
 
38
36
  - if EffectiveOrders.authorized?(controller, :admin, :effective_orders) && order.user != current_user
39
37
  - if EffectiveOrders.refunds? && order.refund?
@@ -103,23 +103,13 @@ EffectiveOrders.setup do |config|
103
103
  # Refunds don't perform any kind of refund action with the payment processor. This just changes the validations.
104
104
  config.refunds_enabled = false
105
105
 
106
- # Pretend Purchase in Development
106
+ # Pretend Purchase
107
107
  # Display a 'Purchase order' button on the Checkout screen allowing the user
108
- # to purchase an Order without going through the payment processor. Works in !Rails.env.production?
109
- config.pretend_purchase_in_development_enabled = true
110
-
111
- # Pretend Purchase in Production
108
+ # to purchase an Order without going through the payment processor.
112
109
  # WARNING: Setting this option to true will allow users to purchase! an Order without entering a credit card
113
110
  # WARNING: When true, users can purchase! anything without paying money
114
- #
115
- # This should basically always be false, but sometimes you want to make a Beta/Demo site
116
- # where users may test the purchase workflow without actually paying money
117
- #
118
- # When true, there will be a 'Process Order' button on the Checkout screen.
119
- # Clicking this button will mark an Order purchased and redirect the user to the
120
- # Thank You page just as if they had successfully Checked Out through a payment processor
121
- config.pretend_purchase_in_production_enabled = false
122
- config.pretend_purchase_in_production_message = '* payment information is not required to process this order at this time.'
111
+ config.pretend_enabled = !Rails.env.production?
112
+ config.pretend_message = '* payment information is not required to process this order at this time.'
123
113
 
124
114
  # Mailer Settings
125
115
  # effective_orders will send out receipts to the buyer, seller and admins.
@@ -21,10 +21,6 @@ module EffectiveOrders
21
21
 
22
22
  mattr_accessor :authorization_method
23
23
 
24
- mattr_accessor :pretend_purchase_in_development_enabled
25
- mattr_accessor :pretend_purchase_in_production_enabled
26
- mattr_accessor :pretend_purchase_in_production_message
27
-
28
24
  mattr_accessor :layout
29
25
  mattr_accessor :mailer
30
26
 
@@ -47,9 +43,13 @@ module EffectiveOrders
47
43
  mattr_accessor :terms_and_conditions_label
48
44
 
49
45
  mattr_accessor :minimum_charge
46
+
47
+ # Features
50
48
  mattr_accessor :free_enabled
51
49
  mattr_accessor :mark_as_paid_enabled
52
50
  mattr_accessor :refunds_enabled
51
+ mattr_accessor :pretend_enabled
52
+ mattr_accessor :pretend_message
53
53
 
54
54
  # Payment processors. false or Hash
55
55
  mattr_accessor :cheque
@@ -110,7 +110,7 @@ module EffectiveOrders
110
110
  end
111
111
 
112
112
  def self.pretend?
113
- (pretend_purchase_in_production_enabled && Rails.env.production?) || (pretend_purchase_in_development_enabled && !Rails.env.production?)
113
+ pretend_enabled == true
114
114
  end
115
115
 
116
116
  def self.refunds?
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '4.0.0beta3'.freeze
2
+ VERSION = '4.0.0beta4'.freeze
3
3
  end
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: 4.0.0beta3
4
+ version: 4.0.0beta4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-02 00:00:00.000000000 Z
11
+ date: 2018-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails