sql_footprint 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34e9e6ba6ddbac8613ef0095c19ad939f6fe1006
4
- data.tar.gz: 296a93ba6fe046f17272ba2eee39f26a42aeb3ea
3
+ metadata.gz: be386779c80212ebc572dc5ab1f8facbc7f01a2d
4
+ data.tar.gz: 24a778a2eef8fb80a8e026155d1df4af82c8fd3f
5
5
  SHA512:
6
- metadata.gz: 6cd90e9372ef23a236835a7edf484920af12358f8ca8bf01bc39c499fbf47eda066241211e75f282e40569c5435da38cd580fd8097805775f4d45dcac6258edf
7
- data.tar.gz: 66add3574878af215a2cb3f31739fba253ee8376ac0bfb35ba6fcb78beb66e17c9f0007eff2052323013b945433379fdb734c725d5baad1924615941cf0e3594
6
+ metadata.gz: fc004cfb2453e5dd2c43d4098a5768a5df1b6fb35b1e58e35c2a8cb851b3cf48f462a54085a2a953b27be310041bbc4bacef14561571599cab37dcec47756cf6
7
+ data.tar.gz: fedb11a433daa76e87afd984a0f848f2bcbd8fe8dcda92387a467264eeccb18b56afe15b30d02d0b163439def24339305e3e578274e4f68be14c382d8c239d86
data/lib/sql_footprint.rb CHANGED
@@ -3,6 +3,9 @@ require 'set'
3
3
  require 'active_support/notifications'
4
4
 
5
5
  module SqlFootprint
6
+ FILENAME = 'footprint.sql'.freeze
7
+ NEWLINE = "\n".freeze
8
+
6
9
  ActiveSupport::Notifications.subscribe('sql.active_record') do |_, _, _, _, payload|
7
10
  capture payload.fetch(:sql)
8
11
  end
@@ -15,11 +18,7 @@ module SqlFootprint
15
18
 
16
19
  def stop
17
20
  @capture = false
18
- File.open('footprint.sql', 'w') do |f|
19
- lines.each do |line|
20
- f.puts line
21
- end
22
- end
21
+ File.write FILENAME, lines.join(NEWLINE)
23
22
  end
24
23
 
25
24
  def exclude
@@ -1,3 +1,3 @@
1
1
  module SqlFootprint
2
- VERSION = '0.4.0'.freeze
2
+ VERSION = '0.4.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sql_footprint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Joyce
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-04 00:00:00.000000000 Z
11
+ date: 2016-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -174,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  version: '0'
175
175
  requirements: []
176
176
  rubyforge_project:
177
- rubygems_version: 2.4.8
177
+ rubygems_version: 2.5.1
178
178
  signing_key:
179
179
  specification_version: 4
180
180
  summary: Keeps your DBA happy.