summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vendor/plugins/gravatar/.gitignore1
-rw-r--r--vendor/plugins/gravatar/README.rdoc (renamed from vendor/plugins/gravatar/README)9
-rw-r--r--vendor/plugins/gravatar/Rakefile1
-rw-r--r--vendor/plugins/gravatar/about.yml4
-rw-r--r--vendor/plugins/gravatar/lib/gravatar.rb26
5 files changed, 31 insertions, 10 deletions
diff --git a/vendor/plugins/gravatar/.gitignore b/vendor/plugins/gravatar/.gitignore
new file mode 100644
index 000000000..4ebc8aea5
--- /dev/null
+++ b/vendor/plugins/gravatar/.gitignore
@@ -0,0 +1 @@
+coverage
diff --git a/vendor/plugins/gravatar/README b/vendor/plugins/gravatar/README.rdoc
index dc516d367..0b95e85e8 100644
--- a/vendor/plugins/gravatar/README
+++ b/vendor/plugins/gravatar/README.rdoc
@@ -12,12 +12,12 @@ set up an avatar for each site that they post on.
== Installation
cd ~/myapp
- ruby script/plugin install svn://rubyforge.org//var/svn/gravatarplugin/plugins/gravatar
+ ruby script/plugin install git://github.com/woods/gravatar-plugin.git
or, if you're using piston[http://piston.rubyforge.org] (worth it!):
cd ~/myapp/vendor/plugins
- piston import svn://rubyforge.org//var/svn/gravatarplugin/plugins/gravatar
+ piston import git://github.com/woods/gravatar-plugin.git
== Example
@@ -34,6 +34,9 @@ Other helpers are documented under GravatarHelper::PublicMethods.
== Acknowledgments
+Thanks to Magnus Bergmark (http://github.com/Mange), who contributed the SSL
+support in this plugin, as well as a few minor fixes.
+
The following people have also written gravatar-related Ruby libraries:
* Seth Rasmussen created the gravatar gem[http://gravatar.rubyforge.org]
* Matt McCray has also created a gravatar
@@ -48,5 +51,5 @@ The following people have also written gravatar-related Ruby libraries:
== TODO
-* Get full spec coverage
+* Add specs for ssl support
* Finish rdoc documentation \ No newline at end of file
diff --git a/vendor/plugins/gravatar/Rakefile b/vendor/plugins/gravatar/Rakefile
index 5a8d92a8a..9e4854916 100644
--- a/vendor/plugins/gravatar/Rakefile
+++ b/vendor/plugins/gravatar/Rakefile
@@ -6,7 +6,6 @@ task :default => :spec
desc 'Run all application-specific specs'
Spec::Rake::SpecTask.new(:spec) do |t|
- t.warning = true
t.rcov = true
end
diff --git a/vendor/plugins/gravatar/about.yml b/vendor/plugins/gravatar/about.yml
index a801d2582..aa5b8b19d 100644
--- a/vendor/plugins/gravatar/about.yml
+++ b/vendor/plugins/gravatar/about.yml
@@ -1,7 +1,7 @@
author: Scott Woods, West Arete Computing
summary: View helpers for displaying gravatars.
-homepage: http://gravatarplugin.rubyforge.org/
-plugin: svn://rubyforge.org//var/svn/gravatarplugin/plugins/gravatar
+homepage: http://github.com/woods/gravatar-plugin/
+plugin: git://github.com/woods/gravatar-plugin.git
license: MIT
version: 0.1
rails_version: 1.0+
diff --git a/vendor/plugins/gravatar/lib/gravatar.rb b/vendor/plugins/gravatar/lib/gravatar.rb
index 58cb4cabe..6246645bc 100644
--- a/vendor/plugins/gravatar/lib/gravatar.rb
+++ b/vendor/plugins/gravatar/lib/gravatar.rb
@@ -22,11 +22,16 @@ module GravatarHelper
# exclude gravatars that may be out of character for your site.
:rating => 'PG',
- # The alt text to use in the img tag for the gravatar.
- :alt => 'avatar',
+ # The alt text to use in the img tag for the gravatar. Since it's a
+ # decorational picture, the alt text should be empty according to the
+ # XHTML specs.
+ :alt => '',
# The class to assign to the img tag for the gravatar.
:class => 'gravatar',
+
+ # Whether or not to display the gravatars using HTTPS instead of HTTP
+ :ssl => false,
}
# The methods that will be made available to your views.
@@ -46,19 +51,32 @@ module GravatarHelper
[:class, :alt, :size].each { |opt| options[opt] = h(options[opt]) }
"<img class=\"#{options[:class]}\" alt=\"#{options[:alt]}\" width=\"#{options[:size]}\" height=\"#{options[:size]}\" src=\"#{src}\" />"
end
+
+ # Returns the base Gravatar URL for the given email hash. If ssl evaluates to true,
+ # a secure URL will be used instead. This is required when the gravatar is to be
+ # displayed on a HTTPS site.
+ def gravatar_api_url(hash, ssl=false)
+ if ssl
+ "https://secure.gravatar.com/avatar/#{hash}"
+ else
+ "http://www.gravatar.com/avatar/#{hash}"
+ end
+ end
# Return the gravatar URL for the given email address.
def gravatar_url(email, options={})
email_hash = Digest::MD5.hexdigest(email)
options = DEFAULT_OPTIONS.merge(options)
options[:default] = CGI::escape(options[:default]) unless options[:default].nil?
- returning "http://www.gravatar.com/avatar.php?gravatar_id=#{email_hash}" do |url|
+ returning gravatar_api_url(email_hash, options.delete(:ssl)) do |url|
+ opts = []
[:rating, :size, :default].each do |opt|
unless options[opt].nil?
value = h(options[opt])
- url << "&#{opt}=#{value}"
+ opts << [opt, value].join('=')
end
end
+ url << "?#{opts.join('&')}" unless opts.empty?
end
end
>backport/47832/stable30 Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
summaryrefslogtreecommitdiffstats
path: root/apps/files/l10n/sr@latin.js
blob: 736e4a1cc81a344099207764a3d82fafef665b50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95