futures_pipeline 0.0.4 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -72,3 +72,5 @@ Copyright
72
72
  ---------
73
73
  Copyright (c) 2011 Code for America.
74
74
  See [LICENSE](https://github.com/codeforamerica/futures_pipeline/blob/master/LICENSE.md) for details.
75
+
76
+ [![Code for America Tracker](http://stats.codeforamerica.org/codeforamerica/futures_pipeline.png)](http://stats.codeforamerica.org/projects/futures_pipeline)
@@ -12,7 +12,6 @@ Gem::Specification.new do |gem|
12
12
  gem.add_runtime_dependency 'faraday', '~> 0.6.1'
13
13
  gem.add_runtime_dependency 'faraday_middleware', '~> 0.6.3'
14
14
  gem.add_runtime_dependency 'hashie', '~> 1.0.0'
15
- gem.add_runtime_dependency 'json', '~> 1.5.1'
16
15
  gem.add_runtime_dependency 'multi_json', '~> 1.0.2'
17
16
  gem.add_runtime_dependency 'rash', '~> 0.3.0'
18
17
  gem.authors = ["Erik Michaels-Ober", "Ryan Resella"]
@@ -1,13 +1,20 @@
1
1
  require 'futures_pipeline/client'
2
2
 
3
3
  module FuturesPipeline
4
-
5
- def self.client
6
- FuturesPipeline::Client.new
4
+ # Alias for FuturesPipeline::Client.new
5
+ #
6
+ # @return [FuturesPipeline::Client]
7
+ def self.new(options={})
8
+ FuturesPipeline::Client.new(options)
7
9
  end
8
10
 
9
- def self.new
10
- client
11
+ # Delegate to FuturesPipeline::Client
12
+ def self.method_missing(method, *args, &block)
13
+ return super unless new.respond_to?(method)
14
+ new.send(method, *args, &block)
11
15
  end
12
16
 
17
+ def self.respond_to?(method, include_private=false)
18
+ new.respond_to?(method, include_private) || super(method, include_private)
19
+ end
13
20
  end
@@ -13,8 +13,7 @@ module FuturesPipeline
13
13
  # @option options page [Integer] the page of results from the first career in the list.
14
14
  # @return [Array<Hashie::Mash>]
15
15
  # @example
16
- # @client = FuturesPipeline.new
17
- # @client.careers
16
+ # FuturesPipeline.careers
18
17
  def careers(options={})
19
18
  get("/api/v1/careers.json", options)
20
19
  end
@@ -26,8 +25,7 @@ module FuturesPipeline
26
25
  # @return [Hashie::Mash]
27
26
  # @raise [Faraday::Error::ResourceNotFound] If O\*NET code is not found.
28
27
  # @example
29
- # @client = FuturesPipeline.new
30
- # @client.career("11-1011.00")
28
+ # FuturesPipeline.career("11-1011.00")
31
29
  def career(onet_soc_code, options={})
32
30
  api_safe_onet_soc_code = onet_soc_code.tr(".", "-")
33
31
  get("/api/v1/careers/#{api_safe_onet_soc_code}.json", options)
@@ -39,11 +37,9 @@ module FuturesPipeline
39
37
  # @param options [Hash] A customizable set of options.
40
38
  # @return [Hashie::Mash]
41
39
  # @example
42
- # @client = FuturesPipeline.new
43
- # @client.search("11b")
40
+ # FuturesPipeline.search("11b")
44
41
  def search(moc, options={})
45
42
  get("/api/v1/careers/search.json?moc=#{moc}", options)
46
43
  end
47
-
48
44
  end
49
45
  end
@@ -1,3 +1,3 @@
1
1
  module FuturesPipeline
2
- VERSION = "0.0.4"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -1,9 +1,9 @@
1
1
  require 'helper'
2
2
 
3
3
  describe FuturesPipeline do
4
- describe ".client" do
5
- it "should be a FuturesPipeline::Client" do
6
- FuturesPipeline.client.should be_a FuturesPipeline::Client
4
+ describe ".new" do
5
+ it "should return a FuturesPipeline::Client" do
6
+ FuturesPipeline.new.should be_a FuturesPipeline::Client
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: futures_pipeline
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.4
5
+ version: 0.1.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Erik Michaels-Ober
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2011-05-23 00:00:00 Z
14
+ date: 2011-05-29 00:00:00 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: ZenTest
@@ -123,39 +123,28 @@ dependencies:
123
123
  version: 1.0.0
124
124
  type: :runtime
125
125
  version_requirements: *id010
126
- - !ruby/object:Gem::Dependency
127
- name: json
128
- prerelease: false
129
- requirement: &id011 !ruby/object:Gem::Requirement
130
- none: false
131
- requirements:
132
- - - ~>
133
- - !ruby/object:Gem::Version
134
- version: 1.5.1
135
- type: :runtime
136
- version_requirements: *id011
137
126
  - !ruby/object:Gem::Dependency
138
127
  name: multi_json
139
128
  prerelease: false
140
- requirement: &id012 !ruby/object:Gem::Requirement
129
+ requirement: &id011 !ruby/object:Gem::Requirement
141
130
  none: false
142
131
  requirements:
143
132
  - - ~>
144
133
  - !ruby/object:Gem::Version
145
134
  version: 1.0.2
146
135
  type: :runtime
147
- version_requirements: *id012
136
+ version_requirements: *id011
148
137
  - !ruby/object:Gem::Dependency
149
138
  name: rash
150
139
  prerelease: false
151
- requirement: &id013 !ruby/object:Gem::Requirement
140
+ requirement: &id012 !ruby/object:Gem::Requirement
152
141
  none: false
153
142
  requirements:
154
143
  - - ~>
155
144
  - !ruby/object:Gem::Version
156
145
  version: 0.3.0
157
146
  type: :runtime
158
- version_requirements: *id013
147
+ version_requirements: *id012
159
148
  description: Ruby wrapper for the Futures, Inc. US Military Pipeline API
160
149
  email:
161
150
  - erik@codeforamerica.org
@@ -213,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
213
202
  requirements: []
214
203
 
215
204
  rubyforge_project:
216
- rubygems_version: 1.8.3
205
+ rubygems_version: 1.8.4
217
206
  signing_key:
218
207
  specification_version: 3
219
208
  summary: Ruby wrapper for the Futures, Inc. US Military Pipeline API