active_zuora 1.3.0 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +5 -0
  3. data/.octopolo.yml +4 -0
  4. data/.soyuz.yml +13 -0
  5. data/.travis.yml +7 -0
  6. data/CHANGELOG.markdown +41 -0
  7. data/Gemfile +4 -0
  8. data/MIT-LICENSE +20 -0
  9. data/README.md +191 -0
  10. data/Rakefile +9 -53
  11. data/TODO.md +2 -0
  12. data/active_zuora.gemspec +25 -59
  13. data/lib/active_zuora.rb +44 -12
  14. data/lib/active_zuora/amend.rb +43 -0
  15. data/lib/active_zuora/base.rb +84 -0
  16. data/lib/active_zuora/batch_subscribe.rb +53 -0
  17. data/lib/active_zuora/belongs_to_associations.rb +56 -0
  18. data/lib/active_zuora/billing_preview.rb +49 -0
  19. data/lib/active_zuora/collection_proxy.rb +38 -0
  20. data/lib/active_zuora/connection.rb +47 -0
  21. data/lib/active_zuora/fields.rb +129 -0
  22. data/lib/active_zuora/fields/array_field_decorator.rb +28 -0
  23. data/lib/active_zuora/fields/boolean_field.rb +12 -0
  24. data/lib/active_zuora/fields/date_field.rb +18 -0
  25. data/lib/active_zuora/fields/date_time_field.rb +19 -0
  26. data/lib/active_zuora/fields/decimal_field.rb +12 -0
  27. data/lib/active_zuora/fields/field.rb +76 -0
  28. data/lib/active_zuora/fields/integer_field.rb +11 -0
  29. data/lib/active_zuora/fields/object_field.rb +31 -0
  30. data/lib/active_zuora/fields/string_field.rb +11 -0
  31. data/lib/active_zuora/generate.rb +43 -0
  32. data/lib/active_zuora/generator.rb +244 -0
  33. data/lib/active_zuora/has_many_associations.rb +37 -0
  34. data/lib/active_zuora/has_many_proxy.rb +50 -0
  35. data/lib/active_zuora/lazy_attr.rb +52 -0
  36. data/lib/active_zuora/persistence.rb +172 -0
  37. data/lib/active_zuora/relation.rb +260 -0
  38. data/lib/active_zuora/scoping.rb +50 -0
  39. data/lib/active_zuora/subscribe.rb +42 -0
  40. data/lib/active_zuora/version.rb +3 -0
  41. data/lib/active_zuora/z_object.rb +21 -0
  42. data/spec/account_integration_spec.rb +41 -0
  43. data/spec/base_spec.rb +39 -0
  44. data/spec/belongs_to_associations_spec.rb +35 -0
  45. data/spec/collection_proxy_spec.rb +28 -0
  46. data/spec/connection_spec.rb +66 -0
  47. data/spec/fields/date_field_spec.rb +35 -0
  48. data/spec/has_many_integration_spec.rb +53 -0
  49. data/spec/lazy_attr_spec.rb +22 -0
  50. data/spec/spec_helper.rb +34 -0
  51. data/spec/subscribe_integration_spec.rb +344 -0
  52. data/spec/zobject_integration_spec.rb +104 -0
  53. data/wsdl/zuora.wsdl +1548 -0
  54. metadata +141 -53
  55. data/LICENSE +0 -202
  56. data/README.rdoc +0 -15
  57. data/VERSION +0 -1
  58. data/custom_fields.yml +0 -17
  59. data/lib/zuora/ZUORA.rb +0 -1398
  60. data/lib/zuora/ZUORADriver.rb +0 -128
  61. data/lib/zuora/ZUORAMappingRegistry.rb +0 -1488
  62. data/lib/zuora/ZuoraServiceClient.rb +0 -124
  63. data/lib/zuora/account.rb +0 -4
  64. data/lib/zuora/api.rb +0 -18
  65. data/lib/zuora/contact.rb +0 -4
  66. data/lib/zuora/rate_plan.rb +0 -4
  67. data/lib/zuora/rate_plan_data.rb +0 -4
  68. data/lib/zuora/subscribe_options.rb +0 -4
  69. data/lib/zuora/subscribe_request.rb +0 -4
  70. data/lib/zuora/subscribe_with_existing_account_request.rb +0 -4
  71. data/lib/zuora/subscription.rb +0 -4
  72. data/lib/zuora/subscription_data.rb +0 -4
  73. data/lib/zuora/zobject.rb +0 -52
  74. data/lib/zuora_client.rb +0 -181
  75. data/lib/zuora_interface.rb +0 -199
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 0062452244ebd1717b59ec9198f538144178ff38be926a0ec2f48882ba1aabcb
4
+ data.tar.gz: '080dc069b8587830d38b8b735c614536c171e5945812611f0f03e8ecf4e9d21f'
5
+ SHA512:
6
+ metadata.gz: 0a5327fe797ae221fe76111a0c0ed00be25b923c81425c193a518273e5568ac095e1b13161e3784c8046f1b2a1e7e2545c95f11cf476eaedcfbbc601d5190b7b
7
+ data.tar.gz: b2f3250dfd3a66f4ed0efbb2cc7093d2b78cf4c9b081c9cadd971d56853c74283f8e09634b44fcd3502055c84a6744de87b8950ca736856b72111fbbb71b0448
@@ -0,0 +1,5 @@
1
+ .bundle/
2
+ log/*.log
3
+ pkg/
4
+ *.gem
5
+ Gemfile.lock
@@ -0,0 +1,4 @@
1
+ github_repo: sportngin/active_zuora
2
+ semantic_versioning: true
3
+ branches_to_keep:
4
+ - master
@@ -0,0 +1,13 @@
1
+ defaults:
2
+ deploy_cmd: gem push *.gem
3
+ before_deploy_cmds:
4
+ - op tag-release
5
+ - sed -i "" -e "s/\".*/\"$(git tag| sort -n -t. -k1,1 -k2,2 -k3,3 | tail -1 | sed s/v//)\"/" lib/active_zuora/version.rb
6
+ - git add lib/active_zuora/version.rb
7
+ - git commit -m "Version Bump" && git push
8
+ - gem build active_zuora.gemspec
9
+ after_deploy_cmds:
10
+ - rm *.gem
11
+ environments:
12
+ -
13
+ rubygems: {}
@@ -0,0 +1,7 @@
1
+ rvm:
2
+ - 2.2
3
+ - 2.3
4
+ env:
5
+ global:
6
+ - secure: ZFQj4fzF4wTAd0PTVT7scZZC8z572SsHC1364PqxO5aAgeR2GODUkMcqIpiQ1mFr14c2NZbtT6krJIexww+/o/XSyiPKuoxZj9BB1bZ0+ei4JV2MSi5sD3Dhnx7k8Tp3Rxvuis2h7VUSILGdSo47KImWAFDtdVwO7s2LAMTfTsk=
7
+ - secure: NCKEWiLo7lemfhP1ivwXPr07p1cuSnquH9IJTA7EpyayhBgLrjwhgYOJ/v/pCHfthji2Qylv34MbqzNxcfYW/xaBnM9ytsNwdrHDlnLv+cDuSjRYla4eXplbVeEcsfrdadbbf6LuNRtV3nwvtKEESc0VcCyvY6AmdKlfpbYwDbs=
@@ -0,0 +1,41 @@
1
+ #### v2.5.4
2
+ * Add ProductDiscountApplyDetailData to query exclusion
3
+ #### v2.5.3
4
+ * Remove max version restriction for Active Model and Active Support to support rails 5.1
5
+ #### v2.5.2
6
+ * Bug fix to the query locator
7
+ * Bug fix to the RatePlanCharge query exclusion
8
+ #### v2.5.1
9
+ * Fix bug with bill_to and sold_to on account
10
+ #### v2.5.0
11
+ * Add Support for rails 5
12
+ #### v2.4.1
13
+ * Set the order attribute only if the `created_date` field is defined.
14
+ #### v2.4.0
15
+ * Add date field to support WSDL >= 69
16
+ #### v2.3.1
17
+ * Add billing preview capability
18
+ * Capitalize first letter of wsdl object name to ensure that it is a valid Ruby constant
19
+ #### v2.3.0
20
+ #### v2.2.7
21
+ #### v2.2.6
22
+ #### v2.2.5
23
+ #### v2.2.4
24
+ #### v2.2.3
25
+ #### v2.2.5
26
+ #### v2.2.4
27
+ #### v2.2.2
28
+ * Fix #43 - Add invoice_payment_data to exclusions list
29
+
30
+ > David: : https://github.com/sportngin/active_zuora/pull/44
31
+ #### v2.2.0
32
+ #### v2.1.4
33
+ #### v2.1.3
34
+ #### v2.1.2
35
+ #### v2.1.1
36
+ #### v2.1.0
37
+ * Upgrade Savon to 1.2 https://github.com/sportngin/active_zuora/pull/22
38
+ - By @nvd
39
+ - Makes AZ 2 Thread Safe
40
+ #### v2.0.6
41
+ #### v2.0.5
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
4
+
@@ -0,0 +1,20 @@
1
+ Copyright 2013 Sport Ngin
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,191 @@
1
+ # active_zuora - Auto-Generated ActiveModel Interface for Zuora
2
+
3
+ [![TravisCI](https://secure.travis-ci.org/sportngin/active_zuora.png "TravisCI")](http://travis-ci.org/sportngin/active_zuora "Travis-CI ActiveZuora") [![Code Climate](https://codeclimate.com/github/sportngin/active_zuora.png)](https://codeclimate.com/github/sportngin/active_zuora)
4
+
5
+ Use Zuora's API like ActiveRecord. Auto-generate all the classes from the wsdl file, or easily declare your own.
6
+
7
+ ## Active Zuora Version 1
8
+ This repostiory contains >= Version 2 of Active Zuora
9
+
10
+ Version 1 can be found at https://github.com/sportngin/active_zuora_v1
11
+
12
+ ## Thread Safety
13
+ 2.0.X versions of Active Zuora are not thread safe. They depend on a version of [Savon](https://github.com/savonrb/savon) that is [does not work with threads](https://github.com/savonrb/savon/issues/259).
14
+
15
+ As of 2.1.0 Active Zuora is now depending on a thread safe version of [Savon](https://github.com/savonrb/savon)
16
+
17
+
18
+ ## Configuration
19
+
20
+ ```ruby
21
+ ActiveZuora.configure(
22
+ :username => 'user@example.com',
23
+ :password => 'password'
24
+ )
25
+ ```
26
+
27
+ Enable SOAP logging to stderr, provide your own wsdl file or add custom
28
+ fields to a list of filtered fields.
29
+
30
+ ```ruby
31
+ ActiveZuora.configure(
32
+ :username => 'user@example.com',
33
+ :password => 'password',
34
+ :log => true,
35
+ :log_filters => [:password, :SessionHeader, :mySecretCustomField1, :mySecretCustomField1], # Defaults to [:password, :SessionHeader]
36
+ :wsdl => 'path/to/zuora.wsdl'
37
+ )
38
+ ```
39
+ Override the default endpoint or host loaded from the wsdl
40
+
41
+ ```
42
+ ActiveZuora::Base.connection.soap_client.wsdl.endpoint.host = "www.zuora.com" if Rails.env.production?
43
+ ````
44
+
45
+ To add custom headers to your Zuora requests, you can use the following pattern
46
+
47
+ ```
48
+ ActiveZuora::Base.connection.custom_header = { 'X-Foo' => 'Bar' }
49
+ ```
50
+
51
+ ## Defining Classes
52
+
53
+ You can auto-generate all your Zuora classes from the wsdl file. It will generate all Z-Objects, like Account and Subscription, and Zuora Complex objects, such as SubscribeRequest.
54
+
55
+ ActiveZuora.generate_classes
56
+
57
+ By default, it will generate the classes inside the ActiveZuora module. But you can specify a different nesting if you'd like.
58
+
59
+ ActiveZuora.generate_classes :inside => SomeOtherModule
60
+
61
+ Or, if you prefer, you can define your ZObjects or Complex Types manually.
62
+
63
+ class Account
64
+
65
+ include ActiveZuora::ZObject
66
+
67
+ field :name, :string
68
+ field :auto_pay, :boolean, :default => true
69
+ field :balance, :decimal
70
+ field :created_date, :datetime
71
+
72
+ has_many :subscriptions, :order => :name
73
+ has_many :active_subscriptions, :class_name => 'Subscription',
74
+ :conditions => { :status => 'Active' },
75
+ :order => [ :name, :desc ]
76
+ belongs_to :parent, :class_name => 'Account'
77
+ has_many :children, :class_name => 'Account', :foreign_key => :parent_id, :inverse_of => :parent
78
+
79
+ validates_presence_of :name
80
+
81
+ end
82
+
83
+ class SubscriptionData
84
+
85
+ include ActiveZuora::Base
86
+
87
+ field :subscription, :object
88
+ field :rate_plan_data, :object, :array => true
89
+
90
+ end
91
+
92
+ ## Saving, Updating, and Deleting
93
+
94
+ These familiar functions are available: save, create, and update_attributes, along with ! versions that raise exceptions upon failure.
95
+
96
+ account = ActiveZuora::Account.new :name => "Frank's Pest Control"
97
+ account.new_record?
98
+ account.save
99
+
100
+ account = ActiveZuora::Account.create! :name => "Frank's Pest Control"
101
+ account.update_attributes :auto_pay => false, :currency => "USD"
102
+
103
+ Changes are also tracked.
104
+
105
+ account = ActiveZuora::Account.new :name => "Frank's Pest Control"
106
+ account.changes # { :name => [nil, "Frank's Pest Control"] }
107
+ account.save!
108
+ account.changes # []
109
+
110
+ Errors are captured using ActiveModel::Validations, or from error messages received from the server.
111
+
112
+ account = ActiveZuora::Account.new
113
+ account.save # false
114
+ account.errors # { :base => ["Missing attribute: Name"] } # Returned from server.
115
+
116
+ Delete a record with #delete.
117
+
118
+ account.delete
119
+
120
+ ## Querying
121
+
122
+ ActiveZuora::Account.find(id)
123
+
124
+ ActiveZuora::Account.where(:name => "Frank's Pest Control").all
125
+
126
+ ActiveZuora::Account.where(:name => { :like => '%Pest Control' }).count
127
+
128
+ ActiveZuora::Account.where(:auto_pay => true).or(:balance => 0).all
129
+
130
+ ActiveZuora::Account.select(:id, :name).where(:created_date => { "<" => Date.yesterday })
131
+
132
+ There is no "order by" clause in the ZQL query language, but ActiveZuora's query system can post-sort results for you:
133
+
134
+ ActiveZuora::Account.where(:status => "Active").order(:name)
135
+
136
+ ActiveZuora::Account.where(:status => "Draft").order(:created_date, :desc)
137
+
138
+ By default, every Query object caches the results once you call an array-like method on it. However, if you know you'll have a very large result set and you just want to iterate through them without keeping them, you can use `find_each`.
139
+
140
+ ActiveZuora::Account.where(:status => "Active").find_each do |account|
141
+ ...
142
+ end
143
+
144
+ ## Scopes
145
+
146
+ ActiveZuora::Account.instance_eval do
147
+ scope :active, :status => "Active"
148
+ scope :draft, where(:status => "Draft")
149
+ scope :since, lambda { |datetime| where(:created_date => { ">=" => datetime }) }
150
+ end
151
+
152
+ ActiveZuora::Account.select(:id).draft.since(Date.new 2012).to_zql
153
+ # => "select Id from Account where Status = 'Draft' and CreatedDate >= '2012-01-01T00:00:00+08:00'"
154
+
155
+ Like ActiveRecord, you can also chain any class method on the ZObject, since named scopes are nothing more than class methods that return a Relation object.
156
+
157
+ ## Update or Delete Using Queries
158
+
159
+ You can update or delete multiple records at once. The following command issues two requests to the Zuora API server: the first to query for the records, and the second to update them all at once. The method returns the count of records that were successfully updated.
160
+
161
+ ActiveZuora::Account.where(:status => "Draft").update_all :status => "Active" # 56
162
+
163
+ You can also use a block to update your records, in case your updates depend on the records themselves.
164
+
165
+ ActiveZuora::Account.where(:status => "Draft").update_all do |account|
166
+ account.name += " (#{account.currency})"
167
+ end
168
+
169
+ You can also delete all records matching a query as well. The method returns the amount of records deleted.
170
+
171
+ ActiveZuora::Account.where(:status => "Draft").delete_all # 56
172
+
173
+ ## Batch Subscribe
174
+
175
+ You can submit up to 50 subscribe requests on a single subscribe call per the Zuora documentation. To batch subscribe requests, use the CollectionProxy to build a collection of subscribe requests, then call batch_subscribe
176
+
177
+ ActiveZuora::CollectionProxy.new([ActiveZuora::SubscribeRequest.new({account: {}, bill_to: {}, subscription_data:{}}),
178
+ ActiveZuora::SubscribeRequest.new({account: {}, bill_to: {}, subscription_data:{}})]).batch_subscribe
179
+
180
+
181
+ ## License
182
+
183
+ Active Zuora is released under the MIT license:
184
+
185
+ http://www.opensource.org/licenses/MIT
186
+
187
+ ## Support
188
+
189
+ Bug reports and feature requests can be filed as github issues here:
190
+
191
+ https://github.com/sportngin/active_zuora/issues
data/Rakefile CHANGED
@@ -1,56 +1,12 @@
1
- require 'rubygems'
2
- require 'rake'
1
+ require "bundler/gem_tasks"
2
+ require 'bundler'
3
+ Bundler.setup
4
+ require 'rspec/core/rake_task'
3
5
 
4
- begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = "active_zuora"
8
- gem.summary = "Active Zuora"
9
- gem.description = "A client for Zuora API"
10
- gem.email = "anfleene@gmail.com"
11
- gem.homepage = "http://github.com/anfleene/active_zuora"
12
- gem.authors = ["anfleene"]
13
- gem.files = FileList["CHANGES", "active_zuora.gemspec", "Rakefile", "README", "VERSION", "custom_fields.yml",
14
- "lib/**/*"]
15
- gem.add_dependency "soap4r", ">= 1.5.8"
16
- gem.add_dependency "json_pure", ">= 1.4.6"
17
- gem.requirements = ["none"]
18
- end
19
- Jeweler::GemcutterTasks.new
20
- rescue LoadError
21
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
22
- end
23
-
24
- require 'rake/testtask'
25
- Rake::TestTask.new(:test) do |test|
26
- test.libs << 'lib' << 'test'
27
- test.pattern = 'test/**/test_*.rb'
28
- test.verbose = true
29
- end
30
-
31
- begin
32
- require 'rcov/rcovtask'
33
- Rcov::RcovTask.new do |test|
34
- test.libs << 'test'
35
- test.pattern = 'test/**/test_*.rb'
36
- test.verbose = true
37
- end
38
- rescue LoadError
39
- task :rcov do
40
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
41
- end
42
- end
43
-
44
- task :test => :check_dependencies
45
-
46
- task :default => :test
47
-
48
- require 'rake/rdoctask'
49
- Rake::RDocTask.new do |rdoc|
50
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
6
+ desc 'Default: run library specs.'
7
+ task :default => :spec
51
8
 
52
- rdoc.rdoc_dir = 'rdoc'
53
- rdoc.title = "active_zuora #{version}"
54
- rdoc.rdoc_files.include('README*')
55
- rdoc.rdoc_files.include('lib/**/*.rb')
9
+ desc "Run library specs"
10
+ RSpec::Core::RakeTask.new do |t|
11
+ t.pattern = ["./spec/**/*_spec.rb"]
56
12
  end
data/TODO.md ADDED
@@ -0,0 +1,2 @@
1
+ * add deeper customizations for more classes in generator
2
+ * add get_user_info and other operations
@@ -1,64 +1,30 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
1
  # -*- encoding: utf-8 -*-
5
-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "active_zuora/version"
4
+ authors = {
5
+ "Ed Lebert" => "edlebert@gmail.com",
6
+ "Andy Fleener" => "andy.fleener@sportngin.com",
7
+ }
6
8
  Gem::Specification.new do |s|
7
- s.name = "active_zuora"
8
- s.version = "1.3.0"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["anfleene"]
12
- s.date = "2012-01-20"
13
- s.description = "A client for Zuora API"
14
- s.email = "anfleene@gmail.com"
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.rdoc"
18
- ]
19
- s.files = [
20
- "Rakefile",
21
- "VERSION",
22
- "active_zuora.gemspec",
23
- "custom_fields.yml",
24
- "lib/active_zuora.rb",
25
- "lib/zuora/ZUORA.rb",
26
- "lib/zuora/ZUORADriver.rb",
27
- "lib/zuora/ZUORAMappingRegistry.rb",
28
- "lib/zuora/ZuoraServiceClient.rb",
29
- "lib/zuora/account.rb",
30
- "lib/zuora/api.rb",
31
- "lib/zuora/contact.rb",
32
- "lib/zuora/rate_plan.rb",
33
- "lib/zuora/rate_plan_data.rb",
34
- "lib/zuora/subscribe_options.rb",
35
- "lib/zuora/subscribe_request.rb",
36
- "lib/zuora/subscribe_with_existing_account_request.rb",
37
- "lib/zuora/subscription.rb",
38
- "lib/zuora/subscription_data.rb",
39
- "lib/zuora/zobject.rb",
40
- "lib/zuora_client.rb",
41
- "lib/zuora_interface.rb"
42
- ]
43
- s.homepage = "http://github.com/anfleene/active_zuora"
44
- s.require_paths = ["lib"]
45
- s.requirements = ["none"]
46
- s.rubygems_version = "1.8.10"
47
- s.summary = "Active Zuora"
9
+ s.name = "active_zuora"
10
+ s.version = ActiveZuora::VERSION.to_s
11
+ s.platform = Gem::Platform::RUBY
12
+ s.authors = authors.keys
13
+ s.email = authors.values
14
+ s.homepage = "https://github.com/sportngin/active_zuora"
15
+ s.summary = %q{ActiveZuora - Zuora API that looks and feels like ActiveRecord.}
16
+ s.description = %q{ActiveZuora - Zuora API based on ActiveModel and auto-generated from your zuora.wsdl.}
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.require_paths = ["lib"]
21
+ s.license = "MIT"
22
+ s.extra_rdoc_files = [ "README.md" ]
48
23
 
49
- if s.respond_to? :specification_version then
50
- s.specification_version = 3
24
+ s.add_runtime_dependency('savon', ["~> 1.2.0"])
25
+ s.add_runtime_dependency('activesupport', [">= 3.0.0"])
26
+ s.add_runtime_dependency('activemodel', [">= 3.0.0"])
51
27
 
52
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
53
- s.add_runtime_dependency(%q<soap4r>, [">= 1.5.8"])
54
- s.add_runtime_dependency(%q<json_pure>, [">= 1.4.6"])
55
- else
56
- s.add_dependency(%q<soap4r>, [">= 1.5.8"])
57
- s.add_dependency(%q<json_pure>, [">= 1.4.6"])
58
- end
59
- else
60
- s.add_dependency(%q<soap4r>, [">= 1.5.8"])
61
- s.add_dependency(%q<json_pure>, [">= 1.4.6"])
62
- end
28
+ s.add_development_dependency('rake', [">= 0.8.7"])
29
+ s.add_development_dependency('rspec', [">= 3.0.0"])
63
30
  end
64
-