futures_pipeline 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +0 -1
- data/README.md +1 -1
- data/futures_pipeline.gemspec +10 -10
- data/lib/futures_pipeline/client.rb +37 -6
- data/lib/futures_pipeline/version.rb +1 -1
- data/spec/fixtures/assessment.json +1 -0
- data/spec/fixtures/assessment_result.json +1 -0
- data/spec/futures_pipeline/client_spec.rb +26 -0
- metadata +43 -38
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -62,8 +62,8 @@ against](http://travis-ci.org/codeforamerica/futures_pipeline) the following
|
|
62
62
|
Ruby implementations:
|
63
63
|
|
64
64
|
* Ruby 1.8.7
|
65
|
-
* Ruby 1.9.1
|
66
65
|
* Ruby 1.9.2
|
66
|
+
* Ruby 1.9.3
|
67
67
|
* [JRuby](http://www.jruby.org/)
|
68
68
|
* [Rubinius](http://rubini.us/)
|
69
69
|
* [Ruby Enterprise Edition](http://www.rubyenterpriseedition.com/)
|
data/futures_pipeline.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
require File.expand_path('../lib/futures_pipeline/version', __FILE__)
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
|
-
gem.add_dependency 'faraday', '~> 0.7
|
6
|
-
gem.add_dependency 'faraday_middleware', '~> 0.7
|
7
|
-
gem.add_dependency 'hashie', '~> 1.1
|
8
|
-
gem.add_dependency 'multi_json', '~> 1.0
|
9
|
-
gem.add_development_dependency 'rake'
|
10
|
-
gem.add_development_dependency 'rdiscount'
|
11
|
-
gem.add_development_dependency 'rspec'
|
12
|
-
gem.add_development_dependency 'simplecov'
|
13
|
-
gem.add_development_dependency 'webmock'
|
14
|
-
gem.add_development_dependency 'yard'
|
5
|
+
gem.add_dependency 'faraday', '~> 0.7'
|
6
|
+
gem.add_dependency 'faraday_middleware', '~> 0.7'
|
7
|
+
gem.add_dependency 'hashie', '~> 1.1'
|
8
|
+
gem.add_dependency 'multi_json', '~> 1.0'
|
9
|
+
gem.add_development_dependency 'rake'
|
10
|
+
gem.add_development_dependency 'rdiscount'
|
11
|
+
gem.add_development_dependency 'rspec'
|
12
|
+
gem.add_development_dependency 'simplecov'
|
13
|
+
gem.add_development_dependency 'webmock'
|
14
|
+
gem.add_development_dependency 'yard'
|
15
15
|
gem.authors = ["Erik Michaels-Ober", "Ryan Resella"]
|
16
16
|
gem.description = %q{Ruby wrapper for the Futures, Inc. US Military Pipeline API}
|
17
17
|
gem.email = ['erik@codeforamerica.org', 'ryan@codeforamerica.org']
|
@@ -21,25 +21,56 @@ module FuturesPipeline
|
|
21
21
|
# Get a single career using O\*NET code.
|
22
22
|
#
|
23
23
|
# @param onet_soc_code [String] The O\*NET code
|
24
|
-
# @param options [Hash] A customizable set of options.
|
25
24
|
# @return [Hashie::Mash]
|
26
25
|
# @raise [Faraday::Error::ResourceNotFound] If O\*NET code is not found.
|
27
26
|
# @example
|
28
27
|
# FuturesPipeline.career("11-1011.00")
|
29
|
-
def career(onet_soc_code
|
28
|
+
def career(onet_soc_code)
|
30
29
|
api_safe_onet_soc_code = onet_soc_code.tr(".", "-")
|
31
|
-
get("/api/v1/careers/#{api_safe_onet_soc_code}.json"
|
30
|
+
get("/api/v1/careers/#{api_safe_onet_soc_code}.json")
|
32
31
|
end
|
33
32
|
|
34
33
|
# Search for careers by MOC code. Returns a list of careers related to the MOC.
|
35
34
|
#
|
36
35
|
# @param moc [String] The MOC
|
37
|
-
# @param options [Hash] A customizable set of options.
|
38
36
|
# @return [Hashie::Mash]
|
39
37
|
# @example
|
40
38
|
# FuturesPipeline.search("11b")
|
41
|
-
def search(moc
|
42
|
-
get("/api/v1/careers/search.json?moc=#{moc}"
|
39
|
+
def search(moc)
|
40
|
+
get("/api/v1/careers/search.json?moc=#{moc}")
|
41
|
+
end
|
42
|
+
|
43
|
+
# Get the skill/interest assessment questions and possible answers
|
44
|
+
#
|
45
|
+
# @return [Hashie::Mash]
|
46
|
+
# @example
|
47
|
+
# FuturesPipeline.assessment
|
48
|
+
def assessment
|
49
|
+
get("/api/v1/assessment.json")
|
43
50
|
end
|
51
|
+
|
52
|
+
# Get the results from the skill/interest assessment
|
53
|
+
#
|
54
|
+
# @param i1 [Integer] The numeric answer to interest question 1
|
55
|
+
# @param i2 [Integer] The numeric answer to interest question 2
|
56
|
+
# @param i3 [Integer] The numeric answer to interest question 3
|
57
|
+
# @param i4 [Integer] The numeric answer to interest question 4
|
58
|
+
# @param i5 [Integer] The numeric answer to interest question 5
|
59
|
+
# @param i6 [Integer] The numeric answer to interest question 6
|
60
|
+
# @param s1 [Integer] The numeric answer to skill question 1
|
61
|
+
# @param s2 [Integer] The numeric answer to skill question 2
|
62
|
+
# @param s3 [Integer] The numeric answer to skill question 3
|
63
|
+
# @param s4 [Integer] The numeric answer to skill question 4
|
64
|
+
# @param s5 [Integer] The numeric answer to skill question 5
|
65
|
+
# @param s6 [Integer] The numeric answer to skill question 6
|
66
|
+
# @param s7 [Integer] The numeric answer to skill question 7
|
67
|
+
# @param s8 [Integer] The numeric answer to skill question 8
|
68
|
+
# @return [Hashie::Mash]
|
69
|
+
# @example
|
70
|
+
# FuturesPipeline.assessment_results(1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4)
|
71
|
+
def assessment_result(i1, i2, i3, i4, i5, i6, s1, s2, s3, s4, s5, s6, s7, s8)
|
72
|
+
get("/api/v1/careers/#{[i1, i2, i3, i4, i5, i6].join}/#{[s1, s2, s3, s4, s5, s6, s7, s8].join}.json")
|
73
|
+
end
|
74
|
+
|
44
75
|
end
|
45
76
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"id":"interest_question_1","text":"I enjoy being physically active or using mechanical tools & machines. I am practical and enjoy being rewarded for the results I get.","answers":[{"value":"1","text":"Not True"},{"value":"2","text":"A Little True"},{"value":"3","text":"Neutral"},{"value":"4","text":"Mostly True"},{"value":"5","text":"Exactly True"}]},{"id":"interest_question_2","text":"I am precise, logical and curious about how things work. I enjoy being able to solve problems and learn new things.","answers":[{"value":"1","text":"Not True"},{"value":"2","text":"A Little True"},{"value":"3","text":"Neutral"},{"value":"4","text":"Mostly True"},{"value":"5","text":"Exactly True"}]},{"id":"interest_question_3","text":"I am original, innovative and creative. I enjoy using my imagination, coming up with new ideas, and expressing myself in words, music, art, or dance.","answers":[{"value":"1","text":"Not True"},{"value":"2","text":"A Little True"},{"value":"3","text":"Neutral"},{"value":"4","text":"Mostly True"},{"value":"5","text":"Exactly True"}]},{"id":"interest_question_4","text":"I am friendly and outgoing. I enjoy helping people by teaching, explaining the things I do, or giving advice.","answers":[{"value":"1","text":"Not True"},{"value":"2","text":"A Little True"},{"value":"3","text":"Neutral"},{"value":"4","text":"Mostly True"},{"value":"5","text":"Exactly True"}]},{"id":"interest_question_5","text":"I am a leader and enjoy being in charge. I am confident and like to take risks and make the decisions.","answers":[{"value":"1","text":"Not True"},{"value":"2","text":"A Little True"},{"value":"3","text":"Neutral"},{"value":"4","text":"Mostly True"},{"value":"5","text":"Exactly True"}]},{"id":"interest_question_6","text":"I am efficient and organized. I enjoy getting into details, working with numbers, and following procedures & standard methods.","answers":[{"value":"1","text":"Not True"},{"value":"2","text":"A Little True"},{"value":"3","text":"Neutral"},{"value":"4","text":"Mostly True"},{"value":"5","text":"Exactly True"}]},{"id":"skill_question_1","text":"I am resourceful and efficient. I enjoy managing my time, others\u2019 time, and the materials needed to get the job done.","answers":[{"value":"1","text":"Not True"},{"value":"2","text":"A Little True"},{"value":"3","text":"Neutral"},{"value":"4","text":"Mostly True"},{"value":"5","text":"Exactly True"}]},{"id":"skill_question_2","text":"I like to learn new things, mostly through study or school. I enjoy writing or talking about the things I know.","answers":[{"value":"1","text":"Not True"},{"value":"2","text":"A Little True"},{"value":"3","text":"Neutral"},{"value":"4","text":"Mostly True"},{"value":"5","text":"Exactly True"}]},{"id":"skill_question_3","text":"I like to think about things that are abstract, theoretical, or conceptual. I enjoy work that challenges my mind.","answers":[{"value":"1","text":"Not True"},{"value":"2","text":"A Little True"},{"value":"3","text":"Neutral"},{"value":"4","text":"Mostly True"},{"value":"5","text":"Exactly True"}]},{"id":"skill_question_4","text":"I am a social person and like to share my ideas. I enjoy working with the public and connecting with people through speaking or writing.","answers":[{"value":"1","text":"Not True"},{"value":"2","text":"A Little True"},{"value":"3","text":"Neutral"},{"value":"4","text":"Mostly True"},{"value":"5","text":"Exactly True"}]},{"id":"skill_question_5","text":"I like to solve problems with logic. I prefer to be systematic and methodical to get to the right answer.","answers":[{"value":"1","text":"Not True"},{"value":"2","text":"A Little True"},{"value":"3","text":"Neutral"},{"value":"4","text":"Mostly True"},{"value":"5","text":"Exactly True"}]},{"id":"skill_question_6","text":"I enjoy fixing things with my hands. I like to know how things work and how to keep them working well.","answers":[{"value":"1","text":"Not True"},{"value":"2","text":"A Little True"},{"value":"3","text":"Neutral"},{"value":"4","text":"Mostly True"},{"value":"5","text":"Exactly True"}]},{"id":"skill_question_7","text":"I like to make decisions based on data. I enjoy calculating and analyzing things to get to an answer.","answers":[{"value":"1","text":"Not True"},{"value":"2","text":"A Little True"},{"value":"3","text":"Neutral"},{"value":"4","text":"Mostly True"},{"value":"5","text":"Exactly True"}]},{"id":"skill_question_8","text":"I enjoy using science, technology, engineering, or math principles to solve problems or create new solutions. I like to apply what I know to practical situations.","answers":[{"value":"1","text":"Not True"},{"value":"2","text":"A Little True"},{"value":"3","text":"Neutral"},{"value":"4","text":"Mostly True"},{"value":"5","text":"Exactly True"}]}]
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"onet_soc_code":"27-3011.00","api_safe_onet_soc_code":"27-3011-00","title":"Radio and Television Announcers","link":"http://militarydemo.pipelinenc.com/careers/433-radio-and-television-announcers","average_national_salary":24310},{"onet_soc_code":"39-6021.00","api_safe_onet_soc_code":"39-6021-00","title":"Tour Guides and Escorts","link":"http://militarydemo.pipelinenc.com/careers/646-tour-guides-and-escorts","average_national_salary":20420},{"onet_soc_code":"23-1021.00","api_safe_onet_soc_code":"23-1021-00","title":"Administrative Law Judges, Adjudicators, and Hearing Officers","link":"http://militarydemo.pipelinenc.com/careers/329-administrative-law-judges-adjudicators-and-hea","average_national_salary":72600},{"onet_soc_code":"13-1199.05","api_safe_onet_soc_code":"13-1199-05","title":"Sustainability Specialists","link":"http://militarydemo.pipelinenc.com/careers/101-sustainability-specialists","average_national_salary":55650},{"onet_soc_code":"27-3031.00","api_safe_onet_soc_code":"27-3031-00","title":"Public Relations Specialists","link":"http://militarydemo.pipelinenc.com/careers/437-public-relations-specialists","average_national_salary":47350},{"onet_soc_code":"41-3031.02","api_safe_onet_soc_code":"41-3031-02","title":"Sales Agents, Financial Services","link":"http://militarydemo.pipelinenc.com/careers/668-sales-agents-financial-services","average_national_salary":68500},{"onet_soc_code":"27-3012.00","api_safe_onet_soc_code":"27-3012-00","title":"Public Address System and Other Announcers","link":"http://militarydemo.pipelinenc.com/careers/434-public-address-system-and-other-announcers","average_national_salary":24990},{"onet_soc_code":"25-1191.00","api_safe_onet_soc_code":"25-1191-00","title":"Graduate Teaching Assistants","link":"http://militarydemo.pipelinenc.com/careers/370-graduate-teaching-assistants","average_national_salary":27840},{"onet_soc_code":"13-1011.00","api_safe_onet_soc_code":"13-1011-00","title":"Agents and Business Managers of Artists, Performers, and Athletes","link":"http://militarydemo.pipelinenc.com/careers/68-agents-and-business-managers-of-artists-perform","average_national_salary":64500},{"onet_soc_code":"25-1065.00","api_safe_onet_soc_code":"25-1065-00","title":"Political Science Teachers, Postsecondary","link":"http://militarydemo.pipelinenc.com/careers/353-political-science-teachers-postsecondary","average_national_salary":61820},{"onet_soc_code":"43-4051.00","api_safe_onet_soc_code":"43-4051-00","title":"Customer Service Representatives","link":"http://militarydemo.pipelinenc.com/careers/707-customer-service-representatives","average_national_salary":28330},{"onet_soc_code":"35-9031.00","api_safe_onet_soc_code":"35-9031-00","title":"Hosts and Hostesses, Restaurant, Lounge, and Coffee Shop","link":"http://militarydemo.pipelinenc.com/careers/609-hosts-and-hostesses-restaurant-lounge-and-coff","average_national_salary":16170},{"onet_soc_code":"41-3011.00","api_safe_onet_soc_code":"41-3011-00","title":"Advertising Sales Agents","link":"http://militarydemo.pipelinenc.com/careers/664-advertising-sales-agents","average_national_salary":42750},{"onet_soc_code":"27-2042.01","api_safe_onet_soc_code":"27-2042-01","title":"Singers","link":"http://militarydemo.pipelinenc.com/careers/430-singers","average_national_salary":44179},{"onet_soc_code":"13-2071.00","api_safe_onet_soc_code":"13-2071-00","title":"Loan Counselors","link":"http://militarydemo.pipelinenc.com/careers/114-loan-counselors","average_national_salary":35790},{"onet_soc_code":"23-1022.00","api_safe_onet_soc_code":"23-1022-00","title":"Arbitrators, Mediators, and Conciliators","link":"http://militarydemo.pipelinenc.com/careers/330-arbitrators-mediators-and-conciliators","average_national_salary":49490},{"onet_soc_code":"39-6012.00","api_safe_onet_soc_code":"39-6012-00","title":"Concierges","link":"http://militarydemo.pipelinenc.com/careers/645-concierges","average_national_salary":24600},{"onet_soc_code":"43-4081.00","api_safe_onet_soc_code":"43-4081-00","title":"Hotel, Motel, and Resort Desk Clerks","link":"http://militarydemo.pipelinenc.com/careers/711-hotel-motel-and-resort-desk-clerks","average_national_salary":18460},{"onet_soc_code":"13-1071.02","api_safe_onet_soc_code":"13-1071-02","title":"Personnel Recruiters","link":"http://militarydemo.pipelinenc.com/careers/87-personnel-recruiters","average_national_salary":42420},{"onet_soc_code":"19-3032.00","api_safe_onet_soc_code":"19-3032-00","title":"Industrial-Organizational Psychologists","link":"http://militarydemo.pipelinenc.com/careers/278-industrial-organizational-psychologists","average_national_salary":86420},{"onet_soc_code":"43-4181.00","api_safe_onet_soc_code":"43-4181-00","title":"Reservation and Transportation Ticket Agents and Travel Clerks","link":"http://militarydemo.pipelinenc.com/careers/719-reservation-and-transportation-ticket-agents-a","average_national_salary":28540},{"onet_soc_code":"13-2072.00","api_safe_onet_soc_code":"13-2072-00","title":"Loan Officers","link":"http://militarydemo.pipelinenc.com/careers/115-loan-officers","average_national_salary":51760},{"onet_soc_code":"43-4111.00","api_safe_onet_soc_code":"43-4111-00","title":"Interviewers, Except Eligibility and Loan","link":"http://militarydemo.pipelinenc.com/careers/712-interviewers-except-eligibility-and-loan","average_national_salary":26290},{"onet_soc_code":"39-5094.00","api_safe_onet_soc_code":"39-5094-00","title":"Skin Care Specialists","link":"http://militarydemo.pipelinenc.com/careers/643-skin-care-specialists","average_national_salary":26170},{"onet_soc_code":"11-3041.00","api_safe_onet_soc_code":"11-3041-00","title":"Compensation and Benefits Managers","link":"http://militarydemo.pipelinenc.com/careers/16-compensation-and-benefits-managers","average_national_salary":74750},{"onet_soc_code":"41-2031.00","api_safe_onet_soc_code":"41-2031-00","title":"Retail Salespersons","link":"http://militarydemo.pipelinenc.com/careers/663-retail-salespersons","average_national_salary":19760},{"onet_soc_code":"41-3041.00","api_safe_onet_soc_code":"41-3041-00","title":"Travel Agents","link":"http://militarydemo.pipelinenc.com/careers/670-travel-agents","average_national_salary":29210},{"onet_soc_code":"43-4141.00","api_safe_onet_soc_code":"43-4141-00","title":"New Accounts Clerks","link":"http://militarydemo.pipelinenc.com/careers/715-new-accounts-clerks","average_national_salary":28390},{"onet_soc_code":"13-2052.00","api_safe_onet_soc_code":"13-2052-00","title":"Personal Financial Advisors","link":"http://militarydemo.pipelinenc.com/careers/111-personal-financial-advisors","average_national_salary":66120},{"onet_soc_code":"25-1112.00","api_safe_onet_soc_code":"25-1112-00","title":"Law Teachers, Postsecondary","link":"http://militarydemo.pipelinenc.com/careers/362-law-teachers-postsecondary","average_national_salary":87240},{"onet_soc_code":"13-1071.01","api_safe_onet_soc_code":"13-1071-01","title":"Employment Interviewers","link":"http://militarydemo.pipelinenc.com/careers/86-employment-interviewers","average_national_salary":42420},{"onet_soc_code":"39-6022.00","api_safe_onet_soc_code":"39-6022-00","title":"Travel Guides","link":"http://militarydemo.pipelinenc.com/careers/647-travel-guides","average_national_salary":28460},{"onet_soc_code":"43-9041.01","api_safe_onet_soc_code":"43-9041-01","title":"Insurance Claims Clerks","link":"http://militarydemo.pipelinenc.com/careers/747-insurance-claims-clerks","average_national_salary":31120},{"onet_soc_code":"25-3011.00","api_safe_onet_soc_code":"25-3011-00","title":"Adult Literacy, Remedial Education, and GED Teachers and Instructors","link":"http://militarydemo.pipelinenc.com/careers/385-adult-literacy-remedial-education-and-ged-teac","average_national_salary":43910},{"onet_soc_code":"43-3021.01","api_safe_onet_soc_code":"43-3021-01","title":"Statement Clerks","link":"http://militarydemo.pipelinenc.com/careers/690-statement-clerks","average_national_salary":28850},{"onet_soc_code":"11-2031.00","api_safe_onet_soc_code":"11-2031-00","title":"Public Relations Managers","link":"http://militarydemo.pipelinenc.com/careers/9-public-relations-managers","average_national_salary":82180},{"onet_soc_code":"21-1021.00","api_safe_onet_soc_code":"21-1021-00","title":"Child, Family, and School Social Workers","link":"http://militarydemo.pipelinenc.com/careers/317-child-family-and-school-social-workers","average_national_salary":37480},{"onet_soc_code":"11-3042.00","api_safe_onet_soc_code":"11-3042-00","title":"Training and Development Managers","link":"http://militarydemo.pipelinenc.com/careers/17-training-and-development-managers","average_national_salary":80250},{"onet_soc_code":"43-9041.02","api_safe_onet_soc_code":"43-9041-02","title":"Insurance Policy Processing Clerks","link":"http://militarydemo.pipelinenc.com/careers/748-insurance-policy-processing-clerks","average_national_salary":31120},{"onet_soc_code":"27-3022.00","api_safe_onet_soc_code":"27-3022-00","title":"Reporters and Correspondents","link":"http://militarydemo.pipelinenc.com/careers/436-reporters-and-correspondents","average_national_salary":33470},{"onet_soc_code":"43-4161.00","api_safe_onet_soc_code":"43-4161-00","title":"Human Resources Assistants, Except Payroll and Timekeeping","link":"http://militarydemo.pipelinenc.com/careers/717-human-resources-assistants-except-payroll-and-","average_national_salary":33750},{"onet_soc_code":"41-3021.00","api_safe_onet_soc_code":"41-3021-00","title":"Insurance Sales Agents","link":"http://militarydemo.pipelinenc.com/careers/665-insurance-sales-agents","average_national_salary":43870},{"onet_soc_code":"39-5092.00","api_safe_onet_soc_code":"39-5092-00","title":"Manicurists and Pedicurists","link":"http://militarydemo.pipelinenc.com/careers/641-manicurists-and-pedicurists","average_national_salary":19190},{"onet_soc_code":"11-2021.00","api_safe_onet_soc_code":"11-2021-00","title":"Marketing Managers","link":"http://militarydemo.pipelinenc.com/careers/7-marketing-managers","average_national_salary":98720},{"onet_soc_code":"27-2042.02","api_safe_onet_soc_code":"27-2042-02","title":"Musicians, Instrumental","link":"http://militarydemo.pipelinenc.com/careers/431-musicians-instrumental","average_national_salary":44179},{"onet_soc_code":"25-1011.00","api_safe_onet_soc_code":"25-1011-00","title":"Business Teachers, Postsecondary","link":"http://militarydemo.pipelinenc.com/careers/337-business-teachers-postsecondary","average_national_salary":62040},{"onet_soc_code":"11-9031.00","api_safe_onet_soc_code":"11-9031-00","title":"Education Administrators, Preschool and Child Care Center/Program","link":"http://militarydemo.pipelinenc.com/careers/36-education-administrators-preschool-and-child-ca","average_national_salary":37740},{"onet_soc_code":"11-3040.00","api_safe_onet_soc_code":"11-3040-00","title":"Human Resources Managers","link":"http://militarydemo.pipelinenc.com/careers/15-human-resources-managers","average_national_salary":null},{"onet_soc_code":"27-1025.00","api_safe_onet_soc_code":"27-1025-00","title":"Interior Designers","link":"http://militarydemo.pipelinenc.com/careers/410-interior-designers","average_national_salary":42260},{"onet_soc_code":"21-2021.00","api_safe_onet_soc_code":"21-2021-00","title":"Directors, Religious Activities and Education","link":"http://militarydemo.pipelinenc.com/careers/326-directors-religious-activities-and-education","average_national_salary":34260}]
|
@@ -74,4 +74,30 @@ describe FuturesPipeline::Client do
|
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
77
|
+
describe "#assessment" do
|
78
|
+
before do
|
79
|
+
stub_get("api/v1/assessment.json").
|
80
|
+
to_return(:status => 200, :body => fixture("assessment.json"))
|
81
|
+
end
|
82
|
+
|
83
|
+
it "should fetch all assessment questions" do
|
84
|
+
assessment = @client.assessment
|
85
|
+
a_get("api/v1/assessment.json").should have_been_made
|
86
|
+
assessment.first.id.should == "interest_question_1"
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
describe "#assessment_result" do
|
91
|
+
before do
|
92
|
+
stub_get("api/v1/careers/123451/12345123.json").
|
93
|
+
to_return(:status => 200, :body => fixture("assessment_result.json"))
|
94
|
+
end
|
95
|
+
|
96
|
+
it "should fetch an assessment result" do
|
97
|
+
assessment_result = @client.assessment_result(1, 2, 3, 4, 5, 1, 1, 2, 3, 4, 5, 1, 2, 3)
|
98
|
+
a_get("api/v1/careers/123451/12345123.json").should have_been_made
|
99
|
+
assessment_result.first.onet_soc_code.should == "27-3011.00"
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
77
103
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: futures_pipeline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,118 +10,118 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-10-21 00:00:00.000000000Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: faraday
|
17
|
-
requirement: &
|
17
|
+
requirement: &70341601273840 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.7
|
22
|
+
version: '0.7'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70341601273840
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: faraday_middleware
|
28
|
-
requirement: &
|
28
|
+
requirement: &70341601270940 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.7
|
33
|
+
version: '0.7'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70341601270940
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: hashie
|
39
|
-
requirement: &
|
39
|
+
requirement: &70341601269500 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ~>
|
43
43
|
- !ruby/object:Gem::Version
|
44
|
-
version: 1.1
|
44
|
+
version: '1.1'
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *70341601269500
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: multi_json
|
50
|
-
requirement: &
|
50
|
+
requirement: &70341601268300 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ~>
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 1.0
|
55
|
+
version: '1.0'
|
56
56
|
type: :runtime
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *70341601268300
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: rake
|
61
|
-
requirement: &
|
61
|
+
requirement: &70341601267160 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
|
-
- -
|
64
|
+
- - ! '>='
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: '0
|
66
|
+
version: '0'
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *70341601267160
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: rdiscount
|
72
|
-
requirement: &
|
72
|
+
requirement: &70341601266460 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
|
-
- -
|
75
|
+
- - ! '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: '
|
77
|
+
version: '0'
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *70341601266460
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: rspec
|
83
|
-
requirement: &
|
83
|
+
requirement: &70341601265440 !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|
86
|
-
- -
|
86
|
+
- - ! '>='
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: '
|
88
|
+
version: '0'
|
89
89
|
type: :development
|
90
90
|
prerelease: false
|
91
|
-
version_requirements: *
|
91
|
+
version_requirements: *70341601265440
|
92
92
|
- !ruby/object:Gem::Dependency
|
93
93
|
name: simplecov
|
94
|
-
requirement: &
|
94
|
+
requirement: &70341601242800 !ruby/object:Gem::Requirement
|
95
95
|
none: false
|
96
96
|
requirements:
|
97
|
-
- -
|
97
|
+
- - ! '>='
|
98
98
|
- !ruby/object:Gem::Version
|
99
|
-
version: '0
|
99
|
+
version: '0'
|
100
100
|
type: :development
|
101
101
|
prerelease: false
|
102
|
-
version_requirements: *
|
102
|
+
version_requirements: *70341601242800
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: webmock
|
105
|
-
requirement: &
|
105
|
+
requirement: &70341601242220 !ruby/object:Gem::Requirement
|
106
106
|
none: false
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ! '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '0'
|
111
111
|
type: :development
|
112
112
|
prerelease: false
|
113
|
-
version_requirements: *
|
113
|
+
version_requirements: *70341601242220
|
114
114
|
- !ruby/object:Gem::Dependency
|
115
115
|
name: yard
|
116
|
-
requirement: &
|
116
|
+
requirement: &70341601241440 !ruby/object:Gem::Requirement
|
117
117
|
none: false
|
118
118
|
requirements:
|
119
|
-
- -
|
119
|
+
- - ! '>='
|
120
120
|
- !ruby/object:Gem::Version
|
121
|
-
version: '0
|
121
|
+
version: '0'
|
122
122
|
type: :development
|
123
123
|
prerelease: false
|
124
|
-
version_requirements: *
|
124
|
+
version_requirements: *70341601241440
|
125
125
|
description: Ruby wrapper for the Futures, Inc. US Military Pipeline API
|
126
126
|
email:
|
127
127
|
- erik@codeforamerica.org
|
@@ -146,6 +146,8 @@ files:
|
|
146
146
|
- lib/futures_pipeline/request.rb
|
147
147
|
- lib/futures_pipeline/version.rb
|
148
148
|
- spec/faraday/response_spec.rb
|
149
|
+
- spec/fixtures/assessment.json
|
150
|
+
- spec/fixtures/assessment_result.json
|
149
151
|
- spec/fixtures/career.json
|
150
152
|
- spec/fixtures/careers.json
|
151
153
|
- spec/fixtures/not_found.json
|
@@ -179,6 +181,8 @@ specification_version: 3
|
|
179
181
|
summary: Ruby wrapper for the Futures, Inc. US Military Pipeline API
|
180
182
|
test_files:
|
181
183
|
- spec/faraday/response_spec.rb
|
184
|
+
- spec/fixtures/assessment.json
|
185
|
+
- spec/fixtures/assessment_result.json
|
182
186
|
- spec/fixtures/career.json
|
183
187
|
- spec/fixtures/careers.json
|
184
188
|
- spec/fixtures/not_found.json
|
@@ -186,3 +190,4 @@ test_files:
|
|
186
190
|
- spec/futures_pipeline/client_spec.rb
|
187
191
|
- spec/futures_pipeline_spec.rb
|
188
192
|
- spec/helper.rb
|
193
|
+
has_rdoc:
|