redash_backup 0.2.0 → 0.3.0

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: 9f36f9eeebbd9fa0be5a711cd32b0675c9ceaa279c8d69995969a60965138ce6
4
- data.tar.gz: 6f44e27b0139dbfe55d63ed9a6139d77671d733abe074dfed9b6076b52181ca6
3
+ metadata.gz: 5e356e2c523aec0f7a5393a39cd32bbffdcfc3138b859566f2cd07d27d6b8748
4
+ data.tar.gz: 111609164c2100ba6cda937416b22bab4f049e5ad819417951e7b35df63519f6
5
5
  SHA512:
6
- metadata.gz: 2935e1f86598239f8fc8d7a91a4d548835faa338bff76636d78b4514c49e81f95bce87482dbc59d762b33f7fbe64bc7498e27c0cfd82fe733430bee120ed0925
7
- data.tar.gz: 0536d95831121e13a62a9deba8087a7f0a13127f48a0fc52fe6ef2bef5c0a55b4033bd71ed0789831103490d1a45437e0f7a80d2e8d44a6ce5d1d3b83592cc37
6
+ metadata.gz: d4b5ea3fb81f1133912517c1d18baf94b77b724ecc3449e6f74d770998a1ac777edcfad117ddfa70bdb67c4a41e71b261120a82f51814146cbc76c7ad7d8f018
7
+ data.tar.gz: 5b8e9b935728867bfcaca02eaba6f081316e4172d53ebc5269fba81da942afe5be54b16c4577ca041212e8d389a3a5ad82f833b364b168b74a9c5593084e563f
data/CHANGELOG.md CHANGED
@@ -4,5 +4,8 @@
4
4
  # 0.1.2
5
5
  - export unused queries
6
6
 
7
- # 0.2.2
8
- - add raketask
7
+ # 0.2.0
8
+ - add raketask
9
+
10
+ # 0.3.0
11
+ - add cli
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- redash_backup (0.2.0)
4
+ redash_backup (0.3.0)
5
5
  activerecord
6
6
  fileutils
7
7
  pg
data/README.md CHANGED
@@ -19,41 +19,19 @@ Or install it yourself as:
19
19
  $ gem install redash_backup
20
20
 
21
21
  ## Usage
22
- ### With other than zsh
23
- - YOUR_REDEDASH_DATABASE_URL is like postgres://username:password@host:port/db
22
+ - EXPORT_DIR_NAME is optional argument
23
+ - YOUR_REDEDASH_DATABASE_URL is like postgres://username:password@host:port/database
24
24
 
25
25
  ```sh
26
- rake redash:backup[YOUR_REDEDASH_DATABASE_URL,EXPORT_DIR_NAME]
27
- #
28
- # export...
29
- #
30
- # ./queries/dashboard1/hoge.sql
31
- # ./queries/dashboard1/page.sql
32
- # ./queries/dashboard2/poko.sql
33
- # ./queries/dashboard2/pako.sql
34
- # ./queries/unused/maru.sql
35
- # ./queries/unused/batu.sql
36
- #
37
- # ※ default export path: './queries'
38
- # Can call without 'EXPORT DIR NAME'
39
- # ex. rake redash:backup['YOUR REDEDASH DATABASE_URL']
40
- ```
41
-
42
- ### With zsh
43
-
44
- ```sh
45
- ※ Surround with single quotes
46
- rake 'redash:backup[YOUR_REDEDASH_DATABASE_URL,EXPORT_DIR_NAME]'
47
- #
26
+ bundle exec redash_backup YOUR_REDEDASH_DATABASE_URL EXPORT_DIR_NAME
48
27
  # export...
49
28
  #
50
- # ./queries/dashboard1/hoge.sql
51
- # ./queries/dashboard1/page.sql
52
- # ./queries/dashboard2/poko.sql
53
- # ./queries/dashboard2/pako.sql
54
- # ./queries/unused/maru.sql
55
- # ./queries/unused/batu.sql
29
+ # Completed export to ./queries/dashboard1/hoge.sql
30
+ # Completed export to ./queries/dashboard1/page.sql
31
+ # Completed export to ./queries/dashboard2/poko.sql
32
+ # Completed export to ./queries/dashboard2/pako.sql
33
+ # Completed export to ./queries/unused/maru.sql
34
+ # Completed export to ./queries/unused/batu.sql
56
35
  #
57
36
  # ※ default export path: './queries'
58
- #
59
37
  ```
data/Rakefile CHANGED
@@ -8,8 +8,4 @@ namespace :redash do
8
8
  task :query_backup, [:db_url, :export_dir] do |task, args|
9
9
  RedashBackup.new(args.db_url).execute(args.export_dir)
10
10
  end
11
-
12
- task :db_backup, [:db_url, :expoet_dir] do |task, args|
13
- RedashBackup.new(args.db_url).db_dump(args.export_dir)
14
- end
15
11
  end
data/exe/redash_backup ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems'
3
+
4
+ here = File.expand_path(File.dirname __FILE__)
5
+ $LOAD_PATH << "#{here}/../lib"
6
+ require 'redash_backup'
7
+ RedashBackup.new(ARGV[0]).execute(ARGV[1])
@@ -1,3 +1,3 @@
1
1
  class RedashBackup
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redash_backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tashiro
@@ -55,7 +55,8 @@ dependencies:
55
55
  description: cli for back up redash queries
56
56
  email:
57
57
  - g4160hc@gmail.com
58
- executables: []
58
+ executables:
59
+ - redash_backup
59
60
  extensions: []
60
61
  extra_rdoc_files: []
61
62
  files:
@@ -70,6 +71,7 @@ files:
70
71
  - Rakefile
71
72
  - bin/console
72
73
  - bin/setup
74
+ - exe/redash_backup
73
75
  - lib/redash_backup.rb
74
76
  - lib/redash_backup/base.rb
75
77
  - lib/redash_backup/model.rb