mautic 0.1.2 → 0.1.3

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
  SHA1:
3
- metadata.gz: 7ffe887a24a76b7478220db1f4acfa84f0fdb7a9
4
- data.tar.gz: 53130ea996b7e93e54a537c80dd489abbd1c8c5c
3
+ metadata.gz: 11db7c9607e84c68c33c020711014b1f6c858073
4
+ data.tar.gz: 3bdca3d4ab03eb07970fbdb7d14ac06133694093
5
5
  SHA512:
6
- metadata.gz: f9430d72187f8fa3aaac4d3d96f00b5b206e8a41f1fd5914d48d83b38d2f2b41e66ea02b49f23fbf1915fb7d10d473075c04ee59f1696abe0069042c3bd27b9a
7
- data.tar.gz: 0f5ba996476345d15e19d71c379cc6285b137a3049dbf15362b609904a699b8e66a4eddbe7cb70f325c15770ed6582585d40b06b78c75043e3056fce07fc4bb8
6
+ metadata.gz: 47d1a229897761802e43a7fc317ee01bf6b2bdce1ad6bda948e5432fd52a6f8c122e9df5c3b04d606012bb276cac2b8f8d3c99415c91786da0e09c328fd1af62
7
+ data.tar.gz: b4e767ec3ede605578d385af2f5091ef8803ac53d6196476a9c9f33c72a1c61024146055138089505fc03e6a523dd3049f5942bbf0f08767a702cda077996d69
@@ -31,6 +31,7 @@ module Mautic
31
31
  raise ArgumentError if @data.nil?
32
32
  defaults = {
33
33
  'submit' => '1',
34
+ 'return' => host,
34
35
  'domain' => host
35
36
  }
36
37
  defaults.merge(@data.to_h).inject({}){|mem, (name, value)| mem["mauticform[#{name}]"] = value; mem}
@@ -41,7 +42,12 @@ module Mautic
41
42
  uri.path = '/form/submit'
42
43
  headers = {}
43
44
  headers.store 'X-Forwarded-For', forward_ip if forward_ip
44
- RestClient.post uri.to_s, data, headers
45
+ begin
46
+ @response = RestClient.post uri.to_s, data, headers
47
+ rescue RestClient::Found => e
48
+ @response = e
49
+ end
50
+
45
51
  end
46
52
  alias_method :push, :submit
47
53
  end
@@ -1,3 +1,3 @@
1
1
  module Mautic
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mautic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukáš Pokorný
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-05 00:00:00.000000000 Z
11
+ date: 2017-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -240,5 +240,5 @@ signing_key:
240
240
  specification_version: 4
241
241
  summary: Ruby on Rails Mautic integration
242
242
  test_files:
243
- - spec/rails_helper.rb
244
243
  - spec/spec_helper.rb
244
+ - spec/rails_helper.rb