ecm_links2 3.0.1 → 3.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: c4f9b1f727d60faf9539b48f1eecb987318802cc
4
- data.tar.gz: 2f53b99704afed79800d6fde9ddf51c4f985e68f
3
+ metadata.gz: aa66765da7e9f36ce94edefcb213ec3b567d9a71
4
+ data.tar.gz: 41b0ba722fd23ca92d783f2ee28cb7316fa40acc
5
5
  SHA512:
6
- metadata.gz: 77cf0f82572b3b188ce847ed34ec6ea66ec8cd38afd883c352a25c285391084a065898479fd00b606b9ef14772832f5baf308a5494a1305466928c72a0232e37
7
- data.tar.gz: 2c7a7723ca0174ce97782997a3ee4e861d5aa0eae8fc8d04ec3e72c62f24d55bb49fcb7e0fcc5950cd4ebcdc8eea5b2df4805d314bc00239ab4ef62ba7f0ef2e
6
+ metadata.gz: 9de447e8db123215bdff7e6bcb33222d4e583d3218a6574a411d9599d783abc5182f673af7cca552189f20b73afcf631f6712c532af74b9d44e8fb171639a7e7
7
+ data.tar.gz: 45d8d1923ab19133e28f370750d9a89edd0315d169765698465f6724bae97043d6a8e33bd34a47c2ecdf2eefd82094a691be681e2632ea58797c124a82ed68d5
@@ -1,5 +1,5 @@
1
1
  module Ecm
2
2
  module Links
3
- VERSION = '3.0.1'
3
+ VERSION = '3.1.0'.freeze
4
4
  end
5
5
  end
@@ -6,14 +6,20 @@ 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
+
16
+
9
17
  def generate_initializer
10
- copy_file 'initializer.rb', 'config/initializers/ecm_links.rb'
18
+ template 'initializer.rb', 'config/initializers/ecm_links.rb'
11
19
  end
12
20
 
13
21
  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
22
+ route File.read(File.join(File.expand_path('../templates', __FILE__), 'routes.source'))
17
23
  end
18
24
  end
19
25
  end
@@ -13,9 +13,9 @@ Ecm::Links.configure do |config|
13
13
 
14
14
  # Set the base controller for the contact form
15
15
  #
16
- # Default: config.base_controller = 'ApplicationController'
16
+ # Default: config.base_controller = '<%= base_controller_class_name %>'
17
17
  #
18
- config.base_controller = 'ApplicationController'
18
+ config.base_controller = '<%= base_controller_class_name %>'
19
19
 
20
20
  # Accepted markup languages
21
21
  #
@@ -1,5 +1,3 @@
1
1
 
2
- # ECM Links Frontend Routing
3
- localized do
4
- Ecm::Links::Routing.routes(self)
5
- end
2
+
3
+ mount Ecm::Links::Engine, at: '/'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecm_links2
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.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-07-23 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