effective_orders 1.3.7 → 1.3.8

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: 1b8769263e5346b0af139545eb1a8f4d37164641
4
- data.tar.gz: 42da041b103a006985390489f4819ac5783964d3
3
+ metadata.gz: 5494ef5456b563f09ab899d1cf820bcf98c4c878
4
+ data.tar.gz: 419a7feeb1554f21da89ea4e917f5b96ffcb396d
5
5
  SHA512:
6
- metadata.gz: 79ce0ce434baf544af4556deb344515f80629670ade517915cfd71ae8fb72d0d0318e4dfda120280e5f6a2544adf09deec6f98e67e8857f71014532d8127aca6
7
- data.tar.gz: 8ef56ae806db2ca6a1229422edf72a8dda874f3331c53aa8753cb27898ef4ffc2c7187be3dc43f4386ad162ccc48975a0e376742e4adad7e5687e852d19f6d8c
6
+ metadata.gz: 119f358d8c7cfe73391ed7e10c88545e8785891d4152e61a64d44b0054c5197fe77b843a3c1ee8e40e6dc801bb66479ed10b5a3ce5874f957821c7a77d57906c
7
+ data.tar.gz: 3e4939eb786b08d7276bdcb097c9042f3d4516e4dc2522de57809ed016644c57ae6e9decc73c7a578800b0a9d37a3519b51e10940092e89d260cb2dbc1e96a01
@@ -127,7 +127,7 @@ module Effective
127
127
  end
128
128
 
129
129
  def pretend_purchase
130
- if Rails.env.development? || EffectiveOrders.allow_pretend_purchase_in_production
130
+ if (Rails.env.development? || Rails.env.test?) || EffectiveOrders.allow_pretend_purchase_in_production
131
131
  @order = Order.find(params[:id])
132
132
  EffectiveOrders.authorized?(self, :update, @order)
133
133
  order_purchased('for pretend', params[:purchased_redirect_url], params[:declined_redirect_url])
@@ -13,6 +13,6 @@
13
13
  - if EffectiveOrders.allow_pretend_purchase_in_production
14
14
  = link_to 'Purchase Order', effective_orders.pretend_purchase_path(order, :purchased_redirect_url => purchased_redirect_url, :declined_redirect_url => declined_redirect_url), :class => 'btn btn-primary', :data => {'disable_with' => 'Purchasing...' }
15
15
  %p= EffectiveOrders.allow_pretend_purchase_in_production_message
16
- - elsif Rails.env.development?
16
+ - elsif (Rails.env.development? || Rails.env.test?)
17
17
  = link_to 'Purchase Order (development only)', effective_orders.pretend_purchase_path(order, :purchased_redirect_url => purchased_redirect_url, :declined_redirect_url => declined_redirect_url), :class => 'btn btn-primary', :data => {'disable_with' => 'Purchasing...' }
18
18
 
data/config/routes.rb CHANGED
@@ -31,7 +31,7 @@ EffectiveOrders::Engine.routes.draw do
31
31
  match 'orders/my_sales', :to => 'orders#my_sales', :as => 'my_sales', :via => :get
32
32
  end
33
33
 
34
- if Rails.env.development? || EffectiveOrders.allow_pretend_purchase_in_production
34
+ if (Rails.env.development? || Rails.env.test?) || EffectiveOrders.allow_pretend_purchase_in_production
35
35
  match 'orders/:id/pretend_purchase', :to => 'orders#pretend_purchase', :as => 'pretend_purchase', :via => [:get, :post]
36
36
  end
37
37
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '1.3.7'.freeze
2
+ VERSION = '1.3.8'.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: 1.3.7
4
+ version: 1.3.8
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: 2015-06-08 00:00:00.000000000 Z
11
+ date: 2015-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails