redata 1.3.7 → 1.3.8
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 +4 -4
- data/README.md +1 -0
- data/lib/redata/config.rb +4 -1
- data/lib/redata/relation.rb +2 -1
- data/lib/redata/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f938bf7f7d2775b6c7cd047756d94f4875e86ce
|
4
|
+
data.tar.gz: 80ce822a40b86b8cfeb91b1ace3835ee65f39885
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66b48a6cd3e8d154daa0093beeabef64ab7543df7a0c6a42f6e35c123a2449294103edbad23db15a95724130e326b2ee6ff13b2cf0e2ccba6fe7e47d5e28b500
|
7
|
+
data.tar.gz: 298e78a9ce931f7832049e0885e49578a6350786185ffc683ed030d32fbe88c45e7caabd7b5ce48c10f51482273b0aebf68207098e0f408ad8c77cd0a0a0083a
|
data/README.md
CHANGED
@@ -174,6 +174,7 @@ Usage: `redata [-options] [action] [object key] {stage}`
|
|
174
174
|
- -dir --> project directory, both absolute path and realtive path will be okay. default is current directory.
|
175
175
|
- -e --> environment: `production`, `development`, etc.
|
176
176
|
- -f --> force mode, use `CADCASE` when removing view or table in redshift
|
177
|
+
- -identify --> table/view name will be appended with this identify
|
177
178
|
- -ssh --> use ssh accessing to private database with ssh config in `config/redata.yml`
|
178
179
|
- -append --> use `append_mode`, append new data into existing table for redshift or inject into local db without deleting. view has no append mode.
|
179
180
|
- other options --> some params will be used in query file when declared, such `start_time`
|
data/lib/redata/config.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Redata
|
2
2
|
class Config
|
3
|
-
attr_accessor :root, :env, :is_forced, :is_ssh, :is_append, :params, :locals
|
3
|
+
attr_accessor :root, :env, :identify, :is_forced, :is_ssh, :is_append, :params, :locals
|
4
4
|
|
5
5
|
def initialize(argv=nil)
|
6
6
|
# params
|
@@ -13,6 +13,7 @@ module Redata
|
|
13
13
|
@root = Pathname.new(Dir.pwd).join @argv[:dir]
|
14
14
|
end
|
15
15
|
@env = @argv[:env] || 'development'
|
16
|
+
@identify = @argv[:identify]
|
16
17
|
@is_forced = @argv[:force]
|
17
18
|
@is_ssh = @argv[:ssh]
|
18
19
|
@is_append = @argv[:append_mode]
|
@@ -112,6 +113,8 @@ module Redata
|
|
112
113
|
new_argv[:ssh] = true
|
113
114
|
when '-append'
|
114
115
|
new_argv[:append_mode] = true
|
116
|
+
when '-identify'
|
117
|
+
new_argv[:identify] = argv[i]
|
115
118
|
else
|
116
119
|
if argv[i] =~ /\A-(.+)/
|
117
120
|
key = argv[i].match(/\A-(.+)/)[1]
|
data/lib/redata/relation.rb
CHANGED
@@ -14,7 +14,8 @@ module Redata
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def source_name
|
17
|
-
|
17
|
+
postfix = RED.identify ? "_#{RED.identify}" : ""
|
18
|
+
@category == :main ? "#{@name}#{postfix}" : "#{@category}_#{@name}#{postfix}"
|
18
19
|
end
|
19
20
|
|
20
21
|
def query_file
|
data/lib/redata/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- goshan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|