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 +2 -0
- data/futures_pipeline.gemspec +0 -1
- data/lib/futures_pipeline.rb +12 -5
- data/lib/futures_pipeline/client.rb +3 -7
- data/lib/futures_pipeline/version.rb +1 -1
- data/spec/futures_pipeline_spec.rb +3 -3
- metadata +7 -18
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)
|
data/futures_pipeline.gemspec
CHANGED
@@ -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"]
|
data/lib/futures_pipeline.rb
CHANGED
@@ -1,13 +1,20 @@
|
|
1
1
|
require 'futures_pipeline/client'
|
2
2
|
|
3
3
|
module FuturesPipeline
|
4
|
-
|
5
|
-
|
6
|
-
|
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
|
-
|
10
|
-
|
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
|
-
#
|
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
|
-
#
|
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
|
-
#
|
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,9 +1,9 @@
|
|
1
1
|
require 'helper'
|
2
2
|
|
3
3
|
describe FuturesPipeline do
|
4
|
-
describe ".
|
5
|
-
it "should
|
6
|
-
FuturesPipeline.
|
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
|
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-
|
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: &
|
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: *
|
136
|
+
version_requirements: *id011
|
148
137
|
- !ruby/object:Gem::Dependency
|
149
138
|
name: rash
|
150
139
|
prerelease: false
|
151
|
-
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: *
|
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.
|
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
|