chimps 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. data/Gemfile +3 -9
  2. data/Gemfile.lock +14 -10
  3. data/README.rdoc +146 -240
  4. data/Rakefile +4 -33
  5. data/VERSION +1 -1
  6. data/lib/chimps/config.rb +35 -21
  7. data/lib/chimps/{utils/error.rb → error.rb} +1 -12
  8. data/lib/chimps/query_request.rb +67 -0
  9. data/lib/chimps/request.rb +82 -108
  10. data/lib/chimps/response.rb +62 -22
  11. data/lib/chimps/utils/typewriter.rb +90 -0
  12. data/lib/chimps/utils/uses_curl.rb +22 -12
  13. data/lib/chimps/utils.rb +50 -6
  14. data/lib/chimps/workflows/download.rb +72 -0
  15. data/lib/chimps/workflows/upload.rb +113 -0
  16. data/lib/chimps.rb +12 -12
  17. data/spec/chimps/query_request_spec.rb +44 -0
  18. data/spec/chimps/request_spec.rb +92 -0
  19. data/spec/chimps/response_spec.rb +0 -1
  20. data/spec/chimps/workflows/download_spec.rb +48 -0
  21. data/spec/spec_helper.rb +2 -19
  22. metadata +46 -91
  23. data/.document +0 -5
  24. data/.gitignore +0 -32
  25. data/CHANGELOG.textile +0 -4
  26. data/bin/chimps +0 -5
  27. data/lib/chimps/cli.rb +0 -28
  28. data/lib/chimps/commands/base.rb +0 -65
  29. data/lib/chimps/commands/batch.rb +0 -40
  30. data/lib/chimps/commands/create.rb +0 -31
  31. data/lib/chimps/commands/destroy.rb +0 -26
  32. data/lib/chimps/commands/download.rb +0 -46
  33. data/lib/chimps/commands/help.rb +0 -100
  34. data/lib/chimps/commands/list.rb +0 -41
  35. data/lib/chimps/commands/query.rb +0 -82
  36. data/lib/chimps/commands/search.rb +0 -48
  37. data/lib/chimps/commands/show.rb +0 -30
  38. data/lib/chimps/commands/test.rb +0 -39
  39. data/lib/chimps/commands/update.rb +0 -34
  40. data/lib/chimps/commands/upload.rb +0 -50
  41. data/lib/chimps/commands.rb +0 -125
  42. data/lib/chimps/typewriter.rb +0 -349
  43. data/lib/chimps/utils/log.rb +0 -48
  44. data/lib/chimps/utils/uses_model.rb +0 -34
  45. data/lib/chimps/utils/uses_yaml_data.rb +0 -93
  46. data/lib/chimps/workflows/batch.rb +0 -127
  47. data/lib/chimps/workflows/downloader.rb +0 -102
  48. data/lib/chimps/workflows/up.rb +0 -149
  49. data/lib/chimps/workflows/upload/bundler.rb +0 -249
  50. data/lib/chimps/workflows/upload/notifier.rb +0 -59
  51. data/lib/chimps/workflows/upload/token.rb +0 -77
  52. data/lib/chimps/workflows/upload/uploader.rb +0 -51
  53. data/lib/chimps/workflows.rb +0 -12
  54. data/spec/chimps/typewriter_spec.rb +0 -114
  55. data/spec/chimps/workflows/upload/bundler_spec.rb +0 -75
  56. data/spec/chimps/workflows/upload/token_spec.rb +0 -6
data/Gemfile CHANGED
@@ -1,16 +1,10 @@
1
1
  #!/usr/bin/env ruby
2
2
  source :gemcutter
3
3
  gem "json"
4
- gem "configliere"
4
+ gem "configliere", ">= 0.3.2"
5
5
  gem 'rest-client', '>= 1.6.1', :require => 'restclient'
6
+ gem 'addressable', :require => 'addressable/uri'
6
7
 
7
8
  group :test do
8
- gem "rspec", "1.3.0", :require => 'spec'
9
+ gem "rspec"
9
10
  end
10
-
11
- group :upload do
12
- gem 'imw', '>= 0.2.11'
13
- gem 'activesupport', '2.3.5', :require => 'active_support'
14
- gem 'addressable', :require => 'addressable/uri'
15
- end
16
-
data/Gemfile.lock CHANGED
@@ -1,24 +1,28 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- activesupport (2.3.5)
5
- addressable (2.2.2)
6
- configliere (0.1.1)
7
- imw (0.2.11)
8
- json (1.4.6)
4
+ addressable (2.2.4)
5
+ configliere (0.3.2)
6
+ diff-lcs (1.1.2)
7
+ json (1.5.1)
9
8
  mime-types (1.16)
10
9
  rest-client (1.6.1)
11
10
  mime-types (>= 1.16)
12
- rspec (1.3.0)
11
+ rspec (2.5.0)
12
+ rspec-core (~> 2.5.0)
13
+ rspec-expectations (~> 2.5.0)
14
+ rspec-mocks (~> 2.5.0)
15
+ rspec-core (2.5.1)
16
+ rspec-expectations (2.5.0)
17
+ diff-lcs (~> 1.1.2)
18
+ rspec-mocks (2.5.0)
13
19
 
14
20
  PLATFORMS
15
21
  ruby
16
22
 
17
23
  DEPENDENCIES
18
- activesupport (= 2.3.5)
19
24
  addressable
20
- configliere
21
- imw (>= 0.2.11)
25
+ configliere (>= 0.3.2)
22
26
  json
23
27
  rest-client (>= 1.6.1)
24
- rspec (= 1.3.0)
28
+ rspec
data/README.rdoc CHANGED
@@ -1,278 +1,182 @@
1
- Infochimps[http://infochimps.org] offers two APIs for users to access
2
- and modify data:
1
+ = Who /are/ these Chimps?
3
2
 
4
- - an XML & JSON based {RESTful API}[http://infochimps.org/api] to list, show, create, update, and destroy datasets and associated resources on Infochimps[http://infochimps.org]
5
- - a JSON based {Query API}[http://api.infochimps.com] to query particular rows in datasets
3
+ Infochimps[http://www.infochimps.com] is an online data marketplace
4
+ and repository where anyone can find, share, and sell data.
6
5
 
7
- Chimps provides a Ruby wrapper for both of these APIs (built on
8
- RestClient) as well as a command-line tool.
6
+ Infochimps offers two APIs for users to access and modify data
9
7
 
10
- See the above links for details on the sorts of parameters the
11
- Infochimps APIs expect and the output they provide.
8
+ - a {Dataset API}[http://www.infochimps.com/api] to list, show, create, update, and destroy datasets and associated resources on Infochimps[http://www.infochimps.com]
9
+ - a {Query API}[http://www.infochimps.com/api] to query data from particular rows of these datasets
12
10
 
13
- = Installation
11
+ *Chimps* is a Ruby library that makes interacting with Infochimps'
12
+ APIs as easy as
14
13
 
15
- Chimps is hosted as a gem on Gemcutter[http://gemcutter.org]. You can see our current gem sources with
16
-
17
- gem sources
18
-
19
- If you don't see <tt>http://gemcutter.org</tt> you'll have to add it
20
- with
21
-
22
- gem sources -a http://gemcutter.org
23
-
24
- Then you can install Chimps with
25
-
26
- gem install chimps
27
-
28
- == API keys
29
-
30
- You'll need an API key and secret from Infochimps before you can start
31
- adding or modifying datasets via the Dataset API. {Sign up for an
32
- Infochimps account}[http://infochimps.org/signup] and register for an
33
- API key.
34
-
35
- You'll need a separate API key to use the Query API, {register for one
36
- now}[http://api.infochimps.com/features-and-pricing].
37
-
38
- Once you've registered for the API(s) you'll need to put them in your
39
- <tt>~/.chimps</tt> file which should look like
40
-
41
- # -*-yaml-*-
42
- :site:
43
- :username: monkeyboy
44
- :key: xxxxxxxxxxxxxxxx
45
- :secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
46
- :query:
47
- :username: monkeyboy
48
- :key: xxxxxxxxxxxxxxxxx
49
-
50
- = Usage
51
-
52
- Chimps can be used as a library in your own code or as a command-line
53
- tool.
54
-
55
- == Chimps on the Command Line
14
+ require 'rubygems'
15
+ require 'chimps'
16
+
17
+ # Sign up for an Infochimps account and get your keys from
18
+ # http://www.infochimps.com/me
19
+ Chimps.config[:dataset][:key] = "Your Dataset API key"
20
+ Chimps.config[:dataset][:secret] = "Your Dataset API secret"
56
21
 
57
- You can use Chimps directly on the command line to interact with
58
- Infochimps.
22
+ # list datasets in JSON
23
+ Chimps::Request.new("/datasets").get.print
59
24
 
60
- Try running
25
+ You can use Chimps into your web application or into any other
26
+ Ruby software that talks to Infochimps.
61
27
 
62
- chimps help
28
+ If you're interested in a command line client built on top of Chimps,
29
+ try {Chimps CLI}[http://github.com/infochimps/chimps-cli].
63
30
 
64
- to get started as well as
31
+ = First Steps
65
32
 
66
- chimps help COMMAND
33
+ == Installing Chimps
67
34
 
68
- for help on a specific command. When running in verbose mode (with
69
- <tt>-v</tt>), Chimps will print helpful diagnostics on each query it's
70
- performing.
35
+ Chimps is hosted as a gem on RubyGems[http://rubygems.org]. You can
36
+ see your current gem sources with
71
37
 
72
- === Testing
38
+ $ gem sources
73
39
 
74
- You can test whether or not you have access to the Infochimps Dataset API
40
+ If you don't see <tt>http://rubygems.org</tt> you'll have to add it
75
41
  with
76
42
 
77
- chimps test
78
-
79
- Chimps will try and print informative error messages if it finds it
80
- can't authenticate you.
81
-
82
- === Searching
83
-
84
- Search datasets
85
-
86
- chimps search 'statisical abstract'
87
-
88
- or other kinds of models
89
-
90
- chimps search -m source 'Department of Justice'
91
-
92
- This _does_ _not_ require credentials for the RESTful API.
93
-
94
- === Listing
95
-
96
- You can list your datasets
97
-
98
- chimps list
99
-
100
- or all datasets
101
-
102
- chimps list -a
103
-
104
- === Showing
105
-
106
- You can get more information about a particular dataset (as a YAML
107
- document)
43
+ $ gem sources -a http://rubygems.org
108
44
 
109
- chimps show my-awesome-dataset
110
-
111
- This _does_ _not_ require credentials for the RESTful API.
112
-
113
- === Creating
114
-
115
- You can create a dataset, passing properties directly on the command
116
- line
117
-
118
- chimps create title="My Awesome Dataset" description="Curt, but informative."
119
- 16011 my-awesome-dataset 2010-05-25T22:52:16Z My Awesome Dataset
120
-
121
- or from a YAML input file
122
-
123
- chimps create my_awesome_dataset.yaml
124
- 16011 my-awesome-dataset 2010-05-25T22:52:16Z My Awesome Dataset
125
-
126
- Examples of input files are in the <tt>examples</tt> directory of the
127
- Chimps distribution.
128
-
129
- === Updating
130
-
131
- You can also update an existing dataset
132
-
133
- chimps update my-awesome-dataset title="My TOTALLY Awesome Dataset"
134
-
135
- Passing in data works just like the <tt>create</tt> command.
136
-
137
- === Destroying
138
-
139
- You can destroy datasets as well
140
-
141
- chimps destroy my-awesome-dataset
142
-
143
- === Downloading
144
-
145
- You can download a dataset from Infochimps
146
-
147
- chimps download my-awesome-dataset
148
-
149
- which will put it in the current directory.
150
-
151
- You can also specify a format or package.
152
-
153
- chimps download -f csv -p tar.bz2 my-awesome-dataset
45
+ Then you can install Chimps with
154
46
 
155
- === Uploading
47
+ $ sudo gem install chimps
156
48
 
157
- You can upload data from your local machine to an existing dataset at
158
- Infochimps
49
+ == Configuring Chimps
159
50
 
160
- chimps upload my-awesome-dataset /path/to/my/data/*
161
- 16005 boozer 2010-05-20T13:58:07Z boozer
51
+ You'll need a Dataset API key and secret from Infochimps before you
52
+ can start adding or modifying datasets via the Dataset API. {Sign up
53
+ for an Infochimps account}[http://www.infochimps.com/signup] and get
54
+ your {Dataset API key}[http://www.infochimps.com/me].
162
55
 
163
- Chimps will package all the files you specify into a single archive
164
- and upload it. You can annotate the upload with a particular format
165
- (though Chimps will try and guess). Chimps will NOT make an archive
166
- if you only attempt to upload a single file and it is already an
167
- archive.
56
+ To query particular rows from a dataset, you'll also need to get a
57
+ {Query API key}[http://www.infochimps.com/api].
168
58
 
169
- Chimps uses the {Infinite
170
- Monkeywrench}[http://github.com/infochimps/imw] to process the data
171
- for uploads.
59
+ You can always explicitly set values in <tt>Chimps.config</tt> like
60
+ in the first example at the top of this +README+ but you may find it
61
+ more convenient to keep your keys in a configuration file.
172
62
 
173
- === Batch Jobs
63
+ Chimps will look for configuration in two places:
64
+ <tt>/etc/chimps/chimps.yaml</tt> and <tt>~/.chimps</tt>. Once you've
65
+ registered for the API(s) you can create one of these files. The
66
+ configuration file looks like
174
67
 
175
- Chimps allows you to peform batch requests against the Infochimps REST
176
- API in which many changes are affected through a single API call.
177
68
 
178
- chimps batch batch_data.yaml
179
- Status Resource ID Errors
180
- created source 13671
181
- created dataset 16013
182
- invalid Title is too short (minimum is 4 characters)
183
-
184
- The contents in <tt>batch_data.yaml</tt> specify an array of resources
185
- to update or create. Each resource's data can be attached to local
186
- paths to upload. These paths will be packaged and uploaded (just as
187
- in the +upload+ command) after the batch update finishes.
188
-
189
- Errors in a particular resource will not cause the whole batch job to
190
- fail (as above).
69
+ # -*-yaml-*-
70
+ # ~/.chimps
71
+ :site:
72
+ :key: xxxxxxxxxxxxxxxx
73
+ :secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
74
+ :query:
75
+ :key: xxxxxxxxxxxxxxxxx
191
76
 
192
- Learn more about the format of the <tt>batch_data.yaml</tt> file by
193
- looking at the example in the +examples+ directory of the Chimps
194
- distribution or by visiting the {Infochimps REST
195
- API}[http://infochimps.org/api].
77
+ Your personal configuration file (<tt>~/.chimps</tt>) will override
78
+ the site-configuration file (<tt>/etc/chimps/chimps.yaml</tt>).
196
79
 
197
- === Querying
80
+ You have to explicitly tell Chimps to read your configuration file
81
+ when you require it:
198
82
 
199
- You can also use Chimps to make queries against the Infochimps Query
200
- API.
83
+ require 'rubygems'
84
+ require 'chimps'
201
85
 
202
- chimps query soc/net/tw/influence screen_name=infochimps
203
- {"replies_out":13,"account_age":602,"statuses":166,"id":15748351,"replies_in":22,"screen_name":"infochimps"}
86
+ # reads configuration files
87
+ Chimps.boot!
204
88
 
205
- where parameters to include for a _single_ query can be passed in on
206
- the command line.
89
+ # ..do stuff
207
90
 
208
- If you pass in the path to a YAML file then it must consist of an
209
- array of such parameter hashes and will result in multiple queries
210
- being made (to the same dataset)
91
+ = Making Requests
211
92
 
212
- chimps query soc/net/tw/influene query.yaml
213
- {"replies_out":13,"account_age":602,"statuses":166,"id":15748351,"replies_in":22,"screen_name":"infochimps"}
214
- {"replies_out":940,"account_age":440,"statuses":5015,"id":19058681,"replies_in":88909,"screen_name":"aplusk"}
215
- {"replies_out":0,"account_age":1123,"statuses":634,"id":813286,"replies_in":14541,"screen_name":"BarackObama"}
93
+ == Dataset API
216
94
 
217
- == Chimps as a Library
95
+ You can use the {Dataset API}[http://www.infochimps.com/api] to
96
+ search, list, show, create, update, or destroy datasets and other
97
+ resources at Infochimps.
218
98
 
219
- You can also use Chimps in your own code to handle making requests of
220
- Infochimps.
99
+ If instead of /creating/ a dataset with 100,000 baby names you want to
100
+ /query/ a dataset of 100,000 baby names then you should skip down to
101
+ the Query API section below.
221
102
 
222
- At present, Chimps' classes internally use the JSON API so you'll have
223
- to as well -- support for the XML API will be coming soon...
103
+ You can find a complete list of Dataset API endpoints, expected
104
+ parameters, return codes, documentation, and authentication
105
+ requirements at http://www.infochimps.com/api.
224
106
 
225
- === Configuration Options
107
+ === A Simple +GET+ Request
226
108
 
227
- When invoked from the command-line, Chimps automatically reads
228
- configuration files before executing requests. When used as a library
229
- via
109
+ The <tt>Chimps::Request</tt> class makes requests against the Dataset
110
+ API. Create a request by specifying a path on the Infochimps server.
111
+ The extension of the path determines the MIME type that Infochimps
112
+ will respond with:
230
113
 
231
- require 'rubygems'
232
- require 'chimps'
114
+ # list datasets
115
+ request = Chimps::Request.new('/datasets.json')
116
+ response = request.get
117
+ response.print
118
+ # lotsa JSON...
233
119
 
234
- Chimps will *NOT* read default configuration files. You can force it
235
- to do so by calling
120
+ === Understanding the Response
236
121
 
237
- Chimps::Config.load
122
+ The +response+ above is an instance of <tt>Chimps::Response</tt>. You
123
+ can examine <tt>response.body<tt>, <tt>response.code</tt>,
124
+ <tt>response.headers</tt>, &c.
238
125
 
239
- which will load from the configuration file defined in
240
- Chimps::CONFIG[:identity_file]. You can alternatively set
241
- configuration options directly in Chimps::CONFIG yourself (they should
242
- match the structure of a <tt>~/.chimps</tt> file).
126
+ response.code #=> 200
127
+ response.headers #=> Hash of headers
128
+ response.body #=> JSON text
243
129
 
244
- === Using the Dataset API
130
+ Since the response is a structured data format, you can parse it and
131
+ look inside:
245
132
 
246
- You can find a complete list of Dataset API endpoints, expected
247
- parameters, return codes, documentation, and authentication
248
- requirements at http://infochimps.com/api.
133
+ response.parse!
134
+ response.size #=> 20
135
+ response.each do |dataset|
136
+ # do something ...
137
+ end
249
138
 
250
- The Chimps::Request class makes requests against the Dataset API.
251
- Create a request by specifying a path on the Infochimps server (it
252
- _must_ end with <tt>.json</tt> for now).
139
+ === A Signed +GET+ Request
253
140
 
254
- list_dataset_request = Chimps::Request.new('/datasets.json')
255
- list_dataset_request.get
141
+ Many Dataset API calls at Infochimps (like listing datasets, above) do
142
+ not require the request to be signed in any way. Other requests,
143
+ which reveal your private information or create new datasets, &c. on
144
+ Infochimps will require your Dataset API secret to sign. You can see
145
+ a full list of the Dataset API endpoints available and whether or not
146
+ requests to each need to be signed at http://www.infochimps.com/api.
256
147
 
257
148
  Assuming you've properly configured Chimps (see above) you ask the
258
149
  request to sign itself.
259
150
 
260
- authenticated_list_datasets_request = Chimps::Request.new('/datasets.json', :authenticate => true)
151
+ # list only your datasets -- required to be signed
152
+ request = Chimps::Request.new('/my/datasets.json', :sign => true)
153
+ response = request.get
154
+ response.print
155
+ # lotsa JSON...but only about *your* datasets
156
+
157
+ The authentication mechanism uses the Dataset API secret (which is
158
+ shared between you and Infochimps) to sign either the query string
159
+ (for the case of +GET+ and +DELETE+ requests) or the request body (for
160
+ +POST+ and +PUT+ requests).
261
161
 
262
- (not necessary for a list datasets request, but you get the idea).
263
- You can also pass in query params
162
+ === +PUT+, +POST+, and +DELETE+ Requests
264
163
 
265
- authenticated_list_datasets_request_with_params = Chimps::Request.new('/datasets.json', :query_params => { :id => 'infochimps' }, :authenticate => true)
164
+ All +POST+, +PUT+, and +DELETE+ requests to Infochimps are required to
165
+ be signed.
266
166
 
267
- For POST and PUT requests you can also include data, which will also
268
- be signed if you ask.
167
+ Here's how to you might create a new dataset via a +POST+ request:
269
168
 
270
- authenticated_create_dataset_request = Chimps::Request('/datasets.json', :data => { :title => "My Awesome Dataset", :description => "An amazing description." }, :authenticate => true)
271
- authenticated_create_dataset_request.post
169
+ request = Chimps::Request('/datasets.json', :body => { :dataset => { :title => "My Awesome Dataset", :description => "An amazing description." }}, :sign => true)
170
+ response = request.post
171
+ response.code #=> 201
172
+ response.print
173
+ # your new dataset in JSON...
174
+ response.parse!
175
+ response['dataset']['id'] #=> 20876
272
176
 
273
- The +get+, +post+, +put+, and +delete+ methods of a Chimps::Request
274
- all return a Chimps::Response which automatically parses the response
275
- body into Ruby data structures.
177
+ You can find a complete list of what Dataset API endpoints are
178
+ available and what parameters they take at
179
+ http://www.infochimps.com/api.
276
180
 
277
181
  === Using the Query API
278
182
 
@@ -283,34 +187,36 @@ API}[http://api.infochimps.com].
283
187
 
284
188
  All QueryRequests will automatically be signed.
285
189
 
286
- authenticated_query_request = Chimps::QueryRequest.new('soc/net/tw/trstrank.json', :query_params => { :screen_name => 'infochimps' } )
287
- authenticated_query_request.get
190
+ request = Chimps::QueryRequest.new('soc/net/tw/trstrank.json', :query_params => { :screen_name => 'infochimps' } )
191
+ response = request.get
192
+ response.print
193
+ #=> {"trstrank":1.75,"user_id":15748351,"tq":96,"screen_name":"infochimps"}
288
194
 
289
- === Using Workflows
195
+ = Downloading Data
290
196
 
291
- In addition to making single requests, Chimps also has a few workflows
292
- which automate sequences of requests needed for certain complex tasks
293
- (like uploading or downloading of data, both of which require
294
- authorization tokens).
197
+ You can download the data for a dataset on Infochimps by making a
198
+ signed +POST+ request to obtain a download token and then making a
199
+ +GET+ request to the signed and expired URL contained in the token.
295
200
 
296
- The three workflows implemented so far include
201
+ Chimps provides a +Download+ class to simplify this for you. Here's
202
+ an example.
297
203
 
298
- - Chimps::Workflows::Up
299
- - Chimps::Workflows::Downloader
300
- - Chimps::Workflows::BatchUpdater
204
+ download = Chimps::Download.new('my-awesome-dataset')
205
+ # save your data directory
206
+ download.download('/data')
301
207
 
302
- Consult the documentation for each workflow to learn how to use it. A
303
- brief example of how to use the Downloader:
208
+ = Uploading Data
304
209
 
305
- downloader = Chimps::Workflows::Downloader.new(:dataset => 'my-awesome-dataset')
306
- downloader.execute! # performs download
210
+ Coming soon! For now you will have to upload your data manually
211
+ through the Infochimps website.
307
212
 
308
213
  = Contributing
309
214
 
310
215
  Chimps is an open source project created by the Infochimps team to
311
- encourage adoption of the Infochimps APIs. The official repository is
312
- hosted on GitHub
216
+ encourage adoption of Infochimps' Dataset & Query APIs. The official
217
+ repository is hosted on GitHub
313
218
 
314
219
  http://github.com/infochimps/chimps
315
220
 
316
- Feel free to clone it and send pull requests.
221
+ Infochimps encourages you to contribute by cloning Chimps, adding your
222
+ feature or bugfix, writing a spec, and sending us a pull request.
data/Rakefile CHANGED
@@ -6,16 +6,11 @@ begin
6
6
  require 'jeweler'
7
7
  Jeweler::Tasks.new do |gem|
8
8
  gem.name = "chimps"
9
- gem.summary = "Chimps! is a Ruby wrapper and command-line interface for the Infochimps APIs (http://infochimps.org/api, http://api.infochimps.com)"
10
- gem.description = "Chimps! allows you to easily make API calls against Infochimps web services. Chimps!'s Request and Response classes take care of all the details so you can remain calm and RESTful. Chimps! also comes with a command-line tool to make it simple to query, create, update, upload, and download data on Infochimps"
11
- gem.email = "coders@infochimps.org"
9
+ gem.summary = "Chimps is a Ruby interface for the Infochimps Dataset & Query APIs (http://www.infochimps.com/api)"
10
+ gem.description = "Chimps allows you to easily make API calls against Infochimps web services. Chimps!'s Request and Response classes take care of all the details so you can remain calm and RESTful."
11
+ gem.email = "coders@infochimps.com"
12
12
  gem.homepage = "http://github.com/infochimps/chimps"
13
13
  gem.authors = ["Dhruv Bansal"]
14
- gem.add_dependency 'rest-client', ['>= 1.5.1']
15
- gem.add_dependency 'json', ['>= 1.4.3']
16
- gem.add_dependency 'imw', ['>= 0.2.3']
17
- gem.add_development_dependency "rspec", [">= 1.2.9"]
18
- gem.add_development_dependency "yard", [">= 0"]
19
14
  gem.files.exclude "old/**/*"
20
15
  end
21
16
  Jeweler::GemcutterTasks.new
@@ -25,30 +20,6 @@ end
25
20
 
26
21
  desc "Build tags"
27
22
  task :tags do
28
- system "etags -R README.rdoc bin examples lib spec"
23
+ system "etags -R README.rdoc examples lib spec"
29
24
  end
30
25
 
31
- require 'spec/rake/spectask'
32
- Spec::Rake::SpecTask.new(:spec) do |spec|
33
- spec.libs << 'lib' << 'spec'
34
- spec.spec_files = FileList['spec/**/*_spec.rb']
35
- end
36
-
37
- Spec::Rake::SpecTask.new(:rcov) do |spec|
38
- spec.libs << 'lib' << 'spec'
39
- spec.pattern = 'spec/**/*_spec.rb'
40
- spec.rcov = true
41
- end
42
-
43
- task :spec => :check_dependencies
44
- task :default => :spec
45
-
46
- begin
47
- require 'yard'
48
- YARD::Rake::YardocTask.new
49
- rescue LoadError
50
- desc "Build YARD documentation"
51
- task :yardoc do
52
- abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard"
53
- end
54
- end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.3.0