futures_pipeline 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -3,6 +3,5 @@ rvm:
3
3
  - 1.9.1
4
4
  - 1.9.2
5
5
  - jruby
6
- - rbx
7
6
  - ree
8
7
  - ruby-head
data/README.md CHANGED
@@ -12,7 +12,7 @@ Documentation
12
12
 
13
13
  Continuous Integration
14
14
  ----------------------
15
- [![Build Status](http://travis-ci.org/codeforamerica/futures_pipeline.png)](http://travis-ci.org/codeforamerica/futures_pipeline)
15
+ [![Build Status](https://secure.travis-ci.org/codeforamerica/futures_pipeline.png)](http://travis-ci.org/codeforamerica/futures_pipeline)
16
16
 
17
17
  Usage Examples
18
18
  --------------
@@ -64,6 +64,32 @@ Submitting a Pull Request
64
64
  8. Commit and push your changes.
65
65
  9. Submit a pull request. Please do not include changes to the gemspec, version, or history file. (If you want to create your own version for some reason, please do so in a separate commit.)
66
66
 
67
+ Supported Rubies
68
+ ----------------
69
+ This library aims to support and is [tested
70
+ against](http://travis-ci.org/codeforamerica/futures_pipeline) the following
71
+ Ruby implementations:
72
+
73
+ * Ruby 1.8.7
74
+ * Ruby 1.9.1
75
+ * Ruby 1.9.2
76
+ * Ruby Enterprise Edition 1.8.7
77
+ * JRuby 1.6
78
+
79
+ If something doesn't work on one of these interpreters, it should be considered
80
+ a bug.
81
+
82
+ This library may inadvertently work (or seem to work) on other Ruby
83
+ implementations, however support will only be provided for the versions listed
84
+ above.
85
+
86
+ If you would like this library to support another Ruby version, you may
87
+ volunteer to be a maintainer. Being a maintainer entails making sure all tests
88
+ run and pass on that implementation. When something breaks on your
89
+ implementation, you will be personally responsible for providing patches in a
90
+ timely fashion. If critical issues for a particular implementation exist at the
91
+ time of a major release, support for that Ruby version may be dropped.
92
+
67
93
  Credits
68
94
  -------
69
95
  Futures, Inc. REST API developed by [Tom Harris](https://github.com/tomharris).
@@ -9,11 +9,10 @@ Gem::Specification.new do |gem|
9
9
  gem.add_development_dependency 'simplecov', '~> 0.4'
10
10
  gem.add_development_dependency 'webmock', '~> 1.6'
11
11
  gem.add_development_dependency 'yard', '~> 0.7'
12
- gem.add_runtime_dependency 'faraday', '~> 0.6.1'
13
- gem.add_runtime_dependency 'faraday_middleware', '~> 0.6.3'
12
+ gem.add_runtime_dependency 'faraday', '~> 0.7.4'
13
+ gem.add_runtime_dependency 'faraday_middleware', '~> 0.7.0'
14
14
  gem.add_runtime_dependency 'hashie', '~> 1.0.0'
15
15
  gem.add_runtime_dependency 'multi_json', '~> 1.0.2'
16
- gem.add_runtime_dependency 'rash', '~> 0.3.0'
17
16
  gem.authors = ["Erik Michaels-Ober", "Ryan Resella"]
18
17
  gem.description = %q{Ruby wrapper for the Futures, Inc. US Military Pipeline API}
19
18
  gem.email = ['erik@codeforamerica.org', 'ryan@codeforamerica.org']
@@ -1,20 +1,22 @@
1
1
  require 'futures_pipeline/client'
2
2
 
3
3
  module FuturesPipeline
4
- # Alias for FuturesPipeline::Client.new
5
- #
6
- # @return [FuturesPipeline::Client]
7
- def self.new(options={})
8
- FuturesPipeline::Client.new(options)
9
- end
4
+ class << self
5
+ # Alias for FuturesPipeline::Client.new
6
+ #
7
+ # @return [FuturesPipeline::Client]
8
+ def new
9
+ FuturesPipeline::Client.new
10
+ end
10
11
 
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)
15
- end
12
+ # Delegate to FuturesPipeline::Client
13
+ def method_missing(method, *args, &block)
14
+ return super unless new.respond_to?(method)
15
+ new.send(method, *args, &block)
16
+ end
16
17
 
17
- def self.respond_to?(method, include_private=false)
18
- new.respond_to?(method, include_private) || super(method, include_private)
18
+ def respond_to?(method, include_private=false)
19
+ new.respond_to?(method, include_private) || super(method, include_private)
20
+ end
19
21
  end
20
22
  end
@@ -8,7 +8,7 @@ module FuturesPipeline
8
8
  Faraday.new(:url => 'http://militarydemo.pipelinenc.com') do |connection|
9
9
  connection.use Faraday::Request::UrlEncoded
10
10
  connection.use Faraday::Response::RaiseError
11
- connection.use Faraday::Response::Rashify
11
+ connection.use Faraday::Response::Mashify
12
12
  connection.use Faraday::Response::ParseJson
13
13
  connection.adapter(Faraday.default_adapter)
14
14
  end
@@ -1,3 +1,3 @@
1
1
  module FuturesPipeline
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -13,6 +13,7 @@ describe FuturesPipeline::Client do
13
13
 
14
14
  it "should fetch all careers" do
15
15
  careers = @client.careers
16
+ a_get("api/v1/careers.json").should have_been_made
16
17
  careers.first.title.should == "Chief Executives"
17
18
  end
18
19
  end
@@ -26,6 +27,7 @@ describe FuturesPipeline::Client do
26
27
 
27
28
  it "should fetch one career" do
28
29
  career = @client.career("11-1011-00")
30
+ a_get("api/v1/careers/11-1011-00.json").should have_been_made
29
31
  career.title.should == "Chief Executives"
30
32
  end
31
33
  end
@@ -38,6 +40,7 @@ describe FuturesPipeline::Client do
38
40
 
39
41
  it "should fetch one career" do
40
42
  career = @client.career("11-1011.00")
43
+ a_get("api/v1/careers/11-1011-00.json").should have_been_made
41
44
  career.title.should == "Chief Executives"
42
45
  end
43
46
  end
@@ -65,6 +68,7 @@ describe FuturesPipeline::Client do
65
68
 
66
69
  it "should return one career related to the MOC" do
67
70
  search = @client.search("11b")
71
+ a_get("api/v1/careers/search.json?moc=11b").should have_been_made
68
72
  search.first.title.should == "Training and Development Specialists"
69
73
  end
70
74
  end
data/spec/helper.rb CHANGED
@@ -1,8 +1,10 @@
1
+ $:.unshift File.expand_path('..', __FILE__)
2
+ $:.unshift File.expand_path('../../lib', __FILE__)
1
3
  require 'simplecov'
2
4
  SimpleCov.start
5
+ require 'futures_pipeline'
3
6
  require 'rspec'
4
7
  require 'webmock/rspec'
5
- require 'futures_pipeline'
6
8
 
7
9
  def a_delete(path)
8
10
  a_request(:delete, 'http://militarydemo.pipelinenc.com/' + path)
metadata CHANGED
@@ -1,161 +1,147 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: futures_pipeline
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
4
5
  prerelease:
5
- version: 0.1.0
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Erik Michaels-Ober
9
9
  - Ryan Resella
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
-
14
- date: 2011-05-29 00:00:00 Z
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
13
+ date: 2011-07-30 00:00:00.000000000 -07:00
14
+ default_executable:
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
17
  name: ZenTest
18
- prerelease: false
19
- requirement: &id001 !ruby/object:Gem::Requirement
18
+ requirement: &70144166152020 !ruby/object:Gem::Requirement
20
19
  none: false
21
- requirements:
20
+ requirements:
22
21
  - - ~>
23
- - !ruby/object:Gem::Version
24
- version: "4.5"
22
+ - !ruby/object:Gem::Version
23
+ version: '4.5'
25
24
  type: :development
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
28
- name: maruku
29
25
  prerelease: false
30
- requirement: &id002 !ruby/object:Gem::Requirement
26
+ version_requirements: *70144166152020
27
+ - !ruby/object:Gem::Dependency
28
+ name: maruku
29
+ requirement: &70144166151480 !ruby/object:Gem::Requirement
31
30
  none: false
32
- requirements:
31
+ requirements:
33
32
  - - ~>
34
- - !ruby/object:Gem::Version
35
- version: "0.6"
33
+ - !ruby/object:Gem::Version
34
+ version: '0.6'
36
35
  type: :development
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
39
- name: rake
40
36
  prerelease: false
41
- requirement: &id003 !ruby/object:Gem::Requirement
37
+ version_requirements: *70144166151480
38
+ - !ruby/object:Gem::Dependency
39
+ name: rake
40
+ requirement: &70144166150920 !ruby/object:Gem::Requirement
42
41
  none: false
43
- requirements:
42
+ requirements:
44
43
  - - ~>
45
- - !ruby/object:Gem::Version
46
- version: "0.9"
44
+ - !ruby/object:Gem::Version
45
+ version: '0.9'
47
46
  type: :development
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
50
- name: rspec
51
47
  prerelease: false
52
- requirement: &id004 !ruby/object:Gem::Requirement
48
+ version_requirements: *70144166150920
49
+ - !ruby/object:Gem::Dependency
50
+ name: rspec
51
+ requirement: &70144166150440 !ruby/object:Gem::Requirement
53
52
  none: false
54
- requirements:
53
+ requirements:
55
54
  - - ~>
56
- - !ruby/object:Gem::Version
57
- version: "2.6"
55
+ - !ruby/object:Gem::Version
56
+ version: '2.6'
58
57
  type: :development
59
- version_requirements: *id004
60
- - !ruby/object:Gem::Dependency
61
- name: simplecov
62
58
  prerelease: false
63
- requirement: &id005 !ruby/object:Gem::Requirement
59
+ version_requirements: *70144166150440
60
+ - !ruby/object:Gem::Dependency
61
+ name: simplecov
62
+ requirement: &70144166149960 !ruby/object:Gem::Requirement
64
63
  none: false
65
- requirements:
64
+ requirements:
66
65
  - - ~>
67
- - !ruby/object:Gem::Version
68
- version: "0.4"
66
+ - !ruby/object:Gem::Version
67
+ version: '0.4'
69
68
  type: :development
70
- version_requirements: *id005
71
- - !ruby/object:Gem::Dependency
72
- name: webmock
73
69
  prerelease: false
74
- requirement: &id006 !ruby/object:Gem::Requirement
70
+ version_requirements: *70144166149960
71
+ - !ruby/object:Gem::Dependency
72
+ name: webmock
73
+ requirement: &70144166137440 !ruby/object:Gem::Requirement
75
74
  none: false
76
- requirements:
75
+ requirements:
77
76
  - - ~>
78
- - !ruby/object:Gem::Version
79
- version: "1.6"
77
+ - !ruby/object:Gem::Version
78
+ version: '1.6'
80
79
  type: :development
81
- version_requirements: *id006
82
- - !ruby/object:Gem::Dependency
83
- name: yard
84
80
  prerelease: false
85
- requirement: &id007 !ruby/object:Gem::Requirement
81
+ version_requirements: *70144166137440
82
+ - !ruby/object:Gem::Dependency
83
+ name: yard
84
+ requirement: &70144166136860 !ruby/object:Gem::Requirement
86
85
  none: false
87
- requirements:
86
+ requirements:
88
87
  - - ~>
89
- - !ruby/object:Gem::Version
90
- version: "0.7"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.7'
91
90
  type: :development
92
- version_requirements: *id007
93
- - !ruby/object:Gem::Dependency
94
- name: faraday
95
91
  prerelease: false
96
- requirement: &id008 !ruby/object:Gem::Requirement
92
+ version_requirements: *70144166136860
93
+ - !ruby/object:Gem::Dependency
94
+ name: faraday
95
+ requirement: &70144166136280 !ruby/object:Gem::Requirement
97
96
  none: false
98
- requirements:
97
+ requirements:
99
98
  - - ~>
100
- - !ruby/object:Gem::Version
101
- version: 0.6.1
99
+ - !ruby/object:Gem::Version
100
+ version: 0.7.4
102
101
  type: :runtime
103
- version_requirements: *id008
104
- - !ruby/object:Gem::Dependency
105
- name: faraday_middleware
106
102
  prerelease: false
107
- requirement: &id009 !ruby/object:Gem::Requirement
103
+ version_requirements: *70144166136280
104
+ - !ruby/object:Gem::Dependency
105
+ name: faraday_middleware
106
+ requirement: &70144166135700 !ruby/object:Gem::Requirement
108
107
  none: false
109
- requirements:
108
+ requirements:
110
109
  - - ~>
111
- - !ruby/object:Gem::Version
112
- version: 0.6.3
110
+ - !ruby/object:Gem::Version
111
+ version: 0.7.0
113
112
  type: :runtime
114
- version_requirements: *id009
115
- - !ruby/object:Gem::Dependency
116
- name: hashie
117
113
  prerelease: false
118
- requirement: &id010 !ruby/object:Gem::Requirement
114
+ version_requirements: *70144166135700
115
+ - !ruby/object:Gem::Dependency
116
+ name: hashie
117
+ requirement: &70144166135120 !ruby/object:Gem::Requirement
119
118
  none: false
120
- requirements:
119
+ requirements:
121
120
  - - ~>
122
- - !ruby/object:Gem::Version
121
+ - !ruby/object:Gem::Version
123
122
  version: 1.0.0
124
123
  type: :runtime
125
- version_requirements: *id010
126
- - !ruby/object:Gem::Dependency
127
- name: multi_json
128
124
  prerelease: false
129
- requirement: &id011 !ruby/object:Gem::Requirement
125
+ version_requirements: *70144166135120
126
+ - !ruby/object:Gem::Dependency
127
+ name: multi_json
128
+ requirement: &70144166134540 !ruby/object:Gem::Requirement
130
129
  none: false
131
- requirements:
130
+ requirements:
132
131
  - - ~>
133
- - !ruby/object:Gem::Version
132
+ - !ruby/object:Gem::Version
134
133
  version: 1.0.2
135
134
  type: :runtime
136
- version_requirements: *id011
137
- - !ruby/object:Gem::Dependency
138
- name: rash
139
135
  prerelease: false
140
- requirement: &id012 !ruby/object:Gem::Requirement
141
- none: false
142
- requirements:
143
- - - ~>
144
- - !ruby/object:Gem::Version
145
- version: 0.3.0
146
- type: :runtime
147
- version_requirements: *id012
136
+ version_requirements: *70144166134540
148
137
  description: Ruby wrapper for the Futures, Inc. US Military Pipeline API
149
- email:
138
+ email:
150
139
  - erik@codeforamerica.org
151
140
  - ryan@codeforamerica.org
152
141
  executables: []
153
-
154
142
  extensions: []
155
-
156
143
  extra_rdoc_files: []
157
-
158
- files:
144
+ files:
159
145
  - .gemtest
160
146
  - .gitignore
161
147
  - .rspec
@@ -179,34 +165,32 @@ files:
179
165
  - spec/futures_pipeline/client_spec.rb
180
166
  - spec/futures_pipeline_spec.rb
181
167
  - spec/helper.rb
168
+ has_rdoc: true
182
169
  homepage: https://github.com/codeforamerica/futures_pipeline
183
170
  licenses: []
184
-
185
171
  post_install_message:
186
172
  rdoc_options: []
187
-
188
- require_paths:
173
+ require_paths:
189
174
  - lib
190
- required_ruby_version: !ruby/object:Gem::Requirement
175
+ required_ruby_version: !ruby/object:Gem::Requirement
191
176
  none: false
192
- requirements:
193
- - - ">="
194
- - !ruby/object:Gem::Version
195
- version: "0"
196
- required_rubygems_version: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ! '>='
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ required_rubygems_version: !ruby/object:Gem::Requirement
197
182
  none: false
198
- requirements:
199
- - - ">="
200
- - !ruby/object:Gem::Version
201
- version: "0"
183
+ requirements:
184
+ - - ! '>='
185
+ - !ruby/object:Gem::Version
186
+ version: '0'
202
187
  requirements: []
203
-
204
188
  rubyforge_project:
205
- rubygems_version: 1.8.4
189
+ rubygems_version: 1.6.2
206
190
  signing_key:
207
191
  specification_version: 3
208
192
  summary: Ruby wrapper for the Futures, Inc. US Military Pipeline API
209
- test_files:
193
+ test_files:
210
194
  - spec/faraday/response_spec.rb
211
195
  - spec/fixtures/career.json
212
196
  - spec/fixtures/careers.json