active_record_mysql_repl 0.1.2 → 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: accf9badcb507bbebe51faf48edd6ef5fe850e01214cc34a8be1b06400b5a8d7
4
- data.tar.gz: 225572e71a93254ccb85ee5c1b5d0878a8fe5a71ac9c44eab6d236c4f113accc
3
+ metadata.gz: ebd2f216121431e6d7b24e99fdc0e55926bb698c647bf0f159b8f5e9a107ed54
4
+ data.tar.gz: ece4d3f8e1369023a1beedc12570445018880714fc83ed8842f0a39096b5a6dd
5
5
  SHA512:
6
- metadata.gz: f8cd05e53b0e49770e89fdf93f9ceb9c29df31d814f7f721267304e9557df7d753673781a05b3c8282ab019b16306f5d4e4920a7a7b2ff8776f1ab6da0a0fa5e
7
- data.tar.gz: 0db40cd1589fa912dbb76c2d95195bec40d5ffc59affef92afc35eb6ec32a3c66cb7bccd73114bb9472dc5e726f855bc73f473fbe2d3f91fa82313144eeecf88
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.2"
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.2
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