shiba 0.9.0 → 0.9.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f1ef713e70ede38016a29c88d84483617e07311d
4
- data.tar.gz: 4ecd2b966d49746718ae8a7100b3ef66a5485d3b
2
+ SHA256:
3
+ metadata.gz: e7eada3a6681422e90d6dc44bf19121abb12986defaabeb31ca779ed4cb0418a
4
+ data.tar.gz: e0e38dbc12379a611b621eec501c677860721945833cd4248c22e53f0d1f203c
5
5
  SHA512:
6
- metadata.gz: 07d57fc1876fd08e51938b5d3e5b446551a0292b25604fb49619d20bb93b0c7cc13b0b180561eb6b8def2dc1bd283b347df810c7a2a5fb6662f3526736283bd9
7
- data.tar.gz: 992343b80bb1bfecaa290d5dbf9a90fcf30f640a874c7c2184af165ea2edb54ab8aa9848f097175a1451baf93001bb966ff9512f35d2dad947df8c58861ccc23
6
+ metadata.gz: cef76568f5300e5a57ecd8c53f247a889fb3e09f40b2e5c15572f31fc81a5923cde7de6a71407fc1fe6022d95e612b8f66775f982ddbf576303d7e06d23e44d9
7
+ data.tar.gz: bd0b080bfafde25a487ad2e47ee44c96b26e4e7b762cdb9fb62473727b775dae80ec22205d6fe767ce493659ddaa7774ed183ead5f806583beea6d4cc850a1c9
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shiba (0.9.0)
4
+ shiba (0.9.1)
5
5
  activesupport
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -8,7 +8,7 @@ Shiba is a tool (currently in alpha) that automatically reviews SQL queries befo
8
8
 
9
9
  ## Installation
10
10
 
11
- Install using bundler. Note: this gem is not designed to be run on production.
11
+ Install using bundler. Note: this gem is not designed to be run on production. It should be required after minitest/rspec.
12
12
 
13
13
  ```ruby
14
14
  # Gemfile
@@ -48,6 +48,12 @@ module Shiba
48
48
  table = sc[1]
49
49
  col = sc[2]
50
50
 
51
+ tables[table] ||= []
52
+ tables[table] << col
53
+ elsif sc.scan(/\(`(.*?)`\.`(.*?)` collate \w+\) AS `(.*?)`/)
54
+ table = sc[1]
55
+ col = sc[2]
56
+
51
57
  tables[table] ||= []
52
58
  tables[table] << col
53
59
  elsif sc.scan(/(\d+|NULL|'.*?') AS `(.*?)`/m)
@@ -1,3 +1,3 @@
1
1
  module Shiba
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
@@ -65,7 +65,7 @@ function categorizeQueries(v, queries) {
65
65
  }
66
66
 
67
67
  if ( q.hasTag("fuzzed_data") )
68
- this.hasFuzzed = true;
68
+ v.hasFuzzed = true;
69
69
 
70
70
  var rCost = 0;
71
71
  q.messages.forEach(function(m) {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shiba
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Osheroff
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-03-14 00:00:00.000000000 Z
12
+ date: 2019-03-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -157,9 +157,10 @@ files:
157
157
  - shiba.gemspec
158
158
  - shiba.yml.example
159
159
  - web/babel.config.js
160
+ - web/dist/example_data.json
160
161
  - web/dist/index.html
161
- - web/dist/js/app.2be9b1e3.js
162
- - web/dist/js/app.2be9b1e3.js.map
162
+ - web/dist/js/app.2ba8a5da.js
163
+ - web/dist/js/app.2ba8a5da.js.map
163
164
  - web/package-lock.json
164
165
  - web/package.json
165
166
  - web/public/index.html
@@ -194,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
195
  version: '0'
195
196
  requirements: []
196
197
  rubyforge_project:
197
- rubygems_version: 2.6.14.1
198
+ rubygems_version: 2.7.6
198
199
  signing_key:
199
200
  specification_version: 4
200
201
  summary: A gem that attempts to find bad queries before you shoot self in foot