active_record_mysql_repl 0.1.1 → 0.1.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebd2f216121431e6d7b24e99fdc0e55926bb698c647bf0f159b8f5e9a107ed54
|
4
|
+
data.tar.gz: ece4d3f8e1369023a1beedc12570445018880714fc83ed8842f0a39096b5a6dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdc174294e132085476defb3e9056b2cb28db75d9256b9c6141e1462fef39a4e31773b42adb5057c35dc400983e0fa0cdf18d55079f7096d31666e63870533b7
|
7
|
+
data.tar.gz: 57eb3af1988397e38d9ac3430aa75f914f418d134e8fc46f93c6b1eea8fba044dcc8ef076604b590ba6f4decdb3d2d56f798580541de1f083a1f252e38367b99
|
data/.bundle/config
ADDED
@@ -16,7 +16,7 @@ module ActiveRecordMysqlRepl
|
|
16
16
|
end
|
17
17
|
|
18
18
|
opts = CLI::Options.parse(args)
|
19
|
-
army_config = Config.load(opts[:c] || '
|
19
|
+
army_config = Config.load(opts[:c] || File.join(Dir.home, '.army.yml'))
|
20
20
|
|
21
21
|
db_configs = Database::Configs.load(army_config.database_config)
|
22
22
|
db_config_key = opts[:d]
|
@@ -71,14 +71,14 @@ module ActiverecordMysqlRepl
|
|
71
71
|
def csv(orientation = nil)
|
72
72
|
arr = if self.is_a?(Array)
|
73
73
|
self
|
74
|
-
elsif self.is_a?(ActiveRecord::Relation)
|
74
|
+
elsif self.is_a?(::ActiveRecord::Relation)
|
75
75
|
self.to_a
|
76
76
|
else
|
77
77
|
[self]
|
78
78
|
end
|
79
79
|
|
80
80
|
arr = arr.map do |e|
|
81
|
-
if e.is_a?(ActiveRecord::Base)
|
81
|
+
if e.is_a?(::ActiveRecord::Base)
|
82
82
|
values = e.attributes.transform_values do |v|
|
83
83
|
next JSON.pretty_generate(v) if v.is_a?(Enumerable) && v.size > 0
|
84
84
|
next 'NULL' if v.nil?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record_mysql_repl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroki Kishi
|
@@ -214,6 +214,7 @@ executables:
|
|
214
214
|
extensions: []
|
215
215
|
extra_rdoc_files: []
|
216
216
|
files:
|
217
|
+
- ".bundle/config"
|
217
218
|
- ".rspec"
|
218
219
|
- ".standard.yml"
|
219
220
|
- CHANGELOG.md
|