dugway 0.12.3 → 1.0.0
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2625aace16555a5b683e997a7a0e445ba02a07418eb40b711ea03604c8a82c2b
|
|
4
|
+
data.tar.gz: 28e23d4592a86308e3297a6595077913585e8108cfd8ad41dda633ccea57cca6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 93c9c354790dca5dbcc2f14a4bb8c5b75ae82c43283f27c8a1c2509478b9c75c6583f315b247cc7e82aa793ee476d67ae19c6c489cf9bb5e5f3c3a79d09f8097
|
|
7
|
+
data.tar.gz: 75fd66e26e0b8d5490c7dd066d734d794f5df9f2cb5babc873bf18f539abea836a5b7a70347efbb1051b46f95469381e499e29db4e33c9a7a5dbf2d0a7fcff33
|
|
@@ -21,6 +21,15 @@ module Dugway
|
|
|
21
21
|
%{<img id="captcha_image" src="https://s3.amazonaws.com/bigcartel/captcha/28e3d1288cbc70c0cd1a2d10845f8e11e1a90d14.png">}
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
+
def recaptcha
|
|
25
|
+
@recaptcha ||= begin
|
|
26
|
+
html = "This site is protected by reCAPTCHA and the Google "
|
|
27
|
+
html += '<a href="https://policies.google.com/privacy">Privacy Policy</a> and '
|
|
28
|
+
html += '<a href="https://policies.google.com/terms">Terms of Service</a> apply.'
|
|
29
|
+
html
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
24
33
|
def sent
|
|
25
34
|
request.path == '/contact' && request.post? && errors.blank?
|
|
26
35
|
end
|
data/lib/dugway/version.rb
CHANGED
|
@@ -13,7 +13,7 @@ describe Dugway::Drops::ContactDrop do
|
|
|
13
13
|
Rack::MockRequest::DEFAULT_ENV.update({
|
|
14
14
|
'PATH_INFO' => '/contact'
|
|
15
15
|
})}
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
let(:request) { Dugway::Request.new(env) }
|
|
18
18
|
|
|
19
19
|
let(:errors) {
|
|
@@ -96,6 +96,12 @@ describe Dugway::Drops::ContactDrop do
|
|
|
96
96
|
end
|
|
97
97
|
end
|
|
98
98
|
|
|
99
|
+
describe "#recaptcha" do
|
|
100
|
+
it "returns the recaptcha branding text" do
|
|
101
|
+
contact.recaptcha.should == %{This site is protected by reCAPTCHA and the Google <a href="https://policies.google.com/privacy">Privacy Policy</a> and <a href="https://policies.google.com/terms">Terms of Service</a> apply.}
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
99
105
|
describe "#sent" do
|
|
100
106
|
it "should return false before the form has been sent" do
|
|
101
107
|
contact.sent.should be(false)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dugway
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Big Cartel
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-10-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|