wiki-api 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,6 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
- require 'rubygems'
4
- require 'test/unit'
5
- require File.expand_path(File.dirname(__FILE__) + "/../../lib/wiki/api")
3
+ require 'test_helper'
6
4
 
7
5
  #
8
6
  # Testing the parsing of URI (with a predownloaded HTML file):
@@ -13,59 +11,55 @@ require File.expand_path(File.dirname(__FILE__) + "/../../lib/wiki/api")
13
11
  #
14
12
 
15
13
  class WikiPageOfflinePage < Test::Unit::TestCase
16
-
17
14
  # this global is required to resolve URIs (MediaWiki uses relative paths in their links)
18
- URI_CONFIG = { uri: "http://en.wiktionary.org" }
15
+ URI_CONFIG = { uri: 'https://en.wiktionary.org' }.freeze
19
16
  # use local file for test loading
20
- PAGE_CONFIG = { file: File.expand_path(File.dirname(__FILE__) + "/files/Wiktionary_program.html") }
17
+ PAGE_CONFIG = { file: File.expand_path("#{File.dirname(__FILE__)}/files/Wiktionary_program.html") }.freeze
21
18
 
22
19
  def setup
23
20
  # NOTE: comment Page.config, to use the online MediaWiki instance
24
- Wiki::Api::Connect.config = URI_CONFIG
25
- Wiki::Api::Connect.config.merge! PAGE_CONFIG
21
+ Wiki::Api::Connect.config = URI_CONFIG.merge(PAGE_CONFIG)
22
+ # Wiki::Api::Connect.config.merge!(PAGE_CONFIG)
26
23
  end
27
24
 
28
- def teardown
29
- end
25
+ def teardown; end
30
26
 
31
27
  # test simple page invocation
32
28
  def test_headlines_nested
33
-
34
29
  # load page
35
- page = Wiki::Api::Page.new name: "program"
36
- assert page.is_a?(Wiki::Api::Page), "expected Page object"
30
+ page = Wiki::Api::Page.new(name: 'program')
31
+ assert(page.is_a?(Wiki::Api::Page), 'expected Page object')
37
32
  headline = page.root_headline
38
- assert headline.is_a?(Wiki::Api::PageHeadline), "expected PageHeadline object"
39
- assert headline.name == "program", "expected developer headline"
33
+ assert(headline.is_a?(Wiki::Api::PageHeadline), 'expected PageHeadline object')
34
+ assert(headline.name == 'program', 'expected developer headline')
40
35
 
41
- # search nested headline: english
42
- english = headline.headline("english").first
43
- assert english.is_a?(Wiki::Api::PageHeadline), "expected PageHeadline object"
36
+ # search nested headline: english
37
+ english = headline.headline('english').first
38
+ assert(english.is_a?(Wiki::Api::PageHeadline), 'expected PageHeadline object')
44
39
 
45
40
  # search nested headline: noun
46
- noun = english.headline("noun").first
47
- assert noun.is_a?(Wiki::Api::PageHeadline), "expected PageHeadline object"
41
+ noun = english.headline('noun').first
42
+ assert(noun.is_a?(Wiki::Api::PageHeadline), 'expected PageHeadline object')
48
43
 
49
44
  # get block
50
45
  block = noun.block
51
- assert block.is_a?(Wiki::Api::PageBlock), "expected PageBlock object"
46
+ assert(block.is_a?(Wiki::Api::PageBlock), 'expected PageBlock object')
52
47
 
53
48
  # list items
54
49
  block.list_items.each do |list_item|
55
- assert list_item.is_a?(Wiki::Api::PageListItem), "expected PageListItem object"
50
+ assert(list_item.is_a?(Wiki::Api::PageListItem), 'expected PageListItem object')
56
51
  # links
57
52
  list_item.links.each do |link|
58
- assert link.is_a?(Wiki::Api::PageLink), "expected PageListItem object"
53
+ assert(link.is_a?(Wiki::Api::PageLink), 'expected PageListItem object')
59
54
  end
60
55
  end
61
56
 
62
57
  # links
63
58
  block.links.each do |link|
64
- assert link.is_a?(Wiki::Api::PageLink), "expected PageListItem object"
59
+ assert(link.is_a?(Wiki::Api::PageLink), 'expected PageListItem object')
65
60
  end
66
61
  end
67
62
 
68
-
69
63
  # def test_headlines_verify_tree_objects
70
64
  # page = Wiki::Api::Page.new name: "program"
71
65
  # assert page.is_a?(Wiki::Api::Page), "expected Page object"
@@ -101,162 +95,201 @@ class WikiPageOfflinePage < Test::Unit::TestCase
101
95
  # end
102
96
  # end
103
97
 
104
-
105
98
  def test_headlines_verify_tree_data
106
- page = Wiki::Api::Page.new name: "program"
107
- headline = page.root_headline
99
+ page = Wiki::Api::Page.new(name: 'program')
100
+ root_headline = page.root_headline
108
101
  # get root
109
- assert headline.name == "program", "expected program name"
110
-
102
+ assert(root_headline.name == 'program', 'expected program name')
103
+
111
104
  # iterate one deep and verify headline index names
112
- headline.headlines.each do |name, headline|
113
- assert headline.name == name
105
+ root_headline.headlines.each do |name, headline|
106
+ assert(headline.name == name)
114
107
  end
115
- headlines = headline.headlines.values
108
+ headlines = root_headline.headlines.values
116
109
 
117
110
  # English
118
111
  english_headlines = headlines[0]
119
- assert english_headlines.name == "English"
112
+ assert(english_headlines.name == 'English')
120
113
  english_headlines = english_headlines.headlines.values
121
- assert english_headlines[0].name == "Alternative_forms"
122
- assert english_headlines[1].name == "Etymology"
123
- assert english_headlines[2].name == "Pronunciation"
124
- assert english_headlines[3].name == "Noun"
114
+ assert(english_headlines[0].name == 'Alternative_forms')
115
+ assert(english_headlines[1].name == 'Etymology')
116
+ assert(english_headlines[2].name == 'Pronunciation')
117
+ assert(english_headlines[3].name == 'Noun')
125
118
  noun_english_headlines = english_headlines[3].headlines.values
126
- assert noun_english_headlines[0].name == "Usage_notes"
127
- assert noun_english_headlines[1].name == "Synonyms"
128
- assert noun_english_headlines[2].name == "Translations"
129
- assert english_headlines[4].name == "Verb"
119
+ assert(noun_english_headlines[0].name == 'Usage_notes')
120
+ assert(noun_english_headlines[1].name == 'Synonyms')
121
+ assert(noun_english_headlines[2].name == 'Translations')
122
+ assert(english_headlines[4].name == 'Verb')
130
123
  verb_english_headlines = english_headlines[4].headlines.values
131
- assert verb_english_headlines[0].name == "Related_terms"
132
- assert verb_english_headlines[1].name == "Translations_2"
133
- assert english_headlines[5].name == "External_links"
124
+ assert(verb_english_headlines[0].name == 'Related_terms')
125
+ assert(verb_english_headlines[1].name == 'Translations_2')
126
+ assert(english_headlines[5].name == 'External_links')
134
127
 
135
128
  # Czech
136
129
  czech_headlines = headlines[1]
137
- assert czech_headlines.name == "Czech"
130
+ assert(czech_headlines.name == 'Czech')
138
131
  czech_headlines = czech_headlines.headlines.values
139
- assert czech_headlines[0].name == "Pronunciation_2"
140
- assert czech_headlines[1].name == "Noun_2"
132
+ assert(czech_headlines[0].name == 'Pronunciation_2')
133
+ assert(czech_headlines[1].name == 'Noun_2')
141
134
 
142
135
  # Hungarian
143
136
  hungarian_headlines = headlines[2]
144
- assert hungarian_headlines.name == "Hungarian"
137
+ assert(hungarian_headlines.name == 'Hungarian')
145
138
  hungarian_headlines = hungarian_headlines.headlines.values
146
- assert hungarian_headlines[0].name == "Pronunciation_3"
147
- assert hungarian_headlines[1].name == "Noun_3"
139
+ assert(hungarian_headlines[0].name == 'Pronunciation_3')
140
+ assert(hungarian_headlines[1].name == 'Noun_3')
148
141
  noun_hungarian_headlines = hungarian_headlines[1].headlines.values
149
- assert noun_hungarian_headlines[0].name == "Declension"
150
- assert noun_hungarian_headlines[1].name == "Derived_terms"
142
+ assert(noun_hungarian_headlines[0].name == 'Declension')
143
+ assert(noun_hungarian_headlines[1].name == 'Derived_terms')
151
144
 
152
145
  # Norwegian
153
146
  norwegian_headlines = headlines[3]
154
- assert norwegian_headlines.name == "Norwegian_Bokm.C3.A5l"
147
+ assert(norwegian_headlines.name == 'Norwegian_Bokm.C3.A5l')
155
148
  norwegian_headlines = norwegian_headlines.headlines.values
156
- assert norwegian_headlines[0].name == "Noun_4"
149
+ assert(norwegian_headlines[0].name == 'Noun_4')
157
150
 
158
151
  # Romanian
159
152
  romanian_headlines = headlines[4]
160
- assert romanian_headlines.name == "Romanian"
153
+ assert(romanian_headlines.name == 'Romanian')
161
154
  romanian_headlines = romanian_headlines.headlines.values
162
- assert romanian_headlines[0].name == "Etymology_2"
163
- assert romanian_headlines[1].name == "Noun_5"
155
+ assert(romanian_headlines[0].name == 'Etymology_2')
156
+ assert(romanian_headlines[1].name == 'Noun_5')
164
157
  noun_romanian_headlines = romanian_headlines[1].headlines.values
165
- assert noun_romanian_headlines[0].name == "Declension_2"
166
- assert noun_romanian_headlines[1].name == "Related_terms_2"
158
+ assert(noun_romanian_headlines[0].name == 'Declension_2')
159
+ assert(noun_romanian_headlines[1].name == 'Related_terms_2')
167
160
 
168
161
  # Serbo-Croatian
169
162
  serb_croatian_headlines = headlines[5]
170
- assert serb_croatian_headlines.name == "Serbo-Croatian"
163
+ assert(serb_croatian_headlines.name == 'Serbo-Croatian')
171
164
  serb_croatian_headlines = serb_croatian_headlines.headlines.values
172
- assert serb_croatian_headlines[0].name == "Noun_6"
165
+ assert(serb_croatian_headlines[0].name == 'Noun_6')
173
166
  noun_serb_croatian_headlines = serb_croatian_headlines[0].headlines.values
174
- assert noun_serb_croatian_headlines[0].name == "Declension_3"
167
+ assert(noun_serb_croatian_headlines[0].name == 'Declension_3')
175
168
 
176
169
  # Slovak
177
170
  slovak_headlines = headlines[6]
178
- assert slovak_headlines.name == "Slovak"
171
+ assert(slovak_headlines.name == 'Slovak')
179
172
  slovak_headlines = slovak_headlines.headlines.values
180
- assert slovak_headlines[0].name == "Noun_7"
173
+ assert(slovak_headlines[0].name == 'Noun_7')
181
174
 
182
175
  # Swedish
183
176
  swedish_headlines = headlines[7]
184
- assert swedish_headlines.name == "Swedish"
177
+ assert(swedish_headlines.name == 'Swedish')
185
178
  swedish_headlines = swedish_headlines.headlines.values
186
- assert swedish_headlines[0].name == "Etymology_3"
187
- assert swedish_headlines[1].name == "Noun_8"
179
+ assert(swedish_headlines[0].name == 'Etymology_3')
180
+ assert(swedish_headlines[1].name == 'Noun_8')
188
181
  noun_swedish_headlines = swedish_headlines[1].headlines.values
189
- assert noun_swedish_headlines[0].name == "Declension_4"
182
+ assert(noun_swedish_headlines[0].name == 'Declension_4')
190
183
 
191
184
  # Turkish
192
185
  turkish_headlines = headlines[8]
193
- assert turkish_headlines.name == "Turkish"
186
+ assert(turkish_headlines.name == 'Turkish')
194
187
  turkish_headlines = turkish_headlines.headlines.values
195
- assert turkish_headlines[0].name == "Etymology_4"
196
- assert turkish_headlines[1].name == "Noun_9"
188
+ assert(turkish_headlines[0].name == 'Etymology_4')
189
+ assert(turkish_headlines[1].name == 'Noun_9')
197
190
  noun_turkish_headlines = turkish_headlines[1].headlines.values
198
- assert noun_turkish_headlines[0].name == "Declension_5"
199
-
191
+ assert(noun_turkish_headlines[0].name == 'Declension_5')
200
192
  end
201
193
 
202
-
203
194
  def test_headlines_search
204
- page = Wiki::Api::Page.new name: "program"
205
- headline = page.root_headline
195
+ page = Wiki::Api::Page.new(name: 'program')
196
+ root_headline = page.root_headline
206
197
  # get root
207
- assert headline.name == "program", "expected program name"
198
+ assert(root_headline.name == 'program', 'expected program name')
208
199
 
209
- headlines = headline.headline "english"
210
- assert !headlines.empty?, "expected a headline"
200
+ headlines = root_headline.headline('english')
201
+ assert(!headlines.empty?, 'expected a headline')
211
202
 
212
203
  # iterate english
213
204
  headlines.each do |headline|
214
- assert headline.is_a?(Wiki::Api::PageHeadline), "expected PageHeadline object"
215
- assert headline.name == "English", "expected English"
216
- noun_headlines = headline.headline "noun"
217
- assert !noun_headlines.empty?, "exptected a headline"
205
+ assert(headline.is_a?(Wiki::Api::PageHeadline), 'expected PageHeadline object')
206
+ assert(headline.name == 'English', 'expected English')
207
+ noun_headlines = headline.headline('noun')
208
+ assert(!noun_headlines.empty?, 'exptected a headline')
218
209
  # iterate nouns
219
210
  noun_headlines.each do |noun_headline|
220
- assert noun_headline.is_a?(Wiki::Api::PageHeadline), "expected PageHeadline object"
221
- assert noun_headline.name == "Noun", "expected Noun"
222
-
223
- #list_item.links.each do |link|
211
+ assert(noun_headline.is_a?(Wiki::Api::PageHeadline), 'expected PageHeadline object')
212
+ assert(noun_headline.name == 'Noun', 'expected Noun')
213
+
214
+ # list_item.links.each do |link|
224
215
  end
225
216
  end
226
217
  end
227
218
 
228
219
  def test_headlines_has_headline
229
220
  # load page
230
- page = Wiki::Api::Page.new name: "program"
221
+ page = Wiki::Api::Page.new(name: 'program')
231
222
 
232
223
  # get root
233
224
  root_headline = page.root_headline
234
- assert root_headline.name == "program", "expected program name"
235
- headline = root_headline.headline("english").first
225
+ assert(root_headline.name == 'program', 'expected program name')
226
+ headline = root_headline.headline('english').first
236
227
 
237
228
  # verify existence english headlines
238
- assert headline.has_headline?("alternative forms")
239
- assert headline.has_headline?("etymology")
240
- assert headline.has_headline?("pronunciation")
241
- assert headline.has_headline?("noun")
242
- assert headline.has_headline?("verb")
243
- assert headline.has_headline?("external links")
244
- assert !headline.has_headline?("alternative12 forms")
245
- assert !headline.has_headline?("etymolfaogy")
246
- assert !headline.has_headline?("pronunciafaation")
247
- assert !headline.has_headline?("nounia")
248
- assert !headline.has_headline?("verbaf")
249
- assert !headline.has_headline?("externalaf links")
229
+ assert(headline.has_headline?('alternative forms'))
230
+ assert(headline.has_headline?('etymology'))
231
+ assert(headline.has_headline?('pronunciation'))
232
+ assert(headline.has_headline?('noun'))
233
+ assert(headline.has_headline?('verb'))
234
+ assert(headline.has_headline?('external links'))
235
+ assert(!headline.has_headline?('alternative12 forms'))
236
+ assert(!headline.has_headline?('etymolfaogy'))
237
+ assert(!headline.has_headline?('pronunciafaation'))
238
+ assert(!headline.has_headline?('nounia'))
239
+ assert(!headline.has_headline?('verbaf'))
240
+ assert(!headline.has_headline?('externalaf links'))
250
241
 
251
242
  # verify existence czech headlines
252
- headline = root_headline.headline("czech").first
253
- assert headline.has_headline?("pronunciation")
254
- assert headline.has_headline?("noun")
255
- assert !headline.has_headline?("pronunciation82")
256
- assert !headline.has_headline?("nouan")
243
+ headline = root_headline.headline('czech').first
244
+ assert(headline.has_headline?('pronunciation'))
245
+ assert(headline.has_headline?('noun'))
246
+ assert(!headline.has_headline?('pronunciation82'))
247
+ assert(!headline.has_headline?('nouan'))
248
+
249
+ # TODO: add other headlines here as well!
250
+ end
251
+
252
+ def test_headlines_recursive_search
253
+ # load page
254
+ page = Wiki::Api::Page.new(name: 'program')
255
+
256
+ # get root
257
+ root_headline = page.root_headline
258
+ assert(root_headline.name == 'program', 'expected program name')
259
+ headline = root_headline.headline('english').first
260
+
261
+ related_terms_headline = headline.headline_in_depth('related terms').first
262
+ assert(related_terms_headline.is_a?(Wiki::Api::PageHeadline), 'expected PageHeadline object')
263
+ assert(related_terms_headline.name == 'Related_terms')
264
+ assert(related_terms_headline.parent.is_a?(Wiki::Api::PageHeadline))
265
+ assert(related_terms_headline.parent.name == 'Verb')
266
+ assert(related_terms_headline.parent.parent.is_a?(Wiki::Api::PageHeadline))
267
+ assert(related_terms_headline.parent.parent.name == 'English')
268
+ end
257
269
 
258
- #TODO: add other headlines here as well!
270
+ def test_headlines_recursive_multi_search
271
+ # load page
272
+ page = Wiki::Api::Page.new(name: 'program')
259
273
 
274
+ # get root
275
+ root_headline = page.root_headline
276
+ assert(root_headline.name == 'program', 'expected program name')
277
+ headline = root_headline.headline('english').first
278
+ # search translations within english
279
+ translations_headlines = headline.headline_in_depth('translations')
280
+ assert(translations_headlines[0].name == 'Translations')
281
+ assert(translations_headlines[1].name == 'Translations_2')
260
282
  end
261
283
 
262
- end
284
+ def test_headlines_recursive_search_limit_depth
285
+ # load page
286
+ page = Wiki::Api::Page.new(name: 'program')
287
+ # get root
288
+ root_headline = page.root_headline
289
+ assert(root_headline.name == 'program', 'expected program name')
290
+ headline = root_headline.headline('english').first
291
+ # search translations within english
292
+ translations_headlines = headline.headline_in_depth('translations', 0)
293
+ assert(translations_headlines.empty?, 'expected no translations at depth 0')
294
+ end
295
+ end
data/wiki-api.gemspec CHANGED
@@ -1,29 +1,32 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ require 'English'
4
+ lib = File.expand_path('lib', __dir__)
3
5
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
6
  require 'wiki/api/version'
5
7
 
6
8
  Gem::Specification.new do |spec|
7
- spec.name = "wiki-api"
9
+ spec.name = 'wiki-api'
8
10
  spec.version = Wiki::Api::VERSION
9
- spec.authors = ["Dennis Blommesteijn"]
10
- spec.email = ["dennis@blommesteijn.com"]
11
- spec.description = %q{MediaWiki API and Page content parser for Headlines (nested), TextBlocks, ListItems, and Links.}
12
- spec.summary = %q{MediaWiki API and Page content parser for Headlines (nested), TextBlocks, ListItems, and Links.}
13
- spec.homepage = "https://github.com/dblommesteijn/wiki-api"
14
- spec.license = "MIT"
11
+ spec.authors = ['Dennis Blommesteijn']
12
+ spec.email = ['dennis@blommesteijn.com']
13
+ spec.description = 'MediaWiki API and Page content parser for Headlines (nested), TextBlocks, ListItems, and Links.'
14
+ spec.summary = 'MediaWiki API and Page content parser for Headlines (nested), TextBlocks, ListItems, and Links.'
15
+ spec.homepage = 'https://github.com/dblommesteijn/wiki-api'
16
+ spec.license = 'MIT'
15
17
 
16
- spec.files = `git ls-files`.split($/)
18
+ spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
17
19
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
20
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
21
+ spec.require_paths = ['lib']
22
+ spec.required_ruby_version = '>= 1.9.3'
20
23
 
21
- spec.add_development_dependency "bundler", "~> 1.3"
22
- spec.add_development_dependency "rake"
24
+ spec.add_development_dependency('bundler', '> 1.3')
25
+ spec.add_development_dependency('pry', '~> 0.14')
26
+ spec.add_development_dependency('rake')
27
+ spec.add_development_dependency('rubocop', '~> 1.59.0')
28
+ spec.add_development_dependency('test-unit', '> 2.0.0')
23
29
 
24
30
  # dependencies
25
- spec.add_dependency 'nokogiri', "~> 1.5.0"
26
- spec.add_dependency 'json', "~> 1.6.1"
27
- spec.add_development_dependency "test-unit", "~> 2.0.0"
28
-
31
+ spec.add_dependency('nokogiri', '> 1.13.0')
29
32
  end
metadata CHANGED
@@ -1,97 +1,116 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wiki-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Blommesteijn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-09 00:00:00.000000000 Z
11
+ date: 2023-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
15
22
  version_requirements: !ruby/object:Gem::Requirement
16
23
  requirements:
17
- - - "~>"
24
+ - - ">"
18
25
  - !ruby/object:Gem::Version
19
26
  version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: pry
20
29
  requirement: !ruby/object:Gem::Requirement
21
30
  requirements:
22
31
  - - "~>"
23
32
  - !ruby/object:Gem::Version
24
- version: '1.3'
25
- prerelease: false
33
+ version: '0.14'
26
34
  type: :development
27
- - !ruby/object:Gem::Dependency
28
- name: rake
35
+ prerelease: false
29
36
  version_requirements: !ruby/object:Gem::Requirement
30
37
  requirements:
31
- - - ">="
38
+ - - "~>"
32
39
  - !ruby/object:Gem::Version
33
- version: '0'
40
+ version: '0.14'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
34
43
  requirement: !ruby/object:Gem::Requirement
35
44
  requirements:
36
45
  - - ">="
37
46
  - !ruby/object:Gem::Version
38
47
  version: '0'
39
- prerelease: false
40
48
  type: :development
41
- - !ruby/object:Gem::Dependency
42
- name: nokogiri
49
+ prerelease: false
43
50
  version_requirements: !ruby/object:Gem::Requirement
44
51
  requirements:
45
- - - "~>"
52
+ - - ">="
46
53
  - !ruby/object:Gem::Version
47
- version: 1.5.0
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop
48
57
  requirement: !ruby/object:Gem::Requirement
49
58
  requirements:
50
59
  - - "~>"
51
60
  - !ruby/object:Gem::Version
52
- version: 1.5.0
61
+ version: 1.59.0
62
+ type: :development
53
63
  prerelease: false
54
- type: :runtime
55
- - !ruby/object:Gem::Dependency
56
- name: json
57
64
  version_requirements: !ruby/object:Gem::Requirement
58
65
  requirements:
59
66
  - - "~>"
60
67
  - !ruby/object:Gem::Version
61
- version: 1.6.1
68
+ version: 1.59.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: test-unit
62
71
  requirement: !ruby/object:Gem::Requirement
63
72
  requirements:
64
- - - "~>"
73
+ - - ">"
65
74
  - !ruby/object:Gem::Version
66
- version: 1.6.1
75
+ version: 2.0.0
76
+ type: :development
67
77
  prerelease: false
68
- type: :runtime
69
- - !ruby/object:Gem::Dependency
70
- name: test-unit
71
78
  version_requirements: !ruby/object:Gem::Requirement
72
79
  requirements:
73
- - - "~>"
80
+ - - ">"
74
81
  - !ruby/object:Gem::Version
75
82
  version: 2.0.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: nokogiri
76
85
  requirement: !ruby/object:Gem::Requirement
77
86
  requirements:
78
- - - "~>"
87
+ - - ">"
79
88
  - !ruby/object:Gem::Version
80
- version: 2.0.0
89
+ version: 1.13.0
90
+ type: :runtime
81
91
  prerelease: false
82
- type: :development
83
- description: MediaWiki API and Page content parser for Headlines (nested), TextBlocks, ListItems, and Links.
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">"
95
+ - !ruby/object:Gem::Version
96
+ version: 1.13.0
97
+ description: MediaWiki API and Page content parser for Headlines (nested), TextBlocks,
98
+ ListItems, and Links.
84
99
  email:
85
100
  - dennis@blommesteijn.com
86
- executables: []
101
+ executables:
102
+ - console
87
103
  extensions: []
88
104
  extra_rdoc_files: []
89
105
  files:
90
106
  - ".gitignore"
107
+ - ".rubocop.yml"
108
+ - ".travis.yml"
91
109
  - Gemfile
92
110
  - LICENSE.txt
93
111
  - README.md
94
112
  - Rakefile
113
+ - bin/console
95
114
  - lib/wiki/api.rb
96
115
  - lib/wiki/api/connect.rb
97
116
  - lib/wiki/api/page.rb
@@ -119,18 +138,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
119
138
  requirements:
120
139
  - - ">="
121
140
  - !ruby/object:Gem::Version
122
- version: '0'
141
+ version: 1.9.3
123
142
  required_rubygems_version: !ruby/object:Gem::Requirement
124
143
  requirements:
125
144
  - - ">="
126
145
  - !ruby/object:Gem::Version
127
146
  version: '0'
128
147
  requirements: []
129
- rubyforge_project:
130
- rubygems_version: 2.0.3
148
+ rubygems_version: 3.3.7
131
149
  signing_key:
132
150
  specification_version: 4
133
- summary: MediaWiki API and Page content parser for Headlines (nested), TextBlocks, ListItems, and Links.
151
+ summary: MediaWiki API and Page content parser for Headlines (nested), TextBlocks,
152
+ ListItems, and Links.
134
153
  test_files:
135
154
  - test/test_helper.rb
136
155
  - test/unit/files/Wiktionary_Welcome,_newcomers.html