mautic 0.1.7 → 0.1.8

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: 69e12653c1733475492f305f2fbb677898ac30997c8e145d9d83222890a5084b
4
- data.tar.gz: 61448d97dd30a0b94b9f5898e64d37316176d4497f1a4bebf2da86d6b05fe830
3
+ metadata.gz: 5fe0c00bf9adc2bb52aebcec2b270740492e49d6e8a3627635b1c5612e82b04a
4
+ data.tar.gz: 40ada8b3e84aa4ee9bb3ced6392fe47c912cd3ccf32bd7c97ff0f08454f2d2ef
5
5
  SHA512:
6
- metadata.gz: e8a174aff3f060c0659a8ec1a2b04861ee9ddba6a246f50ae60f1e913dbcfed96263bb831d417aa143d2476933c3d3876421976270073ce56cc414543c5527af
7
- data.tar.gz: acc8e875b58b23d8d0eba9a416fff6a3823218993162be99f2b55602c7a3d3f7d53a98818e30063703f747a1eb02f396daa4f23f452decaab5f4a8c57de2af5a
6
+ metadata.gz: 46d1ac327fee620c46227d3b8e41e16d2b66edcd5d228bdf7a414caca606e107cae91cd2c503fead21e37028b497136f3df19135f9d588d5175a73900e560c8f
7
+ data.tar.gz: a7eb6c40d61fa28df4907c022af430df7ec3d24c5ccbce5e284dda73f822991251737c3fbadf6ffc51e4505f2324defc2d726582b8f7c5bcc2c918fddf872bbd
data/README.md CHANGED
@@ -86,6 +86,7 @@ add to `config/initializers/mautic.rb`:
86
86
  Mautic.configure do |config|
87
87
  # This is for oauth handshake token url. I need to know where your app listen
88
88
  config.base_url = "https://my-rails-app.com"
89
+ # OR it can be Proc
89
90
  # *optional* This is your default mautic URL - used in form helper
90
91
  config.mautic_url = "https://mautic.my.app"
91
92
  end
@@ -46,6 +46,14 @@ module Mautic
46
46
 
47
47
  private
48
48
 
49
+ def callback_url
50
+ if (conf = Mautic.config.base_url).is_a?(Proc)
51
+ conf = conf.call(self)
52
+ end
53
+
54
+ URI.parse(conf)
55
+ end
56
+
49
57
  def parse_response(response)
50
58
  case response.status
51
59
  when 400
@@ -38,8 +38,7 @@ module Mautic
38
38
  private
39
39
 
40
40
  def callback_url
41
- # return Mautic.config.oauth2_callback_url if Mautic.config.oauth2_callback_url
42
- uri = URI.parse(Mautic.config.base_url)
41
+ uri = super
43
42
  uri.path = Mautic::Engine.routes.url_helpers.oauth2_connection_path(self)
44
43
  uri.to_s
45
44
  end
@@ -1,3 +1,3 @@
1
1
  module Mautic
2
- VERSION = '0.1.7'
2
+ VERSION = '0.1.8'
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.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukáš Pokorný
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-21 00:00:00.000000000 Z
11
+ date: 2018-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails