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.
Files changed (3) hide show
  1. data/lib/active_helper.rb +2 -3
  2. data/test/rails_test.rb +13 -5
  3. metadata +19 -8
@@ -1,10 +1,9 @@
1
- gem 'activesupport', '~>2.3'
2
- require 'active_support'
1
+ require 'active_support/core_ext'
3
2
  require 'forwardable'
4
3
 
5
4
 
6
5
  module ActiveHelper
7
- VERSION = '0.2.1'
6
+ VERSION = '0.2.2'
8
7
 
9
8
  module GenericMethods
10
9
  def use_for(classes, target)
@@ -1,6 +1,7 @@
1
1
  require File.dirname(__FILE__) + '/test_helper'
2
2
 
3
- gem 'actionpack', '~>2.3'
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
- version: 0.2.1
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
- type: :runtime
18
- version_requirement:
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
- version:
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.5
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!