pin-ruby 0.0.4 → 0.0.5

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: 01730b41395bb4905a13620dd2e88fa0f1a303f6
4
- data.tar.gz: 9e61e9bdbc7a6814003645521e28efd4c301c40b
3
+ metadata.gz: 6d8a89c59793744ce98e60188d82ee3d505588a3
4
+ data.tar.gz: 22b289865ec96e6d9a308c78d480f57ab200e291
5
5
  SHA512:
6
- metadata.gz: 643cb647fbaf356ee77ee02794a5e4a4e0c3be65bec0b8ba20b84fc1aa2356e56d706a4aceb9d88f91813594c6cb8216406ff0e2639eb8b67c5a2f3c24de1107
7
- data.tar.gz: cfe17f44af91a1b1c36462eeff55632eac04c09a8195c153c03d36b4e9732188ff9485ccb2b4de1c47d17d71d62c888a9f2b45092eaa0f77daae8c382b87b0ae
6
+ metadata.gz: ac571be6da919d8e07a4971d6a5f3f61f9b750e011ec1accdedf32b66a4cec1dacf5819001a7db7760358b6b61edbf4bec65b064a8e4fcf835c83a693d740b92
7
+ data.tar.gz: 79c759073c8f608b9c4963dd977dca93fa44642a6679f4a4bd0fbe76d153505b06bd01198403e6bb0eaeeaef8543cba52ebd78c7a6581a2aa353a6dcfcc91e0c
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013 Michael Shimmins
1
+ Copyright (c) 2013 Red Squirel
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Code Climate](https://codeclimate.com/github/redsquirreldev/pin-ruby.png)](https://codeclimate.com/github/redsquirreldev/pin-ruby) [![CircleCI](https://circleci.com/gh/redsquirreldev/pin-ruby.png?circle-token=d474436fee9e60e5d4c77e98d5d2d316569cd958)](https://circleci.com/gh/redsquirreldev/pin-ruby.png?circle-token=d474436fee9e60e5d4c77e98d5d2d316569cd958)
2
+
1
3
  A Ruby library for interacting with v1 of the [Pin Payments API](https://pin.net.au/docs/api).
2
4
 
3
5
  # Installation
@@ -1,3 +1,3 @@
1
1
  module Pin
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
@@ -7,10 +7,10 @@ Gem::Specification.new do |spec|
7
7
  spec.name = 'pin-ruby'
8
8
  spec.version = Pin::VERSION
9
9
  spec.authors = ["Michael Shimmins"]
10
- spec.email = ["michael.shimmins@gmail.com"]
10
+ spec.email = ["michael.shimmins@redsquirrel.com.au"]
11
11
  spec.description = %q{A Ruby library for interacting with v1 of the Pin Payments API}
12
12
  spec.summary = spec.description
13
- spec.homepage = 'https://bitbucket.org/shimms/pin-ruby'
13
+ spec.homepage = 'https://github.com/redsquirreldev/pin-ruby'
14
14
  spec.license = 'MIT'
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
@@ -6,6 +6,6 @@ describe 'configuration' do
6
6
  config.publishable_key = 'pk_12345'
7
7
  end
8
8
 
9
- Pin.config.publishable_key.should eq('pk_12345')
9
+ expect(Pin.config.publishable_key).to eq('pk_12345')
10
10
  end
11
11
  end
@@ -7,15 +7,29 @@ describe 'error' do
7
7
  end
8
8
 
9
9
  context 'valid values' do
10
- status = '402'
11
- json_body = '{"error":"card_declined","error_description":"The card was declined","charge_token":"ch_X3TI-S1LGFmo30zNc4GUaw"}'
10
+ let(:status) { '402' }
11
+ let(:json_body) { '{"error":"card_declined","error_description":"The card was declined","charge_token":"ch_X3TI-S1LGFmo30zNc4GUaw"}' }
12
12
 
13
13
  subject { Pin::Error.new(status, json_body) }
14
14
 
15
- its(:status) { should == '402' }
16
- its(:error_description) { should == 'The card was declined' }
17
- its(:error) { should == 'card_declined' }
18
- its(:details) { should == {'error' => 'card_declined', 'error_description' => 'The card was declined', 'charge_token' => 'ch_X3TI-S1LGFmo30zNc4GUaw'}}
19
- its(:to_s) { should == 'HTTP Error 402: card_declined'}
15
+ it 'should have the correct status' do
16
+ expect(subject.status).to eq('402')
17
+ end
18
+
19
+ it 'should have the correct error description' do
20
+ expect(subject.error_description).to eq('The card was declined')
21
+ end
22
+
23
+ it 'should have the correct error' do
24
+ expect(subject.error).to eq('card_declined')
25
+ end
26
+
27
+ it 'should have the correct details' do
28
+ expect(subject.details).to eq({'error' => 'card_declined', 'error_description' => 'The card was declined', 'charge_token' => 'ch_X3TI-S1LGFmo30zNc4GUaw'})
29
+ end
30
+
31
+ it 'should have the correct string representation' do
32
+ expect(subject.to_s).to eq('HTTP Error 402: card_declined')
33
+ end
20
34
  end
21
35
  end
metadata CHANGED
@@ -1,136 +1,136 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pin-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Shimmins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-08 00:00:00.000000000 Z
11
+ date: 2014-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.3'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: spork
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: 0.9.0.rc
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: 0.9.0.rc
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: guard-rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: 0.7.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: 0.7.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: terminal-notifier-guard
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '>='
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  description: A Ruby library for interacting with v1 of the Pin Payments API
126
126
  email:
127
- - michael.shimmins@gmail.com
127
+ - michael.shimmins@redsquirrel.com.au
128
128
  executables: []
129
129
  extensions: []
130
130
  extra_rdoc_files: []
131
131
  files:
132
- - .gitignore
133
- - .rspec
132
+ - ".gitignore"
133
+ - ".rspec"
134
134
  - Gemfile
135
135
  - Guardfile
136
136
  - LICENSE.txt
@@ -158,7 +158,7 @@ files:
158
158
  - spec/configuration_spec.rb
159
159
  - spec/error_spec.rb
160
160
  - spec/spec_helper.rb
161
- homepage: https://bitbucket.org/shimms/pin-ruby
161
+ homepage: https://github.com/redsquirreldev/pin-ruby
162
162
  licenses:
163
163
  - MIT
164
164
  metadata: {}
@@ -168,17 +168,17 @@ require_paths:
168
168
  - lib
169
169
  required_ruby_version: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - '>='
171
+ - - ">="
172
172
  - !ruby/object:Gem::Version
173
173
  version: '0'
174
174
  required_rubygems_version: !ruby/object:Gem::Requirement
175
175
  requirements:
176
- - - '>='
176
+ - - ">="
177
177
  - !ruby/object:Gem::Version
178
178
  version: '0'
179
179
  requirements: []
180
180
  rubyforge_project:
181
- rubygems_version: 2.0.3
181
+ rubygems_version: 2.2.2
182
182
  signing_key:
183
183
  specification_version: 4
184
184
  summary: A Ruby library for interacting with v1 of the Pin Payments API