slyce 0.9.9 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/slyce +3 -5
- data/bin/slyce3 +4 -6
- data/slyce.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36daa71deee82e19314bc1df0caedb1bc6b4a2b8f0bf524a471f48fcf28c1fb7
|
4
|
+
data.tar.gz: 71c450033ed16659bcb206e6023dc92f9cf448736355385101d051f9c7cfebc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a621fa8b4369fe27d5edc33573b0fe1f59312c7e97564a2c146517bebb3481b1633ffb9444cd494a97890efb0d8fa57f3885281e4c6d281821c6219376f1ee86
|
7
|
+
data.tar.gz: aa98ed93dfc2e762b4e39fbe1d70d5f09c00d47ed5021511dc5811fbb826c97d121f7719a196677b60351f0fc5152f1efcc7a1984140b0be758dab6253cab38d
|
data/bin/slyce
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
VERSION="0.
|
3
|
+
VERSION="1.0.0"
|
4
4
|
|
5
5
|
STDOUT.sync = true
|
6
6
|
|
@@ -17,7 +17,7 @@ OptionParser.new.instance_eval do
|
|
17
17
|
|
18
18
|
on "-c", "--columns" , "Display column names and quit"
|
19
19
|
on "-h", "--help" , "Show help and command usage" do Kernel.abort to_s; end
|
20
|
-
on "-n", "--natural" , "Sort naturally, not numerically"
|
20
|
+
on "-n", "--natural" , "Sort naturally, not numerically"
|
21
21
|
on "-s", "--show <count>" , "Show this many values", Integer
|
22
22
|
on "-v", "--version" , "Show version number" do Kernel.abort "#{program_name} #{VERSION}"; end
|
23
23
|
on "-w", "--where <cond>" , "Where clause (eg - 'age>50 and state='AZ')"
|
@@ -37,9 +37,7 @@ tabl ||= ARGV.shift or abort "no table given"
|
|
37
37
|
# ==[ Helpers ]==
|
38
38
|
|
39
39
|
class Mysql2::Client
|
40
|
-
|
41
|
-
query(...)
|
42
|
-
end
|
40
|
+
alias_method :sql, :query
|
43
41
|
|
44
42
|
def sql!(stmt, *args, **, &)
|
45
43
|
puts "\n==[ SQL statement ]==\n\n", stmt.strip, ";"
|
data/bin/slyce3
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
# wget https://github.com/nalgeon/sqlean/releases/download/0.19.3/sqlean-macos-arm64.zip
|
10
10
|
# unzip sqlean-macos-arm64.zip regexp.dylib
|
11
11
|
|
12
|
-
VERSION="0.
|
12
|
+
VERSION="1.0.0"
|
13
13
|
|
14
14
|
STDOUT.sync = true
|
15
15
|
|
@@ -26,7 +26,7 @@ OptionParser.new.instance_eval do
|
|
26
26
|
|
27
27
|
on "-c", "--columns" , "Display column names and quit"
|
28
28
|
on "-h", "--help" , "Show help and command usage" do Kernel.abort to_s; end
|
29
|
-
on "-n", "--natural" , "Sort naturally, not numerically"
|
29
|
+
on "-n", "--natural" , "Sort naturally, not numerically"
|
30
30
|
on "-r", "--regexp <path>" , "Path to the sqlean/regexp extension"
|
31
31
|
on "-s", "--show <count>" , "Show this many values", Integer
|
32
32
|
on "-v", "--version" , "Show version number" do Kernel.abort "#{program_name} #{VERSION}"; end
|
@@ -38,7 +38,7 @@ end.parse!(into: opts={}) rescue abort($!.message)
|
|
38
38
|
|
39
39
|
filt = opts[:where] and filt = "where\n #{filt}"
|
40
40
|
natu = opts[:natural]
|
41
|
-
regx = opts[:regexp] || Dir["{
|
41
|
+
regx = opts[:regexp] || Dir["{.,sqlean}/regexp.{dll,dylib,so}"].first
|
42
42
|
show = opts[:show]
|
43
43
|
want = opts[:extract].to_s.downcase.split(",")
|
44
44
|
|
@@ -50,9 +50,7 @@ regx && File.exist?(regx) or abort "no regexp extension found#{regx ? " at '#{r
|
|
50
50
|
# ==[ Helpers ]==
|
51
51
|
|
52
52
|
class Extralite::Database
|
53
|
-
|
54
|
-
query_ary(...)
|
55
|
-
end
|
53
|
+
alias_method :sql, :query_ary
|
56
54
|
|
57
55
|
def sql!(stmt, *args, **, &)
|
58
56
|
puts "\n==[ SQL statement ]==\n\n", stmt.strip, ";"
|
data/slyce.gemspec
CHANGED
@@ -11,6 +11,6 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.license = "MIT"
|
12
12
|
s.files = `git ls-files`.split("\n") - %w[.gitignore]
|
13
13
|
s.executables = `cd bin && git ls-files .`.split("\n")
|
14
|
-
s.add_runtime_dependency "extralite-bundle", "~> 1.
|
14
|
+
s.add_runtime_dependency "extralite-bundle", "~> 1.25"
|
15
15
|
s.add_runtime_dependency "mysql2", "~> 0.5"
|
16
16
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slyce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Shreeve
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: '1.25'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: '1.25'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mysql2
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|