omghax-rails-footnotes 3.6.1 → 3.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README +2 -2
- data/lib/rails-footnotes.rb +1 -1
- data/lib/rails-footnotes/footnotes.rb +4 -4
- data/lib/rails-footnotes/notes/controller_note.rb +9 -1
- metadata +4 -3
data/README
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Rails Footnotes
|
2
2
|
License: MIT
|
3
|
-
Version: 3.6
|
3
|
+
Version: 3.6.2
|
4
4
|
|
5
5
|
You can also read this README in pretty html at the GitHub project Wiki page
|
6
6
|
|
@@ -38,7 +38,7 @@ If you want it as plugin, just do:
|
|
38
38
|
If you are running on Rails 2.2 or Rails 2.1 you should do:
|
39
39
|
|
40
40
|
cd myapp
|
41
|
-
git clone git://github.com/josevalim/rails-footnotes.git
|
41
|
+
git clone git://github.com/josevalim/rails-footnotes.git vendor/plugins/rails-footnotes
|
42
42
|
cd vendor/plugins/rails-footnotes
|
43
43
|
git checkout VERSION_NUMBER
|
44
44
|
rm -rf ./.git
|
data/lib/rails-footnotes.rb
CHANGED
@@ -5,7 +5,7 @@ require File.join(dir, 'rails-footnotes', 'backtracer')
|
|
5
5
|
# Load all notes
|
6
6
|
#
|
7
7
|
Dir[File.join(dir, 'rails-footnotes', 'notes', '*.rb')].each do |note|
|
8
|
-
require note
|
8
|
+
require note unless note ~= /queries/ && !defined?(ActiveRecord)
|
9
9
|
end
|
10
10
|
|
11
11
|
# The footnotes are applied by default to all actions. You can change this
|
@@ -13,10 +13,10 @@ module Footnotes
|
|
13
13
|
@@notes += [ :assigns, :session, :cookies, :params, :filters, :routes, :env, :queries, :log, :general ]
|
14
14
|
|
15
15
|
# Change queries for rpm note when available
|
16
|
-
if defined?(NewRelic)
|
17
|
-
|
18
|
-
|
19
|
-
end
|
16
|
+
# if defined?(NewRelic)
|
17
|
+
# @@notes.delete(:queries)
|
18
|
+
# @@notes << :rpm
|
19
|
+
# end
|
20
20
|
|
21
21
|
# :no_style => If you don't want the style to be appended to your pages
|
22
22
|
# :notes => Class variable that holds the notes to be processed
|
@@ -25,7 +25,15 @@ module Footnotes
|
|
25
25
|
def controller_filename
|
26
26
|
controller_name=@controller.class.to_s.underscore
|
27
27
|
controller_name='application' if controller_name=='application_controller'
|
28
|
-
|
28
|
+
if ActionController::Routing.respond_to? :controller_paths
|
29
|
+
ActionController::Routing.controller_paths.each do |controller_path|
|
30
|
+
full_controller_path = File.join(File.expand_path(controller_path), "#{controller_name}.rb")
|
31
|
+
return full_controller_path if File.exists?(full_controller_path)
|
32
|
+
end
|
33
|
+
raise "File not found"
|
34
|
+
else
|
35
|
+
File.join(File.expand_path(RAILS_ROOT), 'app', 'controllers', "#{controller_name}.rb").sub('/controllers/controllers/', '/controllers/')
|
36
|
+
end
|
29
37
|
end
|
30
38
|
|
31
39
|
def controller_text
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omghax-rails-footnotes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.
|
4
|
+
version: 3.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Jos\xC3\xA9 Valim"
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-07-12 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -49,6 +49,7 @@ files:
|
|
49
49
|
- lib/rails-footnotes/notes/view_note.rb
|
50
50
|
has_rdoc: true
|
51
51
|
homepage: http://github.com/josevalim/rails-footnotes
|
52
|
+
licenses:
|
52
53
|
post_install_message:
|
53
54
|
rdoc_options:
|
54
55
|
- --main
|
@@ -70,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
71
|
requirements: []
|
71
72
|
|
72
73
|
rubyforge_project:
|
73
|
-
rubygems_version: 1.
|
74
|
+
rubygems_version: 1.3.5
|
74
75
|
signing_key:
|
75
76
|
specification_version: 2
|
76
77
|
summary: Every Rails page has footnotes that gives information about your application and links back to your editor.
|