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 +4 -4
- data/lib/mautic/form_helper.rb +7 -1
- data/lib/mautic/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11db7c9607e84c68c33c020711014b1f6c858073
|
4
|
+
data.tar.gz: 3bdca3d4ab03eb07970fbdb7d14ac06133694093
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47d1a229897761802e43a7fc317ee01bf6b2bdce1ad6bda948e5432fd52a6f8c122e9df5c3b04d606012bb276cac2b8f8d3c99415c91786da0e09c328fd1af62
|
7
|
+
data.tar.gz: b4e767ec3ede605578d385af2f5091ef8803ac53d6196476a9c9f33c72a1c61024146055138089505fc03e6a523dd3049f5942bbf0f08767a702cda077996d69
|
data/lib/mautic/form_helper.rb
CHANGED
@@ -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
|
-
|
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
|
data/lib/mautic/version.rb
CHANGED
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.
|
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-
|
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
|