faces 0.6.0 → 0.6.1
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.
- data/VERSION +1 -1
- data/faces.gemspec +2 -2
- data/lib/faces.rb +2 -1
- data/test/test_faces.rb +12 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.1
|
data/faces.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{faces}
|
8
|
-
s.version = "0.6.
|
8
|
+
s.version = "0.6.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Nick Pellant"]
|
12
|
-
s.date = %q{2010-03-
|
12
|
+
s.date = %q{2010-03-29}
|
13
13
|
s.description = %q{Avatars made super simple.}
|
14
14
|
s.email = %q{nick@silentale.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/faces.rb
CHANGED
@@ -4,6 +4,7 @@ require 'net/http'
|
|
4
4
|
require 'net/https'
|
5
5
|
require 'rexml/document'
|
6
6
|
require 'digest/md5'
|
7
|
+
require 'cgi'
|
7
8
|
|
8
9
|
module Faces
|
9
10
|
module Configuration
|
@@ -101,7 +102,7 @@ module Faces
|
|
101
102
|
end
|
102
103
|
# Builds a url query parameter string
|
103
104
|
def build_param(key, value, first = false)
|
104
|
-
value.present? ? (first == true ? "?#{key}=#{value}" : "&#{key}=#{value}") : ''
|
105
|
+
value.present? ? (first == true ? "?#{key}=#{CGI.escape(value.to_s)}" : "&#{key}=#{CGI.escape(value.to_s)}") : ''
|
105
106
|
end
|
106
107
|
|
107
108
|
module_function :merge_configurations, :build_param
|
data/test/test_faces.rb
CHANGED
@@ -70,4 +70,16 @@ class FacesTest < Test::Unit::TestCase
|
|
70
70
|
result = ::Faces::Public.provider_supports_ssl?('twitter')
|
71
71
|
assert !result
|
72
72
|
end
|
73
|
+
|
74
|
+
################################
|
75
|
+
#--- build_params_string ---#
|
76
|
+
################################
|
77
|
+
def test_build_params_should_accept_a_first_parameter
|
78
|
+
assert_match /\A\?.*/, Faces::Common.build_param('a', 'b', first = true)
|
79
|
+
assert_match /\A&.*/, Faces::Common.build_param('a', 'b', first = false)
|
80
|
+
end
|
81
|
+
|
82
|
+
def test_build_params_should_encode_values
|
83
|
+
assert_equal '?url=http%3A%2F%2Fx.y.com%3Fa%3Db', Faces::Common.build_param('url', 'http://x.y.com?a=b', first = true)
|
84
|
+
end
|
73
85
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 6
|
8
|
-
-
|
9
|
-
version: 0.6.
|
8
|
+
- 1
|
9
|
+
version: 0.6.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Nick Pellant
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-03-
|
17
|
+
date: 2010-03-29 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|