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: a47211b16afe2eb4241744a18527952b75a6dac904732ef020656e318ddbe0fd
4
- data.tar.gz: 2615f95e36e9418e861a02849897f81d04b31334efe380683222eb1a2fb98d19
3
+ metadata.gz: ebd2f216121431e6d7b24e99fdc0e55926bb698c647bf0f159b8f5e9a107ed54
4
+ data.tar.gz: ece4d3f8e1369023a1beedc12570445018880714fc83ed8842f0a39096b5a6dd
5
5
  SHA512:
6
- metadata.gz: 144b30056aeecf025a5dae76de48a724001c6c152bbcacb903572157de99e95e047e0065280444e10b549812e4c98361e2a1def71d08d5dac10d99af15780897
7
- data.tar.gz: c3e3930c35974d3617ade50b0856408876006c5e60dc9b6fa6645db610137a651cb693fa376a01181104aa3ef423c04f404f3df1dfb1a92019be3aaf5a8c5a16
6
+ metadata.gz: bdc174294e132085476defb3e9056b2cb28db75d9256b9c6141e1462fef39a4e31773b42adb5057c35dc400983e0fa0cdf18d55079f7096d31666e63870533b7
7
+ data.tar.gz: 57eb3af1988397e38d9ac3430aa75f914f418d134e8fc46f93c6b1eea8fba044dcc8ef076604b590ba6f4decdb3d2d56f798580541de1f083a1f252e38367b99
data/.bundle/config ADDED
@@ -0,0 +1,3 @@
1
+ ---
2
+ BUNDLE_PATH: "vendor/bundle"
3
+ BUNDLE_BUILD__MYSQL2: "--with-mysql-dir=/opt/homebrew/opt/mysql-client@8.4"
@@ -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] || '~/.army.yml')
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?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveRecordMysqlRepl
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.3"
5
5
  end
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.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