stripe 1.7.8 → 1.7.9
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +3 -0
- data/VERSION +1 -1
- data/lib/stripe.rb +14 -0
- data/lib/stripe/version.rb +1 -1
- data/test/test_stripe_with_active_support.rb +1 -2
- metadata +28 -28
data/History.txt
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.7.
|
1
|
+
1.7.9
|
data/lib/stripe.rb
CHANGED
@@ -49,6 +49,7 @@ module Stripe
|
|
49
49
|
@@api_key = nil
|
50
50
|
@@api_base = 'https://api.stripe.com'
|
51
51
|
@@verify_ssl_certs = true
|
52
|
+
@@api_version = nil
|
52
53
|
|
53
54
|
def self.api_url(url='')
|
54
55
|
@@api_base + url
|
@@ -78,6 +79,14 @@ module Stripe
|
|
78
79
|
@@verify_ssl_certs
|
79
80
|
end
|
80
81
|
|
82
|
+
def self.api_version=(version)
|
83
|
+
@@api_version = version
|
84
|
+
end
|
85
|
+
|
86
|
+
def self.api_version
|
87
|
+
@@api_version
|
88
|
+
end
|
89
|
+
|
81
90
|
def self.request(method, url, api_key, params={}, headers={})
|
82
91
|
api_key ||= @@api_key
|
83
92
|
raise AuthenticationError.new('No API key provided. (HINT: set your API key using "Stripe.api_key = <API-KEY>". You can generate API keys from the Stripe web interface. See https://stripe.com/api for details, or email support@stripe.com if you have any questions.)') unless api_key
|
@@ -139,6 +148,11 @@ module Stripe
|
|
139
148
|
:authorization => "Bearer #{api_key}",
|
140
149
|
:content_type => 'application/x-www-form-urlencoded'
|
141
150
|
}.merge(headers)
|
151
|
+
|
152
|
+
if self.api_version
|
153
|
+
headers[:stripe_version] = self.api_version
|
154
|
+
end
|
155
|
+
|
142
156
|
opts = {
|
143
157
|
:method => method,
|
144
158
|
:url => url,
|
data/lib/stripe/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 1.7.
|
9
|
+
- 9
|
10
|
+
version: 1.7.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ross Boucher
|
@@ -16,12 +16,10 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date:
|
19
|
+
date: 2013-01-16 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
|
23
|
-
name: rest-client
|
24
|
-
version_requirements: &id001 !ruby/object:Gem::Requirement
|
22
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
23
|
none: false
|
26
24
|
requirements:
|
27
25
|
- - ~>
|
@@ -31,12 +29,12 @@ dependencies:
|
|
31
29
|
- 1
|
32
30
|
- 4
|
33
31
|
version: "1.4"
|
34
|
-
|
32
|
+
prerelease: false
|
35
33
|
type: :runtime
|
34
|
+
name: rest-client
|
35
|
+
version_requirements: *id001
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
|
-
|
38
|
-
name: multi_json
|
39
|
-
version_requirements: &id002 !ruby/object:Gem::Requirement
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
40
38
|
none: false
|
41
39
|
requirements:
|
42
40
|
- - ">="
|
@@ -53,12 +51,12 @@ dependencies:
|
|
53
51
|
segments:
|
54
52
|
- 2
|
55
53
|
version: "2"
|
56
|
-
|
54
|
+
prerelease: false
|
57
55
|
type: :runtime
|
56
|
+
name: multi_json
|
57
|
+
version_requirements: *id002
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
|
-
|
60
|
-
name: mocha
|
61
|
-
version_requirements: &id003 !ruby/object:Gem::Requirement
|
59
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
62
60
|
none: false
|
63
61
|
requirements:
|
64
62
|
- - ">="
|
@@ -67,12 +65,12 @@ dependencies:
|
|
67
65
|
segments:
|
68
66
|
- 0
|
69
67
|
version: "0"
|
70
|
-
|
68
|
+
prerelease: false
|
71
69
|
type: :development
|
70
|
+
name: mocha
|
71
|
+
version_requirements: *id003
|
72
72
|
- !ruby/object:Gem::Dependency
|
73
|
-
|
74
|
-
name: shoulda
|
75
|
-
version_requirements: &id004 !ruby/object:Gem::Requirement
|
73
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
76
74
|
none: false
|
77
75
|
requirements:
|
78
76
|
- - ">="
|
@@ -81,12 +79,12 @@ dependencies:
|
|
81
79
|
segments:
|
82
80
|
- 0
|
83
81
|
version: "0"
|
84
|
-
|
82
|
+
prerelease: false
|
85
83
|
type: :development
|
84
|
+
name: shoulda
|
85
|
+
version_requirements: *id004
|
86
86
|
- !ruby/object:Gem::Dependency
|
87
|
-
|
88
|
-
name: test-unit
|
89
|
-
version_requirements: &id005 !ruby/object:Gem::Requirement
|
87
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
90
88
|
none: false
|
91
89
|
requirements:
|
92
90
|
- - ">="
|
@@ -95,12 +93,12 @@ dependencies:
|
|
95
93
|
segments:
|
96
94
|
- 0
|
97
95
|
version: "0"
|
98
|
-
|
96
|
+
prerelease: false
|
99
97
|
type: :development
|
98
|
+
name: test-unit
|
99
|
+
version_requirements: *id005
|
100
100
|
- !ruby/object:Gem::Dependency
|
101
|
-
|
102
|
-
name: rake
|
103
|
-
version_requirements: &id006 !ruby/object:Gem::Requirement
|
101
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
104
102
|
none: false
|
105
103
|
requirements:
|
106
104
|
- - ">="
|
@@ -109,8 +107,10 @@ dependencies:
|
|
109
107
|
segments:
|
110
108
|
- 0
|
111
109
|
version: "0"
|
112
|
-
|
110
|
+
prerelease: false
|
113
111
|
type: :development
|
112
|
+
name: rake
|
113
|
+
version_requirements: *id006
|
114
114
|
description: Stripe is the easiest way to accept payments online. See https://stripe.com for details.
|
115
115
|
email:
|
116
116
|
- boucher@stripe.com
|