fastspring-saasy 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +23 -19
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/fastspring-saasy.gemspec +2 -2
- data/lib/fastspring-saasy/subscription.rb +14 -0
- data/spec/fixtures/basic_subscription.xml +1 -1
- data/spec/subscription_spec.rb +5 -0
- metadata +3 -3
data/Gemfile.lock
CHANGED
@@ -1,32 +1,36 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
addressable (2.2
|
4
|
+
addressable (2.3.2)
|
5
5
|
archive-tar-minitar (0.5.2)
|
6
|
-
columnize (0.3.
|
7
|
-
crack (0.3.
|
6
|
+
columnize (0.3.6)
|
7
|
+
crack (0.3.2)
|
8
8
|
diff-lcs (1.1.3)
|
9
9
|
git (1.2.5)
|
10
|
-
httparty (0.
|
11
|
-
multi_json
|
10
|
+
httparty (0.10.0)
|
11
|
+
multi_json (~> 1.0)
|
12
12
|
multi_xml
|
13
|
-
jeweler (1.
|
13
|
+
jeweler (1.8.4)
|
14
14
|
bundler (~> 1.0)
|
15
15
|
git (>= 1.2.5)
|
16
16
|
rake
|
17
|
+
rdoc
|
18
|
+
json (1.7.6)
|
17
19
|
linecache19 (0.5.12)
|
18
20
|
ruby_core_source (>= 0.1.4)
|
19
|
-
multi_json (1.0
|
20
|
-
multi_xml (0.
|
21
|
-
rake (0.
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
rspec-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
rspec-
|
21
|
+
multi_json (1.5.0)
|
22
|
+
multi_xml (0.5.2)
|
23
|
+
rake (10.0.3)
|
24
|
+
rdoc (3.12)
|
25
|
+
json (~> 1.4)
|
26
|
+
rspec (2.12.0)
|
27
|
+
rspec-core (~> 2.12.0)
|
28
|
+
rspec-expectations (~> 2.12.0)
|
29
|
+
rspec-mocks (~> 2.12.0)
|
30
|
+
rspec-core (2.12.2)
|
31
|
+
rspec-expectations (2.12.1)
|
32
|
+
diff-lcs (~> 1.1.3)
|
33
|
+
rspec-mocks (2.12.1)
|
30
34
|
ruby-debug-base19 (0.11.25)
|
31
35
|
columnize (>= 0.3.1)
|
32
36
|
linecache19 (>= 0.5.11)
|
@@ -37,8 +41,8 @@ GEM
|
|
37
41
|
ruby-debug-base19 (>= 0.11.19)
|
38
42
|
ruby_core_source (0.1.5)
|
39
43
|
archive-tar-minitar (>= 0.5.2)
|
40
|
-
webmock (1.
|
41
|
-
addressable (
|
44
|
+
webmock (1.9.0)
|
45
|
+
addressable (>= 2.2.7)
|
42
46
|
crack (>= 0.1.7)
|
43
47
|
|
44
48
|
PLATFORMS
|
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.5
|
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.5"
|
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 = "
|
12
|
+
s.date = "2013-02-18"
|
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 = [
|
@@ -49,6 +49,20 @@ module FastSpring
|
|
49
49
|
value_for('quantity').to_i
|
50
50
|
end
|
51
51
|
|
52
|
+
def tags
|
53
|
+
begin
|
54
|
+
fs_tags = value_for('tags')
|
55
|
+
result = {}
|
56
|
+
fs_tags.split(",").each do |t|
|
57
|
+
k,v = t.strip.split('=')
|
58
|
+
result[k.to_sym] = v
|
59
|
+
end
|
60
|
+
result
|
61
|
+
rescue
|
62
|
+
nil
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
52
66
|
def customer_url
|
53
67
|
value_for('customerUrl')
|
54
68
|
end
|
data/spec/subscription_spec.rb
CHANGED
@@ -85,6 +85,11 @@ describe FastSpring::Subscription do
|
|
85
85
|
it 'returns the end date' do
|
86
86
|
subject.ends_on.should be_an_instance_of(Date)
|
87
87
|
end
|
88
|
+
|
89
|
+
it 'returns the tags as a symbolized hash' do
|
90
|
+
subject.tags[:number1].should == "1"
|
91
|
+
subject.tags[:number2].should == "2"
|
92
|
+
end
|
88
93
|
end
|
89
94
|
|
90
95
|
context 'create subscriptions path' do
|
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.5
|
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:
|
12
|
+
date: 2013-02-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -163,7 +163,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
163
163
|
version: '0'
|
164
164
|
segments:
|
165
165
|
- 0
|
166
|
-
hash: -
|
166
|
+
hash: -313030860356725140
|
167
167
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
168
168
|
none: false
|
169
169
|
requirements:
|