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 CHANGED
@@ -1,32 +1,36 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- addressable (2.2.6)
4
+ addressable (2.3.2)
5
5
  archive-tar-minitar (0.5.2)
6
- columnize (0.3.5)
7
- crack (0.3.1)
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.8.1)
11
- multi_json
10
+ httparty (0.10.0)
11
+ multi_json (~> 1.0)
12
12
  multi_xml
13
- jeweler (1.6.4)
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.4)
20
- multi_xml (0.4.1)
21
- rake (0.9.2.2)
22
- rspec (2.7.0)
23
- rspec-core (~> 2.7.0)
24
- rspec-expectations (~> 2.7.0)
25
- rspec-mocks (~> 2.7.0)
26
- rspec-core (2.7.1)
27
- rspec-expectations (2.7.0)
28
- diff-lcs (~> 1.1.2)
29
- rspec-mocks (2.7.0)
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.7.8)
41
- addressable (~> 2.2, > 2.2.5)
44
+ webmock (1.9.0)
45
+ addressable (>= 2.2.7)
42
46
  crack (>= 0.1.7)
43
47
 
44
48
  PLATFORMS
data/Rakefile CHANGED
@@ -24,7 +24,7 @@ Jeweler::Tasks.new do |gem|
24
24
  end
25
25
  Jeweler::RubygemsDotOrgTasks.new
26
26
 
27
- require 'rake/rdoctask'
27
+ require 'rdoc/task'
28
28
  Rake::RDocTask.new do |rdoc|
29
29
  version = File.exist?('VERSION') ? File.read('VERSION') : ""
30
30
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.4
1
+ 0.5.5
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "fastspring-saasy"
8
- s.version = "0.5.4"
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 = "2012-10-30"
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
@@ -18,7 +18,7 @@
18
18
  </customer>
19
19
  <customerUrl/>
20
20
  <productName>Acme Inc Web</productName>
21
- <tags/>
21
+ <tags>number1=1, number2=2</tags>
22
22
  <quantity>0</quantity>
23
23
  <nextPeriodDate>2010-08-15Z</nextPeriodDate>
24
24
  <end>2010-08-15Z</end>
@@ -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
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: 2012-10-30 00:00:00.000000000 Z
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: -1802589329637855334
166
+ hash: -313030860356725140
167
167
  required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  none: false
169
169
  requirements: