rails-footnotes 4.1.5 → 5.0.0
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.
- checksums.yaml +5 -5
- data/.github/workflows/ci.yml +25 -0
- data/.gitignore +4 -3
- data/CHANGELOG +8 -0
- data/Gemfile +8 -1
- data/Gemfile.lock +187 -0
- data/README.rdoc +8 -54
- data/Rakefile +1 -6
- data/bin/rake +29 -0
- data/bin/rspec +29 -0
- data/gemfiles/{Gemfile.rails-3.2.x → Gemfile.rails-3.2.22} +1 -1
- data/lib/generators/templates/rails_footnotes.rb +4 -5
- data/lib/rails-footnotes.rb +9 -9
- data/lib/rails-footnotes/extension.rb +8 -11
- data/lib/rails-footnotes/filter.rb +13 -4
- data/lib/rails-footnotes/notes/assigns_note.rb +2 -2
- data/lib/rails-footnotes/notes/files_note.rb +12 -23
- data/lib/rails-footnotes/notes/log_note.rb +1 -1
- data/lib/rails-footnotes/notes/params_note.rb +5 -1
- data/lib/rails-footnotes/notes/queries_note.rb +9 -10
- data/lib/rails-footnotes/notes/view_note.rb +16 -7
- data/lib/rails-footnotes/version.rb +1 -1
- data/lib/rails6-footnotes.rb +1 -0
- data/rails-footnotes.gemspec +5 -10
- data/spec/abstract_note_spec.rb +17 -13
- data/spec/app/assets/config/manifest.js +2 -0
- data/spec/app/assets/javascripts/foobar.js +1 -0
- data/spec/app/assets/stylesheets/foobar.css +0 -0
- data/spec/app/views/files/index.html.erb +1 -0
- data/spec/app/views/layouts/application.html.erb +12 -0
- data/spec/{views → app/views}/partials/_foo.html.erb +0 -0
- data/spec/{views → app/views}/partials/index.html.erb +0 -0
- data/spec/controllers/files_note_controller_spec.rb +38 -0
- data/spec/controllers/footnotes_controller_spec.rb +49 -34
- data/spec/controllers/log_note_controller_spec.rb +4 -8
- data/spec/controllers/partials_note_controller_spec.rb +2 -3
- data/spec/env_note_spec.rb +4 -4
- data/spec/footnotes_spec.rb +38 -54
- data/spec/notes/assigns_note_spec.rb +13 -9
- data/spec/notes/controller_note_spec.rb +2 -2
- data/spec/notes/files_note_spec.rb +12 -3
- data/spec/notes/javascripts_note_spec.rb +1 -1
- data/spec/notes/stylesheets_note_spec.rb +1 -1
- data/spec/notes/view_note_spec.rb +18 -0
- data/spec/spec_helper.rb +35 -3
- metadata +38 -48
- data/.travis.yml +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c46e88fcf583fff51677ec9c3d049017bc3154f17c38aa9c872f14b5ab5184db
|
4
|
+
data.tar.gz: 16f25b1769f5bd07bbc68c5e598d9a247669fa8249bc08ebcadd0f62427ad085
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 207f2170eed40c410ab90f923ecddc199abe7fdcf341f1e047d9ceda03be2f6135ac049c821249645929123a719cd78812bcfffda8b4aa25340788851f264ec6
|
7
|
+
data.tar.gz: faec60331eb700897e1013e1e3df6b158ba57f3682ab61e479612da878666dd2c34a5f47f76b9fc4162e9bbfeb85f7b7cf28b282ff9ddfa847c81592477cb326
|
@@ -0,0 +1,25 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ main ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ main ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
strategy:
|
14
|
+
matrix:
|
15
|
+
ruby-version: ['3.0']
|
16
|
+
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v2
|
19
|
+
- name: Set up Ruby
|
20
|
+
uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
ruby-version: ${{ matrix.ruby-version }}
|
23
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
24
|
+
- name: Run tests
|
25
|
+
run: bin/rspec
|
data/.gitignore
CHANGED
data/CHANGELOG
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
== Footnotes v4.1.8 ==
|
2
|
+
* Fix the issue of undefined method using Log4r and Rails 3.2
|
3
|
+
* Fix some rails 5 compatibility issues (#140) *
|
4
|
+
* Fix bad timing shown in SQL note (#145) *
|
5
|
+
== Footnotes v4.1.7 ==
|
6
|
+
* Fix notes not collapsing when clicking on them again (#130)*
|
7
|
+
== Footnotes v4.1.6 ==
|
8
|
+
* Fix incorrect handler link to css/js files (#127)*
|
1
9
|
== Footnotes v4.1.5 ==
|
2
10
|
* Remove use of non-existing note in initializer introduced in v4, impacting new installations *
|
3
11
|
== Footnotes v4.1.4 ==
|
data/Gemfile
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,187 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
rails-footnotes (5.0.0)
|
5
|
+
rails (~> 6.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actioncable (6.1.4)
|
11
|
+
actionpack (= 6.1.4)
|
12
|
+
activesupport (= 6.1.4)
|
13
|
+
nio4r (~> 2.0)
|
14
|
+
websocket-driver (>= 0.6.1)
|
15
|
+
actionmailbox (6.1.4)
|
16
|
+
actionpack (= 6.1.4)
|
17
|
+
activejob (= 6.1.4)
|
18
|
+
activerecord (= 6.1.4)
|
19
|
+
activestorage (= 6.1.4)
|
20
|
+
activesupport (= 6.1.4)
|
21
|
+
mail (>= 2.7.1)
|
22
|
+
actionmailer (6.1.4)
|
23
|
+
actionpack (= 6.1.4)
|
24
|
+
actionview (= 6.1.4)
|
25
|
+
activejob (= 6.1.4)
|
26
|
+
activesupport (= 6.1.4)
|
27
|
+
mail (~> 2.5, >= 2.5.4)
|
28
|
+
rails-dom-testing (~> 2.0)
|
29
|
+
actionpack (6.1.4)
|
30
|
+
actionview (= 6.1.4)
|
31
|
+
activesupport (= 6.1.4)
|
32
|
+
rack (~> 2.0, >= 2.0.9)
|
33
|
+
rack-test (>= 0.6.3)
|
34
|
+
rails-dom-testing (~> 2.0)
|
35
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
36
|
+
actiontext (6.1.4)
|
37
|
+
actionpack (= 6.1.4)
|
38
|
+
activerecord (= 6.1.4)
|
39
|
+
activestorage (= 6.1.4)
|
40
|
+
activesupport (= 6.1.4)
|
41
|
+
nokogiri (>= 1.8.5)
|
42
|
+
actionview (6.1.4)
|
43
|
+
activesupport (= 6.1.4)
|
44
|
+
builder (~> 3.1)
|
45
|
+
erubi (~> 1.4)
|
46
|
+
rails-dom-testing (~> 2.0)
|
47
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
48
|
+
activejob (6.1.4)
|
49
|
+
activesupport (= 6.1.4)
|
50
|
+
globalid (>= 0.3.6)
|
51
|
+
activemodel (6.1.4)
|
52
|
+
activesupport (= 6.1.4)
|
53
|
+
activerecord (6.1.4)
|
54
|
+
activemodel (= 6.1.4)
|
55
|
+
activesupport (= 6.1.4)
|
56
|
+
activestorage (6.1.4)
|
57
|
+
actionpack (= 6.1.4)
|
58
|
+
activejob (= 6.1.4)
|
59
|
+
activerecord (= 6.1.4)
|
60
|
+
activesupport (= 6.1.4)
|
61
|
+
marcel (~> 1.0.0)
|
62
|
+
mini_mime (>= 1.1.0)
|
63
|
+
activesupport (6.1.4)
|
64
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
65
|
+
i18n (>= 1.6, < 2)
|
66
|
+
minitest (>= 5.1)
|
67
|
+
tzinfo (~> 2.0)
|
68
|
+
zeitwerk (~> 2.3)
|
69
|
+
addressable (2.8.0)
|
70
|
+
public_suffix (>= 2.0.2, < 5.0)
|
71
|
+
builder (3.2.4)
|
72
|
+
capybara (3.35.3)
|
73
|
+
addressable
|
74
|
+
mini_mime (>= 0.1.3)
|
75
|
+
nokogiri (~> 1.8)
|
76
|
+
rack (>= 1.6.0)
|
77
|
+
rack-test (>= 0.6.3)
|
78
|
+
regexp_parser (>= 1.5, < 3.0)
|
79
|
+
xpath (~> 3.2)
|
80
|
+
coderay (1.1.3)
|
81
|
+
concurrent-ruby (1.1.9)
|
82
|
+
crass (1.0.6)
|
83
|
+
diff-lcs (1.4.4)
|
84
|
+
erubi (1.10.0)
|
85
|
+
globalid (0.5.2)
|
86
|
+
activesupport (>= 5.0)
|
87
|
+
i18n (1.8.10)
|
88
|
+
concurrent-ruby (~> 1.0)
|
89
|
+
loofah (2.12.0)
|
90
|
+
crass (~> 1.0.2)
|
91
|
+
nokogiri (>= 1.5.9)
|
92
|
+
mail (2.7.1)
|
93
|
+
mini_mime (>= 0.1.1)
|
94
|
+
marcel (1.0.1)
|
95
|
+
method_source (1.0.0)
|
96
|
+
mini_mime (1.1.0)
|
97
|
+
minitest (5.14.4)
|
98
|
+
nio4r (2.5.8)
|
99
|
+
nokogiri (1.12.3-arm64-darwin)
|
100
|
+
racc (~> 1.4)
|
101
|
+
nokogiri (1.12.3-x86_64-linux)
|
102
|
+
racc (~> 1.4)
|
103
|
+
pry (0.14.1)
|
104
|
+
coderay (~> 1.1)
|
105
|
+
method_source (~> 1.0)
|
106
|
+
public_suffix (4.0.6)
|
107
|
+
racc (1.5.2)
|
108
|
+
rack (2.2.3)
|
109
|
+
rack-test (1.1.0)
|
110
|
+
rack (>= 1.0, < 3)
|
111
|
+
rails (6.1.4)
|
112
|
+
actioncable (= 6.1.4)
|
113
|
+
actionmailbox (= 6.1.4)
|
114
|
+
actionmailer (= 6.1.4)
|
115
|
+
actionpack (= 6.1.4)
|
116
|
+
actiontext (= 6.1.4)
|
117
|
+
actionview (= 6.1.4)
|
118
|
+
activejob (= 6.1.4)
|
119
|
+
activemodel (= 6.1.4)
|
120
|
+
activerecord (= 6.1.4)
|
121
|
+
activestorage (= 6.1.4)
|
122
|
+
activesupport (= 6.1.4)
|
123
|
+
bundler (>= 1.15.0)
|
124
|
+
railties (= 6.1.4)
|
125
|
+
sprockets-rails (>= 2.0.0)
|
126
|
+
rails-dom-testing (2.0.3)
|
127
|
+
activesupport (>= 4.2.0)
|
128
|
+
nokogiri (>= 1.6)
|
129
|
+
rails-html-sanitizer (1.4.1)
|
130
|
+
loofah (~> 2.3)
|
131
|
+
railties (6.1.4)
|
132
|
+
actionpack (= 6.1.4)
|
133
|
+
activesupport (= 6.1.4)
|
134
|
+
method_source
|
135
|
+
rake (>= 0.13)
|
136
|
+
thor (~> 1.0)
|
137
|
+
rake (13.0.6)
|
138
|
+
regexp_parser (2.1.1)
|
139
|
+
rspec-core (3.10.1)
|
140
|
+
rspec-support (~> 3.10.0)
|
141
|
+
rspec-expectations (3.10.1)
|
142
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
143
|
+
rspec-support (~> 3.10.0)
|
144
|
+
rspec-mocks (3.10.2)
|
145
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
146
|
+
rspec-support (~> 3.10.0)
|
147
|
+
rspec-rails (5.0.2)
|
148
|
+
actionpack (>= 5.2)
|
149
|
+
activesupport (>= 5.2)
|
150
|
+
railties (>= 5.2)
|
151
|
+
rspec-core (~> 3.10)
|
152
|
+
rspec-expectations (~> 3.10)
|
153
|
+
rspec-mocks (~> 3.10)
|
154
|
+
rspec-support (~> 3.10)
|
155
|
+
rspec-support (3.10.2)
|
156
|
+
sprockets (4.0.2)
|
157
|
+
concurrent-ruby (~> 1.0)
|
158
|
+
rack (> 1, < 3)
|
159
|
+
sprockets-rails (3.2.2)
|
160
|
+
actionpack (>= 4.0)
|
161
|
+
activesupport (>= 4.0)
|
162
|
+
sprockets (>= 3.0.0)
|
163
|
+
thor (1.1.0)
|
164
|
+
tzinfo (2.0.4)
|
165
|
+
concurrent-ruby (~> 1.0)
|
166
|
+
websocket-driver (0.7.5)
|
167
|
+
websocket-extensions (>= 0.1.0)
|
168
|
+
websocket-extensions (0.1.5)
|
169
|
+
xpath (3.2.0)
|
170
|
+
nokogiri (~> 1.8)
|
171
|
+
zeitwerk (2.4.2)
|
172
|
+
|
173
|
+
PLATFORMS
|
174
|
+
arm64-darwin-20
|
175
|
+
x86_64-linux
|
176
|
+
|
177
|
+
DEPENDENCIES
|
178
|
+
capybara (~> 3.35)
|
179
|
+
nokogiri (~> 1.12)
|
180
|
+
pry (~> 0.14.1)
|
181
|
+
rails-footnotes!
|
182
|
+
rake (~> 13.0)
|
183
|
+
rspec-rails (~> 5.0)
|
184
|
+
sprockets-rails (~> 3.2)
|
185
|
+
|
186
|
+
BUNDLED WITH
|
187
|
+
2.2.23
|
data/README.rdoc
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
= Rails Footnotes
|
2
|
-
|
3
|
-
{<img src="https://travis-ci.org/josevalim/rails-footnotes.png" />}[https://travis-ci.org/josevalim/rails-footnotes]
|
1
|
+
= Rails 6 Footnotes
|
4
2
|
|
5
3
|
Rails footnotes displays footnotes in your application for easy debugging, such as sessions,
|
6
4
|
request parameters, cookies, filter chain, routes, queries, etc.
|
@@ -10,17 +8,11 @@ your backtrace lines.
|
|
10
8
|
|
11
9
|
== Installation
|
12
10
|
|
13
|
-
|
14
|
-
|
15
|
-
https://github.com/josevalim/rails-footnotes/tree/rails2
|
16
|
-
|
17
|
-
Installing Rails Footnotes is very easy.
|
11
|
+
Add to your `Gemfile`:
|
18
12
|
|
19
|
-
|
13
|
+
gem "rails-footnotes", "~> 5.0"
|
20
14
|
|
21
|
-
|
22
|
-
|
23
|
-
After you install RailsFootnotes and add it to your Gemfile, you need to run the generator:
|
15
|
+
Run `bundle install`, then the generator:
|
24
16
|
|
25
17
|
rails generate rails_footnotes:install
|
26
18
|
|
@@ -37,7 +29,7 @@ This will create an initializer with default config and some examples.
|
|
37
29
|
|
38
30
|
=== Editor links
|
39
31
|
|
40
|
-
Textmate, MacVim and Sublime Text
|
32
|
+
Textmate, MacVim and Sublime Text 3 are compatible.
|
41
33
|
|
42
34
|
*MacVim*
|
43
35
|
|
@@ -52,17 +44,11 @@ the second %d is replaced by the column number.
|
|
52
44
|
Take note that the order in which the file name (%s), line number (%d) and column number (%d) appears is important.
|
53
45
|
We assume that they appear in that order. "foo://line=%d&file=%s" (%d precedes %s) would throw out an error.
|
54
46
|
|
55
|
-
*Sublime* *Text* *
|
56
|
-
|
57
|
-
1. Keep the Textmate prefix, <tt>f.prefix = 'txmt://open?url=file://%s&line=%d&column=%d'</tt>
|
47
|
+
*Sublime* *Text* *3*
|
58
48
|
|
59
|
-
|
49
|
+
Install {subl}[https://github.com/dhoulb/subl], then use:
|
60
50
|
|
61
|
-
|
62
|
-
|
63
|
-
4. Install {RCDefault}[http://www.rubicode.com/Software/RCDefaultApp]. It's OSX 10.2, but it works.
|
64
|
-
|
65
|
-
5. Go to RCDefaultApp (OS System Preferences > DefaultApps). Go to URL section, select "tmxt" extension, and set default applicaiton to "SublHandler".
|
51
|
+
f.prefix = 'subl://open?url=file://%s&line=%d&column=%d'
|
66
52
|
|
67
53
|
*Use* *with* *Vagrant* (*and* *other* *virtual* *machines*)
|
68
54
|
|
@@ -156,39 +142,7 @@ If you'd like the footnote, to be at a different place (perhaps for aesthetical
|
|
156
142
|
<div id="footnotes_holder"></div>
|
157
143
|
at an appropriate place, your notes will now appear inside div#footnotes_holder
|
158
144
|
|
159
|
-
== Collaborators
|
160
|
-
|
161
|
-
* Leon Li - http://github.com/scorpio
|
162
|
-
* Keenan Brock - http://github.com/kbrock
|
163
|
-
* Ivan Storck - http://github.com/ivanoats
|
164
|
-
* Kris Chamber - http://github.com/kristopher
|
165
|
-
* Roman V. Babenko - http://github.com/romanvbabenko
|
166
|
-
* Adrien Siami - http://github.com/intrepidd
|
167
|
-
|
168
145
|
== Bugs and Feedback
|
169
146
|
|
170
147
|
If you discover any bugs, please open an issue.
|
171
148
|
If you just want to give some positive feedback or drop a line, that's fine too!
|
172
|
-
|
173
|
-
=== Version 4.x
|
174
|
-
|
175
|
-
Starting from version 4.0, Adren Siami is the maintainer of this plugin.
|
176
|
-
|
177
|
-
=== Version 3.x
|
178
|
-
|
179
|
-
This plugin was maintained until version 4.0 by Roman V. Babenko
|
180
|
-
|
181
|
-
Copyright (c) 2010-2014 Roman V. Babenko (romanvbabenko@gmail.com)
|
182
|
-
http://romanvbabenko.com
|
183
|
-
|
184
|
-
This plugin was maintained until version 3.6 by José Valim
|
185
|
-
|
186
|
-
Copyright (c) 2009 José Valim (jose@plataformatec.com.br)
|
187
|
-
http://blog.plataformatec.com.br
|
188
|
-
|
189
|
-
=== Version 2.0
|
190
|
-
|
191
|
-
This plugin was created and maintained until version 2.0 by Duane Johnson:
|
192
|
-
|
193
|
-
Copyright (c) 2006 InquiryLabs, Inc.
|
194
|
-
http://blog.inquirylabs.com
|
data/Rakefile
CHANGED
@@ -5,12 +5,7 @@ require 'rdoc/task'
|
|
5
5
|
|
6
6
|
desc 'Default: run tests'
|
7
7
|
task :default => :spec
|
8
|
-
|
9
|
-
desc 'Run tests for Footnotes.'
|
10
|
-
RSpec::Core::RakeTask.new(:spec) do |t|
|
11
|
-
t.pattern = 'spec/**/*_spec.rb'
|
12
|
-
t.rcov = false
|
13
|
-
end
|
8
|
+
RSpec::Core::RakeTask.new(:spec)
|
14
9
|
|
15
10
|
desc 'Generate documentation for Footnotes.'
|
16
11
|
RDoc::Task.new(:rdoc) do |rdoc|
|
data/bin/rake
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rake' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("rake", "rake")
|
data/bin/rspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rspec' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("rspec-core", "rspec")
|