patentscope 0.0.2 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,97 +0,0 @@
1
- require 'spec_helper'
2
-
3
- module Patentscope
4
-
5
- describe Webservice, :core, :vcr do
6
-
7
- before { Patentscope.configure_from_env}
8
-
9
- let(:webservice) { Webservice.new }
10
-
11
- it "exists" do
12
- expect(webservice).to_not be_nil
13
- end
14
-
15
- it "has the right methods" do
16
- expect(webservice).to respond_to(:wsdl)
17
- expect(webservice).to respond_to(:get_available_documents)
18
- expect(webservice).to respond_to(:get_document_content)
19
- expect(webservice).to respond_to(:get_document_ocr_content)
20
- expect(webservice).to respond_to(:get_iasr)
21
- expect(webservice).to respond_to(:get_document_table_of_contents)
22
- expect(webservice).to respond_to(:get_document_content_page)
23
- end
24
-
25
- describe "constants" do
26
- it "has a webservice location constant" do
27
- expect(Webservice::PATENTSCOPE_WEBSERVICE_LOCATION).to_not be_nil
28
- end
29
- end
30
-
31
- describe "wsdl method" do
32
- it "returns a wsdl document" do
33
- response = webservice.wsdl
34
- expect(response).to include('<?xml')
35
- expect(response).to include('<wsdl:definitions')
36
- end
37
- end
38
-
39
- describe "get_available_documents method" do
40
- it 'returns an appropriate XML document for the get_available_documents operation' do
41
- response = webservice.get_available_documents(ia_number: 'SG2009000062')
42
- expect(response).to include('<?xml version="1.0"?>')
43
- expect(response).to include('<doc ocrPresence="yes" gazette="35/2009" docType="PAMPH" docId="id00000008693323"/>')
44
- expect(response).to_not include('<getAvailableDocumentsResponse xmlns="http://www.wipo.org/wsdl/ps">')
45
- end
46
- end
47
-
48
- describe "get_document_content method" do
49
- it 'returns an appropriate XML document for the get_document_content operation' do
50
- response = webservice.get_document_content(doc_id: '090063618004ca88')
51
- expect(response).to include('<?xml version="1.0"?>')
52
- expect(response).to include('<documentContent>')
53
- expect(response).to include('nRpZsy7ezxU2/8/fk5JM6HIXReMWymXUCmhYcRgUIjjNk2pDAkdlxox7xiSLm')
54
- expect(response).to_not include('<getDocumentContentResponse xmlns="http://www.wipo.org/wsdl/ps">')
55
- end
56
- end
57
-
58
- describe "get_document_ocr_content method" do
59
- it 'returns an appropriate XML document for the get_document_ocr_content operation' do
60
- response = webservice.get_document_ocr_content(doc_id: 'id00000015801579')
61
- expect(response).to include('<?xml version="1.0"?>')
62
- expect(response).to include('<documentContent>')
63
- expect(response).to include('XdDb9Ain4kev61wgZc36X022QPCEZZASS2Rwpcy4Hx7I5GYHhriRwpsDwoX9tgjgZwcEGGEksgthsHsNtkFmyGZYQIGGCCX3dhggRDTgEEDNgVgkvuw2ECDDSYMEF')
64
- expect(response).to_not include('<getDocumentOcrContentResponse xmlns="http://www.wipo.org/wsdl/ps">')
65
- end
66
- end
67
-
68
- describe "get_iasr method" do
69
- it 'returns an appropriate XML document for the get_iasr operation' do
70
- response = webservice.get_iasr(ia_number: 'SG2009000062')
71
- expect(response).to include('<?xml version="1.0"?>')
72
- expect(response).to include('<wo-international-application-status>')
73
- expect(response).to include('MESENCHYMAL STEM CELL PARTICLES')
74
- expect(response).to_not include('<getIASRResponse xmlns="http://www.wipo.org/wsdl/ps">')
75
- end
76
- end
77
-
78
- describe "get_document_table_of_contents method" do
79
- it 'returns an appropriate XML document for the get_document_table_of_contents operation' do
80
- response = webservice.get_document_table_of_contents(doc_id: '090063618004ca88')
81
- expect(response).to include('<?xml version="1.0"?>')
82
- expect(response).to include('<content>')
83
- expect(response).to include('<content>000001.tif</content>')
84
- expect(response).to_not include('<getDocumentTableOfContentsResponse xmlns="http://www.wipo.org/wsdl/ps">')
85
- end
86
- end
87
-
88
- describe "get_document_content_page method" do
89
- it 'returns an appropriate XML document for the get_document_content_page operation' do
90
- response = webservice.get_document_content_page(doc_id: '090063618004ca88', page_id: '000001.tif')
91
- expect(response).to include('<?xml version="1.0"?>')
92
- expect(response).to include('+GP0kv9dhgiY7Rb5h2q4RN6Jj9NpDCJjuMImO0l0TfLe7QRO2yFceTvvTu6C6qTH')
93
- expect(response).to_not include('<getDocumentContentPageResponse xmlns="http://www.wipo.org/wsdl/ps">')
94
- end
95
- end
96
- end
97
- end
@@ -1,298 +0,0 @@
1
- passes:
2
- -
3
- doc_id: '090063618004ca88'
4
- signature: '<content>000001.tif</content>'
5
- -
6
- doc_id: '090063618004ca89'
7
- signature: '<content>000001.tif</content>'
8
- -
9
- doc_id: '090063618004ca7c'
10
- signature: '<content>000001.tif</content>'
11
- -
12
- doc_id: '090063618004ca7d'
13
- signature: '<content>000001.tif</content>'
14
- -
15
- doc_id: '090063618004ca8b'
16
- signature: '<content>000001.tif</content>'
17
- -
18
- doc_id: '090063618004ca8d'
19
- signature: '<content>000001.tif</content>'
20
- -
21
- doc_id: '0900636180050716'
22
- signature: '<content>000001.tif</content>'
23
- -
24
- doc_id: '090063618004ca8f'
25
- signature: '<content>000001.tif</content>'
26
- -
27
- doc_id: '090063618004ca90'
28
- signature: '<content>000001.tif</content>'
29
- -
30
- doc_id: '090063618006d63c'
31
- signature: '<content>000001.tif</content>'
32
- -
33
- doc_id: '090063618006d508'
34
- signature: '<content>000001.tif</content>'
35
- -
36
- doc_id: '090063618006d509'
37
- signature: '<content>000001.tif</content>'
38
- -
39
- doc_id: '090063618006d50a'
40
- signature: '<content>000001.tif</content>'
41
- -
42
- doc_id: '0900636180078779'
43
- signature: '<content>000001.tif</content>'
44
- -
45
- doc_id: '0900636180078611'
46
- signature: '<content>000001.tif</content>'
47
- -
48
- doc_id: '0900636180082aed'
49
- signature: '<content>000001.tif</content>'
50
- -
51
- doc_id: '090063618007f732'
52
- signature: '<content>000001.tif</content>'
53
- -
54
- doc_id: '0900636180082aee'
55
- signature: '<content>000001.tif</content>'
56
- -
57
- doc_id: '0900636180082c31'
58
- signature: '<content>000001.tif</content>'
59
- -
60
- doc_id: '09006361800827c0'
61
- signature: '<content>000001.tif</content>'
62
- -
63
- doc_id: '0900636180082aef'
64
- signature: '<content>000001.tif</content>'
65
- -
66
- doc_id: '0900636180083c5e'
67
- signature: '<content>000001.tif</content>'
68
- -
69
- doc_id: '0900636180083c8a'
70
- signature: '<content>000001.tif</content>'
71
- -
72
- doc_id: '0900636180083c8b'
73
- signature: '<content>000001.tif</content>'
74
- -
75
- doc_id: '0900636180083ca1'
76
- signature: '<content>000001.tif</content>'
77
- -
78
- doc_id: '0900636180083ca2'
79
- signature: '<content>000001.tif</content>'
80
- -
81
- doc_id: '0900636180083ca3'
82
- signature: '<content>000001.tif</content>'
83
- -
84
- doc_id: '0900636180083caa'
85
- signature: '<content>000001.tif</content>'
86
- -
87
- doc_id: '0900636180083cab'
88
- signature: '<content>000001.tif</content>'
89
- -
90
- doc_id: '0900636180083cbd'
91
- signature: '<content>000001.tif</content>'
92
- -
93
- doc_id: '0900636180083cbe'
94
- signature: '<content>000001.tif</content>'
95
- -
96
- doc_id: '0900636180083cd9'
97
- signature: '<content>000001.tif</content>'
98
- -
99
- doc_id: '0900636180083cdf'
100
- signature: '<content>000001.tif</content>'
101
- -
102
- doc_id: '0900636180083d50'
103
- signature: '<content>000001.tif</content>'
104
- -
105
- doc_id: '0900636180083dac'
106
- signature: '<content>000001.tif</content>'
107
- -
108
- doc_id: '0900636180083dad'
109
- signature: '<content>000001.tif</content>'
110
- -
111
- doc_id: '0900636180083de9'
112
- signature: '<content>000001.tif</content>'
113
- -
114
- doc_id: '0900636180083df8'
115
- signature: '<content>000001.tif</content>'
116
- -
117
- doc_id: '0900636180083e14'
118
- signature: '<content>000001.tif</content>'
119
- -
120
- doc_id: '0900636180083e15'
121
- signature: '<content>000001.tif</content>'
122
- -
123
- doc_id: '0900636180083e4f'
124
- signature: '<content>000001.tif</content>'
125
- -
126
- doc_id: '0900636180083e50'
127
- signature: '<content>000001.tif</content>'
128
- -
129
- doc_id: '0900636180083e51'
130
- signature: '<content>000001.tif</content>'
131
- -
132
- doc_id: '0900636180083ee5'
133
- signature: '<content>000001.tif</content>'
134
- -
135
- doc_id: '0900636180083f14'
136
- signature: '<content>000001.tif</content>'
137
- -
138
- doc_id: '0900636180083f15'
139
- signature: '<content>000001.tif</content>'
140
- -
141
- doc_id: '0900636180083fe8'
142
- signature: '<content>000001.tif</content>'
143
- -
144
- doc_id: '0900636180083fe9'
145
- signature: '<content>000001.tif</content>'
146
- -
147
- doc_id: '09006361800840e0'
148
- signature: '<content>000001.tif</content>'
149
- -
150
- doc_id: '09006361800840e1'
151
- signature: '<content>000001.tif</content>'
152
- -
153
- doc_id: '0900636180084428'
154
- signature: '<content>000001.tif</content>'
155
- -
156
- doc_id: '0900636180084429'
157
- signature: '<content>000001.tif</content>'
158
- -
159
- doc_id: '0900636180084490'
160
- signature: '<content>000001.tif</content>'
161
- -
162
- doc_id: '0900636180084491'
163
- signature: '<content>000001.tif</content>'
164
- -
165
- doc_id: '0900636180084492'
166
- signature: '<content>000001.tif</content>'
167
- -
168
- doc_id: '09006361800844f4'
169
- signature: '<content>000001.tif</content>'
170
- -
171
- doc_id: '0900636180084577'
172
- signature: '<content>000001.tif</content>'
173
- -
174
- doc_id: '0900636180084578'
175
- signature: '<content>000001.tif</content>'
176
- -
177
- doc_id: '09006361800845a1'
178
- signature: '<content>000001.tif</content>'
179
- -
180
- doc_id: '09006361800845a2'
181
- signature: '<content>000001.tif</content>'
182
- -
183
- doc_id: '09006361800845b2'
184
- signature: '<content>000001.tif</content>'
185
- -
186
- doc_id: '09006361800845b3'
187
- signature: '<content>000001.tif</content>'
188
- -
189
- doc_id: '09006361800845cb'
190
- signature: '<content>000001.tif</content>'
191
- -
192
- doc_id: '09006361800845cc'
193
- signature: '<content>000001.tif</content>'
194
- -
195
- doc_id: '09006361800845f5'
196
- signature: '<content>000001.tif</content>'
197
- -
198
- doc_id: '09006361800845f6'
199
- signature: '<content>000001.tif</content>'
200
- -
201
- doc_id: '09006361800845f7'
202
- signature: '<content>000001.tif</content>'
203
- -
204
- doc_id: '09006361800854a7'
205
- signature: '<content>000001.tif</content>'
206
- -
207
- doc_id: '09006361800854f4'
208
- signature: '<content>000001.tif</content>'
209
- -
210
- doc_id: '09006361800854f5'
211
- signature: '<content>000001.tif</content>'
212
- -
213
- doc_id: '090063618008a415'
214
- signature: '<content>000001.tif</content>'
215
- -
216
- doc_id: '090063618008a416'
217
- signature: '<content>000001.tif</content>'
218
- -
219
- doc_id: '090063618008a417'
220
- signature: '<content>000001.tif</content>'
221
- -
222
- doc_id: '090063618008a419'
223
- signature: '<content>000001.tif</content>'
224
- -
225
- doc_id: '090063618008a41a'
226
- signature: '<content>000001.tif</content>'
227
- -
228
- doc_id: '090063618008a41b'
229
- signature: '<content>000001.tif</content>'
230
- -
231
- doc_id: '0900636180084451'
232
- signature: '<content>000001.tif</content>'
233
- -
234
- doc_id: '0900636180084461'
235
- signature: '<content>000001.tif</content>'
236
- -
237
- doc_id: '0900636180084462'
238
- signature: '<content>000001.tif</content>'
239
- -
240
- doc_id: '0900636180084479'
241
- signature: '<content>000001.tif</content>'
242
- -
243
- doc_id: '090063618008447a'
244
- signature: '<content>000001.tif</content>'
245
- -
246
- doc_id: '09006361800844cc'
247
- signature: '<content>000001.tif</content>'
248
- -
249
- doc_id: '09006361800844cd'
250
- signature: '<content>000001.tif</content>'
251
- -
252
- doc_id: '09006361800844ce'
253
- signature: '<content>000001.tif</content>'
254
- -
255
- doc_id: '0900636180084585'
256
- signature: '<content>000001.tif</content>'
257
- -
258
- doc_id: '09006361800845d4'
259
- signature: '<content>000001.tif</content>'
260
- -
261
- doc_id: '09006361800845d5'
262
- signature: '<content>000001.tif</content>'
263
- -
264
- doc_id: '09006361800854a9'
265
- signature: '<content>000001.tif</content>'
266
- -
267
- doc_id: '09006361800854d8'
268
- signature: '<content>000001.tif</content>'
269
- -
270
- doc_id: '0900636180085517'
271
- signature: '<content>000001.tif</content>'
272
- -
273
- doc_id: '0900636180085518'
274
- signature: '<content>000001.tif</content>'
275
- -
276
- doc_id: '090063618008552a'
277
- signature: '<content>000001.tif</content>'
278
- -
279
- doc_id: '090063618008552b'
280
- signature: '<content>000001.tif</content>'
281
- -
282
- doc_id: '090063618008a3bb'
283
- signature: '<content>000001.tif</content>'
284
- -
285
- doc_id: '090063618008a3bc'
286
- signature: '<content>000001.tif</content>'
287
- -
288
- doc_id: '090063618008a3bd'
289
- signature: '<content>000001.tif</content>'
290
- -
291
- doc_id: '0900636180083c2b'
292
- signature: '<content>000001.tif</content>'
293
- -
294
- doc_id: '0900636180083c2c'
295
- signature: '<content>000001.tif</content>'
296
- -
297
- doc_id: '0900636180083c3c'
298
- signature: '<content>000001.tif</content>'
@@ -1,40 +0,0 @@
1
- passes:
2
- -
3
- ia_number: 'EP2007005648'
4
- title: 'REPRODCUCING OPTICAL IMAGES ON AN IMAGE SENSOR USING A FIBRE-OPTIC PLATE OR A FIBRE WEDGE'
5
- -
6
- ia_number: 'US2007014350'
7
- title: 'LCD-BASED CONFIDENTIAL VIEWING APPARATUS UTILIZING AUTO-INVERSION MASKING'
8
- -
9
- ia_number: 'CA2007001121'
10
- title: 'METHOD FOR PREPARING 2-IODO TRITERPENOID COMPOUNDS'
11
- -
12
- ia_number: 'ES2006000375'
13
- title: 'MACHINE FOR FORMING, FILLING AND CLOSING EXPANDED-POLYMER CONTAINERS'
14
- -
15
- ia_number: 'GB2006002418'
16
- title: 'CONTROLLING POWER CONSUMPTION IN A DATA PROCESSING APPARATUS'
17
- -
18
- ia_number: 'FI2007050319'
19
- title: 'FUEL SYSTEM FOR GAS DRIVEN VESSEL'
20
- -
21
- ia_number: 'DE2006001720'
22
- title: 'FUEL CELL SYSTEM'
23
- -
24
- ia_number: 'EP2007004565'
25
- title: 'DEVICE FOR THE STATUS ENQUIRY OF MECHANICALLY/ELECTRICALLY DETECTABLE SWITCHING STATES OR POSITIONS WITHIN THE FRAMEWORK OF INSPECTION AND INFRASTRUCTURE MONITORING'
26
- -
27
- ia_number: 'US2007014746'
28
- title: 'BIO-RECYCLING OF CARBON DIOXIDE EMITTED FROM POWER PLANTS'
29
- -
30
- ia_number: 'US2007014580'
31
- title: 'TRANSGENIC CROP PLANTS WITH IMPROVED STRESS TOLERANCE'
32
- -
33
- ia_number: 'GB2007002428'
34
- title: 'PHARMACEUTICAL COMBINATIONS'
35
- -
36
- ia_number: 'GB2007002390'
37
- title: 'FUSED THIAZOLE DERIVATIVES AS KINASE INHIBITORS'
38
- -
39
- ia_number: 'US2007015271'
40
- title: 'BICYCLIC COMPOSITIONS AND METHODS FOR MODULATING A KINASE CASCADE'
@@ -1,44 +0,0 @@
1
- require 'spec_helper'
2
- require 'yaml'
3
-
4
- module Patentscope
5
-
6
- describe 'WIPO supplied test suite', :more, :vcr do
7
-
8
- before(:all) do
9
- Patentscope.configure_from_env
10
- end
11
-
12
- let(:webservice) { Webservice.new }
13
-
14
- after(:all) do
15
- Patentscope.reset_configuration
16
- end
17
-
18
- context 'International Application numbers' do
19
-
20
- File.open(File.join(File.dirname(__FILE__), *%w[wipo_test_suite_ia_number_examples.yaml])) do |file|
21
- examples = YAML.load(file)
22
- examples['passes'].each do |e|
23
- it "get_iasr of #{e['ia_number']} includes title #{e["title"]}" do
24
- iasr_xml = webservice.get_iasr(ia_number: e["ia_number"])
25
- expect(iasr_xml).to include(e["title"])
26
- end
27
- end
28
- end
29
- end
30
-
31
- context 'Document IDs' do
32
-
33
- File.open(File.join(File.dirname(__FILE__), *%w[wipo_test_suite_doc_id_examples.yaml])) do |file|
34
- examples = YAML.load(file)
35
- examples['passes'].each do |e|
36
- it "get_document_table_of_contents of #{e['doc_id']} includes #{e["signature"]}" do
37
- iasr_xml = webservice.get_document_table_of_contents(doc_id: e["doc_id"])
38
- expect(iasr_xml).to include(e["signature"])
39
- end
40
- end
41
- end
42
- end
43
- end
44
- end