gravtastic 2.1.3 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -0
- data/README.md +2 -1
- data/Rakefile +18 -7
- data/VERSION +1 -0
- data/lib/gravtastic.rb +9 -9
- data/spec/gravtastic_integration_spec.rb +1 -1
- metadata +16 -14
- data/LICENSE +0 -20
- data/spec/spec.opts +0 -1
data/.gitignore
ADDED
data/README.md
CHANGED
@@ -107,10 +107,11 @@ Fork the project, submit a pull request and I'll get to it straight away. Or you
|
|
107
107
|
* [Matthew Moore](http://www.matthewpaulmoore.com)
|
108
108
|
* [Vincent Charles](http://vincentcharles.com)
|
109
109
|
* [Paul Farnell](http://litmusapp.com/blog)
|
110
|
+
* [Jeff Kreeftmeijer](http://jeffkreeftmeijer.nl/)
|
110
111
|
|
111
112
|
## License
|
112
113
|
|
113
|
-
Copyright (c)
|
114
|
+
Copyright (c) 2008 Chris Lloyd.
|
114
115
|
|
115
116
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
116
117
|
|
data/Rakefile
CHANGED
@@ -1,10 +1,21 @@
|
|
1
|
-
|
2
|
-
require '
|
3
|
-
|
4
|
-
|
1
|
+
begin
|
2
|
+
require 'jeweler'
|
3
|
+
Jeweler::Tasks.new do |gs|
|
4
|
+
gs.name = 'gravtastic'
|
5
|
+
gs.homepage = 'http://github.com/chrislloyd/gravtastic'
|
6
|
+
gs.description = 'Add Gravatars to your Rubies/Rails!'
|
7
|
+
gs.summary = 'Ruby/Gravatar'
|
8
|
+
gs.email = 'christopher.lloyd@gmail.com'
|
9
|
+
gs.author = 'Chris Lloyd'
|
10
|
+
gs.rubyforge_project = 'gravtastic'
|
11
|
+
end
|
12
|
+
Jeweler::GemcutterTasks.new
|
13
|
+
rescue LoadError
|
14
|
+
puts "Install jeweler to build gem"
|
15
|
+
end
|
5
16
|
|
17
|
+
require 'spec/rake/spectask'
|
6
18
|
Spec::Rake::SpecTask.new('spec') do |t|
|
7
|
-
t.spec_opts = ['--
|
8
|
-
t.spec_files = FileList['spec
|
9
|
-
# t.rcov = true
|
19
|
+
t.spec_opts = ['--color']
|
20
|
+
t.spec_files = FileList['spec/*.rb']
|
10
21
|
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.2.0
|
data/lib/gravtastic.rb
CHANGED
@@ -8,16 +8,18 @@ module Gravtastic
|
|
8
8
|
base.extend(SingletonMethods)
|
9
9
|
end
|
10
10
|
|
11
|
+
def self.version
|
12
|
+
File.read(__FILE__.sub('lib/gravtastic.rb','VERSION')).strip
|
13
|
+
end
|
14
|
+
|
11
15
|
module SingletonMethods
|
12
16
|
|
13
|
-
def is_gravtastic(
|
17
|
+
def is_gravtastic(*args)
|
14
18
|
extend ClassMethods
|
15
19
|
include InstanceMethods
|
16
20
|
|
17
|
-
|
18
|
-
|
19
|
-
source = :email
|
20
|
-
end
|
21
|
+
options = args.last.is_a?(Hash) ? args.pop : {}
|
22
|
+
source = args.first || :email
|
21
23
|
|
22
24
|
@gravatar_defaults = {
|
23
25
|
:rating => 'PG',
|
@@ -34,8 +36,6 @@ module Gravtastic
|
|
34
36
|
|
35
37
|
module ClassMethods
|
36
38
|
|
37
|
-
# attr_reader :gravatar_source, :gravatar_defaults
|
38
|
-
|
39
39
|
def gravatar_source
|
40
40
|
@gravatar_source
|
41
41
|
end
|
@@ -45,8 +45,7 @@ module Gravtastic
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def gravatar_options
|
48
|
-
{
|
49
|
-
:size => 's',
|
48
|
+
{ :size => 's',
|
50
49
|
:default => 'd',
|
51
50
|
:rating => 'r'
|
52
51
|
}
|
@@ -89,3 +88,4 @@ end
|
|
89
88
|
|
90
89
|
ActiveRecord::Base.send(:include, Gravtastic) if defined?(ActiveRecord) # :nodoc:
|
91
90
|
DataMapper::Resource.append_inclusions(Gravtastic) if defined?(DataMapper) # :nodoc:
|
91
|
+
MongoMapper::Document.append_inclusions(Gravtastic) if defined?(MongoMapper) && MongoMapper::Document.respond_to?(:append_inclusions) # :nodoc:
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gravtastic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Lloyd
|
@@ -9,34 +9,34 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2010-01-03 00:00:00 +11:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
16
|
-
description:
|
16
|
+
description: Add Gravatars to your Rubies/Rails!
|
17
17
|
email: christopher.lloyd@gmail.com
|
18
18
|
executables: []
|
19
19
|
|
20
20
|
extensions: []
|
21
21
|
|
22
|
-
extra_rdoc_files:
|
23
|
-
|
22
|
+
extra_rdoc_files:
|
23
|
+
- README.md
|
24
24
|
files:
|
25
|
-
-
|
25
|
+
- .gitignore
|
26
26
|
- README.md
|
27
27
|
- Rakefile
|
28
|
+
- VERSION
|
28
29
|
- lib/gravtastic.rb
|
29
30
|
- spec/gravtastic_integration_spec.rb
|
30
31
|
- spec/gravtastic_spec.rb
|
31
|
-
- spec/spec.opts
|
32
32
|
- spec/spec_helper.rb
|
33
33
|
has_rdoc: true
|
34
34
|
homepage: http://github.com/chrislloyd/gravtastic
|
35
35
|
licenses: []
|
36
36
|
|
37
37
|
post_install_message:
|
38
|
-
rdoc_options:
|
39
|
-
|
38
|
+
rdoc_options:
|
39
|
+
- --charset=UTF-8
|
40
40
|
require_paths:
|
41
41
|
- lib
|
42
42
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -54,9 +54,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
54
54
|
requirements: []
|
55
55
|
|
56
56
|
rubyforge_project: gravtastic
|
57
|
-
rubygems_version: 1.3.
|
57
|
+
rubygems_version: 1.3.5
|
58
58
|
signing_key:
|
59
|
-
specification_version:
|
60
|
-
summary:
|
61
|
-
test_files:
|
62
|
-
|
59
|
+
specification_version: 3
|
60
|
+
summary: Ruby/Gravatar
|
61
|
+
test_files:
|
62
|
+
- spec/gravtastic_integration_spec.rb
|
63
|
+
- spec/gravtastic_spec.rb
|
64
|
+
- spec/spec_helper.rb
|
data/LICENSE
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
Copyright (c) 2008 Chris Lloyd
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be
|
12
|
-
included in all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/spec/spec.opts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
--color
|