wwwjdic 13.0.1 → 14.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 +19 -1
- data/Gemfile +1 -1
- data/README.md +79 -73
- data/Rakefile +2 -2
- data/acknowledgements.md +2 -2
- data/authors.md +2 -2
- data/copyright.md +4 -4
- data/examples/basics.rb +1 -1
- data/examples/translate.rb +1 -1
- data/examples/uri.rb +1 -1
- data/html/CHANGELOG.html +28 -7
- data/html/COPYING_md.html +7 -6
- data/html/Gemfile.html +8 -7
- data/html/Object.html +7 -4
- data/html/README_md.html +34 -47
- data/html/Rakefile.html +10 -9
- data/html/WWWJDic.html +11 -8
- data/html/WWWJDic/ParsableDuckType.html +9 -6
- data/html/WWWJDic/Parser.html +9 -6
- data/html/WWWJDic/Parsers.html +7 -4
- data/html/WWWJDic/Parsers/Dict.html +8 -5
- data/html/WWWJDic/Parsers/Display.html +8 -5
- data/html/WWWJDic/Parsers/Key.html +8 -5
- data/html/WWWJDic/Parsers/Search.html +8 -5
- data/html/WWWJDic/Parsers/Server.html +8 -5
- data/html/WWWJDic/Splitter.html +8 -5
- data/html/WWWJDic/Utils.html +8 -5
- data/html/WWWJDic/Utils/Downloader.html +7 -4
- data/html/WWWJDic/Utils/Downloader/Downloader.html +7 -4
- data/html/WWWJDic/Utils/Raisers.html +23 -20
- data/html/WWWJDic/WWWJDic.html +14 -11
- data/html/acknowledgements_md.html +9 -8
- data/html/authors_md.html +9 -8
- data/html/copyright_md.html +198 -195
- data/html/created.rid +57 -58
- data/html/css/rdoc.css +35 -6
- data/html/index.html +34 -47
- data/html/js/darkfish.js +22 -99
- data/html/js/navigation.js +4 -40
- data/html/js/navigation.js.gz +0 -0
- data/html/js/search.js +32 -31
- data/html/js/search_index.js +1 -1
- data/html/js/search_index.js.gz +0 -0
- data/html/js/searcher.js +6 -6
- data/html/js/searcher.js.gz +0 -0
- data/html/table_of_contents.html +10 -10
- data/lib/wwwjdic.rb +4 -2
- data/lib/wwwjdic/application.rb +8 -8
- data/lib/wwwjdic/constants.rb +1 -1
- data/lib/wwwjdic/locales/de.yml +3 -1
- data/lib/wwwjdic/locales/en.yml +3 -1
- data/lib/wwwjdic/locales/es.yml +3 -1
- data/lib/wwwjdic/locales/fr.yml +3 -2
- data/lib/wwwjdic/locales/hu.yml +3 -2
- data/lib/wwwjdic/locales/it.yml +3 -2
- data/lib/wwwjdic/locales/ja.yml +3 -3
- data/lib/wwwjdic/locales/nl.yml +3 -1
- data/lib/wwwjdic/locales/ru.yml +3 -1
- data/lib/wwwjdic/locales/sl.yml +3 -1
- data/lib/wwwjdic/locales/sv.yml +3 -1
- data/lib/wwwjdic/parser.rb +3 -3
- data/lib/wwwjdic/parsers/dict.rb +2 -2
- data/lib/wwwjdic/parsers/display.rb +2 -2
- data/lib/wwwjdic/parsers/key.rb +2 -2
- data/lib/wwwjdic/parsers/search.rb +2 -2
- data/lib/wwwjdic/parsers/server.rb +2 -2
- data/lib/wwwjdic/utils/downloader.rb +2 -2
- data/lib/wwwjdic/utils/raisers.rb +4 -3
- data/lib/wwwjdic/utils/splitter.rb +2 -2
- data/lib/wwwjdic/version.rb +16 -8
- data/test/test_helper.rb +4 -1
- data/test/test_wwwjdic.rb +4 -4
- data/test/wwwjdic/locales/de.yml +1 -1
- data/test/wwwjdic/locales/en.yml +1 -1
- data/test/wwwjdic/locales/es.yml +1 -1
- data/test/wwwjdic/locales/fr.yml +1 -1
- data/test/wwwjdic/locales/hu.yml +1 -1
- data/test/wwwjdic/locales/it.yml +3 -3
- data/test/wwwjdic/locales/ja.yml +1 -1
- data/test/wwwjdic/locales/nl.yml +1 -1
- data/test/wwwjdic/locales/ru.yml +1 -1
- data/test/wwwjdic/locales/sl.yml +1 -1
- data/test/wwwjdic/locales/sv.yml +1 -1
- data/test/wwwjdic/locales/test_locales.rb +11 -11
- data/test/wwwjdic/parsers/test_dict.rb +4 -4
- data/test/wwwjdic/parsers/test_display.rb +4 -4
- data/test/wwwjdic/parsers/test_key.rb +3 -3
- data/test/wwwjdic/parsers/test_server.rb +4 -4
- data/test/wwwjdic/test_application.rb +30 -30
- data/test/wwwjdic/test_parsable_duck_type.rb +3 -3
- data/test/wwwjdic/utils/test_downloader.rb +1 -1
- data/test/wwwjdic/utils/test_raisers.rb +1 -1
- data/wwwjdic.gemspec +15 -14
- metadata +26 -28
- data/html/js/jquery.js +0 -4
- data/html/wwwjdic_gemspec.html +0 -161
data/test/wwwjdic/locales/ja.yml
CHANGED
data/test/wwwjdic/locales/nl.yml
CHANGED
data/test/wwwjdic/locales/ru.yml
CHANGED
data/test/wwwjdic/locales/sl.yml
CHANGED
data/test/wwwjdic/locales/sv.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#--
|
2
2
|
# wwwjdic
|
3
|
-
# Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
|
3
|
+
# Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
|
4
4
|
#
|
5
5
|
# This file is part of wwwjdic.
|
6
6
|
#
|
@@ -29,16 +29,16 @@ describe WWWJDic::WWWJDic do
|
|
29
29
|
I18n.load_path = Dir[File.join(File.dirname(__FILE__), RELATIVE_PATH, '*.yml')]
|
30
30
|
end
|
31
31
|
|
32
|
-
subject {I18n.available_locales}
|
32
|
+
subject { I18n.available_locales }
|
33
33
|
|
34
34
|
it 'shall return at least one available locale' do
|
35
|
-
subject.wont_be_nil
|
36
|
-
subject.wont_be_empty
|
35
|
+
_(subject).wont_be_nil
|
36
|
+
_(subject).wont_be_empty
|
37
37
|
end
|
38
38
|
|
39
39
|
it 'shall contain at least English and Italiano' do
|
40
|
-
subject.must_include :en
|
41
|
-
subject.must_include :it
|
40
|
+
_(subject).must_include :en
|
41
|
+
_(subject).must_include :it
|
42
42
|
end
|
43
43
|
|
44
44
|
it 'shall contain a test.test signpost for each available locale' do
|
@@ -52,13 +52,13 @@ describe WWWJDic::WWWJDic do
|
|
52
52
|
I18n.locale = locale
|
53
53
|
|
54
54
|
translation = load_yaml_file(locale)
|
55
|
-
translation["#{locale}"]['test']['test'].wont_be_nil
|
55
|
+
_(translation["#{locale}"]['test']['test']).wont_be_nil
|
56
56
|
|
57
57
|
a_string = I18n.t('test.test')
|
58
|
-
a_string.wont_be_nil
|
59
|
-
a_string.wont_be_empty
|
60
|
-
a_string.wont_include 'translation missing'
|
61
|
-
a_string.must_equal translation["#{locale}"]['test']['test']
|
58
|
+
_(a_string).wont_be_nil
|
59
|
+
_(a_string).wont_be_empty
|
60
|
+
_(a_string).wont_include 'translation missing'
|
61
|
+
_(a_string).must_equal translation["#{locale}"]['test']['test']
|
62
62
|
end
|
63
63
|
end
|
64
64
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#--
|
2
2
|
# wwwjdic
|
3
|
-
# Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
|
3
|
+
# Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
|
4
4
|
#
|
5
5
|
# This file is part of wwwjdic.
|
6
6
|
#
|
@@ -29,7 +29,7 @@ describe WWWJDic::WWWJDic do
|
|
29
29
|
I18n.load_path = Dir[File.join(File.dirname(__FILE__), '/../../../lib/wwwjdic/locales/', '*.yml')]
|
30
30
|
end
|
31
31
|
|
32
|
-
subject {WWWJDic::Parsers::Dict.new}
|
32
|
+
subject { WWWJDic::Parsers::Dict.new }
|
33
33
|
|
34
34
|
describe 'when provided and invalid parameter' do
|
35
35
|
[nil, '', 42].each do |param|
|
@@ -56,7 +56,7 @@ describe WWWJDic::WWWJDic do
|
|
56
56
|
describe 'when using the dictionary code/number' do
|
57
57
|
WWWJDic::DICTIONARY_CODES.each do |value|
|
58
58
|
it "shall return '#{value}' when parameter is '#{value}'" do
|
59
|
-
subject.parse(value).must_equal value
|
59
|
+
_(subject.parse(value)).must_equal value
|
60
60
|
end
|
61
61
|
end
|
62
62
|
end
|
@@ -65,7 +65,7 @@ describe WWWJDic::WWWJDic do
|
|
65
65
|
WWWJDic::DICTIONARY_NAMES.each do |value|
|
66
66
|
translated = WWWJDic::DICTS_BY_NAMES[value]
|
67
67
|
it "shall return '#{translated}' when parameter is '#{value}'" do
|
68
|
-
subject.parse(value).must_equal translated
|
68
|
+
_(subject.parse(value)).must_equal translated
|
69
69
|
end
|
70
70
|
end
|
71
71
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#--
|
2
2
|
# wwwjdic
|
3
|
-
# Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
|
3
|
+
# Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
|
4
4
|
#
|
5
5
|
# This file is part of wwwjdic.
|
6
6
|
#
|
@@ -29,13 +29,13 @@ describe WWWJDic::WWWJDic do
|
|
29
29
|
I18n.load_path = Dir[File.join(File.dirname(__FILE__), '/../../../lib/wwwjdic/locales/', '*.yml')]
|
30
30
|
end
|
31
31
|
|
32
|
-
subject {WWWJDic::Parsers::Display.new}
|
32
|
+
subject { WWWJDic::Parsers::Display.new }
|
33
33
|
|
34
34
|
describe 'when a valid display mode is selected' do
|
35
35
|
WWWJDic::DISPLAY.each do |key, value|
|
36
36
|
it "shall return '#{value}' when parameter is '#{key}'" do
|
37
|
-
subject.parse(key).must_equal key
|
38
|
-
WWWJDic::DISPLAY[subject.parse(key)].must_equal value
|
37
|
+
_(subject.parse(key)).must_equal key
|
38
|
+
_(WWWJDic::DISPLAY[subject.parse(key)]).must_equal value
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#--
|
2
2
|
# wwwjdic
|
3
|
-
# Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
|
3
|
+
# Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
|
4
4
|
#
|
5
5
|
# This file is part of wwwjdic.
|
6
6
|
#
|
@@ -29,7 +29,7 @@ describe WWWJDic::WWWJDic do
|
|
29
29
|
I18n.load_path = Dir[File.join(File.dirname(__FILE__), '/../../../lib/wwwjdic/locales/', '*.yml')]
|
30
30
|
end
|
31
31
|
|
32
|
-
subject {WWWJDic::Parsers::Key.new}
|
32
|
+
subject { WWWJDic::Parsers::Key.new }
|
33
33
|
|
34
34
|
describe 'when provided and invalid parameter' do
|
35
35
|
[nil, '', 42].each do |param|
|
@@ -44,7 +44,7 @@ describe WWWJDic::WWWJDic do
|
|
44
44
|
describe 'when provided a key' do
|
45
45
|
WWWJDic::KEYS.each do |key, value|
|
46
46
|
it "shall return #{value} when parameter is #{key}" do
|
47
|
-
WWWJDic::KEYS[subject.parse(key)].must_equal value
|
47
|
+
_(WWWJDic::KEYS[subject.parse(key)]).must_equal value
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#--
|
2
2
|
# wwwjdic
|
3
|
-
# Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
|
3
|
+
# Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
|
4
4
|
#
|
5
5
|
# This file is part of wwwjdic.
|
6
6
|
#
|
@@ -29,13 +29,13 @@ describe WWWJDic::WWWJDic do
|
|
29
29
|
I18n.load_path = Dir[File.join(File.dirname(__FILE__), '/../../../lib/wwwjdic/locales/', '*.yml')]
|
30
30
|
end
|
31
31
|
|
32
|
-
subject {WWWJDic::Parsers::Server.new}
|
32
|
+
subject { WWWJDic::Parsers::Server.new }
|
33
33
|
|
34
34
|
describe 'when a valid server is selected' do
|
35
35
|
WWWJDic::URIS.each do |key, value|
|
36
36
|
it "shall return '#{value}' when parameter is '#{key}'" do
|
37
|
-
subject.parse(key).must_equal key
|
38
|
-
WWWJDic::URIS[subject.parse(key)].must_equal value
|
37
|
+
_(subject.parse(key)).must_equal key
|
38
|
+
_(WWWJDic::URIS[subject.parse(key)]).must_equal value
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#--
|
2
2
|
# wwwjdic
|
3
|
-
# Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
|
3
|
+
# Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
|
4
4
|
#
|
5
5
|
# This file is part of wwwjdic.
|
6
6
|
#
|
@@ -23,16 +23,16 @@ require_relative '../test_helper'
|
|
23
23
|
describe WWWJDic::WWWJDic do
|
24
24
|
describe 'when created' do
|
25
25
|
|
26
|
-
subject {WWWJDic::WWWJDic.new(WWWJDic::parser)}
|
26
|
+
subject { WWWJDic::WWWJDic.new(WWWJDic::parser) }
|
27
27
|
|
28
28
|
# Basic checks for instance and default results
|
29
29
|
it 'shall return a valid object' do
|
30
|
-
subject.wont_be_nil
|
31
|
-
subject.must_be_instance_of WWWJDic::WWWJDic
|
30
|
+
_(subject).wont_be_nil
|
31
|
+
_(subject).must_be_instance_of WWWJDic::WWWJDic
|
32
32
|
end
|
33
33
|
|
34
34
|
it 'shall return the URI with basic language' do
|
35
|
-
subject.to_s.must_equal WWWJDic::TEST_REFERENCE_URI
|
35
|
+
_(subject.to_s).must_equal WWWJDic::TEST_REFERENCE_URI
|
36
36
|
end
|
37
37
|
|
38
38
|
# Tests for server selection
|
@@ -46,7 +46,7 @@ describe WWWJDic::WWWJDic do
|
|
46
46
|
end
|
47
47
|
|
48
48
|
it 'shall return the reference URI' do
|
49
|
-
subject.to_s.must_equal WWWJDic::TEST_REFERENCE_URI
|
49
|
+
_(subject.to_s).must_equal WWWJDic::TEST_REFERENCE_URI
|
50
50
|
end
|
51
51
|
end
|
52
52
|
end
|
@@ -55,8 +55,8 @@ describe WWWJDic::WWWJDic do
|
|
55
55
|
describe "when server '#{name}' is selected" do
|
56
56
|
it "shall return the proper '#{uri}'" do
|
57
57
|
subject.server = name
|
58
|
-
subject.server.must_equal uri
|
59
|
-
subject.to_s.must_include uri
|
58
|
+
_(subject.server).must_equal uri
|
59
|
+
_(subject.to_s).must_include uri
|
60
60
|
end
|
61
61
|
end
|
62
62
|
end
|
@@ -73,7 +73,7 @@ describe WWWJDic::WWWJDic do
|
|
73
73
|
end
|
74
74
|
|
75
75
|
it 'shall return the reference URI' do
|
76
|
-
subject.to_s.must_equal WWWJDic::TEST_REFERENCE_URI
|
76
|
+
_(subject.to_s).must_equal WWWJDic::TEST_REFERENCE_URI
|
77
77
|
end
|
78
78
|
end
|
79
79
|
end
|
@@ -82,8 +82,8 @@ describe WWWJDic::WWWJDic do
|
|
82
82
|
describe "when dictionary '#{dict_number}' is selected" do
|
83
83
|
it "shall return the proper number '#{dict_number}'" do
|
84
84
|
subject.dictionary = dict_number
|
85
|
-
subject.dictionary.must_equal WWWJDic::DICTS_BY_CODES[dict_number]
|
86
|
-
subject.to_s.must_equal WWWJDic::URI_DEFAULT + dict_number + WWWJDic::DISPLAY[:regular]
|
85
|
+
_(subject.dictionary).must_equal WWWJDic::DICTS_BY_CODES[dict_number]
|
86
|
+
_(subject.to_s).must_equal WWWJDic::URI_DEFAULT + dict_number + WWWJDic::DISPLAY[:regular]
|
87
87
|
end
|
88
88
|
end
|
89
89
|
end
|
@@ -91,16 +91,16 @@ describe WWWJDic::WWWJDic do
|
|
91
91
|
it 'shall return the URI with basic dictionary when reset' do
|
92
92
|
subject.dictionary = 'R'
|
93
93
|
subject.reset
|
94
|
-
subject.to_s.must_equal WWWJDic::TEST_REFERENCE_URI
|
95
|
-
subject.dictionary.must_equal WWWJDic::DICTIONARY_NAMES[0]
|
94
|
+
_(subject.to_s).must_equal WWWJDic::TEST_REFERENCE_URI
|
95
|
+
_(subject.dictionary).must_equal WWWJDic::DICTIONARY_NAMES[0]
|
96
96
|
end
|
97
97
|
|
98
98
|
WWWJDic::DICTIONARY_NAMES.each do |dict_name|
|
99
99
|
describe "when dictionary '#{dict_name}' is selected" do
|
100
100
|
it "shall return the proper name '#{dict_name}'" do
|
101
101
|
subject.dictionary = dict_name
|
102
|
-
subject.dictionary.must_equal dict_name
|
103
|
-
subject.to_s.must_equal WWWJDic::URI_DEFAULT + WWWJDic::DICTS_BY_NAMES[dict_name] + WWWJDic::DISPLAY[:regular]
|
102
|
+
_(subject.dictionary).must_equal dict_name
|
103
|
+
_(subject.to_s).must_equal WWWJDic::URI_DEFAULT + WWWJDic::DICTS_BY_NAMES[dict_name] + WWWJDic::DISPLAY[:regular]
|
104
104
|
end
|
105
105
|
end
|
106
106
|
end
|
@@ -108,8 +108,8 @@ describe WWWJDic::WWWJDic do
|
|
108
108
|
it 'shall return the URI with basic dictionary when reset' do
|
109
109
|
subject.dictionary = 'Japanese-Italian'
|
110
110
|
subject.reset
|
111
|
-
subject.to_s.must_equal WWWJDic::TEST_REFERENCE_URI
|
112
|
-
subject.dictionary.must_equal WWWJDic::DICTIONARY_NAMES[0]
|
111
|
+
_(subject.to_s).must_equal WWWJDic::TEST_REFERENCE_URI
|
112
|
+
_(subject.dictionary).must_equal WWWJDic::DICTIONARY_NAMES[0]
|
113
113
|
end
|
114
114
|
end
|
115
115
|
|
@@ -138,24 +138,24 @@ describe WWWJDic::WWWJDic do
|
|
138
138
|
|
139
139
|
[:uri, :raw_uri, :json_uri].each do |a_method|
|
140
140
|
it "shall return URI containing '#{number}' for a '#{dict}' word for '#{a_method}' request" do
|
141
|
-
subject.send(a_method, a_word, dict: WWWJDic::AVAIL_LANGS[dict]).must_include number
|
141
|
+
_(subject.send(a_method, a_word, dict: WWWJDic::AVAIL_LANGS[dict])).must_include number
|
142
142
|
end
|
143
143
|
|
144
144
|
it "shall return URI containing '#{a_word}' for a '#{dict}' word for '#{a_method}' request" do
|
145
|
-
subject.send(a_method, a_word, dict: WWWJDic::AVAIL_LANGS[dict]).must_include CGI::escape(a_word).to_s
|
145
|
+
_(subject.send(a_method, a_word, dict: WWWJDic::AVAIL_LANGS[dict])).must_include CGI::escape(a_word).to_s
|
146
146
|
end
|
147
147
|
end
|
148
148
|
|
149
149
|
it 'shall override user-custom display parameter for raw display' do
|
150
|
-
subject.raw_uri(a_word, display: :regular, dict: WWWJDic::AVAIL_LANGS[dict]).must_include WWWJDic::DISPLAY[:raw]
|
150
|
+
_(subject.raw_uri(a_word, display: :regular, dict: WWWJDic::AVAIL_LANGS[dict])).must_include WWWJDic::DISPLAY[:raw]
|
151
151
|
end
|
152
152
|
|
153
153
|
it "shall return correct JSON data containing '#{a_word}' and the proper URI" do
|
154
154
|
json = subject.json_uri(a_word, dict: WWWJDic::AVAIL_LANGS[dict])
|
155
155
|
an_uri = subject.uri(a_word, dict: WWWJDic::AVAIL_LANGS[dict])
|
156
156
|
|
157
|
-
JSON.parse(json).keys.must_include a_word
|
158
|
-
JSON.parse(json)[a_word].must_equal an_uri
|
157
|
+
_(JSON.parse(json).keys).must_include a_word
|
158
|
+
_(JSON.parse(json)[a_word]).must_equal an_uri
|
159
159
|
end
|
160
160
|
end
|
161
161
|
end
|
@@ -190,24 +190,24 @@ describe WWWJDic::WWWJDic do
|
|
190
190
|
it 'shall create a saved file with the proper filename' do
|
191
191
|
filename = "File_#{a_word}"
|
192
192
|
subject.send(a_method, a_word, nil, filename)
|
193
|
-
File.exist?(filename).must_equal true
|
193
|
+
_(File.exist?(filename)).must_equal true
|
194
194
|
File.delete filename
|
195
195
|
end
|
196
196
|
|
197
197
|
it "shall return the translated word '#{a_word}'" do
|
198
198
|
translation = subject.send(a_method, a_word, dict: WWWJDic::AVAIL_LANGS[dict])
|
199
|
-
translation.wont_be_nil
|
200
|
-
translation.wont_be_empty
|
199
|
+
_(translation).wont_be_nil
|
200
|
+
_(translation).wont_be_empty
|
201
201
|
|
202
202
|
if a_method == :json_translate
|
203
|
-
JSON.parse(translation).wont_include '<TITLE>'
|
204
|
-
JSON.parse(translation).wont_include '<pre>'
|
205
|
-
JSON.parse(translation).keys.must_include a_word
|
203
|
+
_(JSON.parse(translation)).wont_include '<TITLE>'
|
204
|
+
_(JSON.parse(translation)).wont_include '<pre>'
|
205
|
+
_(JSON.parse(translation).keys).must_include a_word
|
206
206
|
|
207
207
|
an_uri = subject.raw_uri(a_word, dict: WWWJDic::AVAIL_LANGS[dict])
|
208
|
-
an_uri.must_include number
|
208
|
+
_(an_uri).must_include number
|
209
209
|
|
210
|
-
JSON.parse(translation)[a_word].must_equal an_uri
|
210
|
+
_(JSON.parse(translation)[a_word]).must_equal an_uri
|
211
211
|
end
|
212
212
|
end
|
213
213
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#--
|
2
2
|
# wwwjdic
|
3
|
-
# Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
|
3
|
+
# Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
|
4
4
|
#
|
5
5
|
# This file is part of wwwjdic.
|
6
6
|
#
|
@@ -24,14 +24,14 @@ module WWWJDic
|
|
24
24
|
# purposes.
|
25
25
|
#
|
26
26
|
# Author:: {Marco Bresciani}[mailto:marcobresciani_1974@libero.it]
|
27
|
-
# Copyright:: Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
|
27
|
+
# Copyright:: Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
|
28
28
|
# License:: GNU General Public License version 3
|
29
29
|
module ParsableDuckType
|
30
30
|
|
31
31
|
# The method that tests the parsable duck type interface and its
|
32
32
|
# +parse+ method.
|
33
33
|
def test_parsable_duck_type
|
34
|
-
subject.must_respond_to :parse unless subject.nil?
|
34
|
+
_(subject).must_respond_to :parse unless subject.nil?
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
data/wwwjdic.gemspec
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# wwwjdic
|
2
|
-
# Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
|
2
|
+
# Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
|
3
3
|
#
|
4
4
|
# This file is part of wwwjdic.
|
5
5
|
#
|
@@ -20,13 +20,13 @@ require_relative 'lib/wwwjdic/version'
|
|
20
20
|
|
21
21
|
SUMMARY = 'This gem uses WWWJDic Backdoor Entry/API as described by
|
22
22
|
http://www.edrdg.org/wwwjdic/wwwjdicinf.html#backdoor_tag to to
|
23
|
-
interact with WWWJDic and translate to and from Japanese language.'
|
23
|
+
interact with WWWJDic and translate to and from Japanese language.'.freeze
|
24
24
|
|
25
25
|
Gem::Specification.new do |a_gem|
|
26
26
|
a_gem.name = 'wwwjdic'
|
27
27
|
a_gem.version = WWWJDic::VERSION
|
28
28
|
a_gem.license = 'GPL-3.0'
|
29
|
-
a_gem.licenses = %w
|
29
|
+
a_gem.licenses = %w[GPL-3.0 BSD-3-Clause]
|
30
30
|
a_gem.author = 'Marco Bresciani'
|
31
31
|
a_gem.authors = ['Marco Bresciani', '新部裕', 'Jon Maken']
|
32
32
|
a_gem.email = 'marcobresciani_1974@libero.it'
|
@@ -41,26 +41,27 @@ Gem::Specification.new do |a_gem|
|
|
41
41
|
project by registering to Savannah and ask to be part of the 'wwwjdic'
|
42
42
|
project!"
|
43
43
|
|
44
|
-
COMMON_FILES = %w
|
45
|
-
|
44
|
+
COMMON_FILES = %w[acknowledgements.md authors.md CHANGELOG COPYING.md
|
45
|
+
copyright.md Gemfile wwwjdic.gemspec Rakefile
|
46
|
+
README.md]
|
46
47
|
|
47
48
|
a_gem.files = Dir.glob('{examples,html,lib,test}/**/*') + COMMON_FILES
|
48
49
|
a_gem.test_files = Dir.glob('test/**/test_*.rb')
|
49
50
|
a_gem.require_path = 'lib'
|
50
|
-
a_gem.require_paths = %w
|
51
|
+
a_gem.require_paths = %w[lib]
|
51
52
|
a_gem.extra_rdoc_files = COMMON_FILES
|
52
53
|
|
53
|
-
a_gem.required_ruby_version = '~> 2.
|
54
|
+
a_gem.required_ruby_version = '~> 2.7'
|
54
55
|
a_gem.rubygems_version = '~> 3.0'
|
55
56
|
|
56
|
-
a_gem.add_runtime_dependency 'i18n', '~>1.
|
57
|
-
a_gem.add_runtime_dependency 'json', '~>2.
|
57
|
+
a_gem.add_runtime_dependency 'i18n', '~>1.8'
|
58
|
+
a_gem.add_runtime_dependency 'json', '~>2.3'
|
58
59
|
|
59
|
-
a_gem.add_development_dependency 'bundler', '~>2.
|
60
|
-
a_gem.add_development_dependency 'minitest', '~>5.
|
61
|
-
a_gem.add_development_dependency 'rake', '~>
|
62
|
-
a_gem.add_development_dependency 'rdoc', '~>6.
|
63
|
-
a_gem.add_development_dependency 'simplecov', '~>0.
|
60
|
+
a_gem.add_development_dependency 'bundler', '~>2.1'
|
61
|
+
a_gem.add_development_dependency 'minitest', '~>5.14'
|
62
|
+
a_gem.add_development_dependency 'rake', '~>13.0'
|
63
|
+
a_gem.add_development_dependency 'rdoc', '~>6.2'
|
64
|
+
a_gem.add_development_dependency 'simplecov', '~>0.18'
|
64
65
|
|
65
66
|
a_gem.requirements = a_gem.required_ruby_version.to_s, a_gem.dependencies.to_s
|
66
67
|
|