dugway 0.12.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d4b19083d6ca54cd01c02838818a67437e42b289d41cba01f502b9037d6921e
4
- data.tar.gz: 886d1b3a6ed97edd75fd617c17671c196fc048ef3bd5323d0454d05d24f3ffdf
3
+ metadata.gz: 2625aace16555a5b683e997a7a0e445ba02a07418eb40b711ea03604c8a82c2b
4
+ data.tar.gz: 28e23d4592a86308e3297a6595077913585e8108cfd8ad41dda633ccea57cca6
5
5
  SHA512:
6
- metadata.gz: ae4ac7698a7287aa79a97b630ec46272f7e81a036b2c45fb1b48398341545eadd412825a2dda85350cf3414fb34a88bb776dd97dc986726f1ff4f5418ee92816
7
- data.tar.gz: 4ed1fe5591df26ffbd2cebb3b2d714909490c381d262b69bff1fa1e9593b3cdb63b156ba183a3b4c530cd1d2fe4b5ff588da0f69ae9a67af19605c2687d20729
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
@@ -1,3 +1,3 @@
1
1
  module Dugway
2
- VERSION = "0.12.3"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -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.12.3
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-09-17 00:00:00.000000000 Z
11
+ date: 2020-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler