codelation_pages 0.1.1 → 0.1.2

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: 62816f739c8d81f1d54792c92a8b4b638947806f
4
- data.tar.gz: e9e40faaba3d4d82a63c36c1b6ca6dabfd54618d
3
+ metadata.gz: 65d9c367f06e532025e657baddc753462aa78955
4
+ data.tar.gz: 1ad937686804bb007c7abed9c263c70550d5dc26
5
5
  SHA512:
6
- metadata.gz: 4d45656dba50ea6cee6b29456f7fd154975333f4e3f3494896ee499041cd56ca3146d5bc2e0e7689da731c6584298d676190980f09305f86924896070793ed58
7
- data.tar.gz: 82bf0ebe4ae94f35b9a59bf2957849643449495ba69fc5fed01e3ce015f03e005649ee5894b13c0a7bc247c8d4db23499d1a6e0d844eb26bc31c08d8254cb4c1
6
+ metadata.gz: bbcf89f619cb13112fe623f38044aedc05eed3b65895026edb95f11ceb3d8ac5943e2252354fa0097e925268c3ed90eed89c75a9e602beeaa859276ce4295558
7
+ data.tar.gz: b7e0192d8efac9c3f4dfdd3313d69c3e0cd7ae329415392fcca83072b8dcae503b1b72b0245db5e4738532a7ae249185849dd23deb392aaee4167ae5e821ef92
@@ -1,3 +1,3 @@
1
1
  module CodelationPages
2
- VERSION = "0.1.1".freeze
2
+ VERSION = "0.1.2".freeze
3
3
  end
@@ -23,12 +23,6 @@ module ActionDispatch
23
23
 
24
24
  private
25
25
 
26
- # Returns an application controller for serving static files.
27
- def controller
28
- Class.new(ApplicationController) do
29
- end
30
- end
31
-
32
26
  # Returns whether or not a custom controller file exists.
33
27
  # @param directory_name [String]
34
28
  def custom_controller_exists(directory_name)
@@ -88,12 +82,18 @@ module ActionDispatch
88
82
  def generate_custom_controller(directory_name)
89
83
  Object.const_set("Pages", Module.new) unless pages_module_exists
90
84
  controller_class_name = "#{directory_name.camelize}Controller"
91
- Pages.const_set(controller_class_name, controller) unless custom_controller_exists(directory_name)
85
+ Pages.const_set(controller_class_name, pages_controller) unless custom_controller_exists(directory_name)
92
86
  end
93
87
 
94
88
  # Generates the `PagesController` if it doesn't already exist
95
89
  def generate_pages_controller
96
- Object.const_set("PagesController", controller) unless pages_controller_exists
90
+ Object.const_set("PagesController", pages_controller) unless pages_controller_exists
91
+ end
92
+
93
+ # Returns an application controller for serving static files.
94
+ def pages_controller
95
+ Class.new(ApplicationController) do
96
+ end
97
97
  end
98
98
 
99
99
  # Returns whether or not the PagesController file exists.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codelation_pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Pattison