ecm_contact2 5.0.1 → 5.1.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
  SHA1:
3
- metadata.gz: d7dc9e1f9ccc5505944a124cb9dd010f12f182fa
4
- data.tar.gz: 1074f2dc531272031fb29549e5363f2fc69341fe
3
+ metadata.gz: 79ab7ac7f61c002b9cd0f7c446d492a0d02d1084
4
+ data.tar.gz: 2c10d7112f7c1530f800e7b33416fb9185e428e3
5
5
  SHA512:
6
- metadata.gz: 5d2493c48949ed18d74e7abef9f4247adf7d6059ad68e173452badcbc20d719a7b68ede2342ed0f6a4b82966d3ec3cede7bc92265d1ea1655b2e9f6f7c570494
7
- data.tar.gz: 7af4b4ecea5f8b35a0f89d66f6b7de70b9a05e085fb765a1bb38764528475db2038c457bdc0e593687eb2eac9cc284ce45c74448491261abef6f2a883ee1fd4e
6
+ metadata.gz: e34afc305ba080d98a85e7fa1190891dc5c4662b29e2cd3da9f7f70240ca29cbe2e7a35853ecefa47248b3399615b66b30e71e1e1bd99393a318d1b663b3ea46
7
+ data.tar.gz: 10c227ddc79bea1f50f2ef5ff537214a0319a134ff5357e022f33b1320729435a93d61967c47c759f280abf850af0e8d11c9d8c6eb31bd255f7577a907905dd1
@@ -1,5 +1,5 @@
1
1
  module Ecm
2
2
  module Contact
3
- VERSION = '5.0.1'
3
+ VERSION = '5.1.0'.freeze
4
4
  end
5
5
  end
@@ -6,14 +6,19 @@ module Ecm
6
6
 
7
7
  source_root File.expand_path('../templates', __FILE__)
8
8
 
9
+ attr_reader :base_controller_class_name
10
+
11
+ def initialize(*args)
12
+ super
13
+ @base_controller_class_name = ENV.fetch('BASE_CONTROLLER_CLASS_NAME') { '::FrontendController' }
14
+ end
15
+
9
16
  def generate_initializer
10
- copy_file 'initializer.rb', 'config/initializers/ecm_contact.rb'
17
+ template 'initializer.rb', 'config/initializers/ecm_contact.rb'
11
18
  end
12
19
 
13
20
  def generate_routes
14
- inject_into_file 'config/routes.rb', before: "\nend" do
15
- File.read(File.join(File.expand_path('../templates', __FILE__), 'routes.source'))
16
- end
21
+ route File.read(File.join(File.expand_path('../templates', __FILE__), 'routes.source'))
17
22
  end
18
23
  end
19
24
  end
@@ -55,9 +55,9 @@ Ecm::Contact.configure do |config|
55
55
 
56
56
  # set the base controller for the contact form
57
57
  #
58
- # Default: config.base_controller = 'ApplicationController'
58
+ # Default: config.base_controller = '<%= base_controller_class_name %>'
59
59
  #
60
- config.base_controller = 'ApplicationController'
60
+ config.base_controller = '<%= base_controller_class_name %>'
61
61
 
62
62
  # Add additional information to the contact form. This will be printed
63
63
  # between the heading and the form. You should provide a proc, or
@@ -1,2 +1,3 @@
1
-
2
- mount Ecm::Contact::Engine, at: '/'
1
+
2
+
3
+ mount Ecm::Contact::Engine, at: '/'
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecm_contact2
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.1
4
+ version: 5.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-31 00:00:00.000000000 Z
11
+ date: 2018-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 5.1.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 5.1.1
27
27
  - !ruby/object:Gem::Dependency