gravaty 10.0.0 → 11.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +7 -0
  3. data/Gemfile +5 -1
  4. data/README.md +219 -212
  5. data/Rakefile +9 -3
  6. data/copyright.md +33 -136
  7. data/examples/avatar.rb +70 -43
  8. data/examples/basics.rb +30 -20
  9. data/examples/profile.rb +77 -50
  10. data/examples/xmlrpc.rb +24 -10
  11. data/gravaty.gemspec +46 -25
  12. data/html/CHANGELOG.html +13 -20
  13. data/html/COPYING_md.html +8 -24
  14. data/html/Gemfile.html +7 -21
  15. data/html/Gravaty.html +49 -113
  16. data/html/Gravaty/Gravaty.html +138 -343
  17. data/html/Gravaty/ParsableDuckType.html +14 -33
  18. data/html/Gravaty/Parser.html +27 -66
  19. data/html/Gravaty/Parsers.html +3 -11
  20. data/html/Gravaty/Parsers/Avatar.html +19 -36
  21. data/html/Gravaty/Parsers/Callback.html +21 -37
  22. data/html/Gravaty/Parsers/Default.html +28 -45
  23. data/html/Gravaty/Parsers/Force.html +21 -37
  24. data/html/Gravaty/Parsers/Format.html +22 -42
  25. data/html/Gravaty/Parsers/Pixelsize.html +22 -42
  26. data/html/Gravaty/Parsers/Rating.html +22 -42
  27. data/html/Gravaty/Parsers/Secure.html +19 -36
  28. data/html/Gravaty/Parsers/Type.html +22 -42
  29. data/html/Gravaty/Utils.html +11 -13
  30. data/html/Gravaty/Utils/Downloader.html +3 -11
  31. data/html/Gravaty/Utils/Downloader/Downloader.html +25 -59
  32. data/html/Gravaty/Utils/Raisers.html +24 -55
  33. data/html/Gravaty/Utils/Rfc5322.html +12 -19
  34. data/html/Gravaty/Utils/RpcConnector.html +11 -13
  35. data/html/Gravaty/Utils/RpcConnector/RpcConnector.html +33 -73
  36. data/html/Object.html +728 -57
  37. data/html/README_md.html +105 -100
  38. data/html/Rakefile.html +9 -23
  39. data/html/copyright_md.html +17 -119
  40. data/html/created.rid +48 -55
  41. data/html/css/rdoc.css +1 -1
  42. data/html/index.html +97 -114
  43. data/html/js/navigation.js.gz +0 -0
  44. data/html/js/search_index.js +1 -1
  45. data/html/js/search_index.js.gz +0 -0
  46. data/html/js/searcher.js.gz +0 -0
  47. data/html/table_of_contents.html +219 -651
  48. data/lib/gravaty.rb +22 -15
  49. data/lib/gravaty/application.rb +40 -25
  50. data/lib/gravaty/constants.rb +20 -11
  51. data/lib/gravaty/locales/en.yml +9 -3
  52. data/lib/gravaty/locales/it.yml +9 -3
  53. data/lib/gravaty/locales/ja.yml +7 -4
  54. data/lib/gravaty/parser.rb +16 -10
  55. data/lib/gravaty/parsers/avatar.rb +11 -3
  56. data/lib/gravaty/parsers/callback.rb +13 -4
  57. data/lib/gravaty/parsers/default.rb +24 -16
  58. data/lib/gravaty/parsers/force.rb +12 -2
  59. data/lib/gravaty/parsers/format.rb +11 -2
  60. data/lib/gravaty/parsers/pixelsize.rb +12 -3
  61. data/lib/gravaty/parsers/rating.rb +12 -3
  62. data/lib/gravaty/parsers/secure.rb +11 -2
  63. data/lib/gravaty/parsers/type.rb +11 -2
  64. data/lib/gravaty/utils/downloader.rb +98 -96
  65. data/lib/gravaty/utils/raisers.rb +19 -12
  66. data/lib/gravaty/utils/rfc5322.rb +54 -41
  67. data/lib/gravaty/utils/rpc_connector.rb +19 -11
  68. data/lib/gravaty/version.rb +10 -2
  69. data/test/gravaty/locales/en.yml +29 -0
  70. data/test/gravaty/locales/it.yml +29 -0
  71. data/test/gravaty/locales/ja.yml +27 -0
  72. data/test/gravaty/locales/test_locales.rb +17 -13
  73. data/test/gravaty/parsers/test_avatar.rb +9 -1
  74. data/test/gravaty/parsers/test_callback.rb +12 -4
  75. data/test/gravaty/parsers/test_default.rb +25 -21
  76. data/test/gravaty/parsers/test_force.rb +9 -1
  77. data/test/gravaty/parsers/test_format.rb +18 -11
  78. data/test/gravaty/parsers/test_pixelsize.rb +19 -12
  79. data/test/gravaty/parsers/test_rating.rb +18 -11
  80. data/test/gravaty/parsers/test_secure.rb +9 -1
  81. data/test/gravaty/parsers/test_type.rb +14 -5
  82. data/test/gravaty/test_application.rb +14 -6
  83. data/test/gravaty/test_avatar.rb +94 -59
  84. data/test/gravaty/test_parser.rb +11 -5
  85. data/test/gravaty/test_profile.rb +47 -25
  86. data/test/gravaty/utils/test_downloader.rb +43 -28
  87. data/test/gravaty/utils/test_raisers.rb +42 -26
  88. data/test/gravaty/utils/test_rfc5322.rb +35 -13
  89. data/test/gravaty/utils/test_rpc_connector.rb +83 -39
  90. data/test/test_gravaty.rb +12 -4
  91. data/test/test_helper.rb +15 -9
  92. metadata +54 -40
  93. data/ISSUES.md +0 -62
  94. data/acknowledgements.md +0 -66
  95. data/authors.md +0 -63
  96. data/examples/cacert.pem +0 -3466
  97. data/html/ISSUES_md.html +0 -166
  98. data/html/acknowledgements_md.html +0 -161
  99. data/html/authors_md.html +0 -174
  100. data/html/examples/cacert_pem.html +0 -1078
@@ -1,6 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #--
2
4
  # gravaty
3
- # Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
5
+ # rubocop:disable Style/AsciiComments
6
+ # © 2013 Marco Bresciani
7
+ # rubocop:enable Style/AsciiComments
4
8
  #
5
9
  # This file is part of gravaty.
6
10
  #
@@ -16,6 +20,10 @@
16
20
  #
17
21
  # You should have received a copy of the GNU General Public License
18
22
  # along with gravaty. If not, see <http://www.gnu.org/licenses/>.
23
+ #
24
+ # SPDX-FileCopyrightText: 2013 Marco Bresciani
25
+ #
26
+ # SPDX-License-Identifier: GPL-3.0-or-later
19
27
  #++
20
28
 
21
29
  require_relative '../../test_helper'
@@ -1,6 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #--
2
4
  # gravaty
3
- # Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
5
+ # rubocop:disable Style/AsciiComments
6
+ # © 2013 Marco Bresciani
7
+ # rubocop:enable Style/AsciiComments
4
8
  #
5
9
  # This file is part of gravaty.
6
10
  #
@@ -16,6 +20,10 @@
16
20
  #
17
21
  # You should have received a copy of the GNU General Public License
18
22
  # along with gravaty. If not, see <http://www.gnu.org/licenses/>.
23
+ #
24
+ # SPDX-FileCopyrightText: 2013 Marco Bresciani
25
+ #
26
+ # SPDX-License-Identifier: GPL-3.0-or-later
19
27
  #++
20
28
 
21
29
  require_relative '../../test_helper'
@@ -30,9 +38,9 @@ describe Gravaty::Gravaty do
30
38
 
31
39
  subject { Gravaty::Parsers::Callback.new }
32
40
 
33
- %w(test sample_callback).each do |value|
34
- [[nil, ''], ['', ''], %W(#{value} callback=#{value})]
35
- .each do |pair|
41
+ %w[test sample_callback].each do |value|
42
+ [[nil, ''], ['', ''], %W[#{value} callback=#{value}]]
43
+ .each do |pair|
36
44
  it "shall return '#{pair[1]}' when parameter is '#{pair[0]}'" do
37
45
  _(subject.parse(pair[0])).must_equal pair[1]
38
46
  end
@@ -1,6 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #--
2
4
  # gravaty
3
- # Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
5
+ # rubocop:disable Style/AsciiComments
6
+ # © 2013 Marco Bresciani
7
+ # rubocop:enable Style/AsciiComments
4
8
  #
5
9
  # This file is part of gravaty.
6
10
  #
@@ -16,6 +20,10 @@
16
20
  #
17
21
  # You should have received a copy of the GNU General Public License
18
22
  # along with gravaty. If not, see <http://www.gnu.org/licenses/>.
23
+ #
24
+ # SPDX-FileCopyrightText: 2013 Marco Bresciani
25
+ #
26
+ # SPDX-License-Identifier: GPL-3.0-or-later
19
27
  #++
20
28
 
21
29
  require 'cgi'
@@ -28,15 +36,16 @@ describe Gravaty::Gravaty do
28
36
 
29
37
  before do
30
38
  I18n.load_path = Dir[File.join(
31
- File.dirname(__FILE__),
32
- '/../../../lib/gravaty/locales/', '*.yml')]
39
+ File.dirname(__FILE__),
40
+ '/../../../lib/gravaty/locales/', '*.yml'
41
+ )]
33
42
  @parser = subject
34
43
  end
35
44
 
36
45
  subject { Gravaty::Parsers::Default.new }
37
46
 
38
47
  Gravaty::DEFAULT_OPTIONS.each do |value|
39
- [[nil, ''], ['', ''], %W(#{value} d=#{value})].each do |pair|
48
+ [[nil, ''], ['', ''], %W[#{value} d=#{value}]].each do |pair|
40
49
  it "shall return '#{pair[1]}' when parameter is '#{pair[0]}'" do
41
50
  _(subject.parse(pair[0])).must_equal pair[1]
42
51
  end
@@ -45,7 +54,7 @@ describe Gravaty::Gravaty do
45
54
 
46
55
  Gravaty::IMAGES_FORMATS.each do |extension|
47
56
  value = "http://www.example.com/images/example.#{extension}"
48
- escaped = "d=#{CGI::escape(value)}"
57
+ escaped = "d=#{CGI.escape(value)}"
49
58
 
50
59
  it "shall return '#{escaped}' when parameter is '#{value}'" do
51
60
  _(subject.parse(value)).must_equal escaped
@@ -54,26 +63,21 @@ describe Gravaty::Gravaty do
54
63
 
55
64
  describe 'with invalid default URI image URI' do
56
65
  it 'shall raise exception' do
57
- begin
58
- subject.parse('http://www.example.com/images/example.svg')
59
- .must_raise ArgumentError
60
- rescue ArgumentError => aErr
61
- _(aErr).wont_be_nil
62
- _(aErr.message).wont_be_nil
63
- _(aErr.message).wont_be_empty
64
- end
66
+ subject.parse('http://www.example.com/images/example.svg')
67
+ .must_raise ArgumentError
68
+ rescue ArgumentError => e
69
+ _(e).wont_be_nil
70
+ _(e.message).wont_be_nil
71
+ _(e.message).wont_be_empty
65
72
  end
66
73
 
67
74
  it 'shall raise exception' do
68
- begin
69
- subject.parse('svg').must_raise ArgumentError
70
- rescue ArgumentError => aErr
71
- _(aErr).wont_be_nil
72
- _(aErr.message).wont_be_nil
73
- _(aErr.message).wont_be_empty
74
- end
75
+ subject.parse('svg').must_raise ArgumentError
76
+ rescue ArgumentError => e
77
+ _(e).wont_be_nil
78
+ _(e.message).wont_be_nil
79
+ _(e.message).wont_be_empty
75
80
  end
76
81
  end
77
-
78
82
  end
79
83
  end
@@ -1,6 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #--
2
4
  # gravaty
3
- # Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
5
+ # rubocop:disable Style/AsciiComments
6
+ # © 2013 Marco Bresciani
7
+ # rubocop:enable Style/AsciiComments
4
8
  #
5
9
  # This file is part of gravaty.
6
10
  #
@@ -16,6 +20,10 @@
16
20
  #
17
21
  # You should have received a copy of the GNU General Public License
18
22
  # along with gravaty. If not, see <http://www.gnu.org/licenses/>.
23
+ #
24
+ # SPDX-FileCopyrightText: 2013 Marco Bresciani
25
+ #
26
+ # SPDX-License-Identifier: GPL-3.0-or-later
19
27
  #++
20
28
 
21
29
  require_relative '../../test_helper'
@@ -1,6 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #--
2
4
  # gravaty
3
- # Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
5
+ # rubocop:disable Style/AsciiComments
6
+ # © 2013 Marco Bresciani
7
+ # rubocop:enable Style/AsciiComments
4
8
  #
5
9
  # This file is part of gravaty.
6
10
  #
@@ -16,6 +20,10 @@
16
20
  #
17
21
  # You should have received a copy of the GNU General Public License
18
22
  # along with gravaty. If not, see <http://www.gnu.org/licenses/>.
23
+ #
24
+ # SPDX-FileCopyrightText: 2013 Marco Bresciani
25
+ #
26
+ # SPDX-License-Identifier: GPL-3.0-or-later
19
27
  #++
20
28
 
21
29
  require_relative '../../test_helper'
@@ -26,15 +34,16 @@ describe Gravaty::Gravaty do
26
34
 
27
35
  before do
28
36
  I18n.load_path = Dir[File.join(
29
- File.dirname(__FILE__),
30
- '/../../../lib/gravaty/locales/', '*.yml')]
37
+ File.dirname(__FILE__),
38
+ '/../../../lib/gravaty/locales/', '*.yml'
39
+ )]
31
40
  @parser = subject
32
41
  end
33
42
 
34
43
  subject { Gravaty::Parsers::Format.new }
35
44
 
36
45
  Gravaty::PROFILE_FORMATS.each do |value|
37
- [[nil, ''], %W(#{value} .#{value.downcase})].each do |pair|
46
+ [[nil, ''], %W[#{value} .#{value.downcase}]].each do |pair|
38
47
  it "shall return '#{pair[1]}' when parameter is '#{pair[0]}'" do
39
48
  _(subject.parse(pair[0])).must_equal pair[1]
40
49
  end
@@ -42,13 +51,11 @@ describe Gravaty::Gravaty do
42
51
  end
43
52
 
44
53
  it 'shall raise exception with invalid default image extension' do
45
- begin
46
- subject.parse('svg').must_raise ArgumentError
47
- rescue ArgumentError => aErr
48
- _(aErr).wont_be_nil
49
- _(aErr.message).wont_be_nil
50
- _(aErr.message).wont_be_empty
51
- end
54
+ subject.parse('svg').must_raise ArgumentError
55
+ rescue ArgumentError => e
56
+ _(e).wont_be_nil
57
+ _(e.message).wont_be_nil
58
+ _(e.message).wont_be_empty
52
59
  end
53
60
  end
54
61
  end
@@ -1,6 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #--
2
4
  # gravaty
3
- # Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
5
+ # rubocop:disable Style/AsciiComments
6
+ # © 2013 Marco Bresciani
7
+ # rubocop:enable Style/AsciiComments
4
8
  #
5
9
  # This file is part of gravaty.
6
10
  #
@@ -16,6 +20,10 @@
16
20
  #
17
21
  # You should have received a copy of the GNU General Public License
18
22
  # along with gravaty. If not, see <http://www.gnu.org/licenses/>.
23
+ #
24
+ # SPDX-FileCopyrightText: 2013 Marco Bresciani
25
+ #
26
+ # SPDX-License-Identifier: GPL-3.0-or-later
19
27
  #++
20
28
 
21
29
  require_relative '../../test_helper'
@@ -26,8 +34,9 @@ describe Gravaty::Gravaty do
26
34
 
27
35
  before do
28
36
  I18n.load_path = Dir[File.join(
29
- File.dirname(__FILE__),
30
- '/../../../lib/gravaty/locales/', '*.yml')]
37
+ File.dirname(__FILE__),
38
+ '/../../../lib/gravaty/locales/', '*.yml'
39
+ )]
31
40
  @parser = subject
32
41
  end
33
42
 
@@ -38,19 +47,17 @@ describe Gravaty::Gravaty do
38
47
  end
39
48
 
40
49
  Gravaty::ALLOWED_SIZES.each do |value|
41
- it "shall return s='#{value.to_s}' when parameter is '#{value}'" do
42
- _(subject.parse(value)).must_equal "s=#{value.to_s}"
50
+ it "shall return s='#{value}' when parameter is '#{value}'" do
51
+ _(subject.parse(value)).must_equal "s=#{value}"
43
52
  end
44
53
  end
45
54
 
46
55
  it 'shall raise an exception when provided with invalid rating' do
47
- begin
48
- subject.parse(0).must_raise ArgumentError
49
- rescue ArgumentError => aErr
50
- _(aErr).wont_be_nil
51
- _(aErr.message).wont_be_nil
52
- _(aErr.message).wont_be_empty
53
- end
56
+ subject.parse(0).must_raise ArgumentError
57
+ rescue ArgumentError => e
58
+ _(e).wont_be_nil
59
+ _(e.message).wont_be_nil
60
+ _(e.message).wont_be_empty
54
61
  end
55
62
  end
56
63
  end
@@ -1,6 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #--
2
4
  # gravaty
3
- # Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
5
+ # rubocop:disable Style/AsciiComments
6
+ # © 2013 Marco Bresciani
7
+ # rubocop:enable Style/AsciiComments
4
8
  #
5
9
  # This file is part of gravaty.
6
10
  #
@@ -16,6 +20,10 @@
16
20
  #
17
21
  # You should have received a copy of the GNU General Public License
18
22
  # along with gravaty. If not, see <http://www.gnu.org/licenses/>.
23
+ #
24
+ # SPDX-FileCopyrightText: 2013 Marco Bresciani
25
+ #
26
+ # SPDX-License-Identifier: GPL-3.0-or-later
19
27
  #++
20
28
 
21
29
  require_relative '../../test_helper'
@@ -26,15 +34,16 @@ describe Gravaty::Gravaty do
26
34
 
27
35
  before do
28
36
  I18n.load_path = Dir[File.join(
29
- File.dirname(__FILE__),
30
- '/../../../lib/gravaty/locales/', '*.yml')]
37
+ File.dirname(__FILE__),
38
+ '/../../../lib/gravaty/locales/', '*.yml'
39
+ )]
31
40
  @parser = subject
32
41
  end
33
42
 
34
43
  subject { Gravaty::Parsers::Rating.new }
35
44
 
36
45
  Gravaty::RATING_OPTIONS.each do |value|
37
- [[nil, ''], %W(#{value} rating=#{value.downcase})].each do |pair|
46
+ [[nil, ''], %W[#{value} rating=#{value.downcase}]].each do |pair|
38
47
  it "shall return '#{pair[1]}' when parameter is '#{pair[0]}'" do
39
48
  _(subject.parse(pair[0])).must_equal pair[1]
40
49
  end
@@ -42,13 +51,11 @@ describe Gravaty::Gravaty do
42
51
  end
43
52
 
44
53
  it 'shall raise an exception when provided with invalid rating' do
45
- begin
46
- subject.parse('xxx').must_raise ArgumentError
47
- rescue ArgumentError => aErr
48
- _(aErr).wont_be_nil
49
- _(aErr.message).wont_be_nil
50
- _(aErr.message).wont_be_empty
51
- end
54
+ subject.parse('xxx').must_raise ArgumentError
55
+ rescue ArgumentError => e
56
+ _(e).wont_be_nil
57
+ _(e.message).wont_be_nil
58
+ _(e.message).wont_be_empty
52
59
  end
53
60
  end
54
61
  end
@@ -1,6 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #--
2
4
  # gravaty
3
- # Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
5
+ # rubocop:disable Style/AsciiComments
6
+ # © 2013 Marco Bresciani
7
+ # rubocop:enable Style/AsciiComments
4
8
  #
5
9
  # This file is part of gravaty.
6
10
  #
@@ -16,6 +20,10 @@
16
20
  #
17
21
  # You should have received a copy of the GNU General Public License
18
22
  # along with gravaty. If not, see <http://www.gnu.org/licenses/>.
23
+ #
24
+ # SPDX-FileCopyrightText: 2013 Marco Bresciani
25
+ #
26
+ # SPDX-License-Identifier: GPL-3.0-or-later
19
27
  #++
20
28
 
21
29
  require_relative '../../test_helper'
@@ -1,6 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #--
2
4
  # gravaty
3
- # Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
5
+ # rubocop:disable Style/AsciiComments
6
+ # © 2013 Marco Bresciani
7
+ # rubocop:enable Style/AsciiComments
4
8
  #
5
9
  # This file is part of gravaty.
6
10
  #
@@ -16,6 +20,10 @@
16
20
  #
17
21
  # You should have received a copy of the GNU General Public License
18
22
  # along with gravaty. If not, see <http://www.gnu.org/licenses/>.
23
+ #
24
+ # SPDX-FileCopyrightText: 2013 Marco Bresciani
25
+ #
26
+ # SPDX-License-Identifier: GPL-3.0-or-later
19
27
  #++
20
28
 
21
29
  require_relative '../../test_helper'
@@ -26,15 +34,16 @@ describe Gravaty::Gravaty do
26
34
 
27
35
  before do
28
36
  I18n.load_path = Dir[File.join(
29
- File.dirname(__FILE__),
30
- '/../../../lib/gravaty/locales/',
31
- '*.yml')]
37
+ File.dirname(__FILE__),
38
+ '/../../../lib/gravaty/locales/',
39
+ '*.yml'
40
+ )]
32
41
  end
33
42
 
34
43
  subject { Gravaty::Parsers::Type.new }
35
44
 
36
45
  Gravaty::AVATAR_FORMATS.each do |value|
37
- [[nil, ''], %W(#{value} .#{value.downcase})].each do |pair|
46
+ [[nil, ''], %W[#{value} .#{value.downcase}]].each do |pair|
38
47
  it "shall return '#{pair[1]}' when parameter is '#{pair[0]}'" do
39
48
  _(subject.parse(pair[0])).must_equal pair[1]
40
49
  end
@@ -1,6 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #--
2
4
  # gravaty
3
- # Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
5
+ # rubocop:disable Style/AsciiComments
6
+ # © 2013 Marco Bresciani
7
+ # rubocop:enable Style/AsciiComments
4
8
  #
5
9
  # This file is part of gravaty.
6
10
  #
@@ -16,15 +20,20 @@
16
20
  #
17
21
  # You should have received a copy of the GNU General Public License
18
22
  # along with gravaty. If not, see <http://www.gnu.org/licenses/>.
23
+ #
24
+ # SPDX-FileCopyrightText: 2013 Marco Bresciani
25
+ #
26
+ # SPDX-License-Identifier: GPL-3.0-or-later
19
27
  #++
20
28
 
21
29
  require_relative '../test_helper'
22
30
 
23
31
  describe Gravaty::Gravaty do
24
32
  describe 'when created with a valid email address' do
25
-
26
- subject { Gravaty::Gravaty.new(Gravaty::TEST_MY_ADDRESS,
27
- Gravaty::parser) }
33
+ subject do
34
+ Gravaty::Gravaty.new(Gravaty::TEST_MY_ADDRESS,
35
+ Gravaty.parser)
36
+ end
28
37
 
29
38
  it 'shall return the email content on demand' do
30
39
  _(subject.email).must_equal Gravaty::TEST_MY_ADDRESS.downcase
@@ -43,7 +52,7 @@ describe Gravaty::Gravaty do
43
52
  _(JSON.parse(subject.to_json)).wont_be_nil
44
53
  end
45
54
 
46
- [:avatar, :profile].each do |method|
55
+ %i[avatar profile].each do |method|
47
56
  describe "when asked for '#{method}'" do
48
57
  describe 'when no parameters are provided' do
49
58
  it 'shall provide an URI' do
@@ -73,7 +82,6 @@ describe Gravaty::Gravaty do
73
82
  _(subject.send(method, nil)).must_match Gravaty::TEST_SECURE_URI_REGEXP
74
83
  _(subject.send(method, nil)).wont_match Gravaty::TEST_UNSECURE_URI_REGEXP
75
84
  end
76
-
77
85
  end
78
86
 
79
87
  describe 'when secure:false is provided' do