paypal_nvp 0.1.8 → 0.1.9

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.
Files changed (4) hide show
  1. data/Manifest +3 -3
  2. data/lib/paypal_nvp.rb +13 -13
  3. data/paypal_nvp.gemspec +2 -2
  4. metadata +5 -7
data/Manifest CHANGED
@@ -1,5 +1,5 @@
1
- init.rb
2
- lib/paypal_nvp.rb
3
1
  Manifest
4
- Rakefile
5
2
  README.rdoc
3
+ Rakefile
4
+ init.rb
5
+ lib/paypal_nvp.rb
data/lib/paypal_nvp.rb CHANGED
@@ -9,7 +9,7 @@ class PaypalNVP
9
9
  def initialize(sandbox = false, extras = {})
10
10
  type = sandbox ? "sandbox" : "live"
11
11
  config = YAML.load_file("#{RAILS_ROOT}/config/paypal.yml") rescue nil
12
- @require_ssl_certs = (extras[:require_ssl_certs]!=nil)? extras[:require_ssl_certs] : true
12
+ @require_ssl_certs = extras[:require_ssl_certs].nil?
13
13
  if config
14
14
  @url = config[type]["url"]
15
15
  @user = config[type]["user"]
@@ -29,24 +29,24 @@ class PaypalNVP
29
29
  data.merge!(@extras)
30
30
  qs = []
31
31
  data.each do |key, value|
32
- qs << "#{key.to_s.upcase}=#{URI.escape(value)}"
32
+ qs << "#{key.to_s.upcase}=#{URI.escape(value.to_s)}"
33
33
  end
34
34
  qs = "#{qs * "&"}"
35
35
 
36
36
  uri = URI.parse(@url)
37
37
  http = Net::HTTP.new(uri.host, uri.port)
38
38
  http.use_ssl = true
39
- # http.verify_mode = OpenSSL::SSL::VERIFY_NONE
40
- rootCA = '/etc/ssl/certs'
41
- if File.directory? rootCA
42
- http.ca_path = rootCA
43
- http.verify_mode = OpenSSL::SSL::VERIFY_PEER
44
- http.verify_depth = 5
45
- else
46
- raise "missing ssl certs. Cannot secure paypal communication" if (@require_ssl_certs == true)
47
- puts "WARNING: no ssl certs found. Paypal communication will be insecure. DO NOT DEPLOY"
48
- http.verify_mode = OpenSSL::SSL::VERIFY_NONE
49
- end
39
+ # http.verify_mode = OpenSSL::SSL::VERIFY_NONE
40
+ rootCA = '/etc/ssl/certs'
41
+ if File.directory? rootCA
42
+ http.ca_path = rootCA
43
+ http.verify_mode = OpenSSL::SSL::VERIFY_PEER
44
+ http.verify_depth = 5
45
+ else
46
+ #raise "missing ssl certs. Cannot secure paypal communication" if @require_ssl_certs == true
47
+ puts "WARNING: no ssl certs found. Paypal communication will be insecure. DO NOT DEPLOY"
48
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
49
+ end
50
50
 
51
51
  response = http.start {
52
52
  http.request_post(uri.path, qs) {|res|
data/paypal_nvp.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{paypal_nvp}
5
- s.version = "0.1.8"
5
+ s.version = "0.1.9"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Olivier BONNAURE - Direct Interactive LLC"]
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Paypal_nvp", "--main", "README.rdoc"]
16
16
  s.require_paths = ["lib"]
17
17
  s.rubyforge_project = %q{paypal_nvp}
18
- s.rubygems_version = %q{1.3.5}
18
+ s.rubygems_version = %q{1.7.2}
19
19
  s.summary = %q{Paypal NVP API Class.}
20
20
 
21
21
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paypal_nvp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 8
10
- version: 0.1.8
9
+ - 9
10
+ version: 0.1.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Olivier BONNAURE - Direct Interactive LLC
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-05-28 00:00:00 +02:00
19
- default_executable:
18
+ date: 2010-05-28 00:00:00 Z
20
19
  dependencies: []
21
20
 
22
21
  description: Paypal NVP API Class.
@@ -35,7 +34,6 @@ files:
35
34
  - Rakefile
36
35
  - README.rdoc
37
36
  - paypal_nvp.gemspec
38
- has_rdoc: true
39
37
  homepage: http://github.com/solisoft/paypal_nvp
40
38
  licenses: []
41
39
 
@@ -71,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
69
  requirements: []
72
70
 
73
71
  rubyforge_project: paypal_nvp
74
- rubygems_version: 1.5.2
72
+ rubygems_version: 1.7.2
75
73
  signing_key:
76
74
  specification_version: 3
77
75
  summary: Paypal NVP API Class.