marginalia 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of marginalia might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +1 -2
- data/Gemfile +7 -0
- data/README.md +2 -4
- data/lib/marginalia.rb +12 -1
- data/marginalia.gemspec +3 -3
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a294ff04a314d5e24a21f5995e3e2913d25d5da
|
4
|
+
data.tar.gz: dd9e9e133e72f570379eec9936d8d0fe794de4e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b1b2e1a5da6e9efe3043bdf2485b20990737d65a4d5ea6f86b9cae3a9c7415dd4c7b31702d48625f2f6edd8b15c57c98842819726bef55d347939da5d154256
|
7
|
+
data.tar.gz: a228a5805de1281142fa85f8c6e9b416956ef8acca7e2e2c6e84b59cbc55f634bfacebdf5228d38f36b1102666b50841f628995b96acfc7b297ed0cc4670a6d0
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.3
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -3,6 +3,13 @@ source "https://rubygems.org"
|
|
3
3
|
gemspec
|
4
4
|
|
5
5
|
version = ENV["RAILS_VERSION"] || "4.2.0"
|
6
|
+
|
7
|
+
if "4.2.5" > version
|
8
|
+
gem 'mysql2', '~> 0.3.13'
|
9
|
+
else
|
10
|
+
gem 'mysql2', '>= 0.3.13', '< 0.5'
|
11
|
+
end
|
12
|
+
|
6
13
|
rails = case version
|
7
14
|
when "master"
|
8
15
|
{:github => "rails/rails"}
|
data/README.md
CHANGED
@@ -29,10 +29,6 @@ Patches are welcome for other database adapters.
|
|
29
29
|
|
30
30
|
# Gemfile
|
31
31
|
gem 'marginalia'
|
32
|
-
|
33
|
-
# config/application.rb
|
34
|
-
require 'marginalia/railtie'
|
35
|
-
|
36
32
|
|
37
33
|
### For Rails 2.x:
|
38
34
|
|
@@ -94,6 +90,8 @@ default. In addition, implementation is provided for:
|
|
94
90
|
* `:controller_with_namespace` to include the full classname (including namespace)
|
95
91
|
of the controller.
|
96
92
|
* `:job` to include the classname of the ActiveJob being performed.
|
93
|
+
* `:hostname` to include ```Socket.gethostname```.
|
94
|
+
* `:pid` to include current process id.
|
97
95
|
|
98
96
|
Pull requests for other included comment components are welcome.
|
99
97
|
|
data/lib/marginalia.rb
CHANGED
@@ -56,6 +56,13 @@ module Marginalia
|
|
56
56
|
exec_query_without_marginalia(annotate_sql(sql), name, binds)
|
57
57
|
end
|
58
58
|
|
59
|
+
if ActiveRecord::VERSION::MAJOR >= 5
|
60
|
+
def exec_query_with_marginalia(sql, name = 'SQL', binds = [], options = {})
|
61
|
+
options[:prepare] ||= false
|
62
|
+
exec_query_without_marginalia(annotate_sql(sql), name, binds, options)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
59
66
|
def exec_delete_with_marginalia(sql, name = 'SQL', binds = [])
|
60
67
|
exec_delete_without_marginalia(annotate_sql(sql), name, binds)
|
61
68
|
end
|
@@ -68,7 +75,11 @@ module Marginalia
|
|
68
75
|
module ActionControllerInstrumentation
|
69
76
|
def self.included(instrumented_class)
|
70
77
|
instrumented_class.class_eval do
|
71
|
-
|
78
|
+
if respond_to?(:around_action)
|
79
|
+
around_action :record_query_comment
|
80
|
+
else
|
81
|
+
around_filter :record_query_comment
|
82
|
+
end
|
72
83
|
end
|
73
84
|
end
|
74
85
|
|
data/marginalia.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
Gem::Specification.new do |gem|
|
2
2
|
gem.authors = ["Noah Lorang", "Nick Quaranto", "Taylor Weibley"]
|
3
|
-
gem.email = ["noah@37signals.com"]
|
4
|
-
gem.homepage = "https://github.com/
|
3
|
+
gem.email = ["noah@37signals.com", "github@arthurnn.com"]
|
4
|
+
gem.homepage = "https://github.com/basecamp/marginalia"
|
5
5
|
|
6
6
|
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
7
7
|
gem.files = `git ls-files`.split("\n")
|
8
8
|
gem.test_files = `git ls-files -- {test}/*`.split("\n")
|
9
9
|
gem.name = "marginalia"
|
10
10
|
gem.require_paths = ["lib"]
|
11
|
-
gem.version = "1.
|
11
|
+
gem.version = "1.4.0"
|
12
12
|
gem.license = "MIT"
|
13
13
|
|
14
14
|
gem.add_runtime_dependency "actionpack", ">= 2.3"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marginalia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Noah Lorang
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2016-08-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: actionpack
|
@@ -141,6 +141,7 @@ dependencies:
|
|
141
141
|
description: Attach comments to your ActiveRecord queries.
|
142
142
|
email:
|
143
143
|
- noah@37signals.com
|
144
|
+
- github@arthurnn.com
|
144
145
|
executables: []
|
145
146
|
extensions: []
|
146
147
|
extra_rdoc_files: []
|
@@ -158,7 +159,7 @@ files:
|
|
158
159
|
- lib/marginalia/railtie.rb
|
159
160
|
- marginalia.gemspec
|
160
161
|
- test/query_comments_test.rb
|
161
|
-
homepage: https://github.com/
|
162
|
+
homepage: https://github.com/basecamp/marginalia
|
162
163
|
licenses:
|
163
164
|
- MIT
|
164
165
|
metadata: {}
|
@@ -178,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
179
|
version: '0'
|
179
180
|
requirements: []
|
180
181
|
rubyforge_project:
|
181
|
-
rubygems_version: 2.
|
182
|
+
rubygems_version: 2.6.6
|
182
183
|
signing_key:
|
183
184
|
specification_version: 4
|
184
185
|
summary: Attach comments to your ActiveRecord queries.
|