catarse_paypal_express 2.2.1 → 2.2.2

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: 07eed4533c5542caa215045ca70b7f41d716d322
4
- data.tar.gz: 019bca2925c07d4c5bfcc43934b099d926f5d81e
3
+ metadata.gz: e32edadcb0632c3fb8df93ef94b22de3f86e29c9
4
+ data.tar.gz: 2f8216ff7773b2fc95adbcb376edd09eaebc441e
5
5
  SHA512:
6
- metadata.gz: 18032dd6c34667a2b1ce5b5375cf7033e1c7926ee88f3be84b0933b88a7ba9c0750231b8b1d9903581cc19c042c55f742f318a37c6f6e6cc3bf9b7479f0bac36
7
- data.tar.gz: a41ae452e1c547953a9316cc7f2d7742e5e637cb20ecfb0c4dc6ba988805baa1485e79acd2e2fe1eae474833d6f01abce5d304222501d0df2ee8b209f1412845
6
+ metadata.gz: 2e8fb84cd0db2185f5de230ee58856ddc5b7eae63265bf9af67efb64210291189c044ef93720f41fb06e59d487c134a4ab8920847e3025afcee8f8df4e2be440
7
+ data.tar.gz: 8ae78e4dd7605215098cafd10279d06bd9a4ebc8c89978ae13850735a5544adae9a0c90bce0669cdca22ffe1d5789f6c6a072c8faf623c79954c9f494a780bce
data/.travis.yml CHANGED
@@ -1,5 +1,4 @@
1
1
  rvm:
2
- - 1.9.3
3
2
  - 2.0.0
4
3
 
5
4
  before_script:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- catarse_paypal_express (2.2.0)
4
+ catarse_paypal_express (2.2.2)
5
5
  activemerchant (>= 1.34.0)
6
6
  rails (~> 4.0)
7
7
  slim-rails
@@ -9,103 +9,108 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionmailer (4.0.0)
13
- actionpack (= 4.0.0)
14
- mail (~> 2.5.3)
15
- actionpack (4.0.0)
16
- activesupport (= 4.0.0)
12
+ actionmailer (4.0.4)
13
+ actionpack (= 4.0.4)
14
+ mail (~> 2.5.4)
15
+ actionpack (4.0.4)
16
+ activesupport (= 4.0.4)
17
17
  builder (~> 3.1.0)
18
18
  erubis (~> 2.7.0)
19
19
  rack (~> 1.5.2)
20
20
  rack-test (~> 0.6.2)
21
- active_utils (2.0.0)
21
+ active_utils (2.0.2)
22
22
  activesupport (>= 2.3.11)
23
23
  i18n
24
- activemerchant (1.36.0)
25
- active_utils (>= 1.0.2)
26
- activesupport (>= 2.3.14)
27
- builder (>= 2.0.0)
28
- i18n
29
- json (>= 1.5.1)
30
- money
31
- nokogiri (< 1.6.0)
32
- activemodel (4.0.0)
33
- activesupport (= 4.0.0)
24
+ activemerchant (1.42.6)
25
+ active_utils (~> 2.0, >= 2.0.1)
26
+ activesupport (>= 2.3.14, < 5.0.0)
27
+ builder (>= 2.1.2, < 4.0.0)
28
+ i18n (~> 0.5)
29
+ json (~> 1.7)
30
+ money (< 7.0.0)
31
+ nokogiri (~> 1.4)
32
+ activemodel (4.0.4)
33
+ activesupport (= 4.0.4)
34
34
  builder (~> 3.1.0)
35
- activerecord (4.0.0)
36
- activemodel (= 4.0.0)
35
+ activerecord (4.0.4)
36
+ activemodel (= 4.0.4)
37
37
  activerecord-deprecated_finders (~> 1.0.2)
38
- activesupport (= 4.0.0)
38
+ activesupport (= 4.0.4)
39
39
  arel (~> 4.0.0)
40
40
  activerecord-deprecated_finders (1.0.3)
41
- activesupport (4.0.0)
42
- i18n (~> 0.6, >= 0.6.4)
41
+ activesupport (4.0.4)
42
+ i18n (~> 0.6, >= 0.6.9)
43
43
  minitest (~> 4.2)
44
44
  multi_json (~> 1.3)
45
45
  thread_safe (~> 0.1)
46
46
  tzinfo (~> 0.3.37)
47
- arel (4.0.1)
48
- atomic (1.1.13)
47
+ arel (4.0.2)
48
+ atomic (1.1.16)
49
49
  builder (3.1.4)
50
- database_cleaner (1.1.1)
51
- diff-lcs (1.2.4)
50
+ database_cleaner (1.2.0)
51
+ diff-lcs (1.2.5)
52
52
  erubis (2.7.0)
53
- factory_girl (4.2.0)
53
+ factory_girl (4.4.0)
54
54
  activesupport (>= 3.0.0)
55
- factory_girl_rails (4.2.1)
56
- factory_girl (~> 4.2.0)
55
+ factory_girl_rails (4.4.1)
56
+ factory_girl (~> 4.4.0)
57
57
  railties (>= 3.0.0)
58
58
  hike (1.2.3)
59
- i18n (0.6.5)
60
- json (1.8.0)
59
+ i18n (0.6.9)
60
+ json (1.8.1)
61
61
  mail (2.5.4)
62
62
  mime-types (~> 1.16)
63
63
  treetop (~> 1.4.8)
64
64
  mime-types (1.25.1)
65
+ mini_portile (0.5.2)
65
66
  minitest (4.7.5)
66
- money (5.1.1)
67
- i18n (~> 0.6.0)
68
- multi_json (1.7.9)
69
- nokogiri (1.5.10)
70
- pg (0.16.0)
71
- polyglot (0.3.3)
67
+ monetize (0.1.4)
68
+ money (6.0.1)
69
+ i18n (~> 0.6.4)
70
+ monetize (~> 0.1.3)
71
+ multi_json (1.9.0)
72
+ nokogiri (1.6.1)
73
+ mini_portile (~> 0.5.0)
74
+ pg (0.17.1)
75
+ polyglot (0.3.4)
72
76
  rack (1.5.2)
73
77
  rack-test (0.6.2)
74
78
  rack (>= 1.0)
75
- rails (4.0.0)
76
- actionmailer (= 4.0.0)
77
- actionpack (= 4.0.0)
78
- activerecord (= 4.0.0)
79
- activesupport (= 4.0.0)
79
+ rails (4.0.4)
80
+ actionmailer (= 4.0.4)
81
+ actionpack (= 4.0.4)
82
+ activerecord (= 4.0.4)
83
+ activesupport (= 4.0.4)
80
84
  bundler (>= 1.3.0, < 2.0)
81
- railties (= 4.0.0)
85
+ railties (= 4.0.4)
82
86
  sprockets-rails (~> 2.0.0)
83
- railties (4.0.0)
84
- actionpack (= 4.0.0)
85
- activesupport (= 4.0.0)
87
+ railties (4.0.4)
88
+ actionpack (= 4.0.4)
89
+ activesupport (= 4.0.4)
86
90
  rake (>= 0.8.7)
87
91
  thor (>= 0.18.1, < 2.0)
88
- rake (10.1.0)
89
- rspec-core (2.14.5)
90
- rspec-expectations (2.14.2)
92
+ rake (10.1.1)
93
+ rspec-core (2.14.8)
94
+ rspec-expectations (2.14.5)
91
95
  diff-lcs (>= 1.1.3, < 2.0)
92
- rspec-mocks (2.14.3)
93
- rspec-rails (2.14.0)
96
+ rspec-mocks (2.14.6)
97
+ rspec-rails (2.14.1)
94
98
  actionpack (>= 3.0)
99
+ activemodel (>= 3.0)
95
100
  activesupport (>= 3.0)
96
101
  railties (>= 3.0)
97
102
  rspec-core (~> 2.14.0)
98
103
  rspec-expectations (~> 2.14.0)
99
104
  rspec-mocks (~> 2.14.0)
100
- slim (2.0.1)
105
+ slim (2.0.2)
101
106
  temple (~> 0.6.6)
102
107
  tilt (>= 1.3.3, < 2.1)
103
- slim-rails (2.0.1)
108
+ slim-rails (2.1.2)
104
109
  actionpack (>= 3.0, < 4.1)
105
110
  activesupport (>= 3.0, < 4.1)
106
111
  railties (>= 3.0, < 4.1)
107
112
  slim (~> 2.0)
108
- sprockets (2.10.1)
113
+ sprockets (2.12.0)
109
114
  hike (~> 1.2)
110
115
  multi_json (~> 1.0)
111
116
  rack (~> 1.0)
@@ -114,15 +119,15 @@ GEM
114
119
  actionpack (>= 3.0)
115
120
  activesupport (>= 3.0)
116
121
  sprockets (~> 2.8)
117
- temple (0.6.6)
122
+ temple (0.6.7)
118
123
  thor (0.18.1)
119
- thread_safe (0.1.2)
120
- atomic
124
+ thread_safe (0.3.0)
125
+ atomic (>= 1.1.7, < 2)
121
126
  tilt (1.4.1)
122
127
  treetop (1.4.15)
123
128
  polyglot
124
129
  polyglot (>= 0.3.1)
125
- tzinfo (0.3.37)
130
+ tzinfo (0.3.39)
126
131
 
127
132
  PLATFORMS
128
133
  ruby
@@ -1,15 +1,5 @@
1
1
  begin
2
- PaymentEngines.register({
3
- name: 'paypal',
4
- review_path: ->(contribution) {
5
- CatarsePaypalExpress::Engine.routes.url_helpers.review_paypal_express_path(contribution)
6
- },
7
- can_do_refund?: true,
8
- direct_refund: ->(contribution) {
9
- CatarsePaypalExpress::ContributionActions.new(contribution).refund
10
- },
11
- locale: 'en'
12
- })
2
+ PaymentEngines.register(CatarsePaypalExpress::PaymentEngine.new)
13
3
  rescue Exception => e
14
4
  puts "Error while registering payment engine: #{e}"
15
5
  end
@@ -0,0 +1,29 @@
1
+ begin
2
+ module CatarsePaypalExpress
3
+ class PaymentEngine < PaymentEngines::Interface
4
+
5
+ def name
6
+ 'PayPal'
7
+ end
8
+
9
+ def review_path contribution
10
+ CatarsePaypalExpress::Engine.routes.url_helpers.review_paypal_express_path(contribution)
11
+ end
12
+
13
+ def can_do_refund?
14
+ true
15
+ end
16
+
17
+ def direct_refund contribution
18
+ CatarsePaypalExpress::ContributionActions.new(contribution).refund
19
+ end
20
+
21
+ def locale
22
+ 'en'
23
+ end
24
+
25
+ end
26
+ end
27
+ rescue Exception => e
28
+ puts "Error while use payment engine interface: #{e}"
29
+ end
@@ -1,3 +1,3 @@
1
1
  module CatarsePaypalExpress
2
- VERSION = "2.2.1"
2
+ VERSION = "2.2.2"
3
3
  end
@@ -2,6 +2,7 @@ require 'active_merchant'
2
2
  require "catarse_paypal_express/engine"
3
3
  require "catarse_paypal_express/gateway"
4
4
  require "catarse_paypal_express/contribution_actions"
5
+ require "catarse_paypal_express/payment_engine"
5
6
 
6
7
  module CatarsePaypalExpress
7
8
  end
@@ -1,3 +1,5 @@
1
1
  # dummy class to be stubbed should use interface defined in Catarse
2
2
  class PaymentEngines
3
+ class Interface
4
+ end
3
5
  end
@@ -12,6 +12,7 @@ module Dummy
12
12
  # Application configuration should go into files in config/initializers
13
13
  # -- all .rb files in that directory are automatically loaded.
14
14
 
15
+
15
16
  # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
16
17
  # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
17
18
  # config.time_zone = 'Central Time (US & Canada)'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: catarse_paypal_express
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antônio Roberto Silva
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-03-13 00:00:00.000000000 Z
13
+ date: 2014-03-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -129,6 +129,7 @@ files:
129
129
  - lib/catarse_paypal_express/contribution_actions.rb
130
130
  - lib/catarse_paypal_express/engine.rb
131
131
  - lib/catarse_paypal_express/gateway.rb
132
+ - lib/catarse_paypal_express/payment_engine.rb
132
133
  - lib/catarse_paypal_express/version.rb
133
134
  - lib/tasks/catarse_paypal_express_tasks.rake
134
135
  - script/rails