vishnu 1.2.2 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e3c3ac27d6595188485f30fd8e19b94f4366efa9
4
- data.tar.gz: 6a8e3d5cc7217a1f6e7fbea35941af2ae925f99e
2
+ SHA256:
3
+ metadata.gz: 39c384bc0a95bcbf579da3f0b6b67c0c2373f7ab22131e11c22411201eff6e97
4
+ data.tar.gz: 48582e1db8a8fce83385ad8df1dedd84857dbc6003d4d4ca8de056fbe5503209
5
5
  SHA512:
6
- metadata.gz: 90d6bcf8cae62e3037b0920826ec39184b6cdbaa64bfb5b5e1bb7f8ae24a2a55356170ba45d1060757d50d050706902e5defc57fb2e7df218f7427e539266c12
7
- data.tar.gz: 9fa0491431764f3fe25aadb020c9d66b0b9a0229b319f33a8f6e09670869c43c40cb16875dd5d9a1044e06810ab8ef8c4fd023abc98420c6bebb3d83b42db49a
6
+ metadata.gz: 75b4cc8561a2cb4b11f8c1d33c20fba40cb987bb9424d2bb9146005a175306bb4f9d6cb212c6659137e388b67228f1dcee8945be05afb6096f8224a5fe459624
7
+ data.tar.gz: f3ac061ca1e38ab6013b87db04f2c7f09d18cc0ecd9210e998b7aaf46634fe4e52ec83b96797cc04f6bc732925fc9f6e7fc4715191423db6e3daa5956646a3a8
data/lib/libravatar.rb CHANGED
@@ -1,3 +1,6 @@
1
+ # enable compatibility between Vishnu and Libravatar
2
+ # and allow require 'libravatar' to work
3
+
1
4
  require 'vishnu'
2
5
 
3
- class Libravatar < Vishnu; end
6
+ Libravatar = Vishnu
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Vishnu
4
+ VERSION = '2.0.1'
5
+ end
data/lib/vishnu.rb CHANGED
@@ -1,15 +1,19 @@
1
+ # frozen_string_literal: true
1
2
  #
2
- # The Libravatar class generates the avatar URL provided by the libravatar
3
- # web service at http://www.libravatar.org
3
+ # The Vishnu class generates the avatar URL provided by the libravatar
4
+ # web service at https://www.libravatar.org
4
5
  #
5
6
  # Users may associate their avatar images with multiple OpenIDs and Emails.
6
- #
7
- # Author:: Kang-min Liu (http://gugod.org)
7
+ #
8
+ # Original Author:: Kang-min Liu (http://gugod.org/)
9
+ # Fork Author:: Anton Smirnov (https://sandfox.me/)
8
10
  # Copyright:: Copyright (c) 2011 Kang-min Liu
9
11
  # License:: MIT
10
- # Contributors:: https://github.com/gugod/libravatar/contributors
12
+ # Contributors:: https://github.com/sandfoxme/vishnu/graphs/contributors
11
13
  #
12
14
 
15
+ require 'vishnu/version'
16
+
13
17
  require 'digest/md5'
14
18
  require 'digest/sha2'
15
19
  require 'uri'
@@ -20,7 +24,7 @@ class Vishnu
20
24
 
21
25
  # The options should contain :email or :openid values. If both are
22
26
  # given, email will be used. The value of openid and email will be
23
- # normalized by the rule described in http://www.libravatar.org/api
27
+ # normalized by the rule described in https://wiki.libravatar.org/api/
24
28
  #
25
29
  # List of option keys:
26
30
  #
@@ -28,101 +32,131 @@ class Vishnu
28
32
  # - :openid
29
33
  # - :size An integer ranged 1 - 512, default is 80.
30
34
  # - :https Set to true to serve avatars over SSL
31
- # - :default URL to redirect missing avatars to, or one of these specials: "404", "mm", "identicon", "monsterid", "wavatar", "retro"
35
+ # - :default URL to redirect missing avatars to, or one of these specials:
36
+ # "404", "mm", "identicon", "monsterid", "wavatar", "retro"
32
37
  #
33
- def initialize(options = {})
34
- @email = options[:email]
35
- @openid = options[:openid]
36
- @size = options[:size]
37
- @default = options[:default]
38
- @https = options[:https]
38
+ def initialize(email: nil, openid: nil, size: nil, default: nil, https: nil)
39
+ @email = email
40
+ @openid = openid
41
+ @size = size
42
+ @default = default
43
+ @https = https
39
44
  end
40
45
 
41
- def get_target_domain
42
- return @email.split('@')[1] if @email
43
- return URI.parse(@openid).host
46
+ # All the values which are different between HTTP and HTTPS methods.
47
+ PROFILES = {
48
+ http: {
49
+ scheme: 'http://',
50
+ host: 'cdn.libravatar.org',
51
+ srv: '_avatars._tcp.',
52
+ port: 80,
53
+ }.freeze,
54
+ https: {
55
+ scheme: 'https://',
56
+ host: 'seccdn.libravatar.org',
57
+ srv: '_avatars-sec._tcp.',
58
+ port: 443,
59
+ }.freeze
60
+ }.freeze
61
+
62
+ # Generate the libravatar URL
63
+ def url
64
+ id =
65
+ if @email
66
+ Digest::MD5.hexdigest(normalize_email(@email))
67
+ else
68
+ Digest::SHA2.hexdigest(normalize_openid(@openid))
69
+ end
70
+
71
+ size = "s=#{@size}" if @size
72
+ default = "d=#{@default}" if @default
73
+
74
+ # noinspection RubyScope
75
+ # ok for them to be nil
76
+ query = [size, default].reject(&:!).join('&')
77
+ query = "?#{query}" unless query == ''
78
+
79
+ base_url = get_base_url + '/avatar/'
80
+
81
+ base_url + id + query
44
82
  end
45
83
 
46
- # All the values which are different between HTTP and HTTPS methods.
47
- @@profiles = [
48
- { :scheme => 'http://',
49
- :host => 'cdn.libravatar.org',
50
- :srv => '_avatars._tcp.',
51
- :port => 80 },
52
- { :scheme => 'https://',
53
- :host => 'seccdn.libravatar.org',
54
- :srv => '_avatars-sec._tcp.',
55
- :port => 443 }
56
- ]
84
+ alias_method :to_s, :url
85
+
86
+ private
87
+
88
+ def profile
89
+ PROFILES[@https ? :https : :http]
90
+ end
91
+
92
+ def get_target_domain
93
+ if @email
94
+ @email.split('@')[1]
95
+ else
96
+ URI.parse(@openid).host
97
+ end
98
+ end
57
99
 
58
100
  # Grab the DNS SRV records associated with the target domain,
59
101
  # and choose one according to RFC2782.
60
102
  def srv_lookup
61
- profile = @@profiles[ @https ? 1 : 0 ]
62
- Resolv::DNS::open do |dns|
63
- rrs = dns.getresources(profile[:srv] + get_target_domain(),
64
- Resolv::DNS::Resource::IN::SRV).to_a
65
- return [nil, nil] unless rrs.any?
103
+ Resolv::DNS.open do |dns|
104
+ resources = dns.getresources(
105
+ profile[:srv] + get_target_domain,
106
+ Resolv::DNS::Resource::IN::SRV
107
+ ).to_a
66
108
 
109
+ return [nil, nil] unless resources.any?
67
110
 
68
- min_priority = rrs.map{ |r| r.priority }.min
69
- rrs.delete_if{ |r| r.priority != min_priority }
111
+ min_priority = resources.map(&:priority).min
112
+ resources.delete_if { |r| r.priority != min_priority }
70
113
 
71
- weight_sum = rrs.inject(0) { |a,r| a+r.weight }.to_f
114
+ weight_sum = resources.inject(0) { |sum, r| sum + r.weight }.to_f
72
115
 
73
- r = rrs.max_by { |r| r.weight == 0 ? 0 : rand ** (weight_sum / r.weight) }
116
+ resource = resources.max_by do |r|
117
+ if r.weight == 0
118
+ 0
119
+ else
120
+ rand**(weight_sum / r.weight)
121
+ end
122
+ end
74
123
 
75
- return [r.target, r.port]
124
+ return sanitize_srv_lookup(resource.target.to_s, resource.port)
76
125
  end
77
126
  end
78
127
 
79
128
  def get_base_url
80
- profile = @@profiles[ @https ? 1 : 0 ]
81
129
  target, port = srv_lookup
82
130
 
83
- if (target && port)
131
+ if target && port
84
132
  port_fragment = port != profile[:port] ? ':' + port.to_s : ''
85
- return profile[:scheme] + target.to_s + port_fragment
86
- else
87
- return profile[:scheme] + profile[:host]
88
- end
89
- end
90
-
91
- # Generate the libravatar URL
92
- def to_s
93
- if @email
94
- @email.downcase!
95
- id = Digest::MD5.hexdigest(@email)
133
+ profile[:scheme] + target.to_s + port_fragment
96
134
  else
97
- id = Digest::SHA2.hexdigest(normalize_openid(@openid))
135
+ profile[:scheme] + profile[:host]
98
136
  end
99
- s = @size ? "s=#{@size}" : nil
100
- d = @default ? "d=#{@default}" : nil
101
-
102
- query = [s,d].reject{|x|!x}.join("&")
103
- query = "?#{query}" unless query == ""
104
- baseurl = get_base_url() + '/avatar/'
105
- return baseurl + id + query
106
137
  end
107
138
 
108
- private
109
-
110
139
  def sanitize_srv_lookup(hostname, port)
111
- unless hostname.match(/^[0-9a-zA-Z\-.]+$/) && 1 <= port && port <= 65535
140
+ unless hostname.match(/^[0-9a-zA-Z\-.]+$/) && 1 <= port && port <= 65_535
112
141
  return [nil, nil]
113
142
  end
114
143
 
115
- return [hostname, port]
144
+ [hostname, port]
145
+ end
146
+
147
+ def normalize_email(email)
148
+ email.downcase
116
149
  end
117
150
 
118
151
  # Normalize an openid URL following the description on libravatar.org
119
- def normalize_openid(s)
120
- x = URI.parse(s)
121
- x.host.downcase!
122
- x.scheme = x.scheme.downcase
123
- if (x.path == "" && x.fragment == nil)
124
- x.path = "/"
152
+ def normalize_openid(url)
153
+ parsed_url = URI.parse(url)
154
+ parsed_url.host = parsed_url.host.downcase
155
+ parsed_url.scheme = parsed_url.scheme.downcase
156
+ if parsed_url.path == '' && parsed_url.fragment.nil?
157
+ parsed_url.path = '/'
125
158
  end
126
- return x.to_s
159
+
160
+ parsed_url.to_s
127
161
  end
128
162
  end
metadata CHANGED
@@ -1,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vishnu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Smirnov
8
8
  - Kang-min Liu
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-06-20 00:00:00.000000000 Z
12
+ date: 2023-12-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: jeweler
15
+ name: bundler
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - ">="
@@ -26,35 +26,21 @@ dependencies:
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
- name: shoulda
29
+ name: rspec
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ">"
33
- - !ruby/object:Gem::Version
34
- version: 1.2.3
35
- type: :development
36
- prerelease: false
37
- version_requirements: !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ">"
40
- - !ruby/object:Gem::Version
41
- version: 1.2.3
42
- - !ruby/object:Gem::Dependency
43
- name: minitest
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - '='
32
+ - - ">="
47
33
  - !ruby/object:Gem::Version
48
- version: 4.7.5
34
+ version: '0'
49
35
  type: :development
50
36
  prerelease: false
51
37
  version_requirements: !ruby/object:Gem::Requirement
52
38
  requirements:
53
- - - '='
39
+ - - ">="
54
40
  - !ruby/object:Gem::Version
55
- version: 4.7.5
41
+ version: '0'
56
42
  - !ruby/object:Gem::Dependency
57
- name: test-unit
43
+ name: rake
58
44
  requirement: !ruby/object:Gem::Requirement
59
45
  requirements:
60
46
  - - ">="
@@ -67,33 +53,23 @@ dependencies:
67
53
  - - ">="
68
54
  - !ruby/object:Gem::Version
69
55
  version: '0'
70
- description: libravatar.org provides avatar image hosting (like gravatar.com). Their
71
- users may associate avatar images with email or openid. This rubygem can be used
72
- to generate libravatar avatar image URL
73
- email: sandfox@sandfox.me
56
+ description: |
57
+ Libravatar provides avatar image hosting (like gravatar.com).
58
+ Their users may associate avatar images with email or openid.
59
+ This rubygem can be used to generate Libravatar image URL
60
+ email: sandfox+gem@sandfox.me
74
61
  executables: []
75
62
  extensions: []
76
- extra_rdoc_files:
77
- - LICENSE.txt
78
- - README.rdoc
63
+ extra_rdoc_files: []
79
64
  files:
80
- - ".document"
81
- - ".travis.yml"
82
- - Gemfile
83
- - LICENSE.txt
84
- - README.rdoc
85
- - Rakefile
86
- - VERSION
87
65
  - lib/libravatar.rb
88
66
  - lib/vishnu.rb
89
- - test/helper.rb
90
- - test/test_libravatar.rb
91
- - vishnu.gemspec
92
- homepage: http://github.com/sandfoxme/vishnu
67
+ - lib/vishnu/version.rb
68
+ homepage: https://sandfox.dev/ruby/vishnu.html
93
69
  licenses:
94
70
  - MIT
95
71
  metadata: {}
96
- post_install_message:
72
+ post_install_message:
97
73
  rdoc_options: []
98
74
  require_paths:
99
75
  - lib
@@ -101,16 +77,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
101
77
  requirements:
102
78
  - - ">="
103
79
  - !ruby/object:Gem::Version
104
- version: '0'
80
+ version: 2.0.0
105
81
  required_rubygems_version: !ruby/object:Gem::Requirement
106
82
  requirements:
107
83
  - - ">="
108
84
  - !ruby/object:Gem::Version
109
85
  version: '0'
110
86
  requirements: []
111
- rubyforge_project:
112
- rubygems_version: 2.5.1
113
- signing_key:
87
+ rubygems_version: 3.4.10
88
+ signing_key:
114
89
  specification_version: 4
115
- summary: Avatar URL Generation wih libravatar.org
90
+ summary: Avatar URL Generation with libravatar.org
116
91
  test_files: []
data/.document DELETED
@@ -1,5 +0,0 @@
1
- lib/**/*.rb
2
- bin/*
3
- -
4
- features/**/*.feature
5
- LICENSE.txt
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 1.9.3
4
- - 2.0.0
5
- - 2.2.0
data/Gemfile DELETED
@@ -1,9 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- group :development do
4
- gem 'jeweler'
5
- gem 'shoulda', '> 1.2.3'
6
- gem 'minitest', '4.7.5'
7
- gem 'test-unit'
8
- end
9
-
data/LICENSE.txt DELETED
@@ -1,22 +0,0 @@
1
- The MIT License
2
-
3
- Copyright (c) 2011 Kang-min Liu
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
22
-
data/README.rdoc DELETED
@@ -1,20 +0,0 @@
1
- = libravatar
2
-
3
- http://libravatar.org is an avatar service to let their users associate avatar images
4
- with their emails or openids. This rubygem generates their avatar URL.
5
-
6
- == Contributing to libravatar
7
-
8
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
9
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
10
- * Fork the project
11
- * Start a feature/bugfix branch
12
- * Commit and push until you are happy with your contribution
13
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
14
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
15
-
16
- == Copyright
17
-
18
- Copyright (c) 2011 Kang-min Liu. See LICENSE.txt for
19
- further details.
20
-
data/Rakefile DELETED
@@ -1,39 +0,0 @@
1
- require 'rubygems'
2
- require 'rake'
3
-
4
- require 'jeweler'
5
- Jeweler::Tasks.new do |gem|
6
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
7
- gem.name = "vishnu"
8
- gem.homepage = "http://github.com/sandfoxme/vishnu"
9
- gem.license = "MIT"
10
- gem.summary = %Q{Avatar URL Generation wih libravatar.org}
11
- gem.description = %Q{libravatar.org provides avatar image hosting (like gravatar.com). Their users may associate avatar images with email or openid. This rubygem can be used to generate libravatar avatar image URL}
12
- gem.email = "sandfox@sandfox.me"
13
- gem.authors = ['Anton Smirnov', "Kang-min Liu"]
14
- # Include your dependencies below. Runtime dependencies are required when using your gem,
15
- # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
16
- # gem.add_runtime_dependency 'digest/sha2', '> 0.1'
17
- # gem.add_runtime_dependency 'uri', '> 0.1'
18
- # gem.add_development_dependency 'shoulda', '> 1.2.3'
19
- end
20
- Jeweler::RubygemsDotOrgTasks.new
21
-
22
- require 'rake/testtask'
23
- Rake::TestTask.new(:test) do |test|
24
- test.libs << 'lib' << 'test'
25
- test.pattern = 'test/**/test_*.rb'
26
- test.verbose = true
27
- end
28
-
29
- task :default => :test
30
-
31
- require 'rdoc/task'
32
- Rake::RDocTask.new do |rdoc|
33
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
34
-
35
- rdoc.rdoc_dir = 'rdoc'
36
- rdoc.title = "vishnu #{version}"
37
- rdoc.rdoc_files.include('README*')
38
- rdoc.rdoc_files.include('lib/**/*.rb')
39
- end
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 1.2.2
data/test/helper.rb DELETED
@@ -1,11 +0,0 @@
1
- require 'rubygems'
2
- require 'minitest/autorun'
3
- require 'test/unit'
4
- require 'shoulda'
5
-
6
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
7
- $LOAD_PATH.unshift(File.dirname(__FILE__))
8
- require 'libravatar'
9
-
10
- class Test::Unit::TestCase
11
- end
@@ -1,50 +0,0 @@
1
- require 'helper'
2
-
3
- class TestLibravatar < Test::Unit::TestCase
4
- should "Generate url from email" do
5
- # echo -n "user@example.com"|md5sum
6
- # => b58996c504c5638798eb6b511e6f49af
7
- avatar = Libravatar.new(:email => "user@example.com")
8
-
9
- re = /http:\/\/.+\/avatar\/b58996c504c5638798eb6b511e6f49af$/
10
- assert avatar.to_s.match(re)
11
- assert Libravatar.new(:email => "USER@ExAmPlE.CoM").to_s.match(re)
12
-
13
- assert_equal Libravatar.new(:email => "user@example.com", :https => true).to_s[0,8], "https://"
14
- assert_equal Libravatar.new(:email => "user@example.com", :https => false).to_s[0,7], "http://"
15
-
16
- assert Libravatar.new(:email => "USER@ExAmPlE.CoM", :default => "http://example.com/avatar.png").to_s.match(/http:\/\/.+\/avatar\/b58996c504c5638798eb6b511e6f49af\?d=http:\/\/example\.com\/avatar\.png/)
17
-
18
- assert_equal Libravatar.new(:email => "USER@ExAmPlE.CoM", :size => 512, :default => "mm").to_s[-43,43], "b58996c504c5638798eb6b511e6f49af?s=512&d=mm"
19
- end
20
-
21
- should "Generate url from openid" do
22
- # echo -n "http://example.com/id/Bob"|shasum -a 256
23
- # => 80cd0679bb52beac4d5d388c163016dbc5d3f30c262a4f539564236ca9d49ccd
24
- avatar = Libravatar.new(:openid => "http://example.com/id/Bob")
25
- assert_equal avatar.to_s, "http://cdn.libravatar.org/avatar/80cd0679bb52beac4d5d388c163016dbc5d3f30c262a4f539564236ca9d49ccd"
26
-
27
- avatar = Libravatar.new(:openid => "hTTp://EXAMPLE.COM/id/Bob")
28
- assert_equal avatar.to_s, "http://cdn.libravatar.org/avatar/80cd0679bb52beac4d5d388c163016dbc5d3f30c262a4f539564236ca9d49ccd"
29
-
30
- avatar = Libravatar.new(:openid => "hTTp://EXAMPLE.COM/id/Bob", :size => 512)
31
- assert_equal avatar.to_s, "http://cdn.libravatar.org/avatar/80cd0679bb52beac4d5d388c163016dbc5d3f30c262a4f539564236ca9d49ccd?s=512"
32
- end
33
-
34
- should "Normalize OpenID" do
35
- x = Libravatar.new
36
- assert_equal x.send(:normalize_openid, "HTTP://EXAMPLE.COM/id/Bob"), "http://example.com/id/Bob"
37
- assert_equal x.send(:normalize_openid, "HTTP://EXAMPLE.COM"), "http://example.com/"
38
- end
39
-
40
- should "Return the federated URI" do
41
- avatar = Libravatar.new(:email => 'invalid@catalyst.net.nz')
42
- assert avatar.to_s.match(/http:\/\/.+\/avatar\/f924d1e9f2c10ee9efa7acdd16484c2f$/)
43
- end
44
-
45
- should "Sanitize the SRV lookup result" do
46
- avatar = Libravatar.new
47
- assert_equal ["hosntame.abcde.fghi.com", 12345], avatar.send(:sanitize_srv_lookup, "hosntame.abcde.fghi.com", 12345)
48
- assert_equal [nil, nil], avatar.send(:sanitize_srv_lookup, "FNORD IMPUNTK *#(*$#&", 65348283)
49
- end
50
- end
data/vishnu.gemspec DELETED
@@ -1,61 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
- # stub: vishnu 1.2.2 ruby lib
6
-
7
- Gem::Specification.new do |s|
8
- s.name = "vishnu"
9
- s.version = "1.2.2"
10
-
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
- s.require_paths = ["lib"]
13
- s.authors = ["Anton Smirnov", "Kang-min Liu"]
14
- s.date = "2016-06-20"
15
- s.description = "libravatar.org provides avatar image hosting (like gravatar.com). Their users may associate avatar images with email or openid. This rubygem can be used to generate libravatar avatar image URL"
16
- s.email = "sandfox@sandfox.me"
17
- s.extra_rdoc_files = [
18
- "LICENSE.txt",
19
- "README.rdoc"
20
- ]
21
- s.files = [
22
- ".document",
23
- ".travis.yml",
24
- "Gemfile",
25
- "LICENSE.txt",
26
- "README.rdoc",
27
- "Rakefile",
28
- "VERSION",
29
- "lib/libravatar.rb",
30
- "lib/vishnu.rb",
31
- "test/helper.rb",
32
- "test/test_libravatar.rb",
33
- "vishnu.gemspec"
34
- ]
35
- s.homepage = "http://github.com/sandfoxme/vishnu"
36
- s.licenses = ["MIT"]
37
- s.rubygems_version = "2.5.1"
38
- s.summary = "Avatar URL Generation wih libravatar.org"
39
-
40
- if s.respond_to? :specification_version then
41
- s.specification_version = 4
42
-
43
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
44
- s.add_development_dependency(%q<jeweler>, [">= 0"])
45
- s.add_development_dependency(%q<shoulda>, ["> 1.2.3"])
46
- s.add_development_dependency(%q<minitest>, ["= 4.7.5"])
47
- s.add_development_dependency(%q<test-unit>, [">= 0"])
48
- else
49
- s.add_dependency(%q<jeweler>, [">= 0"])
50
- s.add_dependency(%q<shoulda>, ["> 1.2.3"])
51
- s.add_dependency(%q<minitest>, ["= 4.7.5"])
52
- s.add_dependency(%q<test-unit>, [">= 0"])
53
- end
54
- else
55
- s.add_dependency(%q<jeweler>, [">= 0"])
56
- s.add_dependency(%q<shoulda>, ["> 1.2.3"])
57
- s.add_dependency(%q<minitest>, ["= 4.7.5"])
58
- s.add_dependency(%q<test-unit>, [">= 0"])
59
- end
60
- end
61
-