catarse_pagarme 2.6.8 → 2.6.9

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: ff6a622cd627167a2333b62e2eae22e0c17fb007
4
- data.tar.gz: 45724e635fba48ff21551025a623098f2804e98f
3
+ metadata.gz: 894f90495e7e998b8d2e27c199eae39f6d734d8d
4
+ data.tar.gz: fcf3a55791b3c9c082c0e355d8069fe61af9508c
5
5
  SHA512:
6
- metadata.gz: 38a7838bb9ffbec7561f2383ec5adc01dfbbc02a0e594e30b3f0780e2794de87475361af9e7fc26215dace3d3997332f3a76ef935691b554b9a7e7189bb23883
7
- data.tar.gz: 3b38c79e101ab60cd8af03f4d4be3adbd70ab01383c0003c747e7b126296b329a9c7c318fd4128d3b78b3ed4d2d2503b6f99e71599833ad5b2dfa6076410bc28
6
+ metadata.gz: 20621aeeb2b34e07788941cb199792c4e89de23057b9bd0a7af1f176e19e7fd86c22f1d63664933e7648310c7d8a79bec1713617156fb42661d4a205674763e2
7
+ data.tar.gz: a7f03a55bbc46f7b38bb788228c25fc1c749d5aba0180273bb33b64a46098a666783705604501535db7abf2546d5fce20fb6466f679154b22fa3c2e117de60b9
data/Gemfile.lock CHANGED
@@ -1,9 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- catarse_pagarme (2.6.8)
4
+ catarse_pagarme (2.6.9)
5
5
  pagarme (~> 1.9.8)
6
6
  rails (~> 4.0)
7
+ weekdays (>= 1.0.2)
7
8
 
8
9
  GEM
9
10
  remote: https://rubygems.org/
@@ -96,9 +97,9 @@ GEM
96
97
  rspec-core (~> 2.14.0)
97
98
  rspec-expectations (~> 2.14.0)
98
99
  rspec-mocks (~> 2.14.0)
99
- sprockets (3.0.3)
100
+ sprockets (3.1.0)
100
101
  rack (~> 1.0)
101
- sprockets-rails (2.2.4)
102
+ sprockets-rails (2.3.1)
102
103
  actionpack (>= 3.0)
103
104
  activesupport (>= 3.0)
104
105
  sprockets (>= 2.8, < 4.0)
@@ -112,6 +113,7 @@ GEM
112
113
  unf (0.1.4)
113
114
  unf_ext
114
115
  unf_ext (0.0.7.1)
116
+ weekdays (1.0.2)
115
117
 
116
118
  PLATFORMS
117
119
  ruby
@@ -1,3 +1,5 @@
1
+ require 'weekdays'
2
+
1
3
  module CatarsePagarme
2
4
  class SlipController < CatarsePagarme::ApplicationController
3
5
 
@@ -17,9 +19,10 @@ module CatarsePagarme
17
19
  protected
18
20
 
19
21
  def slip_attributes
22
+ expiration_date = (CatarsePagarme.configuration.slip_week_day_interval || 2).weekdays_from_now
20
23
  {
21
24
  payment_method: 'boleto',
22
- boleto_expiration_date: 2.days.from_now,
25
+ boleto_expiration_date: expiration_date,
23
26
  amount: delegator.value_for_transaction,
24
27
  postback_url: ipn_pagarme_index_url(host: CatarsePagarme.configuration.host,
25
28
  subdomain: CatarsePagarme.configuration.subdomain,
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
19
19
 
20
20
  s.add_dependency "rails", "~> 4.0"
21
21
  s.add_dependency "pagarme", "~> 1.9.8"
22
+ s.add_dependency "weekdays", ">= 1.0.2"
22
23
 
23
24
  s.add_development_dependency "rspec-rails", "~> 2.14.0"
24
25
  s.add_development_dependency "factory_girl_rails"
@@ -3,7 +3,7 @@ module CatarsePagarme
3
3
  attr_accessor :api_key, :slip_tax, :credit_card_tax, :interest_rate, :host, :subdomain, :protocol,
4
4
  :max_installments, :minimum_value_for_installment, :credit_card_cents_fee, :pagarme_tax, :stone_tax,
5
5
  :cielo_tax, :cielo_installment_diners_tax, :cielo_installment_not_diners_tax,
6
- :cielo_installment_amex_tax, :cielo_installment_not_amex_tax, :ecr_key
6
+ :cielo_installment_amex_tax, :cielo_installment_not_amex_tax, :ecr_key, :slip_week_day_interval
7
7
 
8
8
  def initialize
9
9
  self.api_key = ''
@@ -24,6 +24,7 @@ module CatarsePagarme
24
24
  self.cielo_installment_not_diners_tax = 0.0455
25
25
  self.cielo_installment_amex_tax = 0.058
26
26
  self.cielo_installment_not_amex_tax = 0.048
27
+ self.slip_week_day_interval = 2
27
28
  end
28
29
  end
29
30
  end
@@ -1,3 +1,3 @@
1
1
  module CatarsePagarme
2
- VERSION = "2.6.8"
2
+ VERSION = "2.6.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: catarse_pagarme
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.8
4
+ version: 2.6.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antônio Roberto Silva
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-05-13 00:00:00.000000000 Z
12
+ date: 2015-05-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -39,6 +39,20 @@ dependencies:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: 1.9.8
42
+ - !ruby/object:Gem::Dependency
43
+ name: weekdays
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: 1.0.2
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 1.0.2
42
56
  - !ruby/object:Gem::Dependency
43
57
  name: rspec-rails
44
58
  requirement: !ruby/object:Gem::Requirement