sybil 0.1.2 → 0.1.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/sybil/railtie.rb +6 -1
- data/lib/sybil/version.rb +1 -1
- metadata +2 -2
data/lib/sybil/railtie.rb
CHANGED
|
@@ -43,7 +43,12 @@ module Sybil
|
|
|
43
43
|
def inject_sybil
|
|
44
44
|
if Rails.configuration.sybil.layouts.include?(_layout) and (response.content_type =~ Rails.configuration.sybil.content_type)
|
|
45
45
|
@users = instance_eval(&Rails.configuration.sybil.users)
|
|
46
|
-
|
|
46
|
+
insert_index = response.body.rindex(Rails.configuration.sybil.inject_before)
|
|
47
|
+
if insert_index
|
|
48
|
+
response.body = response.body.insert(insert_index,ERB.new(File.read(File.join(File.dirname(__FILE__),'user_picker.html.erb'))).result(binding))
|
|
49
|
+
else
|
|
50
|
+
logger.warn "Sybil: Unable to match value of sybil.inject_before in response from #{params[:controller]}##{params[:action]}. Aborting."
|
|
51
|
+
end
|
|
47
52
|
end
|
|
48
53
|
end
|
|
49
54
|
end
|
data/lib/sybil/version.rb
CHANGED
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: sybil
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.1.
|
|
5
|
+
version: 0.1.3
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Jim Ryan
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2011-05-
|
|
13
|
+
date: 2011-05-26 00:00:00 -04:00
|
|
14
14
|
default_executable:
|
|
15
15
|
dependencies: []
|
|
16
16
|
|