ecm_cms2 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1e6364fc3164fd1c55e586159b1a29398d37b2b0
4
- data.tar.gz: 3ede2082907be277aa14133b0da47b90833f4555
3
+ metadata.gz: 4f7c54a778af57b1b39af7937cd1a15ae8793ea3
4
+ data.tar.gz: fd13db0eb19ec32847972d631964add819a21526
5
5
  SHA512:
6
- metadata.gz: fce777ff95913a00b6f0f4df4b51f0659e21e61f994ce2ff636bff931729eb737cbfa8665fffb4c38b1d50e47b1450fc3cbd8e9d77ebcd0d4c4c7e09cf981606
7
- data.tar.gz: b1193f91d736d099f532f5c17bde07242169a678053b9e8851568ae21bdc66a73138c6eae2b278f5c771d373e8fa22f080c6a4aa2c3e86bd562cb7ba912efa3c
6
+ metadata.gz: a870b892a47de990f997497126643d99a393d8d32af588e01e2ca6c9610b22fa167eec5053618d69d4978861f8b859a04e1c27462118888ddbbb5f74512a95f9
7
+ data.tar.gz: e9259ddfe1a1e228ab91c1fee064abadfa73418eb7b69d406fb8ac67ef93fc8a86a33615fb62b970009ebea4d3a3027332662cf5ede7e889f54719c4a477943f
@@ -11,7 +11,7 @@ module Ecm
11
11
  end
12
12
 
13
13
  # instance methods go here
14
- def find_templates(name, prefix, partial, details)
14
+ def find_templates(name, prefix, partial, details, outside_app_allowed = false)
15
15
  return [] unless resolve(partial)
16
16
 
17
17
  conditions = {
@@ -1,5 +1,5 @@
1
1
  module Ecm
2
2
  module Cms
3
- VERSION = '2.0.3'
3
+ VERSION = '2.0.4'
4
4
  end
5
5
  end
@@ -6,9 +6,25 @@ module Ecm
6
6
 
7
7
  source_root File.expand_path('../templates', __FILE__)
8
8
 
9
- def generate_intializer
9
+ def generate_initializer
10
10
  copy_file 'initializer.rb', 'config/initializers/ecm_cms.rb'
11
11
  end
12
+
13
+ def generate_controller
14
+ copy_file 'frontend_controller.rb', 'app/controllers/frontend_controller.rb'
15
+ end
16
+
17
+ def generate_routes
18
+ inject_into_file 'config/routes.rb', before: "\nend" do
19
+ File.read(File.join(File.expand_path('../templates', __FILE__), 'routes.source'))
20
+ end
21
+ end
22
+
23
+ # def add_homepages
24
+ # if yes? "Do you want to add homepages?"
25
+ # AddHomepagesService.call
26
+ # end
27
+ # end
12
28
  end
13
29
  end
14
30
  end
@@ -0,0 +1,2 @@
1
+ class FrontendController < ApplicationController
2
+ end
@@ -15,9 +15,9 @@ Ecm::Cms.configure do |config|
15
15
 
16
16
  # Set the base controller for the page controller
17
17
  #
18
- # Default: config.base_controller = 'ApplicationController'
18
+ # Default: config.base_controller = 'FrontendController'
19
19
  #
20
- config.base_controller = 'ApplicationController'
20
+ config.base_controller = 'FrontendController'
21
21
 
22
22
  # Set the property keys for navigation items. This keys will be accessible through the create/edit form.
23
23
  #
@@ -0,0 +1,8 @@
1
+
2
+ # ECM CMS Frontend Routing
3
+ localized do
4
+ # This must stay at last position, because it's greedy ;)
5
+ Ecm::Cms::Routing.routes(self)
6
+ end
7
+
8
+ root to: redirect("/#{I18n.locale}")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecm_cms2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
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: 2016-01-28 00:00:00.000000000 Z
11
+ date: 2016-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -480,7 +480,9 @@ files:
480
480
  - lib/ecm/cms/version.rb
481
481
  - lib/ecm_cms2.rb
482
482
  - lib/generators/ecm/cms/install/install_generator.rb
483
+ - lib/generators/ecm/cms/install/templates/frontend_controller.rb
483
484
  - lib/generators/ecm/cms/install/templates/initializer.rb
485
+ - lib/generators/ecm/cms/install/templates/routes.source
484
486
  - lib/generators/ecm/cms/locales/locales_generator.rb
485
487
  - lib/tasks/ecm_cms_tasks.rake
486
488
  homepage: https://github.com/robotex82/ecm_cms2