ideal-mollie 0.0.8 → 1.0.0

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.
data/.travis.yml CHANGED
@@ -1,12 +1,19 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - 1.8.7
3
4
  - 1.9.2
4
5
  - 1.9.3
6
+ - jruby-18mode
7
+ - jruby-19mode
8
+ - rbx-18mode
9
+ - rbx-19mode
5
10
  - ruby-head
11
+ - jruby-head
12
+ - ree
6
13
  env:
7
14
  - TRAVIS_BUILD=true
15
+ matrix:
16
+ allow_failures:
17
+ - rvm: ruby-head
18
+ - rvm: jruby-head
8
19
  script: "bundle exec rake spec"
9
- notifications:
10
- recipients:
11
- - manuel@manuelles.nl
12
-
data/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Changelog
2
2
 
3
- - ** TBA **: version 0.0.9
3
+ - **10 July 2012**: version 1.0.0
4
+ - Released version 1.0
5
+ - Added more platforms to test on Travis CI
6
+ - Fixed spec for latets version of RSpec (2.11.0)
4
7
 
5
8
  - **9 May 2012**: version 0.0.8
6
9
  - Upgraded dependency multi_xml to 0.5
data/Gemfile CHANGED
@@ -1,4 +1,8 @@
1
1
  source "http://rubygems.org"
2
2
 
3
+ platforms :jruby do
4
+ gem "jruby-openssl"
5
+ end
6
+
3
7
  # Specify your gem's dependencies in ideal-mollie.gemspec
4
8
  gemspec
data/Rakefile CHANGED
@@ -2,7 +2,9 @@ require "bundler/gem_tasks"
2
2
  require "rspec/core/rake_task"
3
3
  RSpec::Core::RakeTask.new("spec")
4
4
 
5
- require "yard"
6
- YARD::Rake::YardocTask.new do |t|
7
- t.options += ["--title", "Ideal-Mollie #{IdealMollie::VERSION} Documentation"]
5
+ if ENV['TRAVIS_BUILD'].nil?
6
+ require "yard"
7
+ YARD::Rake::YardocTask.new do |t|
8
+ t.options += ["--title", "Ideal-Mollie #{IdealMollie::VERSION} Documentation"]
9
+ end
8
10
  end
data/ideal-mollie.gemspec CHANGED
@@ -21,12 +21,14 @@ Gem::Specification.new do |s|
21
21
  s.add_development_dependency "rspec"
22
22
  s.add_development_dependency "vcr"
23
23
  s.add_development_dependency "fakeweb"
24
- s.add_development_dependency "yard"
25
- s.add_development_dependency "redcarpet"
26
-
27
- # skip simplecov for travis-ci
28
- s.add_development_dependency "simplecov" if ENV['TRAVIS_BUILD'].nil?
29
-
24
+
25
+ # skipped gems on travis ci
26
+ if ENV['TRAVIS_BUILD'].nil?
27
+ s.add_development_dependency "simplecov"
28
+ s.add_development_dependency "yard"
29
+ s.add_development_dependency "redcarpet"
30
+ end
31
+
30
32
  s.add_dependency "rake", "~> 0.9.0"
31
33
  s.add_dependency "faraday", "~> 0.8.0"
32
34
  s.add_dependency "faraday_middleware", "~> 0.8.1"
@@ -1,4 +1,4 @@
1
1
  module IdealMollie
2
2
  # Version number of IdealMollie
3
- VERSION = "0.0.8"
3
+ VERSION = "1.0.0"
4
4
  end
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  describe IdealMollie::IdealException do
4
4
  context "#new_order" do
5
5
  it "should throw exception when no config is set" do
6
- VCR.use_cassette("new_order") do
6
+ VCR.use_cassette("new_order", :match_requests_on => [:ignore_query_param_ordering]) do
7
7
  config = IdealMollie::Config
8
8
  config.reset!
9
9
  expect { IdealMollie.new_order(1234, "exception test", "0031") }.
@@ -18,7 +18,7 @@ describe IdealMollie::IdealException do
18
18
  config.report_url = "http://example.org/report"
19
19
  config.return_url = "http://example.org/return"
20
20
 
21
- VCR.use_cassette("new_order") do
21
+ VCR.use_cassette("new_order", :match_requests_on => [:ignore_query_param_ordering]) do
22
22
  expect { IdealMollie.new_order(1234, "exception test", "0031") }.
23
23
  to raise_error(IdealMollie::IdealException, /This account does not exist or is suspended./)
24
24
  end
@@ -32,7 +32,7 @@ describe IdealMollie::IdealException do
32
32
  config.report_url = "http://example.org/report"
33
33
  config.return_url = "http://example.org/return"
34
34
 
35
- VCR.use_cassette("new_order") do
35
+ VCR.use_cassette("new_order", :match_requests_on => [:ignore_query_param_ordering]) do
36
36
  expect { IdealMollie.new_order(1234, "exception test", "0031") }.
37
37
  to raise_error(IdealMollie::IdealException, /A fetch was issued for an unknown or inactive profile./)
38
38
  end
@@ -47,7 +47,7 @@ describe IdealMollie::IdealException do
47
47
  config.report_url = "http://example.org/report"
48
48
  config.return_url = "http://example.org/return"
49
49
 
50
- VCR.use_cassette("check_order") do
50
+ VCR.use_cassette("check_order", :match_requests_on => [:ignore_query_param_ordering]) do
51
51
  expect { IdealMollie.check_order("482d599bbcc7795727650330ad65fe9b") }.
52
52
  to raise_error(IdealMollie::IdealException, /This is an unknown order./)
53
53
  end
@@ -12,9 +12,9 @@ describe IdealMollie do
12
12
 
13
13
  context "#banks" do
14
14
  it "returns an array with banks" do
15
- VCR.use_cassette("banks") do
15
+ VCR.use_cassette("banks", :match_requests_on => [:ignore_query_param_ordering]) do
16
16
  banks = IdealMollie.banks
17
- banks.class.is_a?Array.should be_true
17
+ banks.is_a?(Array).should be_true
18
18
  banks.count > 0
19
19
 
20
20
  bank = banks.first
@@ -26,7 +26,7 @@ describe IdealMollie do
26
26
 
27
27
  context "#new_order" do
28
28
  it "should return a Order with the correct values" do
29
- VCR.use_cassette("new_order") do
29
+ VCR.use_cassette("new_order", :match_requests_on => [:ignore_query_param_ordering]) do
30
30
  order = IdealMollie.new_order(1000, "test", "0031")
31
31
  order.transaction_id.should eq "c9f93e5c2bd6c1e7c5bee5c5580c6f83"
32
32
  order.amount.should eq 1000
@@ -38,7 +38,7 @@ describe IdealMollie do
38
38
  it "should return a Order for profile_key with the correct values" do
39
39
  @config.profile_key = "123abc45"
40
40
  @config.update!
41
- VCR.use_cassette("new_order") do
41
+ VCR.use_cassette("new_order", :match_requests_on => [:ignore_query_param_ordering]) do
42
42
  order = IdealMollie.new_order(1000, "test", "0031")
43
43
  order.transaction_id.should eq "474ed7b2735cbe4d1f4fd4da23269263"
44
44
  order.amount.should eq 1000
@@ -69,7 +69,7 @@ describe IdealMollie do
69
69
 
70
70
  context "#check_order" do
71
71
  it "should return a OrderResult with the correct values" do
72
- VCR.use_cassette("check_order") do
72
+ VCR.use_cassette("check_order", :match_requests_on => [:ignore_query_param_ordering]) do
73
73
  order_result = IdealMollie.check_order("c9f93e5c2bd6c1e7c5bee5c5580c6f83")
74
74
  order_result.transaction_id.should eq "c9f93e5c2bd6c1e7c5bee5c5580c6f83"
75
75
  order_result.amount.should eq 1000
@@ -81,7 +81,7 @@ describe IdealMollie do
81
81
  end
82
82
 
83
83
  it "should mark the OrderResult as paid and contain the customer information when called by mollie" do
84
- VCR.use_cassette("check_order") do
84
+ VCR.use_cassette("check_order", :match_requests_on => [:ignore_query_param_ordering]) do
85
85
  order_result = IdealMollie.check_order("482d599bbcc7795727650330ad65fe9b")
86
86
  order_result.transaction_id.should eq "482d599bbcc7795727650330ad65fe9b"
87
87
  order_result.amount.should eq 1000
data/spec/spec_helper.rb CHANGED
@@ -6,11 +6,21 @@ end
6
6
  require 'rubygems'
7
7
  require 'bundler/setup'
8
8
  require 'vcr'
9
+ require 'cgi'
9
10
  require 'ideal-mollie'
10
11
 
11
12
  VCR.configure do |c|
12
13
  c.cassette_library_dir = 'spec/vcr_cassettes'
13
14
  c.hook_into :fakeweb
15
+ c.register_request_matcher :ignore_query_param_ordering do |r1, r2|
16
+ uri1 = URI(r1.uri)
17
+ uri2 = URI(r2.uri)
18
+
19
+ uri1.scheme == uri2.scheme &&
20
+ uri1.host == uri2.host &&
21
+ uri1.path == uri2.path &&
22
+ CGI.parse(uri1.query) == CGI.parse(uri2.query)
23
+ end
14
24
  end
15
25
 
16
26
  RSpec.configure
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://secure.mollie.nl/xml/ideal?partnerid=987654&transaction_id=c9f93e5c2bd6c1e7c5bee5c5580c6f83&a=check&testmode=false
5
+ uri: https://secure.mollie.nl/xml/ideal?a=check&partnerid=987654&testmode=false&transaction_id=c9f93e5c2bd6c1e7c5bee5c5580c6f83
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -41,7 +41,7 @@ http_interactions:
41
41
  recorded_at: Wed, 28 Mar 2012 11:49:24 GMT
42
42
  - request:
43
43
  method: post
44
- uri: https://secure.mollie.nl/xml/ideal?partnerid=987654&transaction_id=482d599bbcc7795727650330ad65fe9b&a=check&testmode=false
44
+ uri: https://secure.mollie.nl/xml/ideal?a=check&partnerid=987654&testmode=false&transaction_id=482d599bbcc7795727650330ad65fe9b
45
45
  body:
46
46
  encoding: US-ASCII
47
47
  string: ''
@@ -81,7 +81,7 @@ http_interactions:
81
81
  recorded_at: Wed, 28 Mar 2012 11:52:09 GMT
82
82
  - request:
83
83
  method: post
84
- uri: https://secure.mollie.nl/xml/ideal?partnerid=654321&transaction_id=482d599bbcc7795727650330ad65fe9b&a=check&testmode=false
84
+ uri: https://secure.mollie.nl/xml/ideal?a=check&partnerid=654321&testmode=false&transaction_id=482d599bbcc7795727650330ad65fe9b
85
85
  body:
86
86
  encoding: US-ASCII
87
87
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://secure.mollie.nl/xml/ideal?partnerid=987654&reporturl=http%3A%2F%2Fexample.org%2Freport&returnurl=http%3A%2F%2Fexample.org%2Freturn&description=test&amount=1000&bank_id=0031&a=fetch&testmode=false
5
+ uri: https://secure.mollie.nl/xml/ideal?a=fetch&amount=1000&bank_id=0031&description=test&partnerid=987654&reporturl=http%3A%2F%2Fexample.org%2Freport&returnurl=http%3A%2F%2Fexample.org%2Freturn&testmode=false
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -41,7 +41,7 @@ http_interactions:
41
41
  recorded_at: Wed, 28 Mar 2012 11:43:50 GMT
42
42
  - request:
43
43
  method: post
44
- uri: https://secure.mollie.nl/xml/ideal?partnerid=987654&reporturl=http%3A%2F%2Fexample.org%2Freport&returnurl=http%3A%2F%2Fexample.org%2Freturn&description=test&amount=1000&bank_id=0031&profile_key=123abc45&a=fetch&testmode=false
44
+ uri: https://secure.mollie.nl/xml/ideal?a=fetch&amount=1000&bank_id=0031&description=test&partnerid=987654&profile_key=123abc45&reporturl=http%3A%2F%2Fexample.org%2Freport&returnurl=http%3A%2F%2Fexample.org%2Freturn&testmode=false
45
45
  body:
46
46
  encoding: US-ASCII
47
47
  string: ''
@@ -80,7 +80,7 @@ http_interactions:
80
80
  recorded_at: Wed, 28 Mar 2012 11:47:09 GMT
81
81
  - request:
82
82
  method: post
83
- uri: https://secure.mollie.nl/xml/ideal?partnerid&reporturl&returnurl&description=exception+test&amount=1234&bank_id=0031&a=fetch&testmode=false
83
+ uri: https://secure.mollie.nl/xml/ideal?a=fetch&amount=1234&bank_id=0031&description=exception+test&partnerid&reporturl&returnurl&testmode=false
84
84
  body:
85
85
  encoding: US-ASCII
86
86
  string: ''
@@ -118,7 +118,7 @@ http_interactions:
118
118
  recorded_at: Wed, 28 Mar 2012 11:54:10 GMT
119
119
  - request:
120
120
  method: post
121
- uri: https://secure.mollie.nl/xml/ideal?partnerid=123465&reporturl=http%3A%2F%2Fexample.org%2Freport&returnurl=http%3A%2F%2Fexample.org%2Freturn&description=exception+test&amount=1234&bank_id=0031&a=fetch&testmode=false
121
+ uri: https://secure.mollie.nl/xml/ideal?a=fetch&amount=1234&bank_id=0031&description=exception+test&partnerid=123465&reporturl=http%3A%2F%2Fexample.org%2Freport&returnurl=http%3A%2F%2Fexample.org%2Freturn&testmode=false
122
122
  body:
123
123
  encoding: US-ASCII
124
124
  string: ''
@@ -156,7 +156,7 @@ http_interactions:
156
156
  recorded_at: Wed, 28 Mar 2012 11:54:10 GMT
157
157
  - request:
158
158
  method: post
159
- uri: https://secure.mollie.nl/xml/ideal?partnerid=123456&reporturl=http%3A%2F%2Fexample.org%2Freport&returnurl=http%3A%2F%2Fexample.org%2Freturn&description=exception+test&amount=1234&bank_id=0031&profile_key=00000000&a=fetch&testmode=false
159
+ uri: https://secure.mollie.nl/xml/ideal?a=fetch&amount=1234&bank_id=0031&description=exception+test&partnerid=123456&profile_key=00000000&reporturl=http%3A%2F%2Fexample.org%2Freport&returnurl=http%3A%2F%2Fexample.org%2Freturn&testmode=false
160
160
  body:
161
161
  encoding: US-ASCII
162
162
  string: ''
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ideal-mollie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-09 00:00:00.000000000 Z
12
+ date: 2012-07-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -60,7 +60,7 @@ dependencies:
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  - !ruby/object:Gem::Dependency
63
- name: yard
63
+ name: simplecov
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  none: false
66
66
  requirements:
@@ -76,7 +76,7 @@ dependencies:
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
78
  - !ruby/object:Gem::Dependency
79
- name: redcarpet
79
+ name: yard
80
80
  requirement: !ruby/object:Gem::Requirement
81
81
  none: false
82
82
  requirements:
@@ -92,7 +92,7 @@ dependencies:
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
94
  - !ruby/object:Gem::Dependency
95
- name: simplecov
95
+ name: redcarpet
96
96
  requirement: !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
@@ -234,12 +234,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
234
234
  - - ! '>='
235
235
  - !ruby/object:Gem::Version
236
236
  version: '0'
237
+ segments:
238
+ - 0
239
+ hash: 2413443481837240933
237
240
  required_rubygems_version: !ruby/object:Gem::Requirement
238
241
  none: false
239
242
  requirements:
240
243
  - - ! '>='
241
244
  - !ruby/object:Gem::Version
242
245
  version: '0'
246
+ segments:
247
+ - 0
248
+ hash: 2413443481837240933
243
249
  requirements: []
244
250
  rubyforge_project: ideal-mollie
245
251
  rubygems_version: 1.8.23