rails_helper 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/rails_helper.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  class Helper
2
- def Helper.version() '1.0.0' end
2
+ def Helper.version() '1.1.0' end
3
3
 
4
4
  def Helper.dependencies
5
5
  {
@@ -8,10 +8,20 @@ class Helper
8
8
  end
9
9
 
10
10
 
11
- if defined?(Rails)
12
- url_helpers = Rails.application.try(:routes).try(:url_helpers)
13
- include(url_helpers) if url_helpers
14
- include(ActionView::Helpers) if defined?(ActionView::Helpers)
11
+ if defined?(Rails::Engine)
12
+
13
+ class Engine < Rails::Engine
14
+ config.after_initialize do
15
+ if defined?(ActionView::Helpers)
16
+ ::Helper.send(:include, ActionView::Helpers)
17
+ end
18
+
19
+ if defined?(Rails.application.routes.url_helpers)
20
+ ::Helper.send(:include, Rails.application.routes.url_helpers)
21
+ end
22
+ end
23
+ end
24
+
15
25
  end
16
26
 
17
27
  def controller
data/rails_helper.gemspec CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification::new do |spec|
5
5
  spec.name = "rails_helper"
6
- spec.version = "1.0.0"
6
+ spec.version = "1.1.0"
7
7
  spec.platform = Gem::Platform::RUBY
8
8
  spec.summary = "rails_helper"
9
9
  spec.description = "description: rails_helper kicks the ass"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-17 00:00:00.000000000 Z
12
+ date: 2011-12-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails_current
16
- requirement: &70226360471260 !ruby/object:Gem::Requirement
16
+ requirement: &70166147788740 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '1.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70226360471260
24
+ version_requirements: *70166147788740
25
25
  description: ! 'description: rails_helper kicks the ass'
26
26
  email: ara.t.howard@gmail.com
27
27
  executables: []