sql_footprint 1.1.2 → 1.1.3

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: acd90d488ef66ecd20784f58558c1c487b6d16dc
4
- data.tar.gz: 76acc64d040fb6d1a7e10bae4ccdbc15e93ed3ef
3
+ metadata.gz: 635ced5a921b548ac13bb158872e411635b954cd
4
+ data.tar.gz: 3a820bc44d80606d492d5816d409ec880f0a3b0b
5
5
  SHA512:
6
- metadata.gz: ae723a981ae93709d43f16e45e3184d58eccb4f92ee51e94d630c267fe4c0627a4b53107d7c1801144babc71ce29e6311384f9c3dd4144f1abb81ceff6470a74
7
- data.tar.gz: 3e33bb04d1dda631d93e74a10d57f0e6c038b6320c79712a3c013d874f43c665c4dfca022eb163b3e325183f15d8453be255841882d71d53abb4e234f294b625
6
+ metadata.gz: be80094ea8ce6ab6a6c425d401b673b7c16458673bc23fd59456637484662fe49191ad73b42beff7b64387690d32ef708db928ca80073f03f54d5f78271d4e94
7
+ data.tar.gz: 4992e9852b7ef17dda690b9f4beae3ed72088dd11081a7c9358d06856e87628df3f48f973da3cc2709b535b2505a351cf7e5c7a877c3d0fded35c210955bde8b
data/README.md CHANGED
@@ -28,7 +28,17 @@ RSpec.configure do |config|
28
28
  end
29
29
  ```
30
30
 
31
- After running your specs you'll find a 'footprint.sql' file in your project.
31
+ Minitest (in `test_helper.rb`) add the following:
32
+ ```ruby
33
+ SqlFootprint.start
34
+ Minitest.after_run { SqlFootprint.stop }
35
+ ```
36
+
37
+ #### Outputs
38
+ After running your specs you'll find a 'footprint.*.sql' file in your project.
39
+ Footprints are per-database. For example, if you're using DB1 AND DB2 in your app, you would end up with two footprint files. (footprint.db1.sql, footprint.db2.sql)
40
+
41
+ If you're using an in-memory database, you'll end up with `footprint.:memory:.sql`.
32
42
 
33
43
  #### Excluding Setup Code
34
44
 
@@ -1,8 +1,9 @@
1
1
  module SqlFootprint
2
2
  class SqlAnonymizer
3
3
  GSUBS = {
4
- /\sIN\s\((.*)\)/ => ' IN (values-redacted)'.freeze, # IN clauses
5
- /([\s\(])'(.*)'/ => "\\1'value-redacted'".freeze, # literal strings
4
+ /\sIN\s\(.*\)/ => ' IN (values-redacted)'.freeze, # IN clauses
5
+ /([\s\(])'.*'/ => "\\1'value-redacted'".freeze, # literal strings
6
+ /N''.*''/ => "N''value-redacted''".freeze, # literal MSSQL strings
6
7
  /\s+(!=|=|<|>|<=|>=)\s+[0-9]+/ => ' \1 number-redacted', # numbers
7
8
  /\s+VALUES\s+\(.+\)/ => ' VALUES (values-redacted)', # VALUES
8
9
  }.freeze
@@ -1,3 +1,3 @@
1
1
  module SqlFootprint
2
- VERSION = '1.1.2'.freeze
2
+ VERSION = '1.1.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sql_footprint
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Joyce
@@ -10,144 +10,144 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2016-07-07 00:00:00.000000000 Z
13
+ date: 2016-11-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - '>='
19
+ - - ">="
20
20
  - !ruby/object:Gem::Version
21
21
  version: '3.0'
22
- - - <
22
+ - - "<"
23
23
  - !ruby/object:Gem::Version
24
24
  version: '5.0'
25
25
  type: :runtime
26
26
  prerelease: false
27
27
  version_requirements: !ruby/object:Gem::Requirement
28
28
  requirements:
29
- - - '>='
29
+ - - ">="
30
30
  - !ruby/object:Gem::Version
31
31
  version: '3.0'
32
- - - <
32
+ - - "<"
33
33
  - !ruby/object:Gem::Version
34
34
  version: '5.0'
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: activesupport
37
37
  requirement: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '3.0'
42
- - - <
42
+ - - "<"
43
43
  - !ruby/object:Gem::Version
44
44
  version: '5.0'
45
45
  type: :runtime
46
46
  prerelease: false
47
47
  version_requirements: !ruby/object:Gem::Requirement
48
48
  requirements:
49
- - - '>='
49
+ - - ">="
50
50
  - !ruby/object:Gem::Version
51
51
  version: '3.0'
52
- - - <
52
+ - - "<"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '5.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.7'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.7'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '10.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '10.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: pry
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: sqlite3
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '>='
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rubocop
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ~>
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
131
  version: 0.37.0
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ~>
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: 0.37.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rubocop-rspec
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - '>='
143
+ - - ">="
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - '>='
150
+ - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  description: Check your footprint file into source control
@@ -159,10 +159,10 @@ executables: []
159
159
  extensions: []
160
160
  extra_rdoc_files: []
161
161
  files:
162
- - .gitignore
163
- - .rspec
164
- - .rubocop.yml
165
- - .travis.yml
162
+ - ".gitignore"
163
+ - ".rspec"
164
+ - ".rubocop.yml"
165
+ - ".travis.yml"
166
166
  - Gemfile
167
167
  - History.md
168
168
  - README.md
@@ -187,18 +187,19 @@ require_paths:
187
187
  - lib
188
188
  required_ruby_version: !ruby/object:Gem::Requirement
189
189
  requirements:
190
- - - '>='
190
+ - - ">="
191
191
  - !ruby/object:Gem::Version
192
192
  version: '0'
193
193
  required_rubygems_version: !ruby/object:Gem::Requirement
194
194
  requirements:
195
- - - '>='
195
+ - - ">="
196
196
  - !ruby/object:Gem::Version
197
197
  version: '0'
198
198
  requirements: []
199
199
  rubyforge_project:
200
- rubygems_version: 2.4.8
200
+ rubygems_version: 2.4.5
201
201
  signing_key:
202
202
  specification_version: 4
203
203
  summary: Keeps your DBA happy.
204
204
  test_files: []
205
+ has_rdoc: