cardmagic-etsy 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +8 -0
  3. data/.travis.yml +13 -0
  4. data/Gemfile +11 -0
  5. data/LICENSE +9 -0
  6. data/README.md +348 -0
  7. data/Rakefile +12 -0
  8. data/etsy.gemspec +34 -0
  9. data/lib/etsy.rb +223 -0
  10. data/lib/etsy/about.rb +15 -0
  11. data/lib/etsy/address.rb +47 -0
  12. data/lib/etsy/attribute_value.rb +46 -0
  13. data/lib/etsy/basic_client.rb +32 -0
  14. data/lib/etsy/category.rb +84 -0
  15. data/lib/etsy/country.rb +27 -0
  16. data/lib/etsy/favorite_listing.rb +26 -0
  17. data/lib/etsy/image.rb +44 -0
  18. data/lib/etsy/listing.rb +296 -0
  19. data/lib/etsy/model.rb +127 -0
  20. data/lib/etsy/payment_template.rb +33 -0
  21. data/lib/etsy/profile.rb +49 -0
  22. data/lib/etsy/receipt.rb +37 -0
  23. data/lib/etsy/request.rb +150 -0
  24. data/lib/etsy/response.rb +128 -0
  25. data/lib/etsy/section.rb +16 -0
  26. data/lib/etsy/secure_client.rb +131 -0
  27. data/lib/etsy/shipping_info.rb +27 -0
  28. data/lib/etsy/shipping_template.rb +41 -0
  29. data/lib/etsy/shop.rb +88 -0
  30. data/lib/etsy/transaction.rb +29 -0
  31. data/lib/etsy/user.rb +109 -0
  32. data/lib/etsy/variation/property_set.rb +71 -0
  33. data/lib/etsy/verification_request.rb +17 -0
  34. data/lib/etsy/version.rb +3 -0
  35. data/test/fixtures/about/getAbout.json +16 -0
  36. data/test/fixtures/address/getUserAddresses.json +12 -0
  37. data/test/fixtures/attribute_value/findAllListingPropertyValues.json +44 -0
  38. data/test/fixtures/category/findAllSubCategoryChildren.json +78 -0
  39. data/test/fixtures/category/findAllTopCategory.json +347 -0
  40. data/test/fixtures/category/findAllTopCategory.single.json +18 -0
  41. data/test/fixtures/category/findAllTopCategoryChildren.json +308 -0
  42. data/test/fixtures/category/getCategory.multiple.json +28 -0
  43. data/test/fixtures/category/getCategory.single.json +18 -0
  44. data/test/fixtures/country/getCountry.json +1 -0
  45. data/test/fixtures/favorite_listing/findAllFavoriteListings.json +1 -0
  46. data/test/fixtures/image/findAllListingImages.json +102 -0
  47. data/test/fixtures/listing/findAllListingActive.category.json +827 -0
  48. data/test/fixtures/listing/findAllShopListings.json +69 -0
  49. data/test/fixtures/listing/getListing.multiple.json +1 -0
  50. data/test/fixtures/listing/getListing.single.includeImages.json +1 -0
  51. data/test/fixtures/listing/getListing.single.json +1 -0
  52. data/test/fixtures/payment_template/getPaymentTemplate.json +1 -0
  53. data/test/fixtures/profile/new.json +28 -0
  54. data/test/fixtures/receipt/findAllShopReceipts.json +28 -0
  55. data/test/fixtures/section/getShopSection.json +18 -0
  56. data/test/fixtures/shipping_info/getShippingInfo.json +1 -0
  57. data/test/fixtures/shipping_template/getShippingTemplate.json +1 -0
  58. data/test/fixtures/shop/findAllShop.json +1 -0
  59. data/test/fixtures/shop/findAllShop.single.json +1 -0
  60. data/test/fixtures/shop/getShop.multiple.json +1 -0
  61. data/test/fixtures/shop/getShop.single.json +34 -0
  62. data/test/fixtures/transaction/findAllShopTransactions.json +1 -0
  63. data/test/fixtures/user/getUser.multiple.json +29 -0
  64. data/test/fixtures/user/getUser.single.json +13 -0
  65. data/test/fixtures/user/getUser.single.private.json +18 -0
  66. data/test/fixtures/user/getUser.single.withProfile.json +38 -0
  67. data/test/fixtures/user/getUser.single.withShops.json +41 -0
  68. data/test/test_helper.rb +45 -0
  69. data/test/unit/etsy/address_test.rb +61 -0
  70. data/test/unit/etsy/attribute_value_test.rb +67 -0
  71. data/test/unit/etsy/basic_client_test.rb +30 -0
  72. data/test/unit/etsy/category_test.rb +106 -0
  73. data/test/unit/etsy/country_test.rb +64 -0
  74. data/test/unit/etsy/favorite_listing_test.rb +44 -0
  75. data/test/unit/etsy/image_test.rb +51 -0
  76. data/test/unit/etsy/listing_test.rb +268 -0
  77. data/test/unit/etsy/model_test.rb +64 -0
  78. data/test/unit/etsy/payment_template_test.rb +68 -0
  79. data/test/unit/etsy/profile_test.rb +111 -0
  80. data/test/unit/etsy/receipt_test.rb +107 -0
  81. data/test/unit/etsy/request_test.rb +190 -0
  82. data/test/unit/etsy/response_test.rb +175 -0
  83. data/test/unit/etsy/section_test.rb +28 -0
  84. data/test/unit/etsy/secure_client_test.rb +132 -0
  85. data/test/unit/etsy/shipping_info_test.rb +24 -0
  86. data/test/unit/etsy/shipping_template_test.rb +24 -0
  87. data/test/unit/etsy/shop_about_test.rb +43 -0
  88. data/test/unit/etsy/shop_test.rb +116 -0
  89. data/test/unit/etsy/transaction_test.rb +61 -0
  90. data/test/unit/etsy/user_test.rb +250 -0
  91. data/test/unit/etsy/verification_request_test.rb +26 -0
  92. data/test/unit/etsy_test.rb +173 -0
  93. metadata +293 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 89bdbadcdb3e6d6fe16cb3555f57ee7384451cba9b1a2a0835ced51f0b026c63
4
+ data.tar.gz: e90bb4cbf466b459a2408071c2cbb954ebe8efb85cf606e48c71cac2630c2a09
5
+ SHA512:
6
+ metadata.gz: 31a6dbea722a209f8d72b1ef9bcef2c0f43f4c8417d29c0f5cc89f6d966afcb95565138b4eb3adebdd0c035e2ca26f8843cc2082eeb4c5b8bed63cab31702d00
7
+ data.tar.gz: 9f6f6513ad15d0813f47ad0aabff6a70458858a8c15490b233806849b73edff70900cb463a929e11e11c6aca3402e55c2244c3ec3e9f29f2ff3b0801116163c0
@@ -0,0 +1,8 @@
1
+ pkg/
2
+ doc/
3
+ coverage/
4
+ .bundle
5
+ Gemfile.lock
6
+ .rvmrc
7
+ *.sw*
8
+ *.orig
@@ -0,0 +1,13 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - jruby-19mode
5
+ - rbx
6
+ - 2.1.5
7
+
8
+ before_install:
9
+ - gem install bundler
10
+
11
+ matrix:
12
+ allow_failures:
13
+ - rvm: rbx
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ if RUBY_VERSION < '1.9'
6
+ gem 'activesupport', '< 4.0'
7
+ end
8
+
9
+ if RUBY_VERSION < '2.0'
10
+ gem 'json', '<= 1.5.5'
11
+ end
data/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2009 - 2013 Patrick Reagan (reaganpr@gmail.com), Katrina Owen (katrina.owen@gmail.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,348 @@
1
+ # Etsy
2
+
3
+ [![Build Status](https://secure.travis-ci.org/kytrinyx/etsy.png)](http://travis-ci.org/kytrinyx/etsy)
4
+ [![Dependency Status](https://gemnasium.com/kytrinyx/etsy.png)](https://gemnasium.com/kytrinyx/etsy)
5
+
6
+ ## Description
7
+
8
+ The Etsy gem provides a friendly Ruby interface to the Etsy API
9
+
10
+ ## Installation
11
+
12
+ Installing the latest stable version is simple:
13
+
14
+ $ gem install etsy
15
+
16
+ If you want to be on the bleeding edge, install from GitHub:
17
+
18
+ $ git clone git://github.com/kytrinyx/etsy.git
19
+ $ cd etsy
20
+ $ rake install
21
+
22
+ ### Dependencies
23
+
24
+ The gem has been verified to work with version 1.5.0 of json.
25
+ It will likely work with higher versions, but this is unproven.
26
+
27
+ ## Usage
28
+
29
+ In order to try this out you'll need to create an app on [etsy.com/your/apps](https://www.etsy.com/your/apps).
30
+
31
+ This will give you an api key and secret.
32
+
33
+ Paste the following into IRB, replacing the api key and secret with the ones you got on Etsy:
34
+
35
+ ```ruby
36
+ require 'etsy'
37
+ Etsy.protocol = "https"
38
+ Etsy.api_key = 'YOUR API KEY'
39
+ Etsy.api_secret = 'YOUR SECRET'
40
+ request = Etsy.request_token
41
+ Etsy.verification_url
42
+ ```
43
+
44
+ Paste the verification URL into your browser, and authorize the application. That will give you a page
45
+ with a code on it. Paste the following into IRB, replacing the code:
46
+
47
+ ```ruby
48
+ access = Etsy.access_token(request.token, request.secret, 'CODE')
49
+ Etsy.myself(access.token, access.secret)
50
+ ```
51
+
52
+ If you've received a 401 unauthorized error, then you likely don't have a valid api key and secret, or
53
+ perhaps the verification url timed out.
54
+
55
+ ### Public Mode
56
+
57
+ The Etsy API has two modes: public, and authenticated. Public mode only requires an
58
+ API key (available from http://developer.etsy.com ):
59
+
60
+ require 'etsy'
61
+
62
+ Etsy.api_key = 'foobar'
63
+
64
+ From there, you can make any non-authenticated calls to the API that you need.
65
+
66
+ ## Authenticated Calls
67
+
68
+ The Etsy API has support for both retrieval of extended information and write support for authenticated users. Authentication can either be performed from the console or from within a Ruby web application.
69
+
70
+ ### Console
71
+
72
+ For simple authentication from the console, configure the necessary parameters:
73
+
74
+ require 'etsy'
75
+
76
+ Etsy.api_key = 'key'
77
+ Etsy.api_secret = 'secret'
78
+
79
+ First, generate a request token:
80
+
81
+ request = Etsy.request_token
82
+
83
+ From there, you will need to paste a verification URL into a browser:
84
+
85
+ Etsy.verification_url
86
+
87
+ Once you have allowed access, you can generate an access token by supplying
88
+ the verifier displayed on the Etsy site:
89
+
90
+ access = Etsy.access_token(request.token, request.secret, 'abc123')
91
+
92
+ Authenticated calls can now be made by passing an access token and secret:
93
+
94
+ Etsy.myself(access.token, access.secret)
95
+
96
+ The key and secret have to be passed in for the authenticated calls.
97
+
98
+ auth = {:access_token=>access.token, :access_secret=>access.secret}
99
+ Etsy::Transaction.find_all_by_shop_id(shop_id, auth.merge(options))
100
+
101
+ ### Web Application
102
+
103
+ The process for authenticating via a web application is similar, but requires the configuration of a callback URL:
104
+
105
+ require 'etsy'
106
+
107
+ Etsy.api_key = 'key'
108
+ Etsy.api_secret = 'secret'
109
+ Etsy.callback_url = 'http://localhost:4567/authorize'
110
+
111
+ In this mode, you'll need to store the request token and secret before redirecting
112
+ to the verification URL. A simple example using Sinatra:
113
+
114
+ enable :sessions
115
+
116
+ get '/' do
117
+ request_token = Etsy.request_token
118
+ session[:request_token] = request_token.token
119
+ session[:request_secret] = request_token.secret
120
+ redirect Etsy.verification_url
121
+ end
122
+
123
+ get '/authorize' do
124
+ access_token = Etsy.access_token(
125
+ session[:request_token],
126
+ session[:request_secret],
127
+ params[:oauth_verifier]
128
+ )
129
+ # access_token.token and access_token.secret can now be saved for future API calls
130
+ end
131
+
132
+ ### Environment
133
+
134
+ The Etsy API previously had both a sandbox environment and a production environment. They have recently eliminated the sandbox environment, but the ability to set the environment has been preserved in case it is implemented in v3.
135
+
136
+ If nothing is set, the default is :production.
137
+
138
+ You can set this using:
139
+
140
+ Etsy.environment = :production
141
+
142
+ ## Error handling
143
+
144
+ For legacy reasons, this gem does *not* raise errors when requests are unsuccessful.
145
+ However, you can force errors to be thrown by configuring the `silent_errors` flag.
146
+
147
+ >>> Etsy.silent_errors = false
148
+
149
+ ## DSL
150
+
151
+ Use the Etsy::Request class to make flexible calls to the API.
152
+
153
+ To do so, find out which endpoint you wish to connect to and the parameters you wish to pass in.
154
+
155
+ >> access = {:access_token => 'token', :access_secret => 'secret'}
156
+ >> Etsy::Request.get('/taxonomy/tags', access.merge(:limit => 5))
157
+
158
+ or to fetch an associated resource
159
+
160
+ >> access = {:access_token => 'token', :access_secret => 'secret'}
161
+ >> Etsy::Request.get('/users/__SELF__', access.merge(:includes => 'Profile'))
162
+
163
+ or to limit the fields returned
164
+
165
+ >> shop_id = 'littletjane'
166
+ >> access = {:access_token => 'token', :access_secret => 'secret'}
167
+ >> Etsy::Request.get('/shops/#{shop_id}', access.merge(:fields => 'is_vacation,is_refusing_alchemy'))
168
+
169
+ ## Convenience Methods
170
+
171
+ There are some wrappers for resources that typically are needed in a small application.
172
+
173
+ ### Users
174
+
175
+ If you're starting with a user, the easiest way is to use the Etsy.user method:
176
+
177
+ >> user = Etsy.user('littletjane')
178
+ => #<Etsy::User:0x107f82c @result=[{"city"=>"Washington, DC", ... >
179
+ >> user.username
180
+ => "littletjane"
181
+ >> user.id
182
+ => 5327518
183
+
184
+ For more information about what is available for a user, check out the documentation
185
+ for Etsy::User.
186
+
187
+ ### Shops
188
+
189
+ Each user may optionally have a shop. If a user is a seller, he / she also has an
190
+ associated shop object:
191
+
192
+ >> shop = user.shop
193
+ => #<Etsy::Shop:0x102578c @result={"is_vacation"=>"", "announcement"=> ... >
194
+ >> shop.name
195
+ => "littletjane"
196
+ >> shop.title
197
+ => "a cute and crafty mix of handmade goods."
198
+
199
+ More information about shops can be found in the documentation for Etsy::Shop.
200
+
201
+ ### Listings
202
+
203
+ Shops contain multiple listings:
204
+
205
+ >> shop.listings
206
+ => [#<Etsy::Listing:0x119acac @result={} ...>, ... ]
207
+ >> listing = shop.listings.first
208
+ => #<Etsy::Listing:0x19a981c @result={} ... >
209
+ >> listing.title
210
+ => "hanging with the bad boys matchbox"
211
+ >> listing.description
212
+ => "standard size matchbox, approx. 1.5 x 2 inches ..."
213
+ >> listing.url
214
+ => "http://www.etsy.com/view_listing.php?listing_id=24165902"
215
+ >> listing.view_count
216
+ => 19
217
+ >> listing.created_at
218
+ => Sat Apr 25 11:31:34 -0400 2009
219
+
220
+ See the documentation for Etsy::Listing for more information.
221
+
222
+ ### Images
223
+
224
+ Each listing has one or more images available:
225
+
226
+ >> listing.images
227
+ => [#<Etsy::Image:0x18f85e4 @result={} ... >,
228
+ #<Etsy::Image:0x18f85d0 @result={} ... >]
229
+ >> listing.images.first.square
230
+ => "http://ny-image0.etsy.com/il_75x75.189111072.jpg"
231
+ >> listing.images.first.full
232
+ => "http://ny-image0.etsy.com/il_fullxfull.189111072.jpg"
233
+
234
+ Listings also have a primary image:
235
+
236
+ >> listing.image
237
+ => #<Etsy::Image:0x18c3060 @result={} ... >
238
+ >> listing.image.full
239
+ => "http://ny-image0.etsy.com/il_fullxfull.189111072.jpg"
240
+
241
+ More information is available in the documentation for Etsy::Image.
242
+
243
+ ### Associations
244
+
245
+ Associations on resources can be specified with the 'includes' key.
246
+
247
+ A single resource can be specified with the name of the resource as a string:
248
+
249
+ >> Listing.find(1, {:includes => 'Images'})
250
+
251
+ Multiple resources can be specified with the name of the resources as a comma-delimited string:
252
+
253
+ >> User.find(1, {:includes => ['FeedbackAsBuyer', 'FeedbackAsSeller']})
254
+
255
+ If you want a more fine-grained response, you can specify the associations as an array of hashes, each of which must contain the name of the resource, and can also include the fields you wish returned, as well as the limit and offset.
256
+
257
+ >> association = {:resource => 'Images', :fields => ['red','green','blue'], :limit => 1, :offset => 0}
258
+ >> Listing.find(1, {:includes => [association]})
259
+
260
+ ## Public mode vs authenticated calls
261
+
262
+ This additional example should make clear the difference between issuing public versus authenticated requests:
263
+
264
+ ### Public workflow
265
+
266
+ >> Etsy.api_key = 'key'
267
+ >> user = Etsy.user('user_id_or_name')
268
+ >> Etsy::Listing.find_all_by_shop_id(user.shop.id, :limit => 5)
269
+
270
+ ### Authenticated workflow
271
+
272
+ >> Etsy.api_key = 'key'
273
+ >> Etsy.api_secret = 'secret'
274
+ >> user = Etsy.myself(token, secret)
275
+ >> access = { :access_token => user.token, :access_secret => user.secret }
276
+ >> Etsy::Listing.find_all_by_shop_id(user.shop.id, access.merge(:limit => 5))
277
+
278
+
279
+ ## Contributing
280
+
281
+ I have a "commit bit" policy for contributions to this repository. Once I accept
282
+ your patch, I will give you full commit access. To submit patches:
283
+
284
+ 1. Fork this repository
285
+ 2. Implement the desired feature with tests (and documentation if necessary)
286
+ 3. Send me a pull request
287
+
288
+ I ask that you not submit patches that include changes to the version or gemspec.
289
+
290
+ ### Basics steps for contributing using (https://github.com/defunkt/hub)
291
+
292
+ # Setup the project
293
+ git clone kytrinyx/etsy
294
+ git fork
295
+ bundle
296
+ rake
297
+
298
+ # Normal flow
299
+ git checkout -b your-feature-or-bug
300
+ # Write your tests
301
+ # Make the tests pass
302
+ git add <CHANGES>
303
+ git commit -m "Some useful message"
304
+ git push -u YOUR-GITHUB-USERNAME your-feature-or-bug
305
+ git pull-request
306
+
307
+ ## Contributors
308
+
309
+ These people have helped make the Etsy gem what it is today:
310
+
311
+ * [Patrick Reagan](https://github.com/reagent)
312
+ * [Katrina Owen](https://github.com/kytrinyx)
313
+ * [Trae Robrock](https://github.com/trobrock)
314
+ * [Roger Smith](https://github.com/rogsmith)
315
+ * [Jimmy Tang](https://github.com/jimmytang)
316
+ * [Mak Nazečić-Andrlon](https://github.com/Muon)
317
+ * [Daniel Szmulewicz](https://github.com/danielsz)
318
+ * [Patrick Schless](https://github.com/plainlystated)
319
+ * [Martin Popelak](https://github.com/pupca)
320
+ * [Julio Santos](https://github.com/julio)
321
+ * [Matt Fields](https://github.com/mfields106)
322
+ * [Mike Taylor](https://github.com/sealabcore)
323
+ * [Mason Stewart](https://github.com/masondesu)
324
+ * [Sasha Gerrand](https://github.com/sgerrand)
325
+ * [Jake Boxer](https://github.com/jakeboxer)
326
+ * [Sunwoo Yang](https://github.com/sunwooz)
327
+ * [Isaac Rosenberg](https://github.com/irosenb)
328
+ * [Carson Gross](https://github.com/carsongross)
329
+ * [John Amicangelo](https://github.com/JohnAmican)
330
+ * [Max Gulyaev](https://github.com/maxilev)
331
+ * [fbehrens](https://github.com/fbehrens)
332
+ * [William Jeffries](https://github.com/williamcodes)
333
+ * [Jack Guoyuan Zhao](https://github.com/zhaoguoyuan)
334
+
335
+ ### Github Flow
336
+
337
+ For those of you with commit access, please check out Scott Chacon's blog post about [github flow](http://scottchacon.com/2011/08/31/github-flow.html)
338
+
339
+ > * Anything in the master branch is deployable
340
+ > * To work on something new, create a descriptively named branch off of master (ie: new-oauth2-scopes)
341
+ > * Commit to that branch locally and regularly push your work to the same named branch on the server
342
+ > * When you need feedback or help, or you think the branch is ready for merging, open a pull request
343
+ > * After someone else has reviewed and signed off on the feature, you can merge it into master
344
+ > * Once it is merged and pushed to ‘master’, you can and should deploy immediately
345
+
346
+ ## License
347
+
348
+ The Etsy rubygem is released under the MIT license.
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env rake
2
+ require 'rubygems'
3
+ require 'rake/testtask'
4
+ require "bundler/gem_tasks"
5
+
6
+ task :default => :test
7
+
8
+ Rake::TestTask.new do |t|
9
+ t.libs << 'test'
10
+ t.test_files = FileList["test/**/*_test.rb"]
11
+ t.verbose = false
12
+ end
@@ -0,0 +1,34 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/etsy/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = ["Patrick Reagan", "Katrina Owen"]
6
+ gem.email = ["reaganpr@gmail.com", "katrina.owen@gmail.com"]
7
+ gem.description = %q{A friendly Ruby interface to the Etsy API}
8
+ gem.summary = %q{Provides a friendly ruby-like wrapper for the Etsy API}
9
+ gem.homepage = "http://github.com/kytrinyx/etsy"
10
+
11
+ gem.files = `git ls-files`.split($\)
12
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
+ gem.name = "cardmagic-etsy"
15
+ gem.require_paths = ["lib"]
16
+ gem.version = Etsy::VERSION
17
+ gem.license = 'MIT'
18
+
19
+ gem.required_rubygems_version = Gem::Requirement.new(">= 0") if gem.respond_to? :required_rubygems_version=
20
+ gem.rubygems_version = "1.8.10"
21
+
22
+ gem.add_dependency "json", ">= 1.5.0"
23
+ gem.add_dependency "oauth", "~> 0.4.0"
24
+
25
+ gem.add_development_dependency "rake", "~> 10.0.4"
26
+ gem.add_development_dependency "jnunemaker-matchy", "~> 0.4.0"
27
+ gem.add_development_dependency 'shoulda', "~> 3.4.0"
28
+ gem.add_development_dependency 'mocha', "~> 0.13.3"
29
+ # shoulda-context blows up on ActiveSupport not being defined
30
+ # on shoulda/context.rb:7
31
+ # But then when you load active_support, shoulda-context decides
32
+ # to load MiniTest
33
+ gem.add_development_dependency 'test-unit', "~>3.2.5"
34
+ end