sql_origin 1.1.0 → 1.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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6f648235cf8dc607a68e9ceaa731da53164ac0d26b55ae43f7ffaaa16efd9379
4
+ data.tar.gz: c563d9ec48720709b8fdfe45bc9d9ee234abedcf0f63bed356989a4a03200309
5
+ SHA512:
6
+ metadata.gz: 7fe74207813b3769ac4d1d78ed8fc878598735aa8d183bd835bd6a75c53dc4a54f831968f7fd2362c33ef52a16ce06e08cc858cd79c933e5f760f8a45838e86c
7
+ data.tar.gz: 336f04e881b8f381b50a25a71a998df5d47a819d936877dc7de378976042b833a020fd82cd75af60b084bb06147827dbdfa5fb774ed2b8ec72a5883aa9bf1ac4
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 1.9.3-p392
1
+ 2.4.2
data/Gemfile.lock CHANGED
@@ -1,88 +1,147 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- actionmailer (4.0.0)
5
- actionpack (= 4.0.0)
6
- mail (~> 2.5.3)
7
- actionpack (4.0.0)
8
- activesupport (= 4.0.0)
9
- builder (~> 3.1.0)
10
- erubis (~> 2.7.0)
11
- rack (~> 1.5.2)
12
- rack-test (~> 0.6.2)
13
- activemodel (4.0.0)
14
- activesupport (= 4.0.0)
15
- builder (~> 3.1.0)
16
- activerecord (4.0.0)
17
- activemodel (= 4.0.0)
18
- activerecord-deprecated_finders (~> 1.0.2)
19
- activesupport (= 4.0.0)
20
- arel (~> 4.0.0)
21
- activerecord-deprecated_finders (1.0.3)
22
- activesupport (4.0.0)
23
- i18n (~> 0.6, >= 0.6.4)
24
- minitest (~> 4.2)
25
- multi_json (~> 1.3)
26
- thread_safe (~> 0.1)
27
- tzinfo (~> 0.3.37)
28
- arel (4.0.0)
29
- atomic (1.1.9)
30
- builder (3.1.4)
31
- erubis (2.7.0)
32
- git (1.2.5)
33
- hike (1.2.3)
34
- i18n (0.6.4)
35
- jeweler (1.8.4)
36
- bundler (~> 1.0)
4
+ actioncable (5.1.4)
5
+ actionpack (= 5.1.4)
6
+ nio4r (~> 2.0)
7
+ websocket-driver (~> 0.6.1)
8
+ actionmailer (5.1.4)
9
+ actionpack (= 5.1.4)
10
+ actionview (= 5.1.4)
11
+ activejob (= 5.1.4)
12
+ mail (~> 2.5, >= 2.5.4)
13
+ rails-dom-testing (~> 2.0)
14
+ actionpack (5.1.4)
15
+ actionview (= 5.1.4)
16
+ activesupport (= 5.1.4)
17
+ rack (~> 2.0)
18
+ rack-test (>= 0.6.3)
19
+ rails-dom-testing (~> 2.0)
20
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
21
+ actionview (5.1.4)
22
+ activesupport (= 5.1.4)
23
+ builder (~> 3.1)
24
+ erubi (~> 1.4)
25
+ rails-dom-testing (~> 2.0)
26
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
27
+ activejob (5.1.4)
28
+ activesupport (= 5.1.4)
29
+ globalid (>= 0.3.6)
30
+ activemodel (5.1.4)
31
+ activesupport (= 5.1.4)
32
+ activerecord (5.1.4)
33
+ activemodel (= 5.1.4)
34
+ activesupport (= 5.1.4)
35
+ arel (~> 8.0)
36
+ activesupport (5.1.4)
37
+ concurrent-ruby (~> 1.0, >= 1.0.2)
38
+ i18n (~> 0.7)
39
+ minitest (~> 5.1)
40
+ tzinfo (~> 1.1)
41
+ addressable (2.4.0)
42
+ arel (8.0.0)
43
+ builder (3.2.3)
44
+ concurrent-ruby (1.0.5)
45
+ crass (1.0.3)
46
+ descendants_tracker (0.0.4)
47
+ thread_safe (~> 0.3, >= 0.3.1)
48
+ erubi (1.7.0)
49
+ faraday (0.9.2)
50
+ multipart-post (>= 1.2, < 3)
51
+ git (1.3.0)
52
+ github_api (0.16.0)
53
+ addressable (~> 2.4.0)
54
+ descendants_tracker (~> 0.0.4)
55
+ faraday (~> 0.8, < 0.10)
56
+ hashie (>= 3.4)
57
+ mime-types (>= 1.16, < 3.0)
58
+ oauth2 (~> 1.0)
59
+ globalid (0.4.1)
60
+ activesupport (>= 4.2.0)
61
+ hashie (3.5.6)
62
+ highline (1.7.10)
63
+ i18n (0.9.1)
64
+ concurrent-ruby (~> 1.0)
65
+ jeweler (2.3.7)
66
+ builder
67
+ bundler (>= 1)
37
68
  git (>= 1.2.5)
69
+ github_api (~> 0.16.0)
70
+ highline (>= 1.6.15)
71
+ nokogiri (>= 1.5.10)
72
+ psych (~> 2.2)
38
73
  rake
39
74
  rdoc
40
- json (1.8.0)
41
- mail (2.5.4)
42
- mime-types (~> 1.16)
43
- treetop (~> 1.4.8)
44
- mime-types (1.23)
45
- minitest (4.7.5)
46
- multi_json (1.7.7)
47
- polyglot (0.3.3)
48
- rack (1.5.2)
49
- rack-test (0.6.2)
50
- rack (>= 1.0)
51
- rails (4.0.0)
52
- actionmailer (= 4.0.0)
53
- actionpack (= 4.0.0)
54
- activerecord (= 4.0.0)
55
- activesupport (= 4.0.0)
56
- bundler (>= 1.3.0, < 2.0)
57
- railties (= 4.0.0)
58
- sprockets-rails (~> 2.0.0)
59
- railties (4.0.0)
60
- actionpack (= 4.0.0)
61
- activesupport (= 4.0.0)
75
+ semver2
76
+ jwt (1.5.6)
77
+ loofah (2.1.1)
78
+ crass (~> 1.0.2)
79
+ nokogiri (>= 1.5.9)
80
+ mail (2.7.0)
81
+ mini_mime (>= 0.1.1)
82
+ method_source (0.9.0)
83
+ mime-types (2.99.3)
84
+ mini_mime (1.0.0)
85
+ mini_portile2 (2.3.0)
86
+ minitest (5.10.3)
87
+ multi_json (1.12.2)
88
+ multi_xml (0.6.0)
89
+ multipart-post (2.0.0)
90
+ nio4r (2.1.0)
91
+ nokogiri (1.8.1)
92
+ mini_portile2 (~> 2.3.0)
93
+ oauth2 (1.4.0)
94
+ faraday (>= 0.8, < 0.13)
95
+ jwt (~> 1.0)
96
+ multi_json (~> 1.3)
97
+ multi_xml (~> 0.5)
98
+ rack (>= 1.2, < 3)
99
+ psych (2.2.4)
100
+ rack (2.0.3)
101
+ rack-test (0.8.2)
102
+ rack (>= 1.0, < 3)
103
+ rails (5.1.4)
104
+ actioncable (= 5.1.4)
105
+ actionmailer (= 5.1.4)
106
+ actionpack (= 5.1.4)
107
+ actionview (= 5.1.4)
108
+ activejob (= 5.1.4)
109
+ activemodel (= 5.1.4)
110
+ activerecord (= 5.1.4)
111
+ activesupport (= 5.1.4)
112
+ bundler (>= 1.3.0)
113
+ railties (= 5.1.4)
114
+ sprockets-rails (>= 2.0.0)
115
+ rails-dom-testing (2.0.3)
116
+ activesupport (>= 4.2.0)
117
+ nokogiri (>= 1.6)
118
+ rails-html-sanitizer (1.0.3)
119
+ loofah (~> 2.0)
120
+ railties (5.1.4)
121
+ actionpack (= 5.1.4)
122
+ activesupport (= 5.1.4)
123
+ method_source
62
124
  rake (>= 0.8.7)
63
125
  thor (>= 0.18.1, < 2.0)
64
- rake (10.1.0)
65
- rdoc (4.0.1)
66
- json (~> 1.4)
67
- redcarpet (2.3.0)
68
- sprockets (2.10.0)
69
- hike (~> 1.2)
70
- multi_json (~> 1.0)
71
- rack (~> 1.0)
72
- tilt (~> 1.1, != 1.3.0)
73
- sprockets-rails (2.0.0)
74
- actionpack (>= 3.0)
75
- activesupport (>= 3.0)
76
- sprockets (~> 2.8)
77
- thor (0.18.1)
78
- thread_safe (0.1.0)
79
- atomic
80
- tilt (1.4.1)
81
- treetop (1.4.14)
82
- polyglot
83
- polyglot (>= 0.3.1)
84
- tzinfo (0.3.37)
85
- yard (0.8.6.1)
126
+ rake (12.3.0)
127
+ rdoc (6.0.0)
128
+ redcarpet (3.4.0)
129
+ semver2 (3.4.2)
130
+ sprockets (3.7.1)
131
+ concurrent-ruby (~> 1.0)
132
+ rack (> 1, < 3)
133
+ sprockets-rails (3.2.1)
134
+ actionpack (>= 4.0)
135
+ activesupport (>= 4.0)
136
+ sprockets (>= 3.0.0)
137
+ thor (0.20.0)
138
+ thread_safe (0.3.6)
139
+ tzinfo (1.2.4)
140
+ thread_safe (~> 0.1)
141
+ websocket-driver (0.6.5)
142
+ websocket-extensions (>= 0.1.0)
143
+ websocket-extensions (0.1.3)
144
+ yard (0.9.12)
86
145
 
87
146
  PLATFORMS
88
147
  ruby
@@ -93,3 +152,6 @@ DEPENDENCIES
93
152
  rails (>= 4.0)
94
153
  redcarpet
95
154
  yard
155
+
156
+ BUNDLED WITH
157
+ 1.16.0
data/README.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## ⚠️ DEPRECATED
2
+
3
+ **This gem is no longer maintained.** Modern Rails has [`ActiveRecord::QueryLogs`](https://api.rubyonrails.org/classes/ActiveRecord/QueryLogs.html) (built-in since Rails 7) which provides equivalent query-origin tracking.
4
+
5
+ ---
6
+
1
7
  SQL:Origin
2
8
  ==========
3
9
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.1.3
@@ -1,14 +1,15 @@
1
1
  module SQLOrigin
2
2
  # @private
3
3
  module LogHook
4
- def log(sql, name = "SQL", binds = [])
4
+ def log(sql, name = "SQL", binds = [], statement_name = nil)
5
5
  @instrumenter.instrument(
6
6
  "sql.active_record",
7
- :sql => sql,
8
- :name => name,
9
- :connection_id => object_id,
10
- :binds => binds,
11
- :backtrace => SQLOrigin.filtered_backtrace[0, 3]) { yield }
7
+ :sql => sql,
8
+ :name => name,
9
+ :connection_id => object_id,
10
+ :binds => binds,
11
+ :statement_name => statement_name,
12
+ :backtrace => SQLOrigin.filtered_backtrace[0, 3]) { yield }
12
13
  rescue Exception => e
13
14
  message = "#{e.class.name}: #{e.message}: #{sql}"
14
15
  @logger.debug message if @logger
data/lib/sql_origin.rb CHANGED
@@ -21,7 +21,7 @@ module SQLOrigin
21
21
  # Enables SQL:Origin backtrace logging to the Rails log.
22
22
 
23
23
  def self.append_to_log
24
- %w( PostgreSQLAdapter MysqlAdapter Mysql2Adapter OracleAdapter SQLiteAdapter ).each do |name|
24
+ %w( PostgreSQLAdapter MysqlAdapter Mysql2Adapter OracleAdapter SQLiteAdapter SQLite3Adapter ).each do |name|
25
25
  adapter = ActiveRecord::ConnectionAdapters.const_get(name.to_sym) rescue nil
26
26
  if adapter
27
27
  adapter.send :include, SQLOrigin::LogHook
data/sql_origin.gemspec CHANGED
@@ -2,14 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
+ # stub: sql_origin 1.1.2 ruby lib
5
6
 
6
7
  Gem::Specification.new do |s|
7
8
  s.name = "sql_origin"
8
- s.version = "1.1.0"
9
+ s.version = "1.1.3"
9
10
 
10
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib"]
11
13
  s.authors = ["Tim Morgan"]
12
- s.date = "2013-06-26"
14
+ s.date = "2015-08-25"
13
15
  s.description = "Ever wonder where a SQL query comes from? This gem lets you add abbreviated backtraces to those queries, either in the query log, or as a comment in the query itself."
14
16
  s.email = "rubygems@timothymorgan.info"
15
17
  s.extra_rdoc_files = [
@@ -32,12 +34,20 @@ Gem::Specification.new do |s|
32
34
  ]
33
35
  s.homepage = "http://github.com/RISCfuture/sql_origin"
34
36
  s.licenses = ["MIT"]
35
- s.require_paths = ["lib"]
36
- s.rubygems_version = "1.8.25"
37
- s.summary = "Add backtraces to your query log and queries themselves."
37
+ s.rubygems_version = "2.4.8"
38
+ s.summary = "[DEPRECATED] Add backtraces to your query log and queries themselves."
39
+ s.post_install_message = <<~MSG
40
+
41
+ ⚠️ DEPRECATED: sql_origin is no longer maintained.
42
+
43
+ Modern Rails has `ActiveRecord::QueryLogs` (built-in since Rails 7) which provides equivalent query-origin tracking.
44
+
45
+ This is the final release. No further updates are planned.
46
+
47
+ MSG
38
48
 
39
49
  if s.respond_to? :specification_version then
40
- s.specification_version = 3
50
+ s.specification_version = 4
41
51
 
42
52
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
43
53
  s.add_runtime_dependency(%q<rails>, [">= 4.0"])
metadata CHANGED
@@ -1,94 +1,82 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sql_origin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
5
- prerelease:
4
+ version: 1.1.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Tim Morgan
9
- autorequire:
10
8
  bindir: bin
11
9
  cert_chain: []
12
- date: 2013-06-26 00:00:00.000000000 Z
10
+ date: 2015-08-25 00:00:00.000000000 Z
13
11
  dependencies:
14
12
  - !ruby/object:Gem::Dependency
15
13
  name: rails
16
14
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
15
  requirements:
19
- - - ! '>='
16
+ - - ">="
20
17
  - !ruby/object:Gem::Version
21
18
  version: '4.0'
22
19
  type: :runtime
23
20
  prerelease: false
24
21
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
22
  requirements:
27
- - - ! '>='
23
+ - - ">="
28
24
  - !ruby/object:Gem::Version
29
25
  version: '4.0'
30
26
  - !ruby/object:Gem::Dependency
31
27
  name: yard
32
28
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
29
  requirements:
35
- - - ! '>='
30
+ - - ">="
36
31
  - !ruby/object:Gem::Version
37
32
  version: '0'
38
33
  type: :development
39
34
  prerelease: false
40
35
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
36
  requirements:
43
- - - ! '>='
37
+ - - ">="
44
38
  - !ruby/object:Gem::Version
45
39
  version: '0'
46
40
  - !ruby/object:Gem::Dependency
47
41
  name: redcarpet
48
42
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
43
  requirements:
51
- - - ! '>='
44
+ - - ">="
52
45
  - !ruby/object:Gem::Version
53
46
  version: '0'
54
47
  type: :development
55
48
  prerelease: false
56
49
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
50
  requirements:
59
- - - ! '>='
51
+ - - ">="
60
52
  - !ruby/object:Gem::Version
61
53
  version: '0'
62
54
  - !ruby/object:Gem::Dependency
63
55
  name: bundler
64
56
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
57
  requirements:
67
- - - ! '>='
58
+ - - ">="
68
59
  - !ruby/object:Gem::Version
69
60
  version: '0'
70
61
  type: :development
71
62
  prerelease: false
72
63
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
64
  requirements:
75
- - - ! '>='
65
+ - - ">="
76
66
  - !ruby/object:Gem::Version
77
67
  version: '0'
78
68
  - !ruby/object:Gem::Dependency
79
69
  name: jeweler
80
70
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
71
  requirements:
83
- - - ! '>='
72
+ - - ">="
84
73
  - !ruby/object:Gem::Version
85
74
  version: '0'
86
75
  type: :development
87
76
  prerelease: false
88
77
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
78
  requirements:
91
- - - ! '>='
79
+ - - ">="
92
80
  - !ruby/object:Gem::Version
93
81
  version: '0'
94
82
  description: Ever wonder where a SQL query comes from? This gem lets you add abbreviated
@@ -101,9 +89,9 @@ extra_rdoc_files:
101
89
  - LICENSE.txt
102
90
  - README.md
103
91
  files:
104
- - .document
105
- - .ruby-gemset
106
- - .ruby-version
92
+ - ".document"
93
+ - ".ruby-gemset"
94
+ - ".ruby-version"
107
95
  - Gemfile
108
96
  - Gemfile.lock
109
97
  - LICENSE.txt
@@ -116,29 +104,31 @@ files:
116
104
  homepage: http://github.com/RISCfuture/sql_origin
117
105
  licenses:
118
106
  - MIT
119
- post_install_message:
107
+ metadata: {}
108
+ post_install_message: |2+
109
+
110
+ ⚠️ DEPRECATED: sql_origin is no longer maintained.
111
+
112
+ Modern Rails has `ActiveRecord::QueryLogs` (built-in since Rails 7) which provides equivalent query-origin tracking.
113
+
114
+ This is the final release. No further updates are planned.
115
+
120
116
  rdoc_options: []
121
117
  require_paths:
122
118
  - lib
123
119
  required_ruby_version: !ruby/object:Gem::Requirement
124
- none: false
125
120
  requirements:
126
- - - ! '>='
121
+ - - ">="
127
122
  - !ruby/object:Gem::Version
128
123
  version: '0'
129
- segments:
130
- - 0
131
- hash: -3377337824874064441
132
124
  required_rubygems_version: !ruby/object:Gem::Requirement
133
- none: false
134
125
  requirements:
135
- - - ! '>='
126
+ - - ">="
136
127
  - !ruby/object:Gem::Version
137
128
  version: '0'
138
129
  requirements: []
139
- rubyforge_project:
140
- rubygems_version: 1.8.25
141
- signing_key:
142
- specification_version: 3
143
- summary: Add backtraces to your query log and queries themselves.
130
+ rubygems_version: 4.0.11
131
+ specification_version: 4
132
+ summary: "[DEPRECATED] Add backtraces to your query log and queries themselves."
144
133
  test_files: []
134
+ ...