rails_helper 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/rails_helper.rb +15 -7
- data/rails_helper.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjYyZmNiYjM4YmM3NWE1Mzg4ZmNjNDAwOGQwZTY1ZDExYjNhNGFlZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTM1NTJjOWE1MGIwZTI4YjMxZmFkNDJkZjJjNjFiM2U5ODMwYjNmNg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTY5NzE2M2ZjOTMzZjU4MmMyZDg4OGNkNGY1NjFkNWEwMDUwMzRlNjFjNmI5
|
10
|
+
NTRiYzkzYTBmMmI0ZTZiZDFhMDMyOTNiYzc1ODk4NjVmNjg0MjQ4N2FlZGZm
|
11
|
+
MzZjMmFlNDU5NGFjOWVmNWM4NjA2MDVjYjhiN2JhNWY1NzE0ZDg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MGM4MmU4ODUzYzIzZGE3OWY3MjU1ZjZlZDk5MDExOThjYzY1ZjU4ZjFhZGNm
|
14
|
+
ZWIxZWU1MmE1YTI0MDBjNWNiNmM1ZDMwZDRjOGIxYTQyNzhiOWI1OTI3NmJk
|
15
|
+
YzRkMWE5MDdkNTU3ZjU0YjQ2NWIxYTQ1MWFkZWE2ZmU2MzVmZGI=
|
data/lib/rails_helper.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
class Helper < (defined?(ActionView::Base) ? ActionView::Base : Object)
|
2
2
|
def Helper.version
|
3
|
-
'2.
|
3
|
+
'2.1.0'
|
4
4
|
end
|
5
5
|
|
6
6
|
def Helper.dependencies
|
@@ -15,27 +15,35 @@ class Helper < (defined?(ActionView::Base) ? ActionView::Base : Object)
|
|
15
15
|
controllers, args = args.partition{|arg| ActionController::Base === arg}
|
16
16
|
controller = controllers.first || Helper.current_controller || Helper.mock_controller
|
17
17
|
|
18
|
+
controller_class = controller.send(:class)
|
19
|
+
|
18
20
|
helpers = args
|
19
21
|
helpers.push(nil) if helpers.empty?
|
20
22
|
|
21
23
|
helpers.flatten!
|
22
24
|
helpers.uniq!
|
23
25
|
|
24
|
-
|
26
|
+
modules = []
|
27
|
+
|
28
|
+
helpers.each do |mod|
|
25
29
|
case mod
|
26
30
|
when NilClass, :all, 'all'
|
27
|
-
|
31
|
+
controller_class.send(:all_application_helpers).each do |name|
|
32
|
+
file_name = name.to_s.underscore + '_helper'
|
33
|
+
mod = file_name.camelize.constantize
|
34
|
+
modules.push(mod)
|
35
|
+
end
|
28
36
|
when Module
|
29
|
-
mod
|
37
|
+
modules.push(mod)
|
30
38
|
else
|
31
|
-
raise
|
39
|
+
raise(ArgumentError, mod.inspect)
|
32
40
|
end
|
33
41
|
end
|
34
42
|
|
35
43
|
view_class =
|
36
44
|
Class.new(self) do
|
37
|
-
|
38
|
-
include
|
45
|
+
modules.each do |mod|
|
46
|
+
include mod
|
39
47
|
end
|
40
48
|
self.helpers = helpers
|
41
49
|
end
|
data/rails_helper.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ara T. Howard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails_current
|