prooflink_connect 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/prooflink_connect.rb +1 -1
- data/lib/prooflink_connect/share.rb +1 -1
- data/lib/prooflink_connect/version.rb +1 -1
- data/spec/prooflink_connect/share_spec.rb +5 -0
- metadata +109 -66
data/Gemfile.lock
CHANGED
data/lib/prooflink_connect.rb
CHANGED
@@ -19,7 +19,7 @@ module ProoflinkConnect
|
|
19
19
|
def self.embedded(options = {}, config = ProoflinkConnect.config)
|
20
20
|
# needed because you didn't have to use px explicitly in the old situation
|
21
21
|
[:width, :height].each do |dimension|
|
22
|
-
if options[dimension] && !options[dimension].include?("%")
|
22
|
+
if options[dimension] && !options[dimension].to_s.include?("%")
|
23
23
|
options[dimension] << "px"
|
24
24
|
end
|
25
25
|
end
|
@@ -18,7 +18,7 @@ module ProoflinkConnect
|
|
18
18
|
:locale => config.locale
|
19
19
|
}.merge(options)
|
20
20
|
|
21
|
-
src = "#{config.base_uri}/#{options[:locale]}/shares/embedded/new?message=#{options[:message]}"
|
21
|
+
src = "#{config.base_uri}/#{options[:locale]}/shares/embedded/new?message=#{CGI.escape(options[:message])}"
|
22
22
|
src << "&position=#{CGI.escape(options[:position])}" if options[:position]
|
23
23
|
styling = "width: #{options[:width]}; height: #{options[:height]};"
|
24
24
|
styling << " border: 0; display: block;"
|
@@ -42,6 +42,11 @@ describe ProoflinkConnect::Share do
|
|
42
42
|
ProoflinkConnect::Share.embedded(:message => "placeholder", :position => "spec with spaces").should == result
|
43
43
|
end
|
44
44
|
|
45
|
+
it "url encodes message" do
|
46
|
+
result = "<iframe src='https://example.prooflink.com/en/shares/embedded/new?message=placeholder+with+spaces' style='width: 400px; height: 355px; border: 0; display: block;' frameborder='0' allowTransparency='true'></iframe>"
|
47
|
+
ProoflinkConnect::Share.embedded(:message => "placeholder with spaces").should == result
|
48
|
+
end
|
49
|
+
|
45
50
|
it "uses correct locale" do
|
46
51
|
ProoflinkConnect.configure do |config|
|
47
52
|
config.locale = "nl"
|
metadata
CHANGED
@@ -1,91 +1,121 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: prooflink_connect
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 61
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 17
|
10
|
+
version: 0.0.17
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Chiel Wester
|
9
14
|
- Jeroen Bulters
|
10
15
|
autorequire:
|
11
16
|
bindir: bin
|
12
17
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
|
18
|
+
|
19
|
+
date: 2011-09-20 00:00:00 +02:00
|
20
|
+
default_executable:
|
21
|
+
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
16
23
|
name: json
|
17
|
-
|
24
|
+
prerelease: false
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
18
26
|
none: false
|
19
|
-
requirements:
|
20
|
-
- -
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
|
27
|
+
requirements:
|
28
|
+
- - ">="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
hash: 3
|
31
|
+
segments:
|
32
|
+
- 0
|
33
|
+
version: "0"
|
23
34
|
type: :runtime
|
24
|
-
|
25
|
-
|
26
|
-
- !ruby/object:Gem::Dependency
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
27
37
|
name: httparty
|
28
|
-
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
29
40
|
none: false
|
30
|
-
requirements:
|
31
|
-
- -
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 3
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
version: "0"
|
34
48
|
type: :runtime
|
35
|
-
|
36
|
-
|
37
|
-
- !ruby/object:Gem::Dependency
|
49
|
+
version_requirements: *id002
|
50
|
+
- !ruby/object:Gem::Dependency
|
38
51
|
name: activesupport
|
39
|
-
|
52
|
+
prerelease: false
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
40
54
|
none: false
|
41
|
-
requirements:
|
42
|
-
- -
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
hash: 3
|
59
|
+
segments:
|
60
|
+
- 0
|
61
|
+
version: "0"
|
45
62
|
type: :runtime
|
46
|
-
|
47
|
-
|
48
|
-
- !ruby/object:Gem::Dependency
|
63
|
+
version_requirements: *id003
|
64
|
+
- !ruby/object:Gem::Dependency
|
49
65
|
name: bundler
|
50
|
-
|
66
|
+
prerelease: false
|
67
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
51
68
|
none: false
|
52
|
-
requirements:
|
53
|
-
- -
|
54
|
-
- !ruby/object:Gem::Version
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
hash: 23
|
73
|
+
segments:
|
74
|
+
- 1
|
75
|
+
- 0
|
76
|
+
- 0
|
55
77
|
version: 1.0.0
|
56
78
|
type: :development
|
57
|
-
|
58
|
-
|
59
|
-
- !ruby/object:Gem::Dependency
|
79
|
+
version_requirements: *id004
|
80
|
+
- !ruby/object:Gem::Dependency
|
60
81
|
name: rspec
|
61
|
-
|
82
|
+
prerelease: false
|
83
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
62
84
|
none: false
|
63
|
-
requirements:
|
64
|
-
- -
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
hash: 3
|
89
|
+
segments:
|
90
|
+
- 0
|
91
|
+
version: "0"
|
67
92
|
type: :development
|
68
|
-
|
69
|
-
|
70
|
-
- !ruby/object:Gem::Dependency
|
93
|
+
version_requirements: *id005
|
94
|
+
- !ruby/object:Gem::Dependency
|
71
95
|
name: webmock
|
72
|
-
|
96
|
+
prerelease: false
|
97
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
73
98
|
none: false
|
74
|
-
requirements:
|
75
|
-
- -
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
hash: 3
|
103
|
+
segments:
|
104
|
+
- 0
|
105
|
+
version: "0"
|
78
106
|
type: :development
|
79
|
-
|
80
|
-
version_requirements: *2153532120
|
107
|
+
version_requirements: *id006
|
81
108
|
description: Make a connection to the prooflink connect api for single sign on authentication
|
82
|
-
email:
|
109
|
+
email:
|
83
110
|
- chiel.wester@holder.nl
|
84
111
|
- jeroen@bulte.rs
|
85
112
|
executables: []
|
113
|
+
|
86
114
|
extensions: []
|
115
|
+
|
87
116
|
extra_rdoc_files: []
|
88
|
-
|
117
|
+
|
118
|
+
files:
|
89
119
|
- .gitignore
|
90
120
|
- .rspec
|
91
121
|
- .travis.yml
|
@@ -109,28 +139,41 @@ files:
|
|
109
139
|
- spec/prooflink_connect/share_spec.rb
|
110
140
|
- spec/prooflink_connect_spec.rb
|
111
141
|
- spec/spec_helper.rb
|
142
|
+
has_rdoc: true
|
112
143
|
homepage: https://github.com/prooflink/prooflink_connect
|
113
144
|
licenses: []
|
145
|
+
|
114
146
|
post_install_message:
|
115
147
|
rdoc_options: []
|
116
|
-
|
148
|
+
|
149
|
+
require_paths:
|
117
150
|
- lib
|
118
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
151
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
119
152
|
none: false
|
120
|
-
requirements:
|
121
|
-
- -
|
122
|
-
- !ruby/object:Gem::Version
|
123
|
-
|
124
|
-
|
153
|
+
requirements:
|
154
|
+
- - ">="
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
hash: 3
|
157
|
+
segments:
|
158
|
+
- 0
|
159
|
+
version: "0"
|
160
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
161
|
none: false
|
126
|
-
requirements:
|
127
|
-
- -
|
128
|
-
- !ruby/object:Gem::Version
|
162
|
+
requirements:
|
163
|
+
- - ">="
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
hash: 23
|
166
|
+
segments:
|
167
|
+
- 1
|
168
|
+
- 3
|
169
|
+
- 6
|
129
170
|
version: 1.3.6
|
130
171
|
requirements: []
|
172
|
+
|
131
173
|
rubyforge_project: prooflink_connect
|
132
|
-
rubygems_version: 1.
|
174
|
+
rubygems_version: 1.4.1
|
133
175
|
signing_key:
|
134
176
|
specification_version: 3
|
135
177
|
summary: Make a connection to the prooflink connect api
|
136
178
|
test_files: []
|
179
|
+
|