active_record_mysql_repl 0.1.3 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +729 -13
  3. data/lib/active_record_mysql_repl/cli/erd.rb +1 -1
  4. data/lib/active_record_mysql_repl/cli/main.rb +19 -14
  5. data/lib/active_record_mysql_repl/cli/zsh_completion.rb +23 -23
  6. data/lib/active_record_mysql_repl/cli.rb +4 -4
  7. data/lib/active_record_mysql_repl/config.rb +7 -7
  8. data/lib/active_record_mysql_repl/database/association.rb +10 -10
  9. data/lib/active_record_mysql_repl/database/configs.rb +2 -2
  10. data/lib/active_record_mysql_repl/database/connection.rb +11 -13
  11. data/lib/active_record_mysql_repl/database/loader.rb +10 -5
  12. data/lib/active_record_mysql_repl/database.rb +4 -4
  13. data/lib/active_record_mysql_repl/extensions/active_record.rb +8 -8
  14. data/lib/active_record_mysql_repl/extensions/global.rb +0 -1
  15. data/lib/active_record_mysql_repl/extensions/hash.rb +8 -5
  16. data/lib/active_record_mysql_repl/extensions/object.rb +53 -54
  17. data/lib/active_record_mysql_repl/extensions/tabler.rb +2 -3
  18. data/lib/active_record_mysql_repl/extensions.rb +5 -6
  19. data/lib/active_record_mysql_repl/ssh_tunnel.rb +5 -3
  20. data/lib/active_record_mysql_repl/version.rb +1 -1
  21. data/lib/active_record_mysql_repl.rb +4 -5
  22. data/sample_config/{.pryrc.sample → .army.sample/.pryrc.sample} +2 -0
  23. data/sample_config/{associations.sample.yml → .army.sample/associations.sample.yml} +1 -1
  24. data/sample_config/{databases.sample.yml → .army.sample/databases.sample.yml} +2 -2
  25. data/sample_config/.army.sample/extensions/hello.rb +9 -0
  26. data/sample_config/.army.sample.yml +4 -4
  27. metadata +20 -5
@@ -1,11 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "active_record_mysql_repl/version"
4
- require_relative 'active_record_mysql_repl/config'
5
- require_relative 'active_record_mysql_repl/cli'
6
- require_relative 'active_record_mysql_repl/database'
7
- require_relative 'active_record_mysql_repl/ssh_tunnel'
8
- require_relative 'active_record_mysql_repl/version'
4
+ require_relative "active_record_mysql_repl/config"
5
+ require_relative "active_record_mysql_repl/cli"
6
+ require_relative "active_record_mysql_repl/database"
7
+ require_relative "active_record_mysql_repl/ssh_tunnel"
9
8
  # extensions should be loaded after database connection is established
10
9
  # require_relative 'active_record_mysql_repl/extensions'
11
10
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  begin
2
4
  require "awesome_print"
3
5
  Pry.config.print = proc do |_output, value, pry_instance|
@@ -8,6 +8,6 @@ test:
8
8
  class_name: UserProfile
9
9
 
10
10
  ignore_columns:
11
- user:
11
+ users:
12
12
  - login_id
13
13
 
@@ -1,9 +1,9 @@
1
- # yaml-language-server: $schema=https://raw.githubusercontent.com/nogahighland/active_record_mysql_repl/refs/heads/main/json_schema/databases_schema.json
1
+ # yaml-language-server: $schema=https://raw.githubusercontent.com/nogahighland/active_record_mysql_repl/refs/heads/main/json_schemas/databases_schema.json
2
2
 
3
3
  test:
4
4
  remote_host: 127.0.0.1
5
5
  database: test
6
- port: 3306
6
+ port: 33060
7
7
  user: root
8
8
  password: root
9
9
  prompt_color: cyan
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module UpcaseName
4
+ def upcase_name
5
+ self.name.upcase
6
+ end
7
+ end
8
+
9
+ ::UserProfile.include UpcaseName
@@ -1,6 +1,6 @@
1
1
  # yaml-language-server: $schema=https://raw.githubusercontent.com/nogahighland/active_record_mysql_repl/refs/heads/main/json_schemas/army_schema.json
2
2
 
3
- database_config: ./databases.sample.yml
4
- associations: ./associations.sample.yml
5
- extensions_dir:
6
- pryrc: ./.pryrc.sample
3
+ database_config: ./.army.sample/databases.sample.yml
4
+ associations: ./.army.sample/associations.sample.yml
5
+ extensions_dir: ./.army.sample/extensions
6
+ pryrc: ./.army.sample/.pryrc.sample
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_mysql_repl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroki Kishi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-11 00:00:00.000000000 Z
11
+ date: 2024-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.50.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: standard
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: activerecord
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -249,9 +263,10 @@ files:
249
263
  - lib/active_record_mysql_repl/ssh_tunnel.rb
250
264
  - lib/active_record_mysql_repl/version.rb
251
265
  - sample_config/.army.sample.yml
252
- - sample_config/.pryrc.sample
253
- - sample_config/associations.sample.yml
254
- - sample_config/databases.sample.yml
266
+ - sample_config/.army.sample/.pryrc.sample
267
+ - sample_config/.army.sample/associations.sample.yml
268
+ - sample_config/.army.sample/databases.sample.yml
269
+ - sample_config/.army.sample/extensions/hello.rb
255
270
  - sample_config/sample_db.sql
256
271
  homepage: https://github.com/nogahighland/active_record_mysql_repl
257
272
  licenses: