sql_csv 0.1.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.ruby-version +1 -1
- data/Gemfile +4 -4
- data/Gemfile.lock +39 -39
- data/README.md +10 -0
- data/bin/{sql_csv → sql2csv} +0 -1
- data/lib/sql_csv/version.rb +1 -1
- data/sql_csv.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bd2654196dbfc8626ab6d0568a32db5880243b82b3628e30313236f92c0128a
|
4
|
+
data.tar.gz: cfad58ce7083277a5b48ce6105065901e9a150c89a89739e07beadebfc472b78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73a3c755832a78a6f3851c15f094c9aa02ac069172af9d9bfe6fcc1c23747c28396c21e34c017e7181230b63d2fa1b4e3af740a75922dd7815da06f80eca3106
|
7
|
+
data.tar.gz: bea69e70f051cad2bb27404ac8f54b1015796e48db92e439246ec691088ae90a09dd667d65a499e9c9ae34f9fab35088bd60da45e47db33481fc9716f551d69f
|
data/.gitignore
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.7.
|
1
|
+
2.7.6
|
data/Gemfile
CHANGED
@@ -5,9 +5,9 @@ source 'https://rubygems.org'
|
|
5
5
|
# Specify your gem's dependencies in sql_csv.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
|
-
gem 'rake', '~>
|
9
|
-
gem 'rspec', '~> 3.
|
10
|
-
gem 'rubocop', '~> 1.
|
8
|
+
gem 'rake', '~> 13.0'
|
9
|
+
gem 'rspec', '~> 3.11'
|
10
|
+
gem 'rubocop', '~> 1.29'
|
11
11
|
gem 'rubocop-rake', '~> 0.6.0'
|
12
|
-
gem 'rubocop-rspec', '~> 2.
|
12
|
+
gem 'rubocop-rspec', '~> 2.10'
|
13
13
|
gem 'strong_versions', '~> 0.4.5'
|
data/Gemfile.lock
CHANGED
@@ -1,67 +1,67 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sql_csv (0.
|
4
|
+
sql_csv (0.2.0)
|
5
5
|
activerecord (~> 6.1)
|
6
6
|
mysql2 (~> 0.5.3)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activemodel (6.1.
|
12
|
-
activesupport (= 6.1.
|
13
|
-
activerecord (6.1.
|
14
|
-
activemodel (= 6.1.
|
15
|
-
activesupport (= 6.1.
|
16
|
-
activesupport (6.1.
|
11
|
+
activemodel (6.1.5)
|
12
|
+
activesupport (= 6.1.5)
|
13
|
+
activerecord (6.1.5)
|
14
|
+
activemodel (= 6.1.5)
|
15
|
+
activesupport (= 6.1.5)
|
16
|
+
activesupport (6.1.5)
|
17
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
18
|
i18n (>= 1.6, < 2)
|
19
19
|
minitest (>= 5.1)
|
20
20
|
tzinfo (~> 2.0)
|
21
21
|
zeitwerk (~> 2.3)
|
22
22
|
ast (2.4.2)
|
23
|
-
concurrent-ruby (1.1.
|
23
|
+
concurrent-ruby (1.1.10)
|
24
24
|
devpack (0.3.2)
|
25
|
-
diff-lcs (1.
|
26
|
-
i18n (1.
|
25
|
+
diff-lcs (1.5.0)
|
26
|
+
i18n (1.10.0)
|
27
27
|
concurrent-ruby (~> 1.0)
|
28
|
-
minitest (5.
|
28
|
+
minitest (5.15.0)
|
29
29
|
mysql2 (0.5.3)
|
30
30
|
paint (2.2.1)
|
31
|
-
parallel (1.
|
32
|
-
parser (3.
|
31
|
+
parallel (1.22.1)
|
32
|
+
parser (3.1.2.0)
|
33
33
|
ast (~> 2.4.1)
|
34
|
-
rainbow (3.
|
35
|
-
rake (
|
36
|
-
regexp_parser (2.
|
34
|
+
rainbow (3.1.1)
|
35
|
+
rake (13.0.6)
|
36
|
+
regexp_parser (2.3.1)
|
37
37
|
rexml (3.2.5)
|
38
|
-
rspec (3.
|
39
|
-
rspec-core (~> 3.
|
40
|
-
rspec-expectations (~> 3.
|
41
|
-
rspec-mocks (~> 3.
|
42
|
-
rspec-core (3.
|
43
|
-
rspec-support (~> 3.
|
44
|
-
rspec-expectations (3.
|
38
|
+
rspec (3.11.0)
|
39
|
+
rspec-core (~> 3.11.0)
|
40
|
+
rspec-expectations (~> 3.11.0)
|
41
|
+
rspec-mocks (~> 3.11.0)
|
42
|
+
rspec-core (3.11.0)
|
43
|
+
rspec-support (~> 3.11.0)
|
44
|
+
rspec-expectations (3.11.0)
|
45
45
|
diff-lcs (>= 1.2.0, < 2.0)
|
46
|
-
rspec-support (~> 3.
|
47
|
-
rspec-mocks (3.
|
46
|
+
rspec-support (~> 3.11.0)
|
47
|
+
rspec-mocks (3.11.1)
|
48
48
|
diff-lcs (>= 1.2.0, < 2.0)
|
49
|
-
rspec-support (~> 3.
|
50
|
-
rspec-support (3.
|
51
|
-
rubocop (1.
|
49
|
+
rspec-support (~> 3.11.0)
|
50
|
+
rspec-support (3.11.0)
|
51
|
+
rubocop (1.29.0)
|
52
52
|
parallel (~> 1.10)
|
53
|
-
parser (>= 3.
|
53
|
+
parser (>= 3.1.0.0)
|
54
54
|
rainbow (>= 2.2.2, < 4.0)
|
55
55
|
regexp_parser (>= 1.8, < 3.0)
|
56
|
-
rexml
|
57
|
-
rubocop-ast (>= 1.
|
56
|
+
rexml (>= 3.2.5, < 4.0)
|
57
|
+
rubocop-ast (>= 1.17.0, < 2.0)
|
58
58
|
ruby-progressbar (~> 1.7)
|
59
59
|
unicode-display_width (>= 1.4.0, < 3.0)
|
60
|
-
rubocop-ast (1.
|
61
|
-
parser (>= 3.
|
60
|
+
rubocop-ast (1.17.0)
|
61
|
+
parser (>= 3.1.1.0)
|
62
62
|
rubocop-rake (0.6.0)
|
63
63
|
rubocop (~> 1.0)
|
64
|
-
rubocop-rspec (2.
|
64
|
+
rubocop-rspec (2.10.0)
|
65
65
|
rubocop (~> 1.19)
|
66
66
|
ruby-progressbar (1.11.0)
|
67
67
|
strong_versions (0.4.5)
|
@@ -70,18 +70,18 @@ GEM
|
|
70
70
|
tzinfo (2.0.4)
|
71
71
|
concurrent-ruby (~> 1.0)
|
72
72
|
unicode-display_width (2.1.0)
|
73
|
-
zeitwerk (2.4
|
73
|
+
zeitwerk (2.5.4)
|
74
74
|
|
75
75
|
PLATFORMS
|
76
76
|
ruby
|
77
77
|
|
78
78
|
DEPENDENCIES
|
79
79
|
devpack (~> 0.3.2)
|
80
|
-
rake (~>
|
81
|
-
rspec (~> 3.
|
82
|
-
rubocop (~> 1.
|
80
|
+
rake (~> 13.0)
|
81
|
+
rspec (~> 3.11)
|
82
|
+
rubocop (~> 1.29)
|
83
83
|
rubocop-rake (~> 0.6.0)
|
84
|
-
rubocop-rspec (~> 2.
|
84
|
+
rubocop-rspec (~> 2.10)
|
85
85
|
sql_csv!
|
86
86
|
strong_versions (~> 0.4.5)
|
87
87
|
|
data/README.md
CHANGED
@@ -18,6 +18,16 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
$ gem install sql_csv
|
20
20
|
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
An executable `sql2csv` is installed with the gem.
|
24
|
+
|
25
|
+
Write an SQL command to `stdin` and set `DATABASE_URL` to configure connection. CSV output will be written to `stdout`.
|
26
|
+
|
27
|
+
```bash
|
28
|
+
echo "select * from users" | DATABASE_URL='postgresql://user:password@host:1234/database' sql2csv > users.csv
|
29
|
+
```
|
30
|
+
|
21
31
|
## License
|
22
32
|
|
23
33
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/bin/{sql_csv → sql2csv}
RENAMED
data/lib/sql_csv/version.rb
CHANGED
data/sql_csv.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
end
|
23
23
|
|
24
24
|
spec.bindir = 'bin'
|
25
|
-
spec.executables = []
|
25
|
+
spec.executables = ['sql2csv']
|
26
26
|
spec.require_paths = ['lib']
|
27
27
|
spec.add_runtime_dependency 'activerecord', '~> 6.1'
|
28
28
|
spec.add_runtime_dependency 'mysql2', '~> 0.5.3'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sql_csv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Farrell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -55,7 +55,8 @@ dependencies:
|
|
55
55
|
description: Use ActiveRecord to execute SQL against any DB to export CSV
|
56
56
|
email:
|
57
57
|
- git@bob.frl
|
58
|
-
executables:
|
58
|
+
executables:
|
59
|
+
- sql2csv
|
59
60
|
extensions: []
|
60
61
|
extra_rdoc_files: []
|
61
62
|
files:
|
@@ -71,7 +72,7 @@ files:
|
|
71
72
|
- Rakefile
|
72
73
|
- bin/console
|
73
74
|
- bin/setup
|
74
|
-
- bin/
|
75
|
+
- bin/sql2csv
|
75
76
|
- lib/sql_csv.rb
|
76
77
|
- lib/sql_csv/version.rb
|
77
78
|
- sql_csv.gemspec
|