flydata 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +5 -5
- data/VERSION +1 -1
- data/flydata.gemspec +8 -8
- data/lib/flydata/command/sync.rb +7 -1
- data/lib/flydata/table_def/redshift_table_def.rb +2 -3
- data/spec/flydata/table_def/redshift_table_def_spec.rb +0 -2
- metadata +10 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ac62ecc4fbe5d87e45507d2dab80b8b627b783e
|
4
|
+
data.tar.gz: 010df8e3d2b117cac3522e5ba18f5efe248b5ad6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e5a8fd19176585e38f9cb5fa12c4f94bb3dacd7233b384c0735b97d2f605030c5f6ed8bfc244891534da7bc53b685e676e3c486dcda04d4eee4c12b6478302f
|
7
|
+
data.tar.gz: a955da06702acbac1cce240b1ab1a9d5cf7f0190fe1033accbd8a8dc7f0ee1e9a9b8b69014579cb44849166d500e2fab15136fa529d6f06cd2fe100d4c18568d
|
data/Rakefile
CHANGED
@@ -15,12 +15,12 @@ require 'jeweler'
|
|
15
15
|
Jeweler::Tasks.new do |gem|
|
16
16
|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
17
|
gem.name = "flydata"
|
18
|
-
gem.homepage = "http://flydata.
|
18
|
+
gem.homepage = "http://flydata.com/"
|
19
19
|
gem.license = "All right reserved."
|
20
|
-
gem.summary = %Q{FlyData
|
21
|
-
gem.description = %Q{FlyData
|
22
|
-
gem.email = "sysadmin@flydata.
|
23
|
-
gem.authors = ["Koichi Fujikawa"]
|
20
|
+
gem.summary = %Q{FlyData Agent}
|
21
|
+
gem.description = %Q{FlyData Agent}
|
22
|
+
gem.email = "sysadmin@flydata.com"
|
23
|
+
gem.authors = ["Koichi Fujikawa", "Masashi Miyazaki", "Matthew Luu", "Mak Inada", "Sriram NS"]
|
24
24
|
# dependencies defined in Gemfile
|
25
25
|
end
|
26
26
|
Jeweler::RubygemsDotOrgTasks.new
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.5
|
data/flydata.gemspec
CHANGED
@@ -2,18 +2,18 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: flydata 0.2.
|
5
|
+
# stub: flydata 0.2.5 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "flydata"
|
9
|
-
s.version = "0.2.
|
9
|
+
s.version = "0.2.5"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
|
-
s.authors = ["Koichi Fujikawa"]
|
14
|
-
s.date = "2014-09-
|
15
|
-
s.description = "FlyData
|
16
|
-
s.email = "sysadmin@flydata.
|
13
|
+
s.authors = ["Koichi Fujikawa", "Masashi Miyazaki", "Matthew Luu", "Mak Inada", "Sriram NS"]
|
14
|
+
s.date = "2014-09-19"
|
15
|
+
s.description = "FlyData Agent"
|
16
|
+
s.email = "sysadmin@flydata.com"
|
17
17
|
s.executables = ["fdmysqldump", "flydata", "serverinfo"]
|
18
18
|
s.files = [
|
19
19
|
".gitignore",
|
@@ -107,10 +107,10 @@ Gem::Specification.new do |s|
|
|
107
107
|
"spec/spec_helper.rb",
|
108
108
|
"tmpl/redshift_mysql_data_entry.conf.tmpl"
|
109
109
|
]
|
110
|
-
s.homepage = "http://flydata.
|
110
|
+
s.homepage = "http://flydata.com/"
|
111
111
|
s.licenses = ["All right reserved."]
|
112
112
|
s.rubygems_version = "2.2.2"
|
113
|
-
s.summary = "FlyData
|
113
|
+
s.summary = "FlyData Agent"
|
114
114
|
|
115
115
|
if s.respond_to? :specification_version then
|
116
116
|
s.specification_version = 4
|
data/lib/flydata/command/sync.rb
CHANGED
@@ -130,6 +130,12 @@ module Flydata
|
|
130
130
|
puts "Run 'flydata start' to start continuous sync."
|
131
131
|
end
|
132
132
|
|
133
|
+
def self.slop_generate_table_ddl
|
134
|
+
Slop.new do
|
135
|
+
on 'c', 'ctl-only', 'Only generate FlyData Control definitions'
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
133
139
|
def generate_table_ddl(*tables)
|
134
140
|
de = retrieve_data_entry
|
135
141
|
Flydata::Mysql::CompatibilityCheck.new(de['mysql_data_entry_preference']).check
|
@@ -196,7 +202,7 @@ module Flydata
|
|
196
202
|
break
|
197
203
|
end
|
198
204
|
flydata_tabledef = mysql_tabledef.to_flydata_tabledef
|
199
|
-
puts Flydata::TableDef::RedshiftTableDef.from_flydata_tabledef(flydata_tabledef, flydata_ctl_table: create_flydata_ctl_table, schema_name: schema_name)
|
205
|
+
puts Flydata::TableDef::RedshiftTableDef.from_flydata_tabledef(flydata_tabledef, flydata_ctl_table: create_flydata_ctl_table, schema_name: schema_name, ctl_only: opts.ctl_only?)
|
200
206
|
create_flydata_ctl_table = false
|
201
207
|
end
|
202
208
|
while !stderr.eof?
|
@@ -35,14 +35,13 @@ class RedshiftTableDef
|
|
35
35
|
|
36
36
|
tabledef = ""
|
37
37
|
tabledef += create_flydata_ctl_table_sql(schema_name) if options[:flydata_ctl_table]
|
38
|
-
tabledef += create_table_sql(flydata_tabledef, schema_name)
|
39
|
-
tabledef += comment_sql(flydata_tabledef, schema_name)
|
38
|
+
tabledef += create_table_sql(flydata_tabledef, schema_name) unless options[:ctl_only]
|
39
|
+
tabledef += comment_sql(flydata_tabledef, schema_name) unless options[:ctl_only]
|
40
40
|
tabledef += flydata_ctl_sql(flydata_tabledef, schema_name)
|
41
41
|
end
|
42
42
|
|
43
43
|
FLYDATA_CTL_COLUMNS_TABLE = "flydata_ctl_columns"
|
44
44
|
CREATE_FLYDATA_CTL_TABLE_SQL = <<EOS
|
45
|
-
DROP TABLE %s;
|
46
45
|
CREATE TABLE %s(
|
47
46
|
id integer NOT NULL IDENTITY(1,1),
|
48
47
|
table_name varchar(128) NOT NULL,
|
@@ -43,7 +43,6 @@ EOT
|
|
43
43
|
|
44
44
|
it 'should return ddl including flydata_ctl_columns creation' do
|
45
45
|
expect(subject).to eq( <<EOT.strip )
|
46
|
-
DROP TABLE "flydata_ctl_columns";
|
47
46
|
CREATE TABLE "flydata_ctl_columns"(
|
48
47
|
id integer NOT NULL IDENTITY(1,1),
|
49
48
|
table_name varchar(128) NOT NULL,
|
@@ -112,7 +111,6 @@ EOT
|
|
112
111
|
|
113
112
|
it 'should preappend schema name to table name' do
|
114
113
|
expect(subject).to eq( <<EOT.strip )
|
115
|
-
DROP TABLE "test_schema"."flydata_ctl_columns";
|
116
114
|
CREATE TABLE "test_schema"."flydata_ctl_columns"(
|
117
115
|
id integer NOT NULL IDENTITY(1,1),
|
118
116
|
table_name varchar(128) NOT NULL,
|
metadata
CHANGED
@@ -1,14 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flydata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Koichi Fujikawa
|
8
|
+
- Masashi Miyazaki
|
9
|
+
- Matthew Luu
|
10
|
+
- Mak Inada
|
11
|
+
- Sriram NS
|
8
12
|
autorequire:
|
9
13
|
bindir: bin
|
10
14
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
15
|
+
date: 2014-09-19 00:00:00.000000000 Z
|
12
16
|
dependencies:
|
13
17
|
- !ruby/object:Gem::Dependency
|
14
18
|
name: rest-client
|
@@ -372,8 +376,8 @@ dependencies:
|
|
372
376
|
- - ~>
|
373
377
|
- !ruby/object:Gem::Version
|
374
378
|
version: '1.0'
|
375
|
-
description: FlyData
|
376
|
-
email: sysadmin@flydata.
|
379
|
+
description: FlyData Agent
|
380
|
+
email: sysadmin@flydata.com
|
377
381
|
executables:
|
378
382
|
- fdmysqldump
|
379
383
|
- flydata
|
@@ -471,7 +475,7 @@ files:
|
|
471
475
|
- spec/flydata_spec.rb
|
472
476
|
- spec/spec_helper.rb
|
473
477
|
- tmpl/redshift_mysql_data_entry.conf.tmpl
|
474
|
-
homepage: http://flydata.
|
478
|
+
homepage: http://flydata.com/
|
475
479
|
licenses:
|
476
480
|
- All right reserved.
|
477
481
|
metadata: {}
|
@@ -494,5 +498,5 @@ rubyforge_project:
|
|
494
498
|
rubygems_version: 2.2.2
|
495
499
|
signing_key:
|
496
500
|
specification_version: 4
|
497
|
-
summary: FlyData
|
501
|
+
summary: FlyData Agent
|
498
502
|
test_files: []
|