ramen-rails 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -7
- data/lib/ramen-rails/ramen_after_filter.rb +2 -2
- data/lib/ramen-rails/version.rb +1 -1
- data/spec/lib/ramen_after_filter_spec.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2231db474859bb6ac9a717111a5bb44ba6ef4fee
|
4
|
+
data.tar.gz: d9b7fcdefbe4adb5abccdbd8a87e99d756af8da9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 487301f75169b1d3ed242194f8efd064ce1f0ffbd3d619f9b2d2634a06bb542b4f499637377d782e646bf7ad0ab6850934725af8febc1266e2851a84eca79723
|
7
|
+
data.tar.gz: 0305862b25190f572c64d7d1de9d1217279da814bd2e8d202fff1c88bc364eb96492010b51d0039dd14987f0a5d71934a8b5c71ca8b7d85064fa0e04a4c41ae1
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ramen-rails (0.0.
|
5
|
-
activesupport (~> 4.0
|
4
|
+
ramen-rails (0.0.5)
|
5
|
+
activesupport (~> 4.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
@@ -51,9 +51,9 @@ PLATFORMS
|
|
51
51
|
ruby
|
52
52
|
|
53
53
|
DEPENDENCIES
|
54
|
-
actionpack (~> 4.0
|
55
|
-
hashie (~> 3.4
|
56
|
-
rake (~> 10.4
|
54
|
+
actionpack (~> 4.0)
|
55
|
+
hashie (~> 3.4)
|
56
|
+
rake (~> 10.4)
|
57
57
|
ramen-rails!
|
58
|
-
rspec (~> 3.2
|
59
|
-
timecop (~> 0.7
|
58
|
+
rspec (~> 3.2)
|
59
|
+
timecop (~> 0.7)
|
@@ -61,7 +61,7 @@ module RamenRails
|
|
61
61
|
|
62
62
|
def ramen_user_labels
|
63
63
|
return nil unless ramen_user_object
|
64
|
-
instance_eval(&RamenRails.config.current_user_labels) if RamenRails.config.current_user_labels.present?
|
64
|
+
controller.instance_eval(&RamenRails.config.current_user_labels) if RamenRails.config.current_user_labels.present?
|
65
65
|
rescue NameError => e
|
66
66
|
Rails.logger.debug "Swallowing NameError. We're probably in an Engine or some other context like Devise."
|
67
67
|
Rails.logger.debug e
|
@@ -85,7 +85,7 @@ module RamenRails
|
|
85
85
|
|
86
86
|
def ramen_user_value
|
87
87
|
return nil unless ramen_user_object
|
88
|
-
instance_eval(&RamenRails.config.current_user_value) if RamenRails.config.current_user_value.present?
|
88
|
+
controller.instance_eval(&RamenRails.config.current_user_value) if RamenRails.config.current_user_value.present?
|
89
89
|
rescue NameError => e
|
90
90
|
Rails.logger.debug "Swallowing NameError. We're probably in an Engine or some other context like Devise."
|
91
91
|
Rails.logger.debug e
|
data/lib/ramen-rails/version.rb
CHANGED
@@ -56,6 +56,7 @@ describe 'After filter' do
|
|
56
56
|
before :each do
|
57
57
|
RamenRails.config do |c|
|
58
58
|
c.current_company = Proc.new { Hashie::Mash.new(name: 'Scrubber', url: 'https://scrubber.social') }
|
59
|
+
c.current_user_labels = Proc.new { ["ryan", "gold"] }
|
59
60
|
end
|
60
61
|
end
|
61
62
|
|
@@ -65,6 +66,7 @@ describe 'After filter' do
|
|
65
66
|
expect(@dummy.response.body).to include("Angilly")
|
66
67
|
expect(@dummy.response.body).to include("company")
|
67
68
|
expect(@dummy.response.body).to include("Scrubber")
|
69
|
+
expect(@dummy.response.body).to include("gold")
|
68
70
|
end
|
69
71
|
end
|
70
72
|
|