render_anywhere 0.0.1 → 0.0.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.
@@ -10,6 +10,6 @@ module RenderAnywhere
10
10
  end
11
11
 
12
12
  def rendering_controller
13
- @rendering_controller ||= RenderingController.new
13
+ @rendering_controller ||= RenderAnywhere::RenderingController.new
14
14
  end
15
15
  end
@@ -1,46 +1,48 @@
1
- class RenderingController < AbstractController::Base
2
- # Include all the concerns we need to make this work
3
- include AbstractController::Logger
4
- include AbstractController::Rendering
5
- include AbstractController::Layouts
6
- include AbstractController::Helpers
7
- include AbstractController::Translation
8
- include AbstractController::AssetPaths
9
- include Rails.application.routes.url_helpers
10
-
11
- # this is you normal rails application helper
12
- helper ApplicationHelper
13
-
14
- # Define additional helpers, this one is for csrf_meta_tag
15
- helper_method :protect_against_forgery?
16
-
17
- # override the layout in your subclass if needed.
18
- layout 'application'
19
-
20
- # configure the different paths correctly
21
- def initialize(*args)
22
- super()
23
- lookup_context.view_paths = Rails.root.join('app', 'views')
24
- config.javascripts_dir = Rails.root.join('public', 'javascripts')
25
- config.stylesheets_dir = Rails.root.join('public', 'stylesheets')
26
- config.assets_dir = Rails.root.join('public')
1
+ module RenderAnywhere
2
+ class RenderingController < AbstractController::Base
3
+ # Include all the concerns we need to make this work
4
+ include AbstractController::Logger
5
+ include AbstractController::Rendering
6
+ include AbstractController::Layouts
7
+ include AbstractController::Helpers
8
+ include AbstractController::Translation
9
+ include AbstractController::AssetPaths
10
+ include Rails.application.routes.url_helpers
11
+
12
+ # this is you normal rails application helper
13
+ helper ApplicationHelper
14
+
15
+ # Define additional helpers, this one is for csrf_meta_tag
16
+ helper_method :protect_against_forgery?
17
+
18
+ # override the layout in your subclass if needed.
19
+ layout 'application'
20
+
21
+ # configure the different paths correctly
22
+ def initialize(*args)
23
+ super()
24
+ lookup_context.view_paths = Rails.root.join('app', 'views')
25
+ config.javascripts_dir = Rails.root.join('public', 'javascripts')
26
+ config.stylesheets_dir = Rails.root.join('public', 'stylesheets')
27
+ config.assets_dir = Rails.root.join('public')
28
+ end
29
+
30
+ # we are not in a browser, no need for this
31
+ def protect_against_forgery?
32
+ false
33
+ end
34
+
35
+ # so that your flash calls still work
36
+ def flash
37
+ {}
38
+ end
39
+
40
+ # same asset host as the controllers
41
+ self.asset_host = ActionController::Base.asset_host
42
+
43
+ # and nil request to differentiate between live and offline
44
+ def request
45
+ nil
46
+ end
27
47
  end
28
-
29
- # we are not in a browser, no need for this
30
- def protect_against_forgery?
31
- false
32
- end
33
-
34
- # so that your flash calls still work
35
- def flash
36
- {}
37
- end
38
-
39
- # same asset host as the controllers
40
- self.asset_host = ActionController::Base.asset_host
41
-
42
- # and nil request to differentiate between live and offline
43
- def request
44
- nil
45
- end
46
- end
48
+ end
@@ -1,3 +1,3 @@
1
1
  module RenderAnywhere
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: render_anywhere
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Luke Melia