wwwjdic 15.0.0 → 16.0.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG +13 -0
- data/Gemfile +4 -0
- data/README.md +6 -7
- data/Rakefile +4 -0
- data/examples/basics.rb +4 -0
- data/examples/translate.rb +26 -0
- data/examples/uri.rb +16 -0
- data/html/CHANGELOG.html +37 -30
- data/html/COPYING_md.html +22 -30
- data/html/Gemfile.html +25 -31
- data/html/Object.html +825 -63
- data/html/README_md.html +27 -33
- data/html/Rakefile.html +25 -31
- data/html/WWWJDic.html +42 -124
- data/html/WWWJDic/ParsableDuckType.html +35 -57
- data/html/WWWJDic/Parser.html +48 -90
- data/html/WWWJDic/Parsers.html +28 -36
- data/html/WWWJDic/Parsers/Dict.html +47 -73
- data/html/WWWJDic/Parsers/Display.html +42 -68
- data/html/WWWJDic/Parsers/Key.html +42 -68
- data/html/WWWJDic/Parsers/Search.html +38 -61
- data/html/WWWJDic/Parsers/Server.html +42 -68
- data/html/WWWJDic/Splitter.html +76 -173
- data/html/WWWJDic/Utils.html +28 -36
- data/html/WWWJDic/Utils/Downloader.html +28 -36
- data/html/WWWJDic/Utils/Downloader/Downloader.html +41 -80
- data/html/WWWJDic/Utils/Raisers.html +42 -96
- data/html/WWWJDic/WWWJDic.html +160 -342
- data/html/copyright_md.html +22 -30
- data/html/created.rid +32 -54
- data/html/css/rdoc.css +1 -1
- data/html/index.html +26 -51
- data/html/js/darkfish.js +84 -84
- data/html/js/navigation.js.gz +0 -0
- data/html/js/search.js +110 -110
- data/html/js/search_index.js +1 -1
- data/html/js/search_index.js.gz +0 -0
- data/html/js/searcher.js +229 -229
- data/html/js/searcher.js.gz +0 -0
- data/html/table_of_contents.html +153 -161
- data/lib/wwwjdic.rb +7 -4
- data/lib/wwwjdic/application.rb +52 -25
- data/lib/wwwjdic/constants.rb +33 -3
- data/lib/wwwjdic/locales/de.yml +2 -0
- data/lib/wwwjdic/locales/en.yml +2 -0
- data/lib/wwwjdic/locales/es.yml +2 -0
- data/lib/wwwjdic/locales/fr.yml +2 -0
- data/lib/wwwjdic/locales/hu.yml +2 -0
- data/lib/wwwjdic/locales/it.yml +2 -0
- data/lib/wwwjdic/locales/ja.yml +3 -1
- data/lib/wwwjdic/locales/nl.yml +2 -0
- data/lib/wwwjdic/locales/ru.yml +2 -0
- data/lib/wwwjdic/locales/sl.yml +2 -0
- data/lib/wwwjdic/locales/sv.yml +2 -0
- data/lib/wwwjdic/parser.rb +7 -4
- data/lib/wwwjdic/parsers/dict.rb +4 -1
- data/lib/wwwjdic/parsers/display.rb +4 -1
- data/lib/wwwjdic/parsers/key.rb +4 -1
- data/lib/wwwjdic/parsers/search.rb +4 -0
- data/lib/wwwjdic/parsers/server.rb +4 -1
- data/lib/wwwjdic/utils/downloader.rb +7 -8
- data/lib/wwwjdic/utils/raisers.rb +7 -13
- data/lib/wwwjdic/utils/splitter.rb +18 -9
- data/lib/wwwjdic/version.rb +5 -1
- data/test/test_helper.rb +4 -0
- data/test/test_wwwjdic.rb +4 -0
- data/test/wwwjdic/locales/de.yml +2 -0
- data/test/wwwjdic/locales/en.yml +2 -0
- data/test/wwwjdic/locales/es.yml +2 -0
- data/test/wwwjdic/locales/fr.yml +2 -0
- data/test/wwwjdic/locales/hu.yml +2 -0
- data/test/wwwjdic/locales/it.yml +2 -0
- data/test/wwwjdic/locales/ja.yml +2 -0
- data/test/wwwjdic/locales/nl.yml +2 -0
- data/test/wwwjdic/locales/ru.yml +2 -0
- data/test/wwwjdic/locales/sl.yml +2 -0
- data/test/wwwjdic/locales/sv.yml +2 -0
- data/test/wwwjdic/locales/test_locales.rb +35 -19
- data/test/wwwjdic/parsers/test_dict.rb +62 -36
- data/test/wwwjdic/parsers/test_display.rb +4 -0
- data/test/wwwjdic/parsers/test_key.rb +4 -0
- data/test/wwwjdic/parsers/test_server.rb +4 -0
- data/test/wwwjdic/test_application.rb +196 -148
- data/test/wwwjdic/test_parsable_duck_type.rb +4 -3
- data/test/wwwjdic/utils/test_downloader.rb +4 -0
- data/test/wwwjdic/utils/test_raisers.rb +42 -27
- data/wwwjdic.gemspec +14 -11
- metadata +19 -33
@@ -1,6 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
#--
|
2
4
|
# wwwjdic
|
5
|
+
# rubocop:disable Style/AsciiComments
|
3
6
|
# © 2014 Marco Bresciani
|
7
|
+
# rubocop:enable Style/AsciiComments
|
4
8
|
#
|
5
9
|
# This file is part of wwwjdic.
|
6
10
|
#
|
@@ -24,40 +28,51 @@
|
|
24
28
|
|
25
29
|
require_relative '../../test_helper'
|
26
30
|
|
31
|
+
def test_no_raise
|
32
|
+
it 'does not raise an ArgumentError when value is nil or in the array' do
|
33
|
+
all_methods = { raiser_downcase: [[nil, nil], ['value', ['value']]],
|
34
|
+
raiser_to_i: [[nil, nil], ['42', [42]]] }
|
35
|
+
|
36
|
+
all_methods.each_key do |method_name|
|
37
|
+
a_method = method method_name
|
38
|
+
all_methods[method_name.to_sym].each do |params|
|
39
|
+
a_method.call 'error.value', params[0], params[1]
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_raise
|
46
|
+
it 'raises ArgumentError when value is not nil and not in the array' do
|
47
|
+
all_methods = { raiser_downcase: ['value', ['no value']],
|
48
|
+
raiser_to_i: ['42', [47]] }
|
49
|
+
|
50
|
+
all_methods.each_key do |method_name|
|
51
|
+
a_method = method method_name
|
52
|
+
assert_raises ArgumentError do
|
53
|
+
a_method.call 'error.value', all_methods[method_name.to_sym][0], all_methods[method_name.to_sym][1]
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def test_raiser
|
60
|
+
describe 'when running any raiser method' do
|
61
|
+
test_no_raise
|
62
|
+
|
63
|
+
test_raise
|
64
|
+
end
|
65
|
+
end
|
27
66
|
|
28
67
|
describe WWWJDic::Utils::Raisers do
|
29
68
|
include WWWJDic::Utils::Raisers
|
69
|
+
all_methods = nil
|
30
70
|
|
31
71
|
before do
|
32
72
|
I18n.load_path = Dir[File.join(File.dirname(__FILE__), '../locales/', '*.yml')]
|
33
73
|
I18n.locale = 'it'
|
74
|
+
all_methods = {}
|
34
75
|
end
|
35
76
|
|
36
|
-
|
37
|
-
it 'does not raise an ArgumentError when value is nil or in the array' do
|
38
|
-
all_methods = {}
|
39
|
-
all_methods[:raiser_downcase] = [[nil, nil], ['value', ['value']]]
|
40
|
-
all_methods[:raiser_to_i] = [[nil, nil], ['42', [42]]]
|
41
|
-
|
42
|
-
all_methods.each_key do |method_name|
|
43
|
-
a_method = method method_name
|
44
|
-
all_methods[method_name.to_sym].each do |params|
|
45
|
-
a_method.call 'error.value', params[0], params[1]
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
it 'raises ArgumentError when value is not nil and not in the array' do
|
51
|
-
all_methods = {}
|
52
|
-
all_methods[:raiser_downcase] = ['value', ['no value']]
|
53
|
-
all_methods[:raiser_to_i] = ['42', [47]]
|
54
|
-
|
55
|
-
all_methods.each_key do |method_name|
|
56
|
-
a_method = method method_name
|
57
|
-
assert_raises ArgumentError do
|
58
|
-
a_method.call 'error.value', all_methods[method_name.to_sym][0], all_methods[method_name.to_sym][1]
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
77
|
+
test_raiser
|
63
78
|
end
|
data/wwwjdic.gemspec
CHANGED
@@ -1,7 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
#--
|
3
4
|
# wwwjdic
|
5
|
+
# rubocop:disable Style/AsciiComments
|
4
6
|
# © 2014 Marco Bresciani
|
7
|
+
# rubocop:enable Style/AsciiComments
|
5
8
|
#
|
6
9
|
# This file is part of wwwjdic.
|
7
10
|
#
|
@@ -50,7 +53,7 @@ Gem::Specification.new do |a_gem|
|
|
50
53
|
I'll send it. You can even decide to contribute to this little free
|
51
54
|
software project by registering to Savannah and ask to be part of the
|
52
55
|
'#{a_gem.name}' project!"
|
53
|
-
a_gem.metadata
|
56
|
+
a_gem.metadata = {
|
54
57
|
'homepage_uri' => "https://savannah.nongnu.org/projects/#{a_gem.name}",
|
55
58
|
'changelog_uri' => "http://hg.savannah.nongnu.org/hgweb/#{a_gem.name}/file/tip/CHANGELOG",
|
56
59
|
'source_code_uri' => "http://hg.savannah.nongnu.org/hgweb/#{a_gem.name}/file/",
|
@@ -66,26 +69,26 @@ Gem::Specification.new do |a_gem|
|
|
66
69
|
a_gem.require_paths = %w[lib]
|
67
70
|
a_gem.extra_rdoc_files = COMMON_FILES
|
68
71
|
|
69
|
-
a_gem.required_ruby_version = '~>
|
70
|
-
a_gem.rubygems_version = '~> 3.
|
72
|
+
a_gem.required_ruby_version = '~> 3.0'
|
73
|
+
a_gem.rubygems_version = '~> 3.2'
|
71
74
|
|
72
75
|
a_gem.add_runtime_dependency 'i18n', '~>1.8'
|
73
|
-
a_gem.add_runtime_dependency 'json', '~>2.
|
76
|
+
a_gem.add_runtime_dependency 'json', '~>2.5'
|
74
77
|
|
75
|
-
a_gem.add_development_dependency 'bundler', '~>2.
|
78
|
+
a_gem.add_development_dependency 'bundler', '~>2.2'
|
76
79
|
a_gem.add_development_dependency 'minitest', '~>5.14'
|
77
80
|
a_gem.add_development_dependency 'rake', '~>13.0'
|
78
81
|
a_gem.add_development_dependency 'rdoc', '~>6.2'
|
79
|
-
a_gem.add_development_dependency 'rubocop', '~>1.
|
80
|
-
a_gem.add_development_dependency 'simplecov', '~>0.
|
82
|
+
a_gem.add_development_dependency 'rubocop', '~>1.8'
|
83
|
+
a_gem.add_development_dependency 'simplecov', '~>0.21'
|
81
84
|
|
82
85
|
a_gem.requirements = a_gem.required_ruby_version.to_s, a_gem.dependencies.to_s
|
83
86
|
|
84
|
-
begin
|
87
|
+
a_gem.post_install_message = begin
|
85
88
|
require 'changelog'
|
86
89
|
rescue LoadError
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
+
"Thank you for using #{a_gem.name} version #{a_gem.version}."
|
91
|
+
else
|
92
|
+
CHANGELOG.new.version_changes
|
90
93
|
end
|
91
94
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wwwjdic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 16.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marco Bresciani
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2021-07-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: i18n
|
@@ -32,28 +32,28 @@ dependencies:
|
|
32
32
|
requirements:
|
33
33
|
- - "~>"
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: '2.
|
35
|
+
version: '2.5'
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '2.
|
42
|
+
version: '2.5'
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: bundler
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - "~>"
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: '2.
|
49
|
+
version: '2.2'
|
50
50
|
type: :development
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - "~>"
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: '2.
|
56
|
+
version: '2.2'
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: minitest
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
@@ -102,28 +102,28 @@ dependencies:
|
|
102
102
|
requirements:
|
103
103
|
- - "~>"
|
104
104
|
- !ruby/object:Gem::Version
|
105
|
-
version: '1.
|
105
|
+
version: '1.8'
|
106
106
|
type: :development
|
107
107
|
prerelease: false
|
108
108
|
version_requirements: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
110
|
- - "~>"
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: '1.
|
112
|
+
version: '1.8'
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: simplecov
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
117
|
- - "~>"
|
118
118
|
- !ruby/object:Gem::Version
|
119
|
-
version: '0.
|
119
|
+
version: '0.21'
|
120
120
|
type: :development
|
121
121
|
prerelease: false
|
122
122
|
version_requirements: !ruby/object:Gem::Requirement
|
123
123
|
requirements:
|
124
124
|
- - "~>"
|
125
125
|
- !ruby/object:Gem::Version
|
126
|
-
version: '0.
|
126
|
+
version: '0.21'
|
127
127
|
description: |-
|
128
128
|
This gem uses WWWJDic Backdoor Entry/API as described by
|
129
129
|
http://www.edrdg.org/wwwjdic/wwwjdicinf.html#backdoor_tag to to
|
@@ -278,22 +278,8 @@ metadata:
|
|
278
278
|
changelog_uri: http://hg.savannah.nongnu.org/hgweb/wwwjdic/file/tip/CHANGELOG
|
279
279
|
source_code_uri: http://hg.savannah.nongnu.org/hgweb/wwwjdic/file/
|
280
280
|
bug_tracker_uri: https://savannah.nongnu.org/bugs/?group=wwwjdic
|
281
|
-
documentation_uri: http://hg.savannah.nongnu.org/hgweb/wwwjdic/tag/
|
282
|
-
post_install_message:
|
283
|
-
from \"exact\" to \"english\".\n[\e[32mVersion 15.0.0\e[0m] MAJOR changed Monash
|
284
|
-
dictionary server reference URL.\n[\e[32mVersion 15.0.0\e[0m] MINOR introduce compliance
|
285
|
-
to REUSE tool from FSF Europe\n[\e[32mVersion 15.0.0\e[0m] MINOR add dependency
|
286
|
-
to Rubocop\n[\e[32mVersion 15.0.0\e[0m] PATCH update copyright notices\n[\e[32mVersion
|
287
|
-
15.0.0\e[0m] PATCH remove test data form I18N files.\n[\e[32mVersion 15.0.0\e[0m]
|
288
|
-
PATCH update gem dependencies.\n[\e[32mVersion 15.0.0\e[0m] PATCH update IntelliJ
|
289
|
-
IDEA (RubyGem) project configuration.\n[\e[32mVersion 15.0.0\e[0m] PATCH update
|
290
|
-
to Ruby 2.7.x new things\n[\e[32mVersion 15.0.0\e[0m] IN PROGRESS: restoring key
|
291
|
-
configuration as allowed parameter, to allow user asking for specific searches.
|
292
|
-
Search key currently fixed to 'E' (exact match) type search.\n[\e[32mVersion 15.0.0\e[0m]
|
293
|
-
IN PROGRESS: improving application RDoc to better comply with SemVer point 1 (Software
|
294
|
-
using Semantic Versioning MUST declare a public API. This API could be declared
|
295
|
-
in the code itself or exist strictly in documentation. However it is done, it should
|
296
|
-
be precise and comprehensive.)\n"
|
281
|
+
documentation_uri: http://hg.savannah.nongnu.org/hgweb/wwwjdic/tag/16.0.0/
|
282
|
+
post_install_message: Thank you for using wwwjdic version 16.0.0.
|
297
283
|
rdoc_options: []
|
298
284
|
require_paths:
|
299
285
|
- lib
|
@@ -301,22 +287,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
301
287
|
requirements:
|
302
288
|
- - "~>"
|
303
289
|
- !ruby/object:Gem::Version
|
304
|
-
version: '
|
290
|
+
version: '3.0'
|
305
291
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
306
292
|
requirements:
|
307
293
|
- - ">="
|
308
294
|
- !ruby/object:Gem::Version
|
309
295
|
version: '0'
|
310
296
|
requirements:
|
311
|
-
- "~>
|
297
|
+
- "~> 3.0"
|
312
298
|
- '[<Gem::Dependency type=:runtime name="i18n" requirements="~> 1.8">, <Gem::Dependency
|
313
|
-
type=:runtime name="json" requirements="~> 2.
|
314
|
-
name="bundler" requirements="~> 2.
|
299
|
+
type=:runtime name="json" requirements="~> 2.5">, <Gem::Dependency type=:development
|
300
|
+
name="bundler" requirements="~> 2.2">, <Gem::Dependency type=:development name="minitest"
|
315
301
|
requirements="~> 5.14">, <Gem::Dependency type=:development name="rake" requirements="~>
|
316
302
|
13.0">, <Gem::Dependency type=:development name="rdoc" requirements="~> 6.2">, <Gem::Dependency
|
317
|
-
type=:development name="rubocop" requirements="~> 1.
|
318
|
-
name="simplecov" requirements="~> 0.
|
319
|
-
rubygems_version: 3.
|
303
|
+
type=:development name="rubocop" requirements="~> 1.8">, <Gem::Dependency type=:development
|
304
|
+
name="simplecov" requirements="~> 0.21">]'
|
305
|
+
rubygems_version: 3.2.5
|
320
306
|
signing_key:
|
321
307
|
specification_version: 4
|
322
308
|
summary: This gem uses WWWJDic Backdoor Entry/API as described by http://www.edrdg.org/wwwjdic/wwwjdicinf.html#backdoor_tag
|