paypal_adaptive 0.3.9 → 0.3.10

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: f7c4d131045d2ff9a03863fb71918db1c7c12053
4
- data.tar.gz: 1d143392a64a072c8bc2a6c3951d4a55c122e91c
3
+ metadata.gz: c7d29ebb60621de3f59a9b04196514055919a811
4
+ data.tar.gz: a6dc95ce352efb590a3d10b94c543a16972d64a9
5
5
  SHA512:
6
- metadata.gz: d4ddd61bd2809e25b16277f359798f5d26ff6a0c1ed097841e66d444f598f90f14e6fbaac281c072848b5cc3d63ad477419b182270c7f65710acd77cc0e41dc6
7
- data.tar.gz: 22fe731aff26f763d58275d89f0fcaf47958ff4b333ae226fa4e9e5f90ed2792954375ae94deec09ff0f554c75c6df85b8b64f206ed621c5748db7e4c321a378
6
+ metadata.gz: cb3462103c5a3c4c5e8cce3ce5c307ef5df1fab8345bd0d6a83b8d28fde4a109b0bc746a35adf7a3b688f3bef8ac2d5d9b5385fa0ecaeac8dce7371d06588824
7
+ data.tar.gz: 2c5a762eb1f151b93c9773adbf7477051d7790f6763fe0ab9ccd506d798e9964595edc415d02333c51cd7d0ea4533296538566f867cd731a0ddb84d8bca21c93
@@ -96,6 +96,9 @@ for each environment, e.g.:
96
96
  The api_cert_file should point to your cert_key_pem.txt that is downloaded through the paypal developer interface. It will contain a section that specifies the RSA private key and another section that specifies a certificate. If this is left empty, paypal_adaptive will attempt to use the signature method of validation with PayPal, so your signature config must not be nil.
97
97
 
98
98
  ## Changelog
99
+ 0.3.10
100
+ Remove Rails dependent gems thanks @ rchekaluk
101
+
99
102
  0.3.9
100
103
  Ensure POST response is not decompressed under Ruby 2.0 thanks @rchekaluk
101
104
 
@@ -46,9 +46,9 @@ module PaypalAdaptive
46
46
  "X-PAYPAL-RESPONSE-DATA-FORMAT" => "JSON"
47
47
  }
48
48
  @headers.merge!({"X-PAYPAL-SECURITY-SIGNATURE" => config['signature']}) if config['signature']
49
- @ssl_cert_path = config['ssl_cert_path'] unless config['ssl_cert_path'].blank?
50
- @ssl_cert_file = config['ssl_cert_file'] unless config['ssl_cert_file'].blank?
51
- @api_cert_file = config['api_cert_file'] unless config['api_cert_file'].blank?
49
+ @ssl_cert_path = config['ssl_cert_path'] unless config['ssl_cert_path'].nil? || config['ssl_cert_path'].length == 0
50
+ @ssl_cert_file = config['ssl_cert_file'] unless config['ssl_cert_file'].nil? || config['ssl_cert_file'].length == 0
51
+ @api_cert_file = config['api_cert_file'] unless config['api_cert_file'].nil? || config['api_cert_file'].length == 0
52
52
  @verify_mode = if pp_env == :sandbox
53
53
  OpenSSL::SSL::VERIFY_NONE
54
54
  else
@@ -29,8 +29,8 @@ module PaypalAdaptive
29
29
  http.cert = OpenSSL::X509::Certificate.new(cert)
30
30
  http.key = OpenSSL::PKey::RSA.new(cert)
31
31
  end
32
- http.ca_path = @ssl_cert_path unless @ssl_cert_path.blank?
33
- http.ca_file = @ssl_cert_file unless @ssl_cert_file.blank?
32
+ http.ca_path = @ssl_cert_path unless @ssl_cert_path.nil? || @ssl_cert_path.length == 0
33
+ http.ca_file = @ssl_cert_file unless @ssl_cert_file.nil? || @ssl_cert_file.length == 0
34
34
 
35
35
  req = Net::HTTP::Post.new(url.request_uri)
36
36
  # we don't want #set_form_data to create a hash and get our
@@ -110,8 +110,8 @@ module PaypalAdaptive
110
110
  http.cert = OpenSSL::X509::Certificate.new(cert)
111
111
  http.key = OpenSSL::PKey::RSA.new(cert)
112
112
  end
113
- http.ca_path = @ssl_cert_path unless @ssl_cert_path.blank?
114
- http.ca_file = @ssl_cert_file unless @ssl_cert_file.blank?
113
+ http.ca_path = @ssl_cert_path unless @ssl_cert_path.nil? || @ssl_cert_path.length == 0
114
+ http.ca_file = @ssl_cert_file unless @ssl_cert_file.nil? || @ssl_cert_file.length == 0
115
115
 
116
116
  begin
117
117
  response_data = http.post(path, api_request_data, @headers)
@@ -1,4 +1,4 @@
1
1
  module PaypalAdaptive
2
- VERSION = "0.3.9"
2
+ VERSION = "0.3.10"
3
3
  end
4
4
 
@@ -15,7 +15,6 @@ Gem::Specification.new do |s|
15
15
  s.add_dependency("json", "~>1.0")
16
16
  s.add_dependency("jsonschema", "~>2.0.0")
17
17
  s.add_development_dependency("rake")
18
- s.add_development_dependency("activesupport", "~> 3.2.0")
19
18
  s.add_development_dependency("webmock")
20
19
 
21
20
  s.rubyforge_project = "paypal_adaptive"
@@ -6,7 +6,6 @@ require "test/unit"
6
6
  require "json"
7
7
  require "jsonschema"
8
8
  require 'paypal_adaptive'
9
- require 'active_support/core_ext/string'
10
9
  require 'webmock/minitest'
11
10
 
12
11
  WebMock.allow_net_connect!
@@ -7,6 +7,12 @@ class ConfigTest < Test::Unit::TestCase
7
7
  assert_equal nil, @config.ssl_cert_path
8
8
  end
9
9
 
10
+ def test_blank_ssl_cert_file
11
+ @config = PaypalAdaptive::Config.new("test", { "ssl_cert_file" => "" })
12
+ assert_equal nil, @config.ssl_cert_file
13
+ assert_equal nil, @config.ssl_cert_path
14
+ end
15
+
10
16
  def test_erb_tags
11
17
  ENV['paypal.username'] = 'account@email.com'
12
18
  ENV['paypal.password'] = 's3krit'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paypal_adaptive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tommy Chheng
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-17 00:00:00.000000000 Z
11
+ date: 2015-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: activesupport
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 3.2.0
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 3.2.0
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: webmock
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -177,3 +163,4 @@ test_files:
177
163
  - test/unit/payment_options_test.rb
178
164
  - test/unit/preapproval_test.rb
179
165
  - test/unit/request_test.rb
166
+ has_rdoc: