renderer 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,7 @@
1
1
  module Renderer
2
- module Rails
3
- class Engine < ::Rails::Engine
2
+ class Engine < ::Rails::Engine
3
+ initialize "renderer.load_app_root" do |app|
4
+ Renderer.app_root = app.root
4
5
  end
5
6
  end
6
7
  end
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
  module Renderer
3
3
  def self.render(partial, locals={}, helpers=[])
4
- view = ActionView::Base.new(Rails.root.join('app', 'views'))
4
+ view = ActionView::Base.new(Renderer.app_root.join('app', 'views'))
5
5
  helpers.each do |helper|
6
6
  view.extend(helper)
7
7
  end
@@ -1,3 +1,3 @@
1
1
  module Renderer
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
data/lib/renderer.rb CHANGED
@@ -2,4 +2,6 @@ require "renderer/engine"
2
2
  require "renderer/renderer"
3
3
  require "renderer/version"
4
4
 
5
- module Renderer; end
5
+ module Renderer
6
+ mattr_accessor :app_root
7
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: renderer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: