gds-api-adapters 0.0.41 → 0.0.42
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gds_api/test_helpers/publisher.rb +4 -1
- data/lib/gds_api/typhoeus_client.rb +3 -0
- data/lib/gds_api/version.rb +1 -1
- metadata +94 -80
@@ -5,9 +5,12 @@ module GdsApi
|
|
5
5
|
module Publisher
|
6
6
|
PUBLISHER_ENDPOINT = "https://publisher.test.alphagov.co.uk"
|
7
7
|
|
8
|
-
def publication_exists(details)
|
8
|
+
def publication_exists(details, options = {})
|
9
9
|
json = JSON.dump(details)
|
10
10
|
uri = "#{PUBLISHER_ENDPOINT}/publications/#{details['slug']}.json"
|
11
|
+
if options[:edition]
|
12
|
+
uri += "?edition=#{options[:edition]}"
|
13
|
+
end
|
11
14
|
stub_request(:get, uri).to_return(:body => json, :status => 200)
|
12
15
|
return uri
|
13
16
|
end
|
data/lib/gds_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,133 +1,137 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: gds-api-adapters
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.41
|
3
|
+
version: !ruby/object:Gem::Version
|
5
4
|
prerelease:
|
5
|
+
version: 0.0.42
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- James Stewart
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
|
13
|
+
date: 2012-01-30 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
15
16
|
name: plek
|
16
|
-
requirement: &
|
17
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
18
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version:
|
19
|
+
requirements:
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: "0"
|
22
23
|
type: :runtime
|
23
24
|
prerelease: false
|
24
|
-
version_requirements: *
|
25
|
-
- !ruby/object:Gem::Dependency
|
25
|
+
version_requirements: *id001
|
26
|
+
- !ruby/object:Gem::Dependency
|
26
27
|
name: null_logger
|
27
|
-
requirement: &
|
28
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
29
|
none: false
|
29
|
-
requirements:
|
30
|
-
- -
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version:
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: "0"
|
33
34
|
type: :runtime
|
34
35
|
prerelease: false
|
35
|
-
version_requirements: *
|
36
|
-
- !ruby/object:Gem::Dependency
|
36
|
+
version_requirements: *id002
|
37
|
+
- !ruby/object:Gem::Dependency
|
37
38
|
name: lrucache
|
38
|
-
requirement: &
|
39
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
40
|
none: false
|
40
|
-
requirements:
|
41
|
+
requirements:
|
41
42
|
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
+
- !ruby/object:Gem::Version
|
43
44
|
version: 0.1.1
|
44
45
|
type: :runtime
|
45
46
|
prerelease: false
|
46
|
-
version_requirements: *
|
47
|
-
- !ruby/object:Gem::Dependency
|
47
|
+
version_requirements: *id003
|
48
|
+
- !ruby/object:Gem::Dependency
|
48
49
|
name: rake
|
49
|
-
requirement: &
|
50
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
51
|
none: false
|
51
|
-
requirements:
|
52
|
+
requirements:
|
52
53
|
- - ~>
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
+
- !ruby/object:Gem::Version
|
54
55
|
version: 0.9.2.2
|
55
56
|
type: :development
|
56
57
|
prerelease: false
|
57
|
-
version_requirements: *
|
58
|
-
- !ruby/object:Gem::Dependency
|
58
|
+
version_requirements: *id004
|
59
|
+
- !ruby/object:Gem::Dependency
|
59
60
|
name: webmock
|
60
|
-
requirement: &
|
61
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
61
62
|
none: false
|
62
|
-
requirements:
|
63
|
+
requirements:
|
63
64
|
- - ~>
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
version:
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: "1.7"
|
66
67
|
type: :development
|
67
68
|
prerelease: false
|
68
|
-
version_requirements: *
|
69
|
-
- !ruby/object:Gem::Dependency
|
69
|
+
version_requirements: *id005
|
70
|
+
- !ruby/object:Gem::Dependency
|
70
71
|
name: mocha
|
71
|
-
requirement: &
|
72
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
72
73
|
none: false
|
73
|
-
requirements:
|
74
|
+
requirements:
|
74
75
|
- - ~>
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
+
- !ruby/object:Gem::Version
|
76
77
|
version: 0.10.0
|
77
78
|
type: :development
|
78
79
|
prerelease: false
|
79
|
-
version_requirements: *
|
80
|
-
- !ruby/object:Gem::Dependency
|
80
|
+
version_requirements: *id006
|
81
|
+
- !ruby/object:Gem::Dependency
|
81
82
|
name: minitest
|
82
|
-
requirement: &
|
83
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
83
84
|
none: false
|
84
|
-
requirements:
|
85
|
+
requirements:
|
85
86
|
- - ~>
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
+
- !ruby/object:Gem::Version
|
87
88
|
version: 2.10.0
|
88
89
|
type: :development
|
89
90
|
prerelease: false
|
90
|
-
version_requirements: *
|
91
|
-
- !ruby/object:Gem::Dependency
|
91
|
+
version_requirements: *id007
|
92
|
+
- !ruby/object:Gem::Dependency
|
92
93
|
name: rack
|
93
|
-
requirement: &
|
94
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
94
95
|
none: false
|
95
|
-
requirements:
|
96
|
-
- -
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
version:
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: "0"
|
99
100
|
type: :development
|
100
101
|
prerelease: false
|
101
|
-
version_requirements: *
|
102
|
-
- !ruby/object:Gem::Dependency
|
102
|
+
version_requirements: *id008
|
103
|
+
- !ruby/object:Gem::Dependency
|
103
104
|
name: simplecov
|
104
|
-
requirement: &
|
105
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
105
106
|
none: false
|
106
|
-
requirements:
|
107
|
+
requirements:
|
107
108
|
- - ~>
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
+
- !ruby/object:Gem::Version
|
109
110
|
version: 0.5.4
|
110
111
|
type: :development
|
111
112
|
prerelease: false
|
112
|
-
version_requirements: *
|
113
|
-
- !ruby/object:Gem::Dependency
|
113
|
+
version_requirements: *id009
|
114
|
+
- !ruby/object:Gem::Dependency
|
114
115
|
name: simplecov-rcov
|
115
|
-
requirement: &
|
116
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
116
117
|
none: false
|
117
|
-
requirements:
|
118
|
-
- -
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
version:
|
118
|
+
requirements:
|
119
|
+
- - ">="
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: "0"
|
121
122
|
type: :development
|
122
123
|
prerelease: false
|
123
|
-
version_requirements: *
|
124
|
+
version_requirements: *id010
|
124
125
|
description: A set of adapters providing easy access to the GDS gov.uk APIs
|
125
|
-
email:
|
126
|
+
email:
|
126
127
|
- jystewart@gmail.com
|
127
128
|
executables: []
|
129
|
+
|
128
130
|
extensions: []
|
131
|
+
|
129
132
|
extra_rdoc_files: []
|
130
|
-
|
133
|
+
|
134
|
+
files:
|
131
135
|
- lib/gds_api/base.rb
|
132
136
|
- lib/gds_api/contactotron.rb
|
133
137
|
- lib/gds_api/core-ext/openstruct.rb
|
@@ -147,6 +151,7 @@ files:
|
|
147
151
|
- lib/gds_api/test_helpers/json_client_helper.rb
|
148
152
|
- lib/gds_api/test_helpers/panopticon.rb
|
149
153
|
- lib/gds_api/test_helpers/publisher.rb
|
154
|
+
- lib/gds_api/typhoeus_client.rb
|
150
155
|
- lib/gds_api/version.rb
|
151
156
|
- README.md
|
152
157
|
- Rakefile
|
@@ -158,29 +163,38 @@ files:
|
|
158
163
|
- test/test_helper.rb
|
159
164
|
homepage: http://github.com/alphagov/gds-api-adapters
|
160
165
|
licenses: []
|
166
|
+
|
161
167
|
post_install_message:
|
162
168
|
rdoc_options: []
|
163
|
-
|
169
|
+
|
170
|
+
require_paths:
|
164
171
|
- lib
|
165
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
172
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
166
173
|
none: false
|
167
|
-
requirements:
|
168
|
-
- -
|
169
|
-
- !ruby/object:Gem::Version
|
170
|
-
|
171
|
-
|
174
|
+
requirements:
|
175
|
+
- - ">="
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
hash: 940462170843670145
|
178
|
+
segments:
|
179
|
+
- 0
|
180
|
+
version: "0"
|
181
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
172
182
|
none: false
|
173
|
-
requirements:
|
174
|
-
- -
|
175
|
-
- !ruby/object:Gem::Version
|
176
|
-
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
hash: 940462170843670145
|
187
|
+
segments:
|
188
|
+
- 0
|
189
|
+
version: "0"
|
177
190
|
requirements: []
|
191
|
+
|
178
192
|
rubyforge_project:
|
179
|
-
rubygems_version: 1.8.
|
193
|
+
rubygems_version: 1.8.13
|
180
194
|
signing_key:
|
181
195
|
specification_version: 3
|
182
196
|
summary: Adapters to work with GDS APIs
|
183
|
-
test_files:
|
197
|
+
test_files:
|
184
198
|
- test/contactotron_api_test.rb
|
185
199
|
- test/gds_api_base_test.rb
|
186
200
|
- test/json_client_test.rb
|