fastspring-saasy 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/fastspring-saasy.gemspec +3 -2
- data/lib/fastspring-saasy/account.rb +8 -2
- data/lib/fastspring-saasy/fastspring.crt +93 -0
- data/lib/fastspring-saasy/order.rb +1 -1
- data/lib/fastspring-saasy/private_api_base.rb +1 -0
- data/lib/fastspring-saasy/subscription.rb +1 -1
- data/spec/account_spec.rb +6 -1
- metadata +16 -15
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.2
|
data/fastspring-saasy.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "fastspring-saasy"
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Richard Patching"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-06-02"
|
13
13
|
s.description = "Ruby lib for using the FastSpring (Saas) subscription management API"
|
14
14
|
s.email = "richard@justaddpixels.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -31,6 +31,7 @@ Gem::Specification.new do |s|
|
|
31
31
|
"lib/fastspring-saasy/address.rb",
|
32
32
|
"lib/fastspring-saasy/customer.rb",
|
33
33
|
"lib/fastspring-saasy/error.rb",
|
34
|
+
"lib/fastspring-saasy/fastspring.crt",
|
34
35
|
"lib/fastspring-saasy/item.rb",
|
35
36
|
"lib/fastspring-saasy/localized_store_pricing.rb",
|
36
37
|
"lib/fastspring-saasy/order.rb",
|
@@ -1,8 +1,14 @@
|
|
1
1
|
module FastSpring
|
2
|
-
|
2
|
+
DEFAULT_SSL_CA_FILE = File.expand_path(File.dirname(__FILE__) + "/fastspring.crt")
|
3
3
|
|
4
|
+
module Account
|
4
5
|
def self.config
|
5
|
-
@config ||= {
|
6
|
+
@config ||= {
|
7
|
+
:username => 'user',
|
8
|
+
:password => 'pass',
|
9
|
+
:company => 'your-company',
|
10
|
+
:ssl_ca_file => DEFAULT_SSL_CA_FILE
|
11
|
+
}
|
6
12
|
end
|
7
13
|
|
8
14
|
def self.[]=(key, val)
|
@@ -0,0 +1,93 @@
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
2
|
+
MIIFSTCCBDGgAwIBAgIQHcefyOMYtLlA+u2r7DMhqjANBgkqhkiG9w0BAQUFADCB
|
3
|
+
tTELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL
|
4
|
+
ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug
|
5
|
+
YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDEvMC0GA1UEAxMm
|
6
|
+
VmVyaVNpZ24gQ2xhc3MgMyBTZWN1cmUgU2VydmVyIENBIC0gRzMwHhcNMTIwNTEx
|
7
|
+
MDAwMDAwWhcNMTMwNTEyMjM1OTU5WjCBhTELMAkGA1UEBhMCVVMxEzARBgNVBAgT
|
8
|
+
CkNhbGlmb3JuaWExFjAUBgNVBAcUDVNhbnRhIEJhcmJhcmExGTAXBgNVBAoUEEJy
|
9
|
+
aWdodE1hcmtldCBMTEMxEzARBgNVBAsUCkZhc3RTcHJpbmcxGTAXBgNVBAMUECou
|
10
|
+
ZmFzdHNwcmluZy5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC9
|
11
|
+
aTmLBj/CmTeCsGzeDaobgBg5PCOL5Idj4djCNmYNcck/jMTbdfbCrRrWk+lw7fky
|
12
|
+
hb1rT+HDhy9nUKfgspGmDnBc1J2yR+OWnjRr/XiUzQgg6d1o3tinZyZntDccOGOo
|
13
|
+
qCN+F68WNJ18Vf+wVIEtFI9aTQURq3NFNlYYnMaBsqLI758Xy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0lAtukixlE0kF6BWlK
|
90
|
+
WE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiCKm0oHw0LxOXnGiYZ
|
91
|
+
4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vEZV8N
|
92
|
+
hnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq
|
93
|
+
-----END CERTIFICATE-----
|
@@ -3,7 +3,7 @@ module FastSpring
|
|
3
3
|
attr_reader :purchaser, :items
|
4
4
|
# Get the order from Saasy
|
5
5
|
def find
|
6
|
-
@response = self.class.get(base_order_path, :basic_auth => @auth)
|
6
|
+
@response = self.class.get(base_order_path, :basic_auth => @auth, :ssl_ca_file => @ssl_ca_file)
|
7
7
|
self
|
8
8
|
end
|
9
9
|
|
data/spec/account_spec.rb
CHANGED
@@ -10,6 +10,11 @@ describe FastSpring::Account do
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
it 'stores the configuration for the account setup' do
|
13
|
-
FastSpring::Account.config.should == {
|
13
|
+
FastSpring::Account.config.should == {
|
14
|
+
:username=>"johndoe",
|
15
|
+
:password=>"secret",
|
16
|
+
:company=>"acme",
|
17
|
+
:ssl_ca_file=>"#{Dir.pwd}/lib/fastspring-saasy/fastspring.crt"
|
18
|
+
}
|
14
19
|
end
|
15
20
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastspring-saasy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-02 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
16
|
-
requirement: &
|
16
|
+
requirement: &70254621883160 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70254621883160
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &70254621882680 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70254621882680
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bundler
|
38
|
-
requirement: &
|
38
|
+
requirement: &70254621882200 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70254621882200
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: jeweler
|
49
|
-
requirement: &
|
49
|
+
requirement: &70254621881720 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70254621881720
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: ruby-debug19
|
60
|
-
requirement: &
|
60
|
+
requirement: &70254621881240 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70254621881240
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: httparty
|
71
|
-
requirement: &
|
71
|
+
requirement: &70254621897900 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: 0.8.1
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70254621897900
|
80
80
|
description: Ruby lib for using the FastSpring (Saas) subscription management API
|
81
81
|
email: richard@justaddpixels.com
|
82
82
|
executables: []
|
@@ -99,6 +99,7 @@ files:
|
|
99
99
|
- lib/fastspring-saasy/address.rb
|
100
100
|
- lib/fastspring-saasy/customer.rb
|
101
101
|
- lib/fastspring-saasy/error.rb
|
102
|
+
- lib/fastspring-saasy/fastspring.crt
|
102
103
|
- lib/fastspring-saasy/item.rb
|
103
104
|
- lib/fastspring-saasy/localized_store_pricing.rb
|
104
105
|
- lib/fastspring-saasy/order.rb
|
@@ -132,7 +133,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
132
133
|
version: '0'
|
133
134
|
segments:
|
134
135
|
- 0
|
135
|
-
hash: -
|
136
|
+
hash: -1553071896156967060
|
136
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
138
|
none: false
|
138
139
|
requirements:
|