rfix 1.4.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/rfix +78 -34
- data/lib/rfix.rb +17 -28
- data/lib/rfix/branch.rb +3 -25
- data/lib/rfix/branch/base.rb +27 -0
- data/lib/rfix/branch/head.rb +15 -0
- data/lib/rfix/branch/main.rb +33 -0
- data/lib/rfix/branch/name.rb +21 -0
- data/lib/rfix/branch/reference.rb +15 -0
- data/lib/rfix/branch/upstream.rb +17 -0
- data/lib/rfix/cli/command.rb +19 -0
- data/lib/rfix/cli/command/base.rb +61 -0
- data/lib/rfix/cli/command/branch.rb +13 -0
- data/lib/rfix/cli/command/config.rb +22 -0
- data/lib/rfix/cli/command/extension.rb +25 -0
- data/lib/rfix/cli/command/help.rb +11 -0
- data/lib/rfix/cli/command/info.rb +11 -0
- data/lib/rfix/cli/command/lint.rb +17 -0
- data/lib/rfix/cli/command/local.rb +11 -0
- data/lib/rfix/cli/command/origin.rb +11 -0
- data/lib/rfix/cli/command/setup.rb +11 -0
- data/lib/rfix/error.rb +5 -1
- data/lib/rfix/extension/offense.rb +79 -0
- data/lib/rfix/extension/pastel.rb +11 -0
- data/lib/rfix/extension/string.rb +12 -0
- data/lib/rfix/extension/strings.rb +9 -0
- data/lib/rfix/file.rb +6 -41
- data/lib/rfix/file/base.rb +73 -0
- data/lib/rfix/file/deleted.rb +17 -0
- data/lib/rfix/file/ignored.rb +17 -0
- data/lib/rfix/file/tracked.rb +42 -0
- data/lib/rfix/file/untracked.rb +20 -0
- data/lib/rfix/formatter.rb +125 -86
- data/lib/rfix/highlighter.rb +118 -0
- data/lib/rfix/indicator.rb +19 -0
- data/lib/rfix/log.rb +12 -121
- data/lib/rfix/rake/gemfile.rb +111 -0
- data/lib/rfix/rake/paths.rb +25 -23
- data/lib/rfix/rake/support.rb +72 -57
- data/lib/rfix/repository.rb +114 -164
- data/lib/rfix/types.rb +52 -0
- data/lib/rfix/version.rb +1 -1
- data/rfix.gemspec +28 -38
- data/vendor/dry-cli/CHANGELOG.md +191 -0
- data/vendor/dry-cli/CODEOWNERS +1 -0
- data/vendor/dry-cli/CODE_OF_CONDUCT.md +13 -0
- data/vendor/dry-cli/CONTRIBUTING.md +29 -0
- data/vendor/dry-cli/Gemfile +14 -0
- data/vendor/dry-cli/Gemfile.devtools +18 -0
- data/vendor/dry-cli/LICENSE +20 -0
- data/vendor/dry-cli/README.md +29 -0
- data/vendor/dry-cli/Rakefile +13 -0
- data/vendor/dry-cli/bin/console +15 -0
- data/vendor/dry-cli/bin/setup +8 -0
- data/vendor/dry-cli/changelog.yml +97 -0
- data/vendor/dry-cli/docsite/source/arguments.html.md +57 -0
- data/vendor/dry-cli/docsite/source/callbacks.html.md +51 -0
- data/vendor/dry-cli/docsite/source/commands-with-subcommands-and-params.md +86 -0
- data/vendor/dry-cli/docsite/source/commands.html.md +41 -0
- data/vendor/dry-cli/docsite/source/index.html.md +302 -0
- data/vendor/dry-cli/docsite/source/options.html.md +51 -0
- data/vendor/dry-cli/docsite/source/subcommands.html.md +38 -0
- data/vendor/dry-cli/docsite/source/variadic-arguments.html.md +45 -0
- data/vendor/dry-cli/dry-cli.gemspec +36 -0
- data/vendor/dry-cli/lib/dry/cli.rb +224 -0
- data/vendor/dry-cli/lib/dry/cli/banner.rb +135 -0
- data/vendor/dry-cli/lib/dry/cli/command.rb +387 -0
- data/vendor/dry-cli/lib/dry/cli/command_registry.rb +253 -0
- data/vendor/dry-cli/lib/dry/cli/errors.rb +37 -0
- data/vendor/dry-cli/lib/dry/cli/inflector.rb +17 -0
- data/vendor/dry-cli/lib/dry/cli/inline.rb +75 -0
- data/vendor/dry-cli/lib/dry/cli/option.rb +131 -0
- data/vendor/dry-cli/lib/dry/cli/parser.rb +138 -0
- data/vendor/dry-cli/lib/dry/cli/program_name.rb +21 -0
- data/vendor/dry-cli/lib/dry/cli/registry.rb +338 -0
- data/vendor/dry-cli/lib/dry/cli/usage.rb +94 -0
- data/vendor/dry-cli/lib/dry/cli/version.rb +8 -0
- data/vendor/dry-cli/project.yml +13 -0
- data/vendor/dry-cli/spec/integration/commands_spec.rb +14 -0
- data/vendor/dry-cli/spec/integration/inherited_commands_spec.rb +24 -0
- data/vendor/dry-cli/spec/integration/inline_spec.rb +43 -0
- data/vendor/dry-cli/spec/integration/processes_errors_spec.rb +29 -0
- data/vendor/dry-cli/spec/integration/rendering_spec.rb +31 -0
- data/vendor/dry-cli/spec/integration/single_command_spec.rb +81 -0
- data/vendor/dry-cli/spec/integration/subcommands_spec.rb +60 -0
- data/vendor/dry-cli/spec/integration/third_party_gems_spec.rb +18 -0
- data/vendor/dry-cli/spec/spec_helper.rb +15 -0
- data/vendor/dry-cli/spec/support/coverage.rb +15 -0
- data/vendor/dry-cli/spec/support/files.rb +13 -0
- data/vendor/dry-cli/spec/support/fixtures/based +65 -0
- data/vendor/dry-cli/spec/support/fixtures/baz +9 -0
- data/vendor/dry-cli/spec/support/fixtures/baz_command.rb +19 -0
- data/vendor/dry-cli/spec/support/fixtures/foo +588 -0
- data/vendor/dry-cli/spec/support/fixtures/infinites +31 -0
- data/vendor/dry-cli/spec/support/fixtures/inline +20 -0
- data/vendor/dry-cli/spec/support/fixtures/registry.rb +15 -0
- data/vendor/dry-cli/spec/support/fixtures/shared_commands.rb +596 -0
- data/vendor/dry-cli/spec/support/fixtures/with_block.rb +86 -0
- data/vendor/dry-cli/spec/support/fixtures/with_registry.rb +90 -0
- data/vendor/dry-cli/spec/support/fixtures/with_zero_arity_block.rb +87 -0
- data/vendor/dry-cli/spec/support/helpers.rb +37 -0
- data/vendor/dry-cli/spec/support/path.rb +24 -0
- data/vendor/dry-cli/spec/support/rspec.rb +26 -0
- data/vendor/dry-cli/spec/support/rspec_options.rb +16 -0
- data/vendor/dry-cli/spec/support/shared_examples/commands.rb +300 -0
- data/vendor/dry-cli/spec/support/shared_examples/inherited_commands.rb +197 -0
- data/vendor/dry-cli/spec/support/shared_examples/rendering.rb +181 -0
- data/vendor/dry-cli/spec/support/shared_examples/subcommands.rb +226 -0
- data/vendor/dry-cli/spec/support/shared_examples/third_party_gems.rb +49 -0
- data/vendor/dry-cli/spec/support/warnings.rb +10 -0
- data/vendor/dry-cli/spec/unit/dry/cli/cli_spec.rb +123 -0
- data/vendor/dry-cli/spec/unit/dry/cli/inflector_spec.rb +26 -0
- data/vendor/dry-cli/spec/unit/dry/cli/registry_spec.rb +78 -0
- data/vendor/dry-cli/spec/unit/dry/cli/version_spec.rb +7 -0
- data/vendor/strings-ansi/CHANGELOG.md +24 -0
- data/vendor/strings-ansi/CODE_OF_CONDUCT.md +74 -0
- data/vendor/strings-ansi/Gemfile +11 -0
- data/{LICENSE.txt → vendor/strings-ansi/LICENSE.txt} +1 -1
- data/vendor/strings-ansi/README.md +155 -0
- data/vendor/strings-ansi/Rakefile +8 -0
- data/vendor/strings-ansi/appveyor.yml +32 -0
- data/vendor/strings-ansi/bin/console +14 -0
- data/vendor/strings-ansi/bin/setup +8 -0
- data/vendor/strings-ansi/lib/strings-ansi.rb +1 -0
- data/vendor/strings-ansi/lib/strings/ansi.rb +84 -0
- data/vendor/strings-ansi/lib/strings/ansi/extensions.rb +23 -0
- data/vendor/strings-ansi/lib/strings/ansi/version.rb +7 -0
- data/vendor/strings-ansi/spec/fixtures/ansi_codes.yaml +194 -0
- data/vendor/strings-ansi/spec/spec_helper.rb +51 -0
- data/vendor/strings-ansi/spec/unit/ansi_spec.rb +15 -0
- data/vendor/strings-ansi/spec/unit/extensions_spec.rb +19 -0
- data/vendor/strings-ansi/spec/unit/only_ansi_spec.rb +36 -0
- data/vendor/strings-ansi/spec/unit/sanitize_spec.rb +53 -0
- data/vendor/strings-ansi/strings-ansi.gemspec +34 -0
- data/vendor/strings-ansi/tasks/console.rake +11 -0
- data/vendor/strings-ansi/tasks/coverage.rake +11 -0
- data/vendor/strings-ansi/tasks/spec.rake +29 -0
- metadata +274 -188
- data/.github/workflows/main.yml +0 -26
- data/.gitignore +0 -43
- data/.rspec +0 -2
- data/.rubocop.yml +0 -87
- data/.travis.yml +0 -35
- data/Gemfile +0 -2
- data/Gemfile.base +0 -14
- data/Gemfile.base.lock +0 -172
- data/Gemfile.lock +0 -188
- data/Guardfile +0 -16
- data/Makefile +0 -12
- data/README.md +0 -85
- data/Rakefile +0 -31
- data/bin/bundle +0 -114
- data/bin/console +0 -29
- data/bin/guard +0 -29
- data/bin/rake +0 -29
- data/bin/rfix +0 -29
- data/bin/rspec +0 -29
- data/bin/setup +0 -29
- data/ci/Gemfile.rubocop-0.80 +0 -2
- data/ci/Gemfile.rubocop-0.80.lock +0 -170
- data/ci/Gemfile.rubocop-0.81 +0 -2
- data/ci/Gemfile.rubocop-0.81.lock +0 -170
- data/ci/Gemfile.rubocop-0.82 +0 -2
- data/ci/Gemfile.rubocop-0.82.lock +0 -170
- data/ci/Gemfile.rubocop-0.83 +0 -2
- data/ci/Gemfile.rubocop-0.83.lock +0 -168
- data/ci/Gemfile.rubocop-0.84 +0 -2
- data/ci/Gemfile.rubocop-0.84.lock +0 -171
- data/ci/Gemfile.rubocop-0.85 +0 -2
- data/ci/Gemfile.rubocop-0.85.1 +0 -2
- data/ci/Gemfile.rubocop-0.85.1.lock +0 -173
- data/ci/Gemfile.rubocop-0.85.lock +0 -173
- data/lib/rfix/box.rb +0 -112
- data/lib/rfix/branches/base.rb +0 -15
- data/lib/rfix/branches/head.rb +0 -13
- data/lib/rfix/branches/main.rb +0 -28
- data/lib/rfix/branches/name.rb +0 -23
- data/lib/rfix/branches/reference.rb +0 -21
- data/lib/rfix/branches/upstream.rb +0 -13
- data/lib/rfix/cmd.rb +0 -39
- data/lib/rfix/commands/branch.rb +0 -15
- data/lib/rfix/commands/extensions/options.rb +0 -8
- data/lib/rfix/commands/help.rb +0 -7
- data/lib/rfix/commands/helper/args.rb +0 -141
- data/lib/rfix/commands/helper/help.rb +0 -6
- data/lib/rfix/commands/helper/loader.rb +0 -6
- data/lib/rfix/commands/helper/option.rb +0 -0
- data/lib/rfix/commands/helper/params.rb +0 -0
- data/lib/rfix/commands/helper/rubocop.rb +0 -17
- data/lib/rfix/commands/info.rb +0 -30
- data/lib/rfix/commands/lint.rb +0 -22
- data/lib/rfix/commands/local.rb +0 -12
- data/lib/rfix/commands/origin.rb +0 -19
- data/lib/rfix/commands/setup.rb +0 -29
- data/lib/rfix/commands/welcome.rb +0 -24
- data/lib/rfix/deleted.rb +0 -13
- data/lib/rfix/extensions/extensions.rb +0 -18
- data/lib/rfix/extensions/offense.rb +0 -78
- data/lib/rfix/extensions/string.rb +0 -8
- data/lib/rfix/file_cache.rb +0 -59
- data/lib/rfix/git_helper.rb +0 -59
- data/lib/rfix/indentation.rb +0 -39
- data/lib/rfix/loader/bundler.rb +0 -37
- data/lib/rfix/loader/env.rb +0 -33
- data/lib/rfix/loader/spec.rb +0 -41
- data/lib/rfix/no_file.rb +0 -13
- data/lib/rfix/rfix.rb +0 -34
- data/lib/rfix/tracked.rb +0 -72
- data/lib/rfix/tracked_file.rb +0 -16
- data/lib/rfix/untracked.rb +0 -13
- data/resources/ps.png +0 -0
- data/tasks/bump.rake +0 -11
- data/tasks/bundle.rake +0 -17
- data/tasks/complex.rake +0 -54
- data/tasks/execute.rake +0 -38
- data/tasks/libgit2.rake +0 -33
- data/tasks/simple.rake +0 -62
- data/tasks/travis.rake +0 -74
- data/tasks/vendor.rake +0 -34
data/lib/rfix/types.rb
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "dry/types"
|
4
|
+
require "dry/logic"
|
5
|
+
|
6
|
+
module Rfix
|
7
|
+
module Types
|
8
|
+
include Dry::Types()
|
9
|
+
include Dry::Logic
|
10
|
+
|
11
|
+
Rugged = Instance(::Rugged::Repository)
|
12
|
+
Constrained = Dry::Types::Constrained
|
13
|
+
|
14
|
+
Dry::Types.define_builder(:not) do |type|
|
15
|
+
Constrained.new(type.lax, rule: Operations::Negation.new(type.rule))
|
16
|
+
end
|
17
|
+
|
18
|
+
Dry::Types.define_builder(:and) do |left, right|
|
19
|
+
Constrained.new(left.lax << right.lax, rule: left.rule & right.rule)
|
20
|
+
end
|
21
|
+
|
22
|
+
Dry::Types.define_builder(:or) do |left, right|
|
23
|
+
Constrained.new(left.lax << right.lax, rule: left.rule | right.rule)
|
24
|
+
end
|
25
|
+
|
26
|
+
module Status
|
27
|
+
include Dry::Types()
|
28
|
+
|
29
|
+
List = Array(Symbol)
|
30
|
+
|
31
|
+
WorkTreeDeleted = List.constrained(includes: :worktree_deleted)
|
32
|
+
DeletedOther = List.constrained(includes: :deleted)
|
33
|
+
Deleted = WorkTreeDeleted.or(DeletedOther)
|
34
|
+
|
35
|
+
module IgnoredType
|
36
|
+
Ignored = List.constrained(includes: :ignored)
|
37
|
+
Unmodified = List.constrained(includes: :unmodified)
|
38
|
+
end
|
39
|
+
|
40
|
+
Ignored = IgnoredType::Ignored.or(IgnoredType::Unmodified).and(Deleted.not)
|
41
|
+
|
42
|
+
module Staged
|
43
|
+
Tree = List.constrained(includes: :worktree_new)
|
44
|
+
Index = List.constrained(includes: :index_new)
|
45
|
+
end
|
46
|
+
|
47
|
+
Untracked = Staged::Tree.or(Staged::Index).and(Ignored.not)
|
48
|
+
Tracked = Untracked.not
|
49
|
+
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
data/lib/rfix/version.rb
CHANGED
data/rfix.gemspec
CHANGED
@@ -1,59 +1,49 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "pathname"
|
4
3
|
require_relative "lib/rfix/version"
|
5
|
-
# require_relative "lib/rfix/gem_helper"
|
6
4
|
|
7
5
|
Gem::Specification.new do |spec|
|
8
6
|
spec.name = "rfix"
|
9
|
-
spec.version
|
7
|
+
spec.version = Rfix::VERSION
|
10
8
|
spec.authors = ["Linus Oleander"]
|
11
9
|
spec.email = ["linus@oleander.nu"]
|
12
|
-
# rubocop:disable Layout/LineLength
|
13
10
|
spec.summary = "RuboCop CLI that only lints and auto-fixes code you committed by utilizing `git-log` and `git-diff`"
|
14
|
-
|
15
|
-
|
16
|
-
spec.description = <<~TEXT
|
11
|
+
spec.description = <<~TEXT
|
17
12
|
RuboCop CLI that only lints and auto-fixes code you committed by utilizing `git-log` and `git-diff`. Rfix CLI makes it possible to lint (`rfix lint`) and auto-fix (`rfix local|origin|branch`) code changes since a certain point in history. You can auto-fix code committed since creating the current branch (`rfix origin`) or since pushing to upstream (`rfix local`).
|
18
13
|
|
19
14
|
Includes a RuboCop formatter with syntax highlighting and build in hyperlinks for offense documentation.
|
20
15
|
|
21
16
|
Holds the same CLI arguments as RuboCop. Run `rfix --help` for a complete list or `rfix` for supported commands.
|
22
17
|
TEXT
|
23
|
-
spec.homepage = "https://github.com/oleander/rfix-rb"
|
24
|
-
spec.license = "MIT"
|
25
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
|
26
|
-
|
27
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
28
|
-
# Specify which files should be added to the gem when it is released.
|
29
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
30
|
-
validate_file = ->(f) { f.match(%r{^(test|spec|features)/}) }
|
31
|
-
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
32
|
-
`git ls-files -z`.split("\x0").reject(&validate_file)
|
33
|
-
end
|
34
18
|
|
35
|
-
spec.
|
19
|
+
spec.homepage = "https://github.com/oleander/rfix-rb"
|
20
|
+
spec.license = "MIT"
|
21
|
+
spec.required_ruby_version = ">= 2.6"
|
22
|
+
spec.files = Dir["lib/**/*", "exe/rfix", "vendor/**/*", "rfix.gemspec"]
|
23
|
+
spec.executables << "rfix"
|
24
|
+
spec.bindir = "exe"
|
25
|
+
spec.requirements << "git >= 2"
|
36
26
|
|
37
|
-
spec.
|
38
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
39
|
-
spec.require_paths = ["lib", "vendor/shopify/cli-ui/lib"]
|
40
|
-
|
41
|
-
spec.requirements << "git, v2.0+"
|
27
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
42
28
|
|
43
|
-
spec.add_runtime_dependency "
|
44
|
-
spec.add_runtime_dependency "
|
45
|
-
spec.add_runtime_dependency "
|
29
|
+
spec.add_runtime_dependency "activesupport"
|
30
|
+
spec.add_runtime_dependency "bundler"
|
31
|
+
spec.add_runtime_dependency "dry-cli"
|
32
|
+
spec.add_runtime_dependency "dry-core"
|
33
|
+
spec.add_runtime_dependency "dry-initializer"
|
34
|
+
spec.add_runtime_dependency "dry-struct"
|
35
|
+
spec.add_runtime_dependency "dry-types"
|
36
|
+
spec.add_runtime_dependency "pastel"
|
46
37
|
spec.add_runtime_dependency "rainbow", "~> 3.0"
|
47
|
-
spec.add_runtime_dependency "
|
38
|
+
spec.add_runtime_dependency "rake"
|
48
39
|
spec.add_runtime_dependency "rouge", "~> 3.20"
|
49
|
-
spec.add_runtime_dependency "rubocop", ">= 0.
|
50
|
-
spec.add_runtime_dependency "
|
51
|
-
|
52
|
-
spec.
|
53
|
-
spec.
|
54
|
-
spec.
|
55
|
-
spec.
|
56
|
-
spec.
|
57
|
-
spec.
|
58
|
-
spec.add_development_dependency "rake", "~> 12.3"
|
40
|
+
spec.add_runtime_dependency "rubocop", ">= 0.82.0", "!= 0.85.0"
|
41
|
+
spec.add_runtime_dependency "rubocop-ast"
|
42
|
+
spec.add_runtime_dependency "rugged"
|
43
|
+
spec.add_runtime_dependency "strings"
|
44
|
+
spec.add_runtime_dependency "tty-box"
|
45
|
+
spec.add_runtime_dependency "tty-link"
|
46
|
+
spec.add_runtime_dependency "tty-prompt"
|
47
|
+
spec.add_runtime_dependency "tty-screen"
|
48
|
+
spec.add_runtime_dependency "zeitwerk"
|
59
49
|
end
|
@@ -0,0 +1,191 @@
|
|
1
|
+
<!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
|
2
|
+
|
3
|
+
## 0.6.0 2020-03-06
|
4
|
+
|
5
|
+
|
6
|
+
### Added
|
7
|
+
|
8
|
+
- [Ivan Shamatov] Ability to pass command along with registry (for a singular command case)
|
9
|
+
- [Nikita Shilnikov] [Internal] Backported ability to run gem's CI against ruby 2.3
|
10
|
+
- [Ivan Shamatov] Inline syntax for commands
|
11
|
+
- [Ivan Shamatov] Introduced stderr to any diagnostic output
|
12
|
+
|
13
|
+
### Fixed
|
14
|
+
|
15
|
+
- [John Ledbetter & Luca Guidi] Fix ruby 2.7 warnings
|
16
|
+
- [Ivan Shamatov] Fix banner, when option is a type of Array
|
17
|
+
|
18
|
+
|
19
|
+
[Compare v0.5.1...v0.6.0](https://github.com/dry-rb/dry-cli/compare/v0.5.1...v0.6.0)
|
20
|
+
|
21
|
+
## 0.5.1 2020-01-23
|
22
|
+
|
23
|
+
|
24
|
+
### Added
|
25
|
+
|
26
|
+
- [Ivan Shamatov] Anonymous Registry sintax
|
27
|
+
- [Ivan Shamatov] [Internal] Specs refactored, more unit specs added
|
28
|
+
- [Luca Guidi] [Internal] removed `dry-inflector` as runtime dependency
|
29
|
+
- [Ivan Shamatov] [Internal] Refactored Command class (command_name property removed)
|
30
|
+
- [Piotr Solnica, Luca Guidi, Nikita Shilnikov & Christian Georgii] [Internal] Adapt gem to dry-rb style
|
31
|
+
|
32
|
+
### Fixed
|
33
|
+
|
34
|
+
- [Piotr Solnica] Added missing 'set' require
|
35
|
+
|
36
|
+
|
37
|
+
[Compare v0.5.0...v0.5.1](https://github.com/dry-rb/dry-cli/compare/v0.5.0...v0.5.1)
|
38
|
+
|
39
|
+
## 0.5.0 2019-12-21
|
40
|
+
|
41
|
+
|
42
|
+
### Added
|
43
|
+
|
44
|
+
- [Ivan Shamatov, Piotr Solnica, Luca Guidi] [Internal] removed runtime and development dependency against `hanami-utils`
|
45
|
+
|
46
|
+
|
47
|
+
[Compare v0.4.0...v0.5.0](https://github.com/dry-rb/dry-cli/compare/v0.4.0...v0.5.0)
|
48
|
+
|
49
|
+
## 0.4.0 2019-12-10
|
50
|
+
|
51
|
+
|
52
|
+
### Added
|
53
|
+
|
54
|
+
- [Ivan Shamatov, Piotr Solnica, Luca Guidi] `hanami-cli` => `dry-cli`
|
55
|
+
|
56
|
+
|
57
|
+
[Compare v0.3.1...v0.4.0](https://github.com/dry-rb/dry-cli/compare/v0.3.1...v0.4.0)
|
58
|
+
|
59
|
+
## 0.3.1 2019-01-18
|
60
|
+
|
61
|
+
|
62
|
+
### Added
|
63
|
+
|
64
|
+
- [Luca Guidi] Official support for Ruby: MRI 2.6
|
65
|
+
- [Luca Guidi] Support `bundler` 2.0+
|
66
|
+
|
67
|
+
|
68
|
+
[Compare v0.3.0...v0.3.1](https://github.com/dry-rb/dry-cli/compare/v0.3.0...v0.3.1)
|
69
|
+
|
70
|
+
## 0.3.0 2018-10-24
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
[Compare v0.3.0.beta1...v0.3.0](https://github.com/dry-rb/dry-cli/compare/v0.3.0.beta1...v0.3.0)
|
75
|
+
|
76
|
+
## 0.3.0.beta1 2018-08-08
|
77
|
+
|
78
|
+
|
79
|
+
### Added
|
80
|
+
|
81
|
+
- [Anton Davydov & Alfonso Uceda] Introduce array type for arguments (`foo exec test spec/bookshelf/entities spec/bookshelf/repositories`)
|
82
|
+
- [Anton Davydov & Alfonso Uceda] Introduce array type for options (`foo generate config --apps=web,api`)
|
83
|
+
- [Alfonso Uceda] Introduce variadic arguments (`foo run ruby:latest -- ruby -v`)
|
84
|
+
- [Luca Guidi] Official support for JRuby 9.2.0.0
|
85
|
+
|
86
|
+
### Fixed
|
87
|
+
|
88
|
+
- [Anton Davydov] Print informative message when unknown or wrong option is passed (`"test" was called with arguments "--framework=unknown"`)
|
89
|
+
|
90
|
+
|
91
|
+
[Compare v0.2.0...v0.3.0.beta1](https://github.com/dry-rb/dry-cli/compare/v0.2.0...v0.3.0.beta1)
|
92
|
+
|
93
|
+
## 0.2.0 2018-04-11
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
[Compare v0.2.0.rc2...v0.2.0](https://github.com/dry-rb/dry-cli/compare/v0.2.0.rc2...v0.2.0)
|
98
|
+
|
99
|
+
## 0.2.0.rc2 2018-04-06
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
[Compare v0.2.0.rc1...v0.2.0.rc2](https://github.com/dry-rb/dry-cli/compare/v0.2.0.rc1...v0.2.0.rc2)
|
104
|
+
|
105
|
+
## 0.2.0.rc1 2018-03-30
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
[Compare v0.2.0.beta2...v0.2.0.rc1](https://github.com/dry-rb/dry-cli/compare/v0.2.0.beta2...v0.2.0.rc1)
|
110
|
+
|
111
|
+
## 0.2.0.beta2 2018-03-23
|
112
|
+
|
113
|
+
|
114
|
+
### Added
|
115
|
+
|
116
|
+
- [Anton Davydov & Luca Guidi] Support objects as callbacks
|
117
|
+
|
118
|
+
### Fixed
|
119
|
+
|
120
|
+
- [Anton Davydov & Luca Guidi] Ensure callbacks' context of execution (aka `self`) to be the command that is being executed
|
121
|
+
|
122
|
+
|
123
|
+
[Compare v0.2.0.beta1...v0.2.0.beta2](https://github.com/dry-rb/dry-cli/compare/v0.2.0.beta1...v0.2.0.beta2)
|
124
|
+
|
125
|
+
## 0.2.0.beta1 2018-02-28
|
126
|
+
|
127
|
+
|
128
|
+
### Added
|
129
|
+
|
130
|
+
- [Anton Davydov] Register `before`/`after` callbacks for commands
|
131
|
+
|
132
|
+
|
133
|
+
[Compare v0.1.1...v0.2.0.beta1](https://github.com/dry-rb/dry-cli/compare/v0.1.1...v0.2.0.beta1)
|
134
|
+
|
135
|
+
## 0.1.1 2018-02-27
|
136
|
+
|
137
|
+
|
138
|
+
### Added
|
139
|
+
|
140
|
+
- [Luca Guidi] Official support for Ruby: MRI 2.5
|
141
|
+
|
142
|
+
### Fixed
|
143
|
+
|
144
|
+
- [Alfonso Uceda] Ensure default values for arguments to be sent to commands
|
145
|
+
- [Alfonso Uceda] Ensure to fail when a missing required argument isn't provider, but an option is provided instead
|
146
|
+
|
147
|
+
|
148
|
+
[Compare v0.1.0...v0.1.1](https://github.com/dry-rb/dry-cli/compare/v0.1.0...v0.1.1)
|
149
|
+
|
150
|
+
## 0.1.0 2017-10-25
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
[Compare v0.1.0.rc1...v0.1.0](https://github.com/dry-rb/dry-cli/compare/v0.1.0.rc1...v0.1.0)
|
155
|
+
|
156
|
+
## 0.1.0.rc1 2017-10-16
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
[Compare v0.1.0.beta3...v0.1.0.rc1](https://github.com/dry-rb/dry-cli/compare/v0.1.0.beta3...v0.1.0.rc1)
|
161
|
+
|
162
|
+
## 0.1.0.beta3 2017-10-04
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
[Compare v0.1.0.beta2...v0.1.0.beta3](https://github.com/dry-rb/dry-cli/compare/v0.1.0.beta2...v0.1.0.beta3)
|
167
|
+
|
168
|
+
## 0.1.0.beta2 2017-10-03
|
169
|
+
|
170
|
+
|
171
|
+
### Added
|
172
|
+
|
173
|
+
- [Alfonso Uceda] Allow default value for arguments
|
174
|
+
|
175
|
+
|
176
|
+
[Compare v0.1.0.beta1...v0.1.0.beta2](https://github.com/dry-rb/dry-cli/compare/v0.1.0.beta1...v0.1.0.beta2)
|
177
|
+
|
178
|
+
## 0.1.0.beta1 2017-08-11
|
179
|
+
|
180
|
+
|
181
|
+
### Added
|
182
|
+
|
183
|
+
- [Alfonso Uceda, Luca Guidi] Commands banner and usage
|
184
|
+
- [Alfonso Uceda] Added support for subcommands
|
185
|
+
- [Alfonso Uceda] Validations for arguments and options
|
186
|
+
- [Alfonso Uceda] Commands arguments and options
|
187
|
+
- [Alfonso Uceda] Commands description
|
188
|
+
- [Alfonso Uceda, Oana Sipos] Commands aliases
|
189
|
+
- [Luca Guidi] Exit on unknown command
|
190
|
+
- [Luca Guidi, Alfonso Uceda, Oana Sipos] Command lookup
|
191
|
+
- [Luca Guidi, Tim Riley] Trie based registry to register commands and allow third-parties to override/add commands
|
@@ -0,0 +1 @@
|
|
1
|
+
* @solnic
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.4.0, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct](https://www.contributor-covenant.org/version/1/4/code-of-conduct)
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# Issue Guidelines
|
2
|
+
|
3
|
+
## Reporting bugs
|
4
|
+
|
5
|
+
If you found a bug, report an issue and describe what's the expected behavior versus what actually happens. If the bug causes a crash, attach a full backtrace. If possible, a reproduction script showing the problem is highly appreciated.
|
6
|
+
|
7
|
+
## Reporting feature requests
|
8
|
+
|
9
|
+
Report a feature request **only after discussing it first on [discourse.dry-rb.org](https://discourse.dry-rb.org)** where it was accepted. Please provide a concise description of the feature.
|
10
|
+
|
11
|
+
## Reporting questions, support requests, ideas, concerns etc.
|
12
|
+
|
13
|
+
**PLEASE DON'T** - use [discourse.dry-rb.org](http://discourse.dry-rb.org) instead.
|
14
|
+
|
15
|
+
# Pull Request Guidelines
|
16
|
+
|
17
|
+
A Pull Request will only be accepted if it addresses a specific issue that was reported previously, or fixes typos, mistakes in documentation etc.
|
18
|
+
|
19
|
+
Other requirements:
|
20
|
+
|
21
|
+
1) Do not open a pull request if you can't provide tests along with it. If you have problems writing tests, ask for help in the related issue.
|
22
|
+
2) Follow the style conventions of the surrounding code. In most cases, this is standard ruby style.
|
23
|
+
3) Add API documentation if it's a new feature
|
24
|
+
4) Update API documentation if it changes an existing feature
|
25
|
+
5) Bonus points for sending a PR which updates user documentation in the `docsite` directory
|
26
|
+
|
27
|
+
# Asking for help
|
28
|
+
|
29
|
+
If these guidelines aren't helpful, and you're stuck, please post a message on [discourse.dry-rb.org](https://discourse.dry-rb.org).
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
eval_gemfile "Gemfile.devtools"
|
6
|
+
|
7
|
+
gemspec
|
8
|
+
|
9
|
+
gem "backports", "~> 3.15.0", require: false
|
10
|
+
|
11
|
+
unless ENV["CI"]
|
12
|
+
gem "byebug", require: false, platforms: :mri
|
13
|
+
gem "yard", require: false
|
14
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# this file is managed by dry-rb/devtools project
|
4
|
+
|
5
|
+
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
6
|
+
|
7
|
+
group :test do
|
8
|
+
gem "simplecov", require: false, platforms: :ruby
|
9
|
+
gem "simplecov-cobertura", require: false, platforms: :ruby
|
10
|
+
gem "rexml", require: false
|
11
|
+
|
12
|
+
gem "warning" if RUBY_VERSION >= "2.4.0"
|
13
|
+
end
|
14
|
+
|
15
|
+
group :tools do
|
16
|
+
# this is the same version that we use on codacy
|
17
|
+
gem "rubocop", "~> 1.12"
|
18
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015-2021 dry-rb team
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|