active_helper 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/active_helper.rb +2 -3
- data/test/rails_test.rb +13 -5
- metadata +19 -8
data/lib/active_helper.rb
CHANGED
data/test/rails_test.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/test_helper'
|
2
2
|
|
3
|
-
gem 'actionpack', '~>
|
3
|
+
#gem 'actionpack', '~>3.0'
|
4
|
+
require 'action_pack'
|
4
5
|
require 'action_controller'
|
5
6
|
require 'action_view'
|
6
7
|
require 'active_helper/rails' # usually happens in active_helper.rb
|
@@ -10,10 +11,6 @@ class BeerController < ActionController::Base
|
|
10
11
|
end
|
11
12
|
end
|
12
13
|
|
13
|
-
ActionController::Routing::Routes.draw do |map|
|
14
|
-
map.connect 'beer/:action', :controller => 'beer'
|
15
|
-
end
|
16
|
-
|
17
14
|
|
18
15
|
class RailsTest < ActionController::TestCase
|
19
16
|
context "The ActionController::Base class" do
|
@@ -45,6 +42,17 @@ class RailsTest < ActionController::TestCase
|
|
45
42
|
end
|
46
43
|
|
47
44
|
context "The view rendered by the controller" do
|
45
|
+
setup do
|
46
|
+
if ActionPack::VERSION::MAJOR == 3
|
47
|
+
@routes = ActionDispatch::Routing::RouteSet.new
|
48
|
+
@routes.draw { |map| map.connect ':controller/:action/:id' }
|
49
|
+
else
|
50
|
+
ActionController::Routing::Routes.draw do |map|
|
51
|
+
map.connect 'beer/:action', :controller => 'beer'
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
48
56
|
should "respond to used helper methods" do
|
49
57
|
@controller = BeerController.new
|
50
58
|
@controller.class.active_helper ThirstyHelper
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 2
|
8
|
+
- 2
|
9
|
+
version: 0.2.2
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Nick Sutterer
|
@@ -14,14 +19,18 @@ default_executable:
|
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
21
|
name: activesupport
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
24
|
requirements:
|
21
25
|
- - ">="
|
22
26
|
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 2
|
29
|
+
- 3
|
30
|
+
- 0
|
23
31
|
version: 2.3.0
|
24
|
-
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
25
34
|
description: Finally - helpers with proper encapsulation, delegation, interfaces and inheritance!
|
26
35
|
email: apotonick@gmail.com
|
27
36
|
executables: []
|
@@ -54,18 +63,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
54
63
|
requirements:
|
55
64
|
- - ">="
|
56
65
|
- !ruby/object:Gem::Version
|
66
|
+
segments:
|
67
|
+
- 0
|
57
68
|
version: "0"
|
58
|
-
version:
|
59
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
70
|
requirements:
|
61
71
|
- - ">="
|
62
72
|
- !ruby/object:Gem::Version
|
73
|
+
segments:
|
74
|
+
- 0
|
63
75
|
version: "0"
|
64
|
-
version:
|
65
76
|
requirements: []
|
66
77
|
|
67
78
|
rubyforge_project:
|
68
|
-
rubygems_version: 1.3.
|
79
|
+
rubygems_version: 1.3.6
|
69
80
|
signing_key:
|
70
81
|
specification_version: 3
|
71
82
|
summary: Finally - helpers with proper encapsulation, delegation, interfaces and inheritance!
|