draper 0.3.2 → 0.3.3
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.
- data/lib/draper/base.rb +4 -1
- data/lib/draper/version.rb +1 -1
- data/spec/base_spec.rb +1 -0
- metadata +4 -4
data/lib/draper/base.rb
CHANGED
@@ -3,7 +3,6 @@ module Draper
|
|
3
3
|
include ActionView::Helpers::TagHelper
|
4
4
|
include ActionView::Helpers::UrlHelper
|
5
5
|
include ActionView::Helpers::TextHelper
|
6
|
-
include ApplicationHelper #if defined?(ApplicationHelper)
|
7
6
|
|
8
7
|
require 'active_support/core_ext/class/attribute'
|
9
8
|
class_attribute :denied, :allowed
|
@@ -32,6 +31,10 @@ module Draper
|
|
32
31
|
def self.decorate(input)
|
33
32
|
input.respond_to?(:each) ? input.map{|i| new(i)} : new(input)
|
34
33
|
end
|
34
|
+
|
35
|
+
def helpers
|
36
|
+
ActionController::Base.helpers
|
37
|
+
end
|
35
38
|
|
36
39
|
private
|
37
40
|
def select_methods
|
data/lib/draper/version.rb
CHANGED
data/spec/base_spec.rb
CHANGED
@@ -130,6 +130,7 @@ describe Draper::Base do
|
|
130
130
|
|
131
131
|
context "in a Rails application" do
|
132
132
|
it "should include ApplicationHelper if one exists" do
|
133
|
+
pending
|
133
134
|
decorator = DecoratorApplicationHelper.decorate(Object.new)
|
134
135
|
decorator.uses_hello == "Hello, World!"
|
135
136
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: draper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.3.
|
5
|
+
version: 0.3.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jeff Casimir
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-07-
|
13
|
+
date: 2011-07-11 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -143,7 +143,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
143
143
|
requirements:
|
144
144
|
- - ">="
|
145
145
|
- !ruby/object:Gem::Version
|
146
|
-
hash: -
|
146
|
+
hash: -714058638522234343
|
147
147
|
segments:
|
148
148
|
- 0
|
149
149
|
version: "0"
|
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
152
|
requirements:
|
153
153
|
- - ">="
|
154
154
|
- !ruby/object:Gem::Version
|
155
|
-
hash: -
|
155
|
+
hash: -714058638522234343
|
156
156
|
segments:
|
157
157
|
- 0
|
158
158
|
version: "0"
|