cobra_commander 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +47 -0
- data/.gitignore +3 -0
- data/.rubocop.yml +8 -38
- data/CHANGELOG.md +8 -0
- data/Gemfile +0 -1
- data/README.md +8 -0
- data/cobra_commander.gemspec +12 -11
- data/gemfiles/bundler1.gemfile +7 -0
- data/gemfiles/bundler2.gemfile +7 -0
- data/lib/cobra_commander/affected.rb +9 -1
- data/lib/cobra_commander/change.rb +4 -4
- data/lib/cobra_commander/cli.rb +7 -5
- data/lib/cobra_commander/component.rb +1 -1
- data/lib/cobra_commander/dependencies/bundler.rb +16 -12
- data/lib/cobra_commander/dependencies/yarn/package.rb +3 -2
- data/lib/cobra_commander/dependencies/yarn/package_repo.rb +3 -2
- data/lib/cobra_commander/executor.rb +11 -8
- data/lib/cobra_commander/executor/component_exec.rb +33 -0
- data/lib/cobra_commander/executor/multi_exec.rb +46 -0
- data/lib/cobra_commander/output/graph_viz.rb +1 -1
- data/lib/cobra_commander/umbrella.rb +1 -0
- data/lib/cobra_commander/version.rb +1 -1
- metadata +69 -37
- data/.travis.yml +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aef5fdfc5c3d583b0b70080e497ee97bc63d25ddcbd0e71fedb1574a73acd0fe
|
4
|
+
data.tar.gz: d99e9e310fb9958fdd6b15ff057be095b7249a0f37d639048db971d4cd7bf336
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3b8ba0d25eb81df0be99c7dfa06a81b87cd1f1233984d622f5a17d15ff672e50e2fa853e724bbea9038220c15fb5e507f0dffa05c605837f550198a5f9643c7
|
7
|
+
data.tar.gz: 7b9dbf8804a4d34e7fa083579917b580807ff92e4896a7db177844545f022392590a96500b31fdf2eb89aecd92e1599187cacd506eb0640d2b2fbc766afe5c56
|
@@ -0,0 +1,47 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
name: Tests
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
strategy:
|
10
|
+
fail-fast: false
|
11
|
+
matrix:
|
12
|
+
ruby:
|
13
|
+
- "2.5"
|
14
|
+
- "2.6"
|
15
|
+
- "2.7"
|
16
|
+
bundler:
|
17
|
+
- "1"
|
18
|
+
- "2"
|
19
|
+
env:
|
20
|
+
BUNDLE_GEMFILE: gemfiles/bundler${{ matrix.bundler }}.gemfile
|
21
|
+
steps:
|
22
|
+
- uses: actions/checkout@v2
|
23
|
+
- name: Set up Ruby
|
24
|
+
uses: ruby/setup-ruby@v1
|
25
|
+
with:
|
26
|
+
ruby-version: ${{ matrix.ruby }}
|
27
|
+
bundler: ${{ matrix.bundler }}
|
28
|
+
bundler-cache: true
|
29
|
+
- name: Install bundler v1 # Even if we're testing bundler v2, we need v1 available because the fixture components have it in their Gemfile.locks
|
30
|
+
run: gem install bundler -v "~> 1" --no-document
|
31
|
+
- name: Install Graphviz
|
32
|
+
run: sudo apt -qq install graphviz
|
33
|
+
- name: Run tests
|
34
|
+
run: bundle exec rake spec
|
35
|
+
lint:
|
36
|
+
name: Lint Ruby
|
37
|
+
runs-on: ubuntu-latest
|
38
|
+
steps:
|
39
|
+
- uses: actions/checkout@v2
|
40
|
+
- name: rubocop
|
41
|
+
uses: reviewdog/action-rubocop@v1
|
42
|
+
with:
|
43
|
+
rubocop_version: 0.88.0
|
44
|
+
filter_mode: nofilter
|
45
|
+
fail_on_error: true
|
46
|
+
rubocop_extensions: ""
|
47
|
+
github_token: ${{ secrets.github_token }}
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,50 +1,20 @@
|
|
1
1
|
AllCops:
|
2
|
-
TargetRubyVersion: 2.
|
3
|
-
|
4
|
-
Metrics/LineLength:
|
5
|
-
Max: 120
|
2
|
+
TargetRubyVersion: 2.5
|
3
|
+
NewCops: enable
|
6
4
|
|
7
5
|
Metrics/BlockLength:
|
8
6
|
Exclude:
|
9
7
|
- spec/**/*.rb
|
10
8
|
- cobra_commander.gemspec
|
11
9
|
|
12
|
-
|
13
|
-
Exclude:
|
14
|
-
- spec/**/*.rb
|
15
|
-
- cobra_commander.gemspec
|
16
|
-
|
17
|
-
Style/AccessModifierIndentation:
|
10
|
+
Layout/AccessModifierIndentation:
|
18
11
|
EnforcedStyle: outdent
|
19
12
|
|
20
|
-
Style/Documentation:
|
21
|
-
Enabled: true
|
22
|
-
|
23
|
-
Style/ExtraSpacing:
|
24
|
-
Exclude:
|
25
|
-
- cobra_commander.gemspec
|
26
|
-
|
27
|
-
Style/SpaceAroundOperators:
|
28
|
-
Exclude:
|
29
|
-
- cobra_commander.gemspec
|
30
|
-
|
31
|
-
Style/Lambda:
|
32
|
-
EnforcedStyle: literal
|
33
|
-
|
34
|
-
Style/PercentLiteralDelimiters:
|
35
|
-
PreferredDelimiters:
|
36
|
-
default: ()
|
37
|
-
'%i': '[]'
|
38
|
-
'%I': '[]'
|
39
|
-
'%r': '{}'
|
40
|
-
'%w': '[]'
|
41
|
-
'%W': '[]'
|
42
|
-
|
43
|
-
# Single quotes being faster is hardly measurable and only affects parse time.
|
44
|
-
# Enforcing double quotes reduces the times where you need to change them when introducing an interpolation.
|
45
|
-
# Use single quotes only if their semantics are needed.
|
46
13
|
Style/StringLiterals:
|
47
14
|
EnforcedStyle: double_quotes
|
48
15
|
|
49
|
-
Style/
|
50
|
-
EnforcedStyleForMultiline:
|
16
|
+
Style/TrailingCommaInArrayLiteral:
|
17
|
+
EnforcedStyleForMultiline: consistent_comma
|
18
|
+
|
19
|
+
Style/TrailingCommaInHashLiteral:
|
20
|
+
EnforcedStyleForMultiline: consistent_comma
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
## Unreleased
|
4
4
|
|
5
|
+
## Version 0.9.0 - 2020-08-26
|
6
|
+
|
7
|
+
* Add support for parallel task execution to `cobra exec`.
|
8
|
+
|
9
|
+
## Version 0.8.1 - 2020-07-29
|
10
|
+
|
11
|
+
* Fix CobraCommander::Executor when running [`bundler`](https://bundler.io/) based commands (i.e.: `bundle exec rspec`)
|
12
|
+
|
5
13
|
## Version 0.8 - 2020-07-21
|
6
14
|
|
7
15
|
* Standardize Cobra CLI options
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -136,6 +136,14 @@ After checking out the repo, run `bin/setup` to install dependencies. You will a
|
|
136
136
|
|
137
137
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
138
138
|
|
139
|
+
### Bundled App
|
140
|
+
|
141
|
+
In order to maintain the features around umbrella apps and specially `changes`, a bundled [`umbrella app repo`](spec/fixtures/app.tgz) is included in this repository. This repo is compacted by `tar`/`gzip` in order to keep isolation, the format was chosen to avoid issues described in https://github.com/swcarpentry/git-novice/issues/272. To avoid the same issues, the workflow for this fixture app is the following:
|
142
|
+
|
143
|
+
1. unpack it somewhere outside your repo
|
144
|
+
1. do your changes and commit (locally only, it doesn't have a remote)
|
145
|
+
1. from within the app run `tar cfz path/to/cobra/spec/fixtures/app.tgz .`
|
146
|
+
|
139
147
|
## Contributing
|
140
148
|
|
141
149
|
Bug reports and pull requests are welcome on GitHub at https://github.com/powerhome/cobra_commander. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
data/cobra_commander.gemspec
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
# coding: utf-8
|
2
1
|
# frozen_string_literal: true
|
3
2
|
|
4
|
-
lib = File.expand_path("
|
3
|
+
lib = File.expand_path("lib", __dir__)
|
5
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
6
5
|
require "cobra_commander/version"
|
7
6
|
|
@@ -13,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
13
12
|
"Garett Arrowood",
|
14
13
|
"Carlos Palhares",
|
15
14
|
]
|
16
|
-
spec.email
|
15
|
+
spec.email = [
|
17
16
|
"blangfeld@powerhrg.com",
|
18
17
|
"garett.arrowood@powerhrg.com",
|
19
18
|
"carlos.palhares@powerhrg.com",
|
@@ -23,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
23
22
|
Tools for working with Component Based Rails Apps (see http://shageman.github.io/cbra.info/).
|
24
23
|
Includes tools for graphing the components of an app and their relationships, as well as selectively
|
25
24
|
testing components based on changes made.
|
26
|
-
DESCRIPTION
|
25
|
+
DESCRIPTION
|
27
26
|
spec.homepage = "http://tech.powerhrg.com/cobra_commander/"
|
28
27
|
spec.license = "MIT"
|
29
28
|
|
@@ -34,15 +33,17 @@ DESCRIPTION
|
|
34
33
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
35
34
|
spec.require_paths = ["lib"]
|
36
35
|
|
37
|
-
spec.add_dependency "bundler"
|
38
|
-
spec.add_dependency "thor", ["< 2.0", ">= 0.18.1"]
|
36
|
+
spec.add_dependency "bundler"
|
39
37
|
spec.add_dependency "ruby-graphviz", "~> 1.2.3"
|
38
|
+
spec.add_dependency "thor", ["< 2.0", ">= 0.18.1"]
|
39
|
+
spec.add_dependency "tty-command", "~> 0.9.0"
|
40
|
+
spec.add_dependency "tty-spinner", "~> 0.9.3"
|
40
41
|
|
41
|
-
spec.add_development_dependency "bundler", "~> 1.17"
|
42
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
43
|
-
spec.add_development_dependency "rspec", "~> 3.5"
|
44
|
-
spec.add_development_dependency "guard-rspec"
|
45
42
|
spec.add_development_dependency "aruba", "~> 0.14.2"
|
46
|
-
spec.add_development_dependency "
|
43
|
+
spec.add_development_dependency "bundler"
|
44
|
+
spec.add_development_dependency "guard-rspec"
|
47
45
|
spec.add_development_dependency "pry"
|
46
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
47
|
+
spec.add_development_dependency "rspec", "~> 3.5"
|
48
|
+
spec.add_development_dependency "rubocop", "0.88.0"
|
48
49
|
end
|
@@ -49,8 +49,16 @@ module CobraCommander
|
|
49
49
|
@directly = @directly.sort_by(&:name)
|
50
50
|
end
|
51
51
|
|
52
|
+
def component_changed?(component)
|
53
|
+
component.root_paths.any? do |component_path|
|
54
|
+
@changes.any? do |file_path|
|
55
|
+
file_path.start_with?(component_path)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
52
60
|
def add_if_changed(component)
|
53
|
-
return
|
61
|
+
return unless component_changed?(component)
|
54
62
|
|
55
63
|
@directly << component
|
56
64
|
@transitively.merge(component.deep_dependents)
|
@@ -42,16 +42,16 @@ module CobraCommander
|
|
42
42
|
Open3.capture3("git", "diff", "--name-only", @branch)
|
43
43
|
end
|
44
44
|
|
45
|
-
if result.exitstatus == 128
|
46
|
-
raise InvalidSelectionError, "Specified --branch could not be found"
|
47
|
-
end
|
45
|
+
raise InvalidSelectionError, "Specified --branch could not be found" if result.exitstatus == 128
|
48
46
|
|
49
47
|
diff.split("\n").map { |f| File.join(@root_dir, f) }
|
50
48
|
end
|
51
49
|
end
|
52
50
|
|
53
51
|
def assert_valid_result_choice
|
54
|
-
|
52
|
+
return if %w[test full name json].include?(@results)
|
53
|
+
|
54
|
+
raise InvalidSelectionError, "--results must be 'test', 'full', 'name' or 'json'"
|
55
55
|
end
|
56
56
|
|
57
57
|
def selected_result?(result)
|
data/lib/cobra_commander/cli.rb
CHANGED
@@ -32,14 +32,14 @@ module CobraCommander
|
|
32
32
|
puts options.total ? components.size : CobraCommander::Output::FlatList.new(components).to_s
|
33
33
|
end
|
34
34
|
|
35
|
-
desc "exec [component] <command>", "Executes the command in the context of a given component or set
|
36
|
-
"
|
35
|
+
desc "exec [component] <command>", "Executes the command in the context of a given component or set thereof. " \
|
36
|
+
"Defaults to all components."
|
37
37
|
method_option :dependencies, type: :boolean, desc: "Run the command on each dependency of a given component"
|
38
38
|
method_option :dependents, type: :boolean, desc: "Run the command on each dependency of a given component"
|
39
39
|
def exec(command_or_component, command = nil)
|
40
40
|
CobraCommander::Executor.exec(
|
41
41
|
components_filtered(command && command_or_component),
|
42
|
-
command
|
42
|
+
command || command_or_component
|
43
43
|
)
|
44
44
|
end
|
45
45
|
|
@@ -58,8 +58,8 @@ module CobraCommander
|
|
58
58
|
options.output
|
59
59
|
)
|
60
60
|
puts "Graph generated at #{options.output}"
|
61
|
-
rescue ArgumentError =>
|
62
|
-
error
|
61
|
+
rescue ArgumentError => e
|
62
|
+
error e.message
|
63
63
|
end
|
64
64
|
|
65
65
|
desc "changes [--results=RESULTS] [--branch=BRANCH]", "Prints list of changed files"
|
@@ -83,10 +83,12 @@ module CobraCommander
|
|
83
83
|
|
84
84
|
def components_filtered(component_name)
|
85
85
|
return umbrella.components unless component_name
|
86
|
+
|
86
87
|
component = find_component(component_name)
|
87
88
|
|
88
89
|
return component.deep_dependencies if options.dependencies
|
89
90
|
return component.deep_dependents if options.dependents
|
91
|
+
|
90
92
|
[component]
|
91
93
|
end
|
92
94
|
end
|
@@ -1,23 +1,22 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "bundler"
|
4
|
+
require "bundler/lockfile_parser"
|
5
|
+
require "pathname"
|
6
|
+
|
3
7
|
module CobraCommander
|
4
8
|
module Dependencies
|
5
9
|
# Calculates ruby bundler dependencies
|
6
10
|
class Bundler
|
7
|
-
|
8
|
-
@definition = ::Bundler::Definition.build(
|
9
|
-
Pathname.new(File.join(root, "Gemfile")).realpath,
|
10
|
-
Pathname.new(File.join(root, "Gemfile.lock")).realpath,
|
11
|
-
false
|
12
|
-
)
|
13
|
-
end
|
11
|
+
attr_reader :path
|
14
12
|
|
15
|
-
def
|
16
|
-
@
|
13
|
+
def initialize(root)
|
14
|
+
@root = Pathname.new(root)
|
15
|
+
@path = @root.join("Gemfile.lock").realpath
|
17
16
|
end
|
18
17
|
|
19
18
|
def dependencies
|
20
|
-
|
19
|
+
lockfile.dependencies.values.map(&:name)
|
21
20
|
end
|
22
21
|
|
23
22
|
def components
|
@@ -28,9 +27,14 @@ module CobraCommander
|
|
28
27
|
|
29
28
|
private
|
30
29
|
|
30
|
+
def lockfile
|
31
|
+
@lockfile ||= ::Bundler::LockfileParser.new(::Bundler.read_file(path))
|
32
|
+
end
|
33
|
+
|
31
34
|
def components_source
|
32
|
-
@components_source ||=
|
33
|
-
source.path.to_s.eql?("components")
|
35
|
+
@components_source ||= begin
|
36
|
+
source = @lockfile.sources.find { |s| s.path.to_s.eql?("components") }
|
37
|
+
::Bundler::Source::Path.new(source.options.merge("root_path" => @root))
|
34
38
|
end
|
35
39
|
end
|
36
40
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "json"
|
4
|
+
require "pathname"
|
4
5
|
|
5
6
|
module CobraCommander
|
6
7
|
module Dependencies
|
@@ -10,11 +11,11 @@ module CobraCommander
|
|
10
11
|
attr_reader :path
|
11
12
|
|
12
13
|
def initialize(path)
|
13
|
-
@path = Pathname.new(File.join(path, "package.json")).realpath
|
14
|
+
@path = ::Pathname.new(File.join(path, "package.json")).realpath
|
14
15
|
end
|
15
16
|
|
16
17
|
def project_tag
|
17
|
-
name.match(%r{^@[\w-]
|
18
|
+
name.match(%r{^@[\w-]+/}).to_s
|
18
19
|
end
|
19
20
|
|
20
21
|
def name
|
@@ -6,7 +6,7 @@ module CobraCommander
|
|
6
6
|
# Yarn package repository to load and cache package.json files
|
7
7
|
class PackageRepo
|
8
8
|
def initialize
|
9
|
-
@specs
|
9
|
+
@specs = {}
|
10
10
|
end
|
11
11
|
|
12
12
|
def specs
|
@@ -14,8 +14,9 @@ module CobraCommander
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def load_linked_specs(package)
|
17
|
-
package.dependencies.
|
17
|
+
package.dependencies.each_value do |spec|
|
18
18
|
next unless spec =~ /link:(.+)/
|
19
|
+
|
19
20
|
load_spec(File.join(package.path, "..", Regexp.last_match(1)))
|
20
21
|
end
|
21
22
|
end
|
@@ -1,16 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "executor/component_exec"
|
4
|
+
require_relative "executor/multi_exec"
|
5
|
+
|
3
6
|
module CobraCommander
|
4
7
|
# Execute commands on all components of a ComponentTree
|
5
8
|
module Executor
|
6
|
-
def self.exec(components, command,
|
7
|
-
components
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
def self.exec(components, command, output = $stdout, status_output = $stderr)
|
10
|
+
components = Array(components)
|
11
|
+
exec = if components.size == 1
|
12
|
+
ComponentExec.new(components.first)
|
13
|
+
else
|
14
|
+
MultiExec.new(components)
|
15
|
+
end
|
16
|
+
exec.run(command, output: output, spin_output: status_output)
|
14
17
|
end
|
15
18
|
end
|
16
19
|
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "tty-command"
|
4
|
+
|
5
|
+
module CobraCommander
|
6
|
+
module Executor
|
7
|
+
# Execute a command on a single component
|
8
|
+
class ComponentExec
|
9
|
+
def initialize(component)
|
10
|
+
@component = component
|
11
|
+
end
|
12
|
+
|
13
|
+
def run(command, output: $stdout, **cmd_options)
|
14
|
+
tty = TTY::Command.new(pty: true, printer: :quiet, output: output)
|
15
|
+
isolate_bundle do
|
16
|
+
@component.root_paths.all? do |path|
|
17
|
+
tty.run!(command, chdir: path, **cmd_options).success?
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def isolate_bundle(&block)
|
25
|
+
if Bundler.respond_to?(:with_unbundled_env)
|
26
|
+
Bundler.with_unbundled_env(&block)
|
27
|
+
else
|
28
|
+
Bundler.with_clean_env(&block)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "tty-spinner"
|
4
|
+
require "stringio"
|
5
|
+
|
6
|
+
require_relative "component_exec"
|
7
|
+
|
8
|
+
module CobraCommander
|
9
|
+
module Executor
|
10
|
+
# Executes a command on multiple components simultaniously
|
11
|
+
class MultiExec
|
12
|
+
def initialize(components)
|
13
|
+
@components = components
|
14
|
+
end
|
15
|
+
|
16
|
+
def run(command, output: $stdout, spin_output: $stderr, only_output_on_error: true, **cmd_options)
|
17
|
+
cmmd_output = StringIO.new
|
18
|
+
multi = TTY::Spinner::Multi.new("Running #{command}", output: spin_output)
|
19
|
+
@components.each do |component|
|
20
|
+
component_exec(multi, component, command, only_output_on_error: only_output_on_error,
|
21
|
+
stderr: :stdout, output: cmmd_output,
|
22
|
+
**cmd_options)
|
23
|
+
end
|
24
|
+
multi.auto_spin
|
25
|
+
output << cmmd_output.string
|
26
|
+
true
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def component_exec(multi, component, command, **options)
|
32
|
+
exec = ComponentExec.new(component)
|
33
|
+
multi.register(*spinner(component.name)) do |spin|
|
34
|
+
exec.run(command, **options) ? spin.success : spin.error
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def spinner(title)
|
39
|
+
pastel = Pastel.new
|
40
|
+
[":spinner #{title}", { format: :bouncing,
|
41
|
+
success_mark: pastel.green("[DONE]"),
|
42
|
+
error_mark: pastel.red("[ERROR]"), },]
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -18,7 +18,7 @@ module CobraCommander
|
|
18
18
|
|
19
19
|
private_class_method def self.extract_format(output)
|
20
20
|
format = output[-3..-1]
|
21
|
-
return format if
|
21
|
+
return format if %w[png dot].include?(format)
|
22
22
|
|
23
23
|
raise ArgumentError, "output format must be 'png' or 'dot'"
|
24
24
|
end
|
metadata
CHANGED
@@ -1,31 +1,45 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cobra_commander
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Langfeld
|
8
8
|
- Garett Arrowood
|
9
9
|
- Carlos Palhares
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2021-02-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - ">="
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '0'
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: ruby-graphviz
|
17
31
|
requirement: !ruby/object:Gem::Requirement
|
18
32
|
requirements:
|
19
33
|
- - "~>"
|
20
34
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
35
|
+
version: 1.2.3
|
22
36
|
type: :runtime
|
23
37
|
prerelease: false
|
24
38
|
version_requirements: !ruby/object:Gem::Requirement
|
25
39
|
requirements:
|
26
40
|
- - "~>"
|
27
41
|
- !ruby/object:Gem::Version
|
28
|
-
version:
|
42
|
+
version: 1.2.3
|
29
43
|
- !ruby/object:Gem::Dependency
|
30
44
|
name: thor
|
31
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -47,61 +61,61 @@ dependencies:
|
|
47
61
|
- !ruby/object:Gem::Version
|
48
62
|
version: 0.18.1
|
49
63
|
- !ruby/object:Gem::Dependency
|
50
|
-
name:
|
64
|
+
name: tty-command
|
51
65
|
requirement: !ruby/object:Gem::Requirement
|
52
66
|
requirements:
|
53
67
|
- - "~>"
|
54
68
|
- !ruby/object:Gem::Version
|
55
|
-
version:
|
69
|
+
version: 0.9.0
|
56
70
|
type: :runtime
|
57
71
|
prerelease: false
|
58
72
|
version_requirements: !ruby/object:Gem::Requirement
|
59
73
|
requirements:
|
60
74
|
- - "~>"
|
61
75
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
76
|
+
version: 0.9.0
|
63
77
|
- !ruby/object:Gem::Dependency
|
64
|
-
name:
|
78
|
+
name: tty-spinner
|
65
79
|
requirement: !ruby/object:Gem::Requirement
|
66
80
|
requirements:
|
67
81
|
- - "~>"
|
68
82
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
70
|
-
type: :
|
83
|
+
version: 0.9.3
|
84
|
+
type: :runtime
|
71
85
|
prerelease: false
|
72
86
|
version_requirements: !ruby/object:Gem::Requirement
|
73
87
|
requirements:
|
74
88
|
- - "~>"
|
75
89
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
90
|
+
version: 0.9.3
|
77
91
|
- !ruby/object:Gem::Dependency
|
78
|
-
name:
|
92
|
+
name: aruba
|
79
93
|
requirement: !ruby/object:Gem::Requirement
|
80
94
|
requirements:
|
81
95
|
- - "~>"
|
82
96
|
- !ruby/object:Gem::Version
|
83
|
-
version:
|
97
|
+
version: 0.14.2
|
84
98
|
type: :development
|
85
99
|
prerelease: false
|
86
100
|
version_requirements: !ruby/object:Gem::Requirement
|
87
101
|
requirements:
|
88
102
|
- - "~>"
|
89
103
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
104
|
+
version: 0.14.2
|
91
105
|
- !ruby/object:Gem::Dependency
|
92
|
-
name:
|
106
|
+
name: bundler
|
93
107
|
requirement: !ruby/object:Gem::Requirement
|
94
108
|
requirements:
|
95
|
-
- - "
|
109
|
+
- - ">="
|
96
110
|
- !ruby/object:Gem::Version
|
97
|
-
version: '
|
111
|
+
version: '0'
|
98
112
|
type: :development
|
99
113
|
prerelease: false
|
100
114
|
version_requirements: !ruby/object:Gem::Requirement
|
101
115
|
requirements:
|
102
|
-
- - "
|
116
|
+
- - ">="
|
103
117
|
- !ruby/object:Gem::Version
|
104
|
-
version: '
|
118
|
+
version: '0'
|
105
119
|
- !ruby/object:Gem::Dependency
|
106
120
|
name: guard-rspec
|
107
121
|
requirement: !ruby/object:Gem::Requirement
|
@@ -117,47 +131,61 @@ dependencies:
|
|
117
131
|
- !ruby/object:Gem::Version
|
118
132
|
version: '0'
|
119
133
|
- !ruby/object:Gem::Dependency
|
120
|
-
name:
|
134
|
+
name: pry
|
135
|
+
requirement: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
140
|
+
type: :development
|
141
|
+
prerelease: false
|
142
|
+
version_requirements: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '0'
|
147
|
+
- !ruby/object:Gem::Dependency
|
148
|
+
name: rake
|
121
149
|
requirement: !ruby/object:Gem::Requirement
|
122
150
|
requirements:
|
123
151
|
- - "~>"
|
124
152
|
- !ruby/object:Gem::Version
|
125
|
-
version: 0
|
153
|
+
version: '10.0'
|
126
154
|
type: :development
|
127
155
|
prerelease: false
|
128
156
|
version_requirements: !ruby/object:Gem::Requirement
|
129
157
|
requirements:
|
130
158
|
- - "~>"
|
131
159
|
- !ruby/object:Gem::Version
|
132
|
-
version: 0
|
160
|
+
version: '10.0'
|
133
161
|
- !ruby/object:Gem::Dependency
|
134
|
-
name:
|
162
|
+
name: rspec
|
135
163
|
requirement: !ruby/object:Gem::Requirement
|
136
164
|
requirements:
|
137
|
-
- -
|
165
|
+
- - "~>"
|
138
166
|
- !ruby/object:Gem::Version
|
139
|
-
version:
|
167
|
+
version: '3.5'
|
140
168
|
type: :development
|
141
169
|
prerelease: false
|
142
170
|
version_requirements: !ruby/object:Gem::Requirement
|
143
171
|
requirements:
|
144
|
-
- -
|
172
|
+
- - "~>"
|
145
173
|
- !ruby/object:Gem::Version
|
146
|
-
version:
|
174
|
+
version: '3.5'
|
147
175
|
- !ruby/object:Gem::Dependency
|
148
|
-
name:
|
176
|
+
name: rubocop
|
149
177
|
requirement: !ruby/object:Gem::Requirement
|
150
178
|
requirements:
|
151
|
-
- -
|
179
|
+
- - '='
|
152
180
|
- !ruby/object:Gem::Version
|
153
|
-
version:
|
181
|
+
version: 0.88.0
|
154
182
|
type: :development
|
155
183
|
prerelease: false
|
156
184
|
version_requirements: !ruby/object:Gem::Requirement
|
157
185
|
requirements:
|
158
|
-
- -
|
186
|
+
- - '='
|
159
187
|
- !ruby/object:Gem::Version
|
160
|
-
version:
|
188
|
+
version: 0.88.0
|
161
189
|
description: |
|
162
190
|
Tools for working with Component Based Rails Apps (see http://shageman.github.io/cbra.info/).
|
163
191
|
Includes tools for graphing the components of an app and their relationships, as well as selectively
|
@@ -172,10 +200,10 @@ extensions: []
|
|
172
200
|
extra_rdoc_files: []
|
173
201
|
files:
|
174
202
|
- ".editorconfig"
|
203
|
+
- ".github/workflows/ci.yml"
|
175
204
|
- ".gitignore"
|
176
205
|
- ".rspec"
|
177
206
|
- ".rubocop.yml"
|
178
|
-
- ".travis.yml"
|
179
207
|
- CHANGELOG.md
|
180
208
|
- CODE_OF_CONDUCT.md
|
181
209
|
- Gemfile
|
@@ -188,6 +216,8 @@ files:
|
|
188
216
|
- bin/setup
|
189
217
|
- cobra_commander.gemspec
|
190
218
|
- exe/cobra
|
219
|
+
- gemfiles/bundler1.gemfile
|
220
|
+
- gemfiles/bundler2.gemfile
|
191
221
|
- lib/cobra_commander.rb
|
192
222
|
- lib/cobra_commander/affected.rb
|
193
223
|
- lib/cobra_commander/change.rb
|
@@ -199,6 +229,8 @@ files:
|
|
199
229
|
- lib/cobra_commander/dependencies/yarn/package_repo.rb
|
200
230
|
- lib/cobra_commander/dependencies/yarn_workspace.rb
|
201
231
|
- lib/cobra_commander/executor.rb
|
232
|
+
- lib/cobra_commander/executor/component_exec.rb
|
233
|
+
- lib/cobra_commander/executor/multi_exec.rb
|
202
234
|
- lib/cobra_commander/output.rb
|
203
235
|
- lib/cobra_commander/output/ascii_tree.rb
|
204
236
|
- lib/cobra_commander/output/flat_list.rb
|
@@ -210,7 +242,7 @@ homepage: http://tech.powerhrg.com/cobra_commander/
|
|
210
242
|
licenses:
|
211
243
|
- MIT
|
212
244
|
metadata: {}
|
213
|
-
post_install_message:
|
245
|
+
post_install_message:
|
214
246
|
rdoc_options: []
|
215
247
|
require_paths:
|
216
248
|
- lib
|
@@ -225,9 +257,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
225
257
|
- !ruby/object:Gem::Version
|
226
258
|
version: '0'
|
227
259
|
requirements: []
|
228
|
-
rubyforge_project:
|
260
|
+
rubyforge_project:
|
229
261
|
rubygems_version: 2.7.3
|
230
|
-
signing_key:
|
262
|
+
signing_key:
|
231
263
|
specification_version: 4
|
232
264
|
summary: Tools for working with Component Based Rails Apps
|
233
265
|
test_files: []
|
data/.travis.yml
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
sudo: true
|
2
|
-
language: ruby
|
3
|
-
before_install:
|
4
|
-
- "find /home/travis/.rvm/rubies -wholename '*default/bundler-*.gemspec' -delete"
|
5
|
-
- gem install bundler:"$BUNDLER_VERSION"
|
6
|
-
- sudo apt-get -qq install graphviz
|
7
|
-
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.13.0
|
8
|
-
- export PATH="$HOME/.yarn/bin:$PATH"
|
9
|
-
rvm:
|
10
|
-
- 2.5.1
|
11
|
-
env:
|
12
|
-
- BUNDLER_VERSION=1.17.3
|