avm-tools 0.115.0 → 0.116.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/launcher/instances/settings.rb +7 -3
  3. data/lib/avm/projects/stereotypes.rb +2 -2
  4. data/lib/avm/ruby/bundler/incompatible_parser/depends_on.rb +1 -1
  5. data/lib/avm/ruby/bundler/incompatible_parser/gem_conflict.rb +1 -1
  6. data/lib/avm/ruby/bundler/incompatible_parser/in_gemfile.rb +1 -1
  7. data/lib/avm/ruby/bundler/incompatible_parser/version_requirement.rb +1 -1
  8. data/lib/avm/ruby/bundler/incompatible_parser.rb +1 -1
  9. data/lib/avm/tools/runner/app_src/ruby/bundler/gemfile_lock/git.rb +1 -1
  10. data/lib/avm/tools/runner/app_src/test.rb +2 -2
  11. data/lib/avm/tools/runner/git/deploy.rb +5 -5
  12. data/lib/avm/tools/runner/git/dirty_files.rb +1 -1
  13. data/lib/avm/tools/runner/git/revisions_test.rb +1 -1
  14. data/lib/avm/tools/runner/ruby/rubocop.rb +2 -2
  15. data/lib/avm/tools/version.rb +1 -1
  16. data/sub/avm/avm.gemspec +2 -2
  17. data/sub/avm/lib/avm/instances/base/auto_values/mailer.rb +2 -2
  18. data/sub/avm/lib/avm/instances/entry_keys.rb +2 -0
  19. data/sub/avm/lib/avm/registry/base.rb +2 -2
  20. data/sub/avm/lib/avm/rspec/shared_examples/not_in_avm_registry.rb +1 -1
  21. data/sub/avm/lib/avm/sources/tests/builder.rb +1 -1
  22. data/sub/avm/lib/avm/version.rb +1 -1
  23. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/build/file.rb +1 -1
  24. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/build.rb +2 -2
  25. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/runner/build.rb +1 -1
  26. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/runner.rb +2 -2
  27. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
  28. data/sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec +1 -1
  29. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +1 -1
  30. data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +2 -2
  31. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/tasks_scheduler/systemd_unit.rb +46 -0
  32. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/tasks_scheduler.rb +17 -0
  33. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit/service.rb +70 -0
  34. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit/tasks_scheduler_command.rb +29 -0
  35. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit.rb +57 -0
  36. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
  37. data/sub/avm-eac_rails_base1/template/avm/eac_rails_base1/systemd_unit/tasks_scheduler.service +12 -0
  38. data/sub/avm-eac_rails_base1/template/avm/eac_rails_base1/systemd_unit/tasks_scheduler_command.sh +6 -0
  39. data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +2 -2
  40. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/core_update.rb +3 -3
  41. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/docker_image.rb +17 -2
  42. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  43. data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/Dockerfile.template +2 -8
  44. data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/Dockerfile_apache_setup +8 -0
  45. data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/start.sh.template +1 -1
  46. data/sub/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +1 -1
  47. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/patches/i18n.rb +1 -1
  48. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/configured.rb +31 -0
  49. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/envvar.rb +17 -0
  50. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/gemfile.rb +41 -0
  51. data/{lib/avm/ruby → sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1}/rubocop.rb +2 -2
  52. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tester.rb +1 -1
  53. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update/sub_update.rb +1 -1
  54. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +1 -1
  55. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/instances/base.rb +6 -0
  56. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/version.rb +1 -1
  57. data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +1 -1
  58. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instance.rb +7 -0
  59. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
  60. data/sub/avm-files/avm-files.gemspec +1 -1
  61. data/sub/avm-files/lib/avm/files/appendable.rb +1 -1
  62. data/sub/avm-files/lib/avm/files/formatter/formats/ruby.rb +2 -2
  63. data/sub/avm-files/lib/avm/files/version.rb +1 -1
  64. data/sub/eac_cli/eac_cli.gemspec +1 -1
  65. data/sub/eac_cli/lib/eac_cli/old_configs/entry_reader.rb +1 -1
  66. data/sub/eac_cli/lib/eac_cli/old_configs/read_entry_options.rb +1 -1
  67. data/sub/eac_cli/lib/eac_cli/parser.rb +2 -2
  68. data/sub/eac_cli/lib/eac_cli/runner_with/help/builder.rb +1 -1
  69. data/sub/eac_cli/lib/eac_cli/runner_with/subcommands.rb +5 -5
  70. data/sub/eac_cli/lib/eac_cli/runner_with_set.rb +2 -2
  71. data/sub/eac_cli/lib/eac_cli/version.rb +1 -1
  72. data/sub/eac_config/eac_config.gemspec +1 -1
  73. data/sub/eac_config/lib/eac_config/entry.rb +1 -1
  74. data/sub/eac_config/lib/eac_config/envvars_node/entry.rb +1 -1
  75. data/sub/eac_config/lib/eac_config/paths_hash/node.rb +1 -1
  76. data/sub/eac_config/lib/eac_config/version.rb +1 -1
  77. data/sub/eac_fs/eac_fs.gemspec +1 -1
  78. data/sub/eac_fs/lib/eac_fs/version.rb +1 -1
  79. data/sub/eac_git/eac_git.gemspec +1 -1
  80. data/sub/eac_git/lib/eac_git/local/remote.rb +2 -2
  81. data/sub/eac_git/lib/eac_git/local.rb +1 -1
  82. data/sub/eac_git/lib/eac_git/version.rb +1 -1
  83. data/sub/eac_rest/eac_rest.gemspec +1 -1
  84. data/sub/eac_rest/lib/eac_rest/api.rb +14 -3
  85. data/sub/eac_rest/lib/eac_rest/request.rb +22 -1
  86. data/sub/eac_rest/lib/eac_rest/response.rb +41 -1
  87. data/sub/eac_rest/lib/eac_rest/version.rb +1 -1
  88. data/sub/eac_ruby_base0/eac_ruby_base0.gemspec +1 -1
  89. data/sub/eac_ruby_base0/lib/eac_ruby_base0/application.rb +2 -2
  90. data/sub/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
  91. data/sub/eac_ruby_gems_utils/eac_ruby_gems_utils.gemspec +1 -1
  92. data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/version_file.rb +2 -2
  93. data/sub/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/version.rb +1 -1
  94. data/sub/eac_ruby_utils/eac_ruby_utils.gemspec +1 -1
  95. data/sub/eac_ruby_utils/lib/eac_ruby_utils/custom_format.rb +1 -1
  96. data/sub/eac_ruby_utils/lib/eac_ruby_utils/gems_registry/gem.rb +1 -1
  97. data/sub/eac_ruby_utils/lib/eac_ruby_utils/gems_registry.rb +1 -1
  98. data/sub/eac_ruby_utils/lib/eac_ruby_utils/inflector.rb +1 -1
  99. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/list.rb +16 -4
  100. data/sub/eac_ruby_utils/lib/eac_ruby_utils/listable/value.rb +12 -2
  101. data/sub/eac_ruby_utils/lib/eac_ruby_utils/local_time_zone.rb +1 -1
  102. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/debug.rb +6 -0
  103. data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_clean_environment.rb +1 -1
  104. data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  105. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp/{temp_spec.rb → directory_spec.rb} +0 -0
  106. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp_spec.rb +4 -4
  107. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/listable_spec.rb +169 -106
  108. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/options_consumer_spec.rb +52 -17
  109. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/listable_spec.rb +5 -3
  110. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/module/simple_cache_spec.rb +5 -3
  111. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/require_sub_spec.rb +3 -3
  112. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/settings_provider_spec.rb +21 -18
  113. data/sub/eac_ruby_utils/spec/locales/pt-BR.yml +3 -0
  114. data/sub/eac_templates/eac_templates.gemspec +1 -1
  115. data/sub/eac_templates/lib/eac_templates/directory.rb +1 -1
  116. data/sub/eac_templates/lib/eac_templates/version.rb +1 -1
  117. metadata +41 -21
  118. data/lib/avm/ruby/rubocop/_configured.rb +0 -29
  119. data/lib/avm/ruby/rubocop/_envvar.rb +0 -15
  120. data/lib/avm/ruby/rubocop/_gemfile.rb +0 -39
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.115.0
4
+ version: 0.116.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-04 00:00:00.000000000 Z
11
+ date: 2022-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-parsers
@@ -30,84 +30,96 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.17'
33
+ version: '0.18'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.17'
40
+ version: '0.18'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: avm-eac_asciidoctor_base0
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.3'
45
48
  - - ">="
46
49
  - !ruby/object:Gem::Version
47
- version: '0'
50
+ version: 0.3.4
48
51
  type: :runtime
49
52
  prerelease: false
50
53
  version_requirements: !ruby/object:Gem::Requirement
51
54
  requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: '0.3'
52
58
  - - ">="
53
59
  - !ruby/object:Gem::Version
54
- version: '0'
60
+ version: 0.3.4
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: avm-eac_rails_base0
57
63
  requirement: !ruby/object:Gem::Requirement
58
64
  requirements:
59
65
  - - "~>"
60
66
  - !ruby/object:Gem::Version
61
- version: '0.2'
67
+ version: '0.3'
62
68
  type: :runtime
63
69
  prerelease: false
64
70
  version_requirements: !ruby/object:Gem::Requirement
65
71
  requirements:
66
72
  - - "~>"
67
73
  - !ruby/object:Gem::Version
68
- version: '0.2'
74
+ version: '0.3'
69
75
  - !ruby/object:Gem::Dependency
70
76
  name: avm-eac_redmine_base0
71
77
  requirement: !ruby/object:Gem::Requirement
72
78
  requirements:
73
79
  - - "~>"
74
80
  - !ruby/object:Gem::Version
75
- version: '0.4'
81
+ version: '0.5'
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: 0.5.1
76
85
  type: :runtime
77
86
  prerelease: false
78
87
  version_requirements: !ruby/object:Gem::Requirement
79
88
  requirements:
80
89
  - - "~>"
81
90
  - !ruby/object:Gem::Version
82
- version: '0.4'
91
+ version: '0.5'
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: 0.5.1
83
95
  - !ruby/object:Gem::Dependency
84
96
  name: avm-eac_ruby_base1
85
97
  requirement: !ruby/object:Gem::Requirement
86
98
  requirements:
87
99
  - - "~>"
88
100
  - !ruby/object:Gem::Version
89
- version: '0.1'
101
+ version: '0.2'
90
102
  type: :runtime
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
93
105
  requirements:
94
106
  - - "~>"
95
107
  - !ruby/object:Gem::Version
96
- version: '0.1'
108
+ version: '0.2'
97
109
  - !ruby/object:Gem::Dependency
98
110
  name: avm-eac_ubuntu_base0
99
111
  requirement: !ruby/object:Gem::Requirement
100
112
  requirements:
101
113
  - - "~>"
102
114
  - !ruby/object:Gem::Version
103
- version: '0.2'
115
+ version: '0.3'
104
116
  type: :runtime
105
117
  prerelease: false
106
118
  version_requirements: !ruby/object:Gem::Requirement
107
119
  requirements:
108
120
  - - "~>"
109
121
  - !ruby/object:Gem::Version
110
- version: '0.2'
122
+ version: '0.3'
111
123
  - !ruby/object:Gem::Dependency
112
124
  name: avm-files
113
125
  requirement: !ruby/object:Gem::Requirement
@@ -250,14 +262,14 @@ dependencies:
250
262
  requirements:
251
263
  - - "~>"
252
264
  - !ruby/object:Gem::Version
253
- version: '0.2'
265
+ version: 0.5.1
254
266
  type: :development
255
267
  prerelease: false
256
268
  version_requirements: !ruby/object:Gem::Requirement
257
269
  requirements:
258
270
  - - "~>"
259
271
  - !ruby/object:Gem::Version
260
- version: '0.2'
272
+ version: 0.5.1
261
273
  description:
262
274
  email:
263
275
  executables:
@@ -361,10 +373,6 @@ files:
361
373
  - lib/avm/ruby/bundler/incompatible_parser/version_requirement.rb
362
374
  - lib/avm/ruby/gems.rb
363
375
  - lib/avm/ruby/gems/generator.rb
364
- - lib/avm/ruby/rubocop.rb
365
- - lib/avm/ruby/rubocop/_configured.rb
366
- - lib/avm/ruby/rubocop/_envvar.rb
367
- - lib/avm/ruby/rubocop/_gemfile.rb
368
376
  - lib/avm/stereotypes.rb
369
377
  - lib/avm/tools.rb
370
378
  - lib/avm/tools/app_src.rb
@@ -497,11 +505,18 @@ files:
497
505
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/logs.rb
498
506
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/logs/clear.rb
499
507
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/rails_server.rb
508
+ - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/tasks_scheduler.rb
509
+ - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/tasks_scheduler/systemd_unit.rb
500
510
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner_with/bundle.rb
501
511
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner_with/rails_environment.rb
512
+ - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit.rb
513
+ - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit/service.rb
514
+ - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit/tasks_scheduler_command.rb
502
515
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb
503
516
  - sub/avm-eac_rails_base1/spec/rubocop_spec.rb
504
517
  - sub/avm-eac_rails_base1/spec/spec_helper.rb
518
+ - sub/avm-eac_rails_base1/template/avm/eac_rails_base1/systemd_unit/tasks_scheduler.service
519
+ - sub/avm-eac_rails_base1/template/avm/eac_rails_base1/systemd_unit/tasks_scheduler_command.sh
505
520
  - sub/avm-eac_redmine_base0/Gemfile
506
521
  - sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec
507
522
  - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0.rb
@@ -518,6 +533,7 @@ files:
518
533
  - sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/deploy/config/install.sh.template
519
534
  - sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/deploy/config/secrets.yml
520
535
  - sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/Dockerfile.template
536
+ - sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/Dockerfile_apache_setup
521
537
  - sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/apache_http_virtualhost.conf.template
522
538
  - sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/apache_https_virtualhost.conf.template
523
539
  - sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/install_settings.sh.template
@@ -527,6 +543,10 @@ files:
527
543
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1.rb
528
544
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/patches.rb
529
545
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/patches/i18n.rb
546
+ - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop.rb
547
+ - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/configured.rb
548
+ - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/envvar.rb
549
+ - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/gemfile.rb
530
550
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources.rb
531
551
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base.rb
532
552
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tester.rb
@@ -1355,7 +1375,7 @@ files:
1355
1375
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/executable_spec.rb
1356
1376
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/ssh_env_spec.rb
1357
1377
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/extname_spec.rb
1358
- - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp/temp_spec.rb
1378
+ - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp/directory_spec.rb
1359
1379
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp_spec.rb
1360
1380
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/inflector_spec.rb
1361
1381
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/listable_spec.rb
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/sources/configuration'
4
-
5
- module Avm
6
- module Ruby
7
- class Rubocop
8
- def configured_rubocop_command_uncached
9
- configured_rubocop_command_by_command || configured_rubocop_command_by_gemfile
10
- end
11
-
12
- def configured_rubocop_command_by_command
13
- configuration.if_present(&:rubocop_command)
14
- end
15
-
16
- def configured_rubocop_command_by_gemfile
17
- configuration.if_present(&:rubocop_gemfile).if_present do |v|
18
- rubocop_command_by_gemfile_path(v.parent)
19
- end
20
- end
21
-
22
- private
23
-
24
- def configuration_uncached
25
- ::Avm::Sources::Configuration.find_by_path(base_path)
26
- end
27
- end
28
- end
29
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module Ruby
7
- class Rubocop
8
- RUBOCOP_COMMAND_ENVVAR_NAME = 'RUBOCOP_COMMAND'
9
-
10
- def env_rubocop_command
11
- ENV[RUBOCOP_COMMAND_ENVVAR_NAME].present? ? cmd(ENV[RUBOCOP_COMMAND_ENVVAR_NAME]) : nil
12
- end
13
- end
14
- end
15
- end
@@ -1,39 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/patches/eac_ruby_gems_utils/gem'
4
- require 'eac_ruby_utils/core_ext'
5
-
6
- module Avm
7
- module Ruby
8
- class Rubocop
9
- def gemfile_rubocop_command
10
- return nil unless rubocop_gemfile?
11
-
12
- rubocop_command_by_gemfile_path(mygem.root)
13
- end
14
-
15
- def rubocop_command_by_gemfile_path(path)
16
- ::EacRubyGemsUtils::Gem.new(path).bundle('exec', 'rubocop').chdir_root
17
- end
18
-
19
- def rubocop_gemfile?
20
- return false if mygem.blank?
21
-
22
- mygem.bundle('install').execute!
23
- mygem.gemfile_lock_gem_version('rubocop').present?
24
- end
25
-
26
- private
27
-
28
- def mygem_uncached
29
- find_gem(::Pathname.new(base_path).expand_path)
30
- end
31
-
32
- def find_gem(path)
33
- r = ::EacRubyGemsUtils::Gem.new(path)
34
- return r if r.gemfile_path.exist?
35
- return find_gem(path.dirname) unless path.root?
36
- end
37
- end
38
- end
39
- end