ecm_comments 0.1.0 → 0.2.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: e3fc1b6ba83a9d3985c7e4fff97c0d00ea6c53d0
4
- data.tar.gz: 9c91301f6357431ad3e348f95849974997908d0e
3
+ metadata.gz: 825ea80d90a255c8aa2bd295ff6464e375add90e
4
+ data.tar.gz: aa74e95b070f3a14e6ff53a3bf6215ce074d095c
5
5
  SHA512:
6
- metadata.gz: 6314ab5f58b59019f2a43e5b10c8ecbfb53c293ea7b80afa3432c3acccea4a7e7c5f4a3132b95baa6bbe7def190dd093e447914e7d663cbd9d090b86580684eb
7
- data.tar.gz: 24577aaebe774600d5e83c85cfb80af49a5fd85f749de6c81fd3f1ca0f371110615a2bde59cedff194dc75b7821a55f2d9a27e4b968cdfbae187d24dbba9dfb5
6
+ metadata.gz: c23318f680d7ddbc23bfc06162fecf298e3859fb6712e95c63cb07b3c24cb61acab8e0441309850571f0b9ea9524601ea75147039c5b4d5b957bc6da716f5ea9
7
+ data.tar.gz: 56d6e3a78d890cf25d3fb1ed2a0c61a3e1e61b60be4ac85e08cc03e09fcc56d9ab601d1bd9e183f90b08f26ea214c4b6657f6b900f1b39cee8c3756aba70564d
@@ -1,5 +1,5 @@
1
1
  module Ecm
2
2
  module Comments
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.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_comments.rb'
17
+ template 'initializer.rb', 'config/initializers/ecm_comments.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
@@ -1,9 +1,9 @@
1
1
  Ecm::Comments.configure do |config|
2
2
  # Set the base controller for the controllers
3
3
  #
4
- # Default: config.base_controller = '::FrontendController'
4
+ # Default: config.base_controller = '<%= base_controller_class_name %>'
5
5
  #
6
- config.base_controller = '::FrontendController'
6
+ config.base_controller = '<%= base_controller_class_name %>'
7
7
 
8
8
  config.creator_class_name = 'User'
9
9
  end
@@ -1,3 +1,3 @@
1
1
 
2
2
 
3
- mount Ecm::Comments::Engine, at: '/'
3
+ mount Ecm::Comments::Engine, at: '/'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecm_comments
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.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-11-05 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