sql_csv 0.1.0 → 0.1.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
  SHA256:
3
- metadata.gz: 0e8f0d24b875a194bca3fe3ea55f7741e461b8fbc909b12fb76637e38695de00
4
- data.tar.gz: 65613b618400bf35f9e2213ae7f224865a6d39b9260dae68ee8b7fdf01fc12e3
3
+ metadata.gz: 66ae2d2126304cb5231d1af07b2f7a28027fdd417f6479588fe5592ed13c46e5
4
+ data.tar.gz: 1b6a84ff3a374acc535402b92d1fdaf3f0265b43d92a391676297443230fc46a
5
5
  SHA512:
6
- metadata.gz: c732347d59799308e3453db21951e7e5696ca0807ffedbfcca1509a6581db21c32d5939020079efd6e49a64c066af85be7c85d69e0d5a85c8cbfe25d0149f8a0
7
- data.tar.gz: 8507cbed40c4f90b5608765fb1767a8af1ffbd2e523c5cecea571f4447f3fee5feb723fbad5acc8367f5eec8f9a9bbcbf8fa0cd35a6ed52264c804709713e997
6
+ metadata.gz: 222afc8bc01a7b9e650e6ba2279b3848210cbd859cf134581d4cbda4b9a977f001ca202012521d5eb6fb765c0f26cf505e4169937e4daee21042c9a7e0e89fcd
7
+ data.tar.gz: 7514781709130addc9aceb03e8c458eac915a32966479a029a0b19f691d647457e0098d17422f75b1aff522dbed43cbb113caef90639faa72230c8f9c9ac4aa2
data/Gemfile.lock CHANGED
@@ -1,19 +1,19 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sql_csv (0.1.0)
4
+ sql_csv (0.1.1)
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.4.1)
12
- activesupport (= 6.1.4.1)
13
- activerecord (6.1.4.1)
14
- activemodel (= 6.1.4.1)
15
- activesupport (= 6.1.4.1)
16
- activesupport (6.1.4.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)
@@ -25,7 +25,7 @@ GEM
25
25
  diff-lcs (1.4.4)
26
26
  i18n (1.8.10)
27
27
  concurrent-ruby (~> 1.0)
28
- minitest (5.14.4)
28
+ minitest (5.15.0)
29
29
  mysql2 (0.5.3)
30
30
  paint (2.2.1)
31
31
  parallel (1.21.0)
@@ -70,7 +70,7 @@ 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.2)
73
+ zeitwerk (2.5.4)
74
74
 
75
75
  PLATFORMS
76
76
  ruby
data/README.md CHANGED
@@ -18,6 +18,14 @@ Or install it yourself as:
18
18
 
19
19
  $ gem install sql_csv
20
20
 
21
+ ## Usage
22
+
23
+ Write an SQL command to `stdin` and set `DATABASE_URL` to configure connection. CSV output will be written to `stdout`.
24
+
25
+ ```bash
26
+ echo "select * from users" | DATABASE_URL='postgresql://user:password@host:1234/database' sql_csv > users.csv
27
+ ```
28
+
21
29
  ## License
22
30
 
23
31
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SqlCsv
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
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 = ['sql_csv']
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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sql_csv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Farrell
@@ -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
+ - sql_csv
59
60
  extensions: []
60
61
  extra_rdoc_files: []
61
62
  files: