gorails 0.1.1 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -1
- data/Gemfile.lock +1 -6
- data/README.md +41 -12
- data/bin/update-deps +95 -0
- data/exe/gorails +2 -1
- data/gorails.gemspec +0 -2
- data/lib/gorails/commands/railsbytes.rb +45 -4
- data/lib/gorails/commands/version.rb +15 -0
- data/lib/gorails/commands.rb +2 -5
- data/lib/gorails/version.rb +1 -1
- data/lib/gorails.rb +11 -20
- data/vendor/deps/cli-kit/REVISION +1 -0
- data/vendor/deps/cli-kit/lib/cli/kit/args/definition.rb +301 -0
- data/vendor/deps/cli-kit/lib/cli/kit/args/evaluation.rb +237 -0
- data/vendor/deps/cli-kit/lib/cli/kit/args/parser/node.rb +131 -0
- data/vendor/deps/cli-kit/lib/cli/kit/args/parser.rb +128 -0
- data/vendor/deps/cli-kit/lib/cli/kit/args/tokenizer.rb +132 -0
- data/vendor/deps/cli-kit/lib/cli/kit/args.rb +15 -0
- data/vendor/deps/cli-kit/lib/cli/kit/base_command.rb +29 -0
- data/vendor/deps/cli-kit/lib/cli/kit/command_help.rb +256 -0
- data/vendor/deps/cli-kit/lib/cli/kit/command_registry.rb +141 -0
- data/vendor/deps/cli-kit/lib/cli/kit/config.rb +137 -0
- data/vendor/deps/cli-kit/lib/cli/kit/core_ext.rb +30 -0
- data/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb +165 -0
- data/vendor/deps/cli-kit/lib/cli/kit/executor.rb +99 -0
- data/vendor/deps/cli-kit/lib/cli/kit/ini.rb +94 -0
- data/vendor/deps/cli-kit/lib/cli/kit/levenshtein.rb +89 -0
- data/vendor/deps/cli-kit/lib/cli/kit/logger.rb +95 -0
- data/vendor/deps/cli-kit/lib/cli/kit/opts.rb +284 -0
- data/vendor/deps/cli-kit/lib/cli/kit/resolver.rb +67 -0
- data/vendor/deps/cli-kit/lib/cli/kit/sorbet_runtime_stub.rb +142 -0
- data/vendor/deps/cli-kit/lib/cli/kit/support/test_helper.rb +253 -0
- data/vendor/deps/cli-kit/lib/cli/kit/support.rb +10 -0
- data/vendor/deps/cli-kit/lib/cli/kit/system.rb +350 -0
- data/vendor/deps/cli-kit/lib/cli/kit/util.rb +133 -0
- data/vendor/deps/cli-kit/lib/cli/kit/version.rb +7 -0
- data/vendor/deps/cli-kit/lib/cli/kit.rb +151 -0
- data/vendor/deps/cli-ui/REVISION +1 -0
- data/vendor/deps/cli-ui/lib/cli/ui/ansi.rb +180 -0
- data/vendor/deps/cli-ui/lib/cli/ui/color.rb +98 -0
- data/vendor/deps/cli-ui/lib/cli/ui/formatter.rb +216 -0
- data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_stack.rb +116 -0
- data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/box.rb +176 -0
- data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/bracket.rb +149 -0
- data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style.rb +112 -0
- data/vendor/deps/cli-ui/lib/cli/ui/frame.rb +300 -0
- data/vendor/deps/cli-ui/lib/cli/ui/glyph.rb +92 -0
- data/vendor/deps/cli-ui/lib/cli/ui/os.rb +58 -0
- data/vendor/deps/cli-ui/lib/cli/ui/printer.rb +72 -0
- data/vendor/deps/cli-ui/lib/cli/ui/progress.rb +102 -0
- data/vendor/deps/cli-ui/lib/cli/ui/prompt/interactive_options.rb +534 -0
- data/vendor/deps/cli-ui/lib/cli/ui/prompt/options_handler.rb +36 -0
- data/vendor/deps/cli-ui/lib/cli/ui/prompt.rb +354 -0
- data/vendor/deps/cli-ui/lib/cli/ui/sorbet_runtime_stub.rb +143 -0
- data/vendor/deps/cli-ui/lib/cli/ui/spinner/async.rb +46 -0
- data/vendor/deps/cli-ui/lib/cli/ui/spinner/spin_group.rb +292 -0
- data/vendor/deps/cli-ui/lib/cli/ui/spinner.rb +82 -0
- data/vendor/deps/cli-ui/lib/cli/ui/stdout_router.rb +264 -0
- data/vendor/deps/cli-ui/lib/cli/ui/terminal.rb +53 -0
- data/vendor/deps/cli-ui/lib/cli/ui/truncater.rb +107 -0
- data/vendor/deps/cli-ui/lib/cli/ui/version.rb +6 -0
- data/vendor/deps/cli-ui/lib/cli/ui/widgets/base.rb +37 -0
- data/vendor/deps/cli-ui/lib/cli/ui/widgets/status.rb +75 -0
- data/vendor/deps/cli-ui/lib/cli/ui/widgets.rb +91 -0
- data/vendor/deps/cli-ui/lib/cli/ui/wrap.rb +63 -0
- data/vendor/deps/cli-ui/lib/cli/ui.rb +356 -0
- metadata +59 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb6ed89fea9fbe57b0f3e0ad9e43b86bcc01d554018610c20ec88ca62a7e3eb4
|
4
|
+
data.tar.gz: 289342d7b991ffd71da958d904163e6aed5bdb38e673fa3a0aa7da4627c8591f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb384482e0a5992b671d681839e7a335c32c9290ad2d5f93016e5f3d5d283d8de754501346a390278c478d9c783c9dd94773a192fd7ea189192160e5025bf13f
|
7
|
+
data.tar.gz: ba828e4f25ccb1d01d30caf3f58ec08deeff4669b785effe8aefcd296508b6c6b4cc28777359d6849c5ccda3c037ee5f5de89a85024f4708a52c612b4e27c58e
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
-
## [0.1.
|
3
|
+
## [0.1.4] - 2022-03-13
|
4
|
+
|
5
|
+
- Add `version` command
|
6
|
+
|
7
|
+
## [0.1.3] - 2022-03-13
|
8
|
+
|
9
|
+
- Vendor cli-kit and cli-ui for speed
|
10
|
+
This also skips loading bundler/setup which looks for a Gemfile
|
11
|
+
|
12
|
+
## [0.1.2] - 2022-03-13
|
13
|
+
|
14
|
+
- Add ability to view and apply individual Railsbytes
|
15
|
+
|
16
|
+
## [0.1.1] - 2022-03-13
|
4
17
|
|
5
18
|
- Initial release
|
19
|
+
|
20
|
+
## [0.1.0] - 2021-12-16
|
21
|
+
|
22
|
+
- Empty release
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
gorails (0.1.
|
5
|
-
cli-kit (~> 4.0.0)
|
6
|
-
cli-ui (~> 1.5.1)
|
4
|
+
gorails (0.1.4)
|
7
5
|
|
8
6
|
GEM
|
9
7
|
remote: https://rubygems.org/
|
@@ -11,9 +9,6 @@ GEM
|
|
11
9
|
ansi (1.5.0)
|
12
10
|
ast (2.4.2)
|
13
11
|
builder (3.2.4)
|
14
|
-
cli-kit (4.0.0)
|
15
|
-
cli-ui (>= 1.1.4)
|
16
|
-
cli-ui (1.5.1)
|
17
12
|
metaclass (0.0.4)
|
18
13
|
minitest (5.15.0)
|
19
14
|
minitest-reporters (1.5.0)
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
#
|
1
|
+
# GoRails CLI
|
2
2
|
|
3
|
-
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/gorails.svg)](https://badge.fury.io/rb/gorails)
|
4
4
|
|
5
|
-
|
5
|
+
An interactive CLI for [GoRails](https://gorails.com), [Railsbytes](https://railsbytes.com), [Jumpstart](https://github.com/excid3/jumpstart), [Ruby on Rails jobs](https://jobs.gorails.com), and more.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -12,27 +12,56 @@ Add this line to your application's Gemfile:
|
|
12
12
|
gem 'gorails'
|
13
13
|
```
|
14
14
|
|
15
|
-
And then
|
15
|
+
And then run
|
16
16
|
|
17
|
-
|
17
|
+
```bash
|
18
|
+
gorails
|
19
|
+
```
|
20
|
+
|
21
|
+
## Usage
|
18
22
|
|
19
|
-
|
23
|
+
#### GoRails episodes
|
20
24
|
|
21
|
-
|
25
|
+
To see a list of the recent GoRails screencasts, you can run:
|
22
26
|
|
23
|
-
|
27
|
+
```sh
|
28
|
+
gorails episodes
|
29
|
+
```
|
30
|
+
|
31
|
+
#### Ruby on Rails Jobs
|
32
|
+
|
33
|
+
To see a list of Ruby on Rails job posts, you can run:
|
34
|
+
|
35
|
+
```sh
|
36
|
+
gorails jobs
|
37
|
+
```
|
38
|
+
|
39
|
+
#### Railsbytes
|
40
|
+
|
41
|
+
To see a list of Railsbytes.com templates, you can run:
|
42
|
+
|
43
|
+
```sh
|
44
|
+
gorails railsbytes
|
45
|
+
gorails railsbytes x7msKX
|
46
|
+
```
|
47
|
+
|
48
|
+
#### Jumpstart
|
24
49
|
|
25
|
-
|
50
|
+
To create a Ruby on Rails app using the [Jumpstart template](https://github.com/excid3/jumpstart), you can run:
|
51
|
+
|
52
|
+
```sh
|
53
|
+
gorails jumpstart myapp
|
54
|
+
```
|
26
55
|
|
27
56
|
## Development
|
28
57
|
|
29
|
-
After checking out the repo, run `
|
58
|
+
After checking out the repo, run `bundle` to install dependencies. Then, run `rake test` to run the tests. You can also run `exe/gorails` to test the gem.
|
30
59
|
|
31
60
|
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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
61
|
|
33
62
|
## Contributing
|
34
63
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
64
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/excid3/gorails-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/excid3/gorails-ruby/blob/master/CODE_OF_CONDUCT.md).
|
36
65
|
|
37
66
|
## License
|
38
67
|
|
@@ -40,4 +69,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
40
69
|
|
41
70
|
## Code of Conduct
|
42
71
|
|
43
|
-
Everyone interacting in the
|
72
|
+
Everyone interacting in the GoRails project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/excid3/gorails-ruby/blob/master/CODE_OF_CONDUCT.md).
|
data/bin/update-deps
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
$LOAD_PATH.unshift(File.expand_path("../../vendor/deps/cli-ui/lib", __FILE__))
|
4
|
+
require 'open3'
|
5
|
+
require 'fileutils'
|
6
|
+
|
7
|
+
def fmt(tag, msg)
|
8
|
+
# Not really CLI::UI.fmt compatible: no nesting support, for example.
|
9
|
+
# While we could pull in CLI::UI here, it makes it more difficult to
|
10
|
+
# bootstrap a new project and to fix a broken vendor.
|
11
|
+
fmt_msg = msg
|
12
|
+
.gsub(/{{yellow:(.*?)}}/, "\x1b[33m\\1\x1b[31m")
|
13
|
+
.gsub(/{{green:(.*?)}}/, "\x1b[32m\\1\x1b[31m")
|
14
|
+
.gsub(/{{blue:(.*?)}}/, "\x1b[34m\\1\x1b[31m")
|
15
|
+
.gsub(/{{bold_blue:(.*?)}}/, "\x1b[1;34m\\1\x1b[0;31m")
|
16
|
+
.gsub(/{{bold_green:(.*?)}}/, "\x1b[1;32m\\1\x1b[0;31m")
|
17
|
+
"\x1b[1;31m[#{tag}] \x1b[0;31m#{fmt_msg}\x1b[0m"
|
18
|
+
end
|
19
|
+
|
20
|
+
def bail(msg)
|
21
|
+
STDERR.puts(fmt("ERROR", msg))
|
22
|
+
exit 1
|
23
|
+
end
|
24
|
+
|
25
|
+
def warn(msg)
|
26
|
+
STDERR.puts(fmt("WARNING", msg))
|
27
|
+
end
|
28
|
+
|
29
|
+
def source_path
|
30
|
+
File.expand_path(ENV.fetch('SOURCE_ROOT', File.expand_path('../../..', __FILE__)))
|
31
|
+
end
|
32
|
+
|
33
|
+
deps = %w(cli-ui cli-kit)
|
34
|
+
|
35
|
+
deps.each do |dep|
|
36
|
+
path = File.expand_path(dep, source_path)
|
37
|
+
|
38
|
+
unless Dir.exist?(path)
|
39
|
+
bail(
|
40
|
+
"dependency is not checked out: {{yellow:#{dep}}}.\n" \
|
41
|
+
" This repo {{bold_blue:(github.com/shopify/#{dep})}} must be cloned at {{bold_blue:#{path}}} for this script to succeed.\n" \
|
42
|
+
" Currently, SOURCE_ROOT is set to {{bold_blue:#{source_path}}}.\n" \
|
43
|
+
" Alternatively, you can set {{bold_blue:SOURCE_ROOT}} to a directory containing {{yellow:#{dep}}}.\n" \
|
44
|
+
" {{bold_blue:SOURCE_ROOT}} defaults to {{bold_blue:../}}."
|
45
|
+
)
|
46
|
+
end
|
47
|
+
|
48
|
+
head_sha = nil
|
49
|
+
dirty = false
|
50
|
+
|
51
|
+
Dir.chdir(path) do
|
52
|
+
_, _, stat = Open3.capture3('git fetch origin main')
|
53
|
+
bail("couldn't git fetch in dependency: {{yellow:#{dep}}}") unless stat.success?
|
54
|
+
|
55
|
+
head_sha, stat = Open3.capture2('git rev-parse HEAD')
|
56
|
+
bail("couldn't determine HEAD: {{yellow:#{dep}}}") unless stat.success?
|
57
|
+
head_sha.chomp!
|
58
|
+
|
59
|
+
fetch_head_sha, stat = Open3.capture2('git rev-parse FETCH_HEAD')
|
60
|
+
bail("couldn't determine FETCH_HEAD: {{yellow:#{dep}}}") unless stat.success?
|
61
|
+
fetch_head_sha.chomp!
|
62
|
+
|
63
|
+
git_status, stat = Open3.capture2('git status --porcelain')
|
64
|
+
bail("couldn't determine git status: {{yellow:#{dep}}}") unless stat.success?
|
65
|
+
|
66
|
+
if head_sha != fetch_head_sha
|
67
|
+
warn(
|
68
|
+
"Copying files from {{yellow:#{path}}} to satisfy dependency {{yellow:#{dep}}}.\n" \
|
69
|
+
" However, the repo at {{yellow:#{path}}} isn't up to date.\n" \
|
70
|
+
" The checked-out revision is {{yellow:#{head_sha[0..8]}}}, and "\
|
71
|
+
"{{yellow:origin/master}} is {{yellow:#{fetch_head_sha[0..8]}}}.\n" \
|
72
|
+
" Unless you know what you're doing, you should {{green:cd}} to that repo and {{green:git pull}}, then run this again."
|
73
|
+
)
|
74
|
+
end
|
75
|
+
|
76
|
+
unless git_status.chomp.empty?
|
77
|
+
dirty = true
|
78
|
+
warn("importing uncommitted changes from dependency: {{yellow:#{dep}}}")
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
depdir = File.expand_path("../../vendor/deps/#{dep}", __FILE__)
|
83
|
+
FileUtils.rm_rf(depdir)
|
84
|
+
FileUtils.mkdir_p(depdir)
|
85
|
+
dstlib = File.expand_path('lib', depdir)
|
86
|
+
srclib = File.expand_path('lib', path)
|
87
|
+
|
88
|
+
FileUtils.cp_r(srclib, dstlib)
|
89
|
+
|
90
|
+
rev = head_sha
|
91
|
+
rev << " (dirty)" if dirty
|
92
|
+
rev << "\n"
|
93
|
+
|
94
|
+
File.write("#{depdir}/REVISION", rev)
|
95
|
+
end
|
data/exe/gorails
CHANGED
@@ -7,9 +7,10 @@ unshift_path = ->(path) {
|
|
7
7
|
p = File.expand_path("../../#{path}", __FILE__)
|
8
8
|
$LOAD_PATH.unshift(p) unless $LOAD_PATH.include?(p)
|
9
9
|
}
|
10
|
+
unshift_path.call("vendor/deps/cli-ui/lib")
|
11
|
+
unshift_path.call("vendor/deps/cli-kit/lib")
|
10
12
|
unshift_path.call("lib")
|
11
13
|
|
12
|
-
require "bundler/setup"
|
13
14
|
require "gorails"
|
14
15
|
|
15
16
|
exit(Gorails::ErrorHandler.call do
|
data/gorails.gemspec
CHANGED
@@ -29,8 +29,6 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
30
30
|
spec.require_paths = ["lib"]
|
31
31
|
|
32
|
-
spec.add_dependency "cli-kit", "~> 4.0.0"
|
33
|
-
spec.add_dependency "cli-ui", "~> 1.5.1"
|
34
32
|
spec.add_development_dependency "standard"
|
35
33
|
|
36
34
|
# For more information and examples about making a new gem, checkout our
|
@@ -1,11 +1,29 @@
|
|
1
1
|
require "gorails"
|
2
|
-
require "
|
2
|
+
require "bundler"
|
3
3
|
require "json"
|
4
|
+
require "net/http"
|
4
5
|
|
5
6
|
module Gorails
|
6
7
|
module Commands
|
7
8
|
class Railsbytes < Gorails::Command
|
8
|
-
def call(
|
9
|
+
def call(args, _name)
|
10
|
+
if args.none?
|
11
|
+
list
|
12
|
+
else
|
13
|
+
apply(args.first)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.help
|
18
|
+
<<~EOF
|
19
|
+
View the latest Railsbytes templates or load a template by ID.
|
20
|
+
Usage:
|
21
|
+
{{command:#{Gorails::TOOL_NAME} railsbytes}}
|
22
|
+
{{command:#{Gorails::TOOL_NAME} railsbytes x7msKX}}
|
23
|
+
EOF
|
24
|
+
end
|
25
|
+
|
26
|
+
def list
|
9
27
|
bytes = JSON.parse Net::HTTP.get(URI("https://railsbytes.com/public/templates.json"))
|
10
28
|
|
11
29
|
CLI::UI::Frame.open("Railsbytes") do
|
@@ -18,8 +36,31 @@ module Gorails
|
|
18
36
|
end
|
19
37
|
end
|
20
38
|
|
21
|
-
def
|
22
|
-
|
39
|
+
def apply(id)
|
40
|
+
byte = JSON.parse Net::HTTP.get(URI("https://railsbytes.com/public/templates/#{id}.json"))
|
41
|
+
|
42
|
+
CLI::UI::Frame.open("Railsbyte") do
|
43
|
+
puts CLI::UI.fmt "{{green:#{byte["name"]}}} by #{byte["created_by"]}"
|
44
|
+
puts byte["short_description"]
|
45
|
+
puts
|
46
|
+
|
47
|
+
CLI::UI::Prompt.ask("What would you like to do?") do |handler|
|
48
|
+
handler.option("Apply Railsbyte") do |selection|
|
49
|
+
puts
|
50
|
+
puts "Running Railsbyte..."
|
51
|
+
puts
|
52
|
+
|
53
|
+
system "rails app:template LOCATION=\"https://railsbytes.com/script/#{id}\""
|
54
|
+
end
|
55
|
+
|
56
|
+
handler.option("View source") do |selection|
|
57
|
+
puts
|
58
|
+
puts byte["script"]
|
59
|
+
end
|
60
|
+
|
61
|
+
handler.option("Exit") { |selection| exit 0 }
|
62
|
+
end
|
63
|
+
end
|
23
64
|
end
|
24
65
|
end
|
25
66
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require "gorails"
|
2
|
+
|
3
|
+
module Gorails
|
4
|
+
module Commands
|
5
|
+
class Example < Gorails::Command
|
6
|
+
def call(_args, _name)
|
7
|
+
puts VERSION
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.help
|
11
|
+
"Prints the version.\nUsage: {{command:#{Gorails::TOOL_NAME} version}}"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/gorails/commands.rb
CHANGED
@@ -2,10 +2,7 @@ require "gorails"
|
|
2
2
|
|
3
3
|
module Gorails
|
4
4
|
module Commands
|
5
|
-
Registry = CLI::Kit::CommandRegistry.new(
|
6
|
-
default: "help",
|
7
|
-
contextual_resolver: nil
|
8
|
-
)
|
5
|
+
Registry = CLI::Kit::CommandRegistry.new(default: "help")
|
9
6
|
|
10
7
|
def self.register(const, cmd, path)
|
11
8
|
autoload(const, path)
|
@@ -16,7 +13,7 @@ module Gorails
|
|
16
13
|
register :Jobs, "jobs", "gorails/commands/jobs"
|
17
14
|
register :Jumpstart, "jumpstart", "gorails/commands/jumpstart"
|
18
15
|
register :Railsbytes, "railsbytes", "gorails/commands/railsbytes"
|
19
|
-
|
16
|
+
register :Version, "version", "gorails/commands/version"
|
20
17
|
register :Help, "help", "gorails/commands/help"
|
21
18
|
end
|
22
19
|
end
|
data/lib/gorails/version.rb
CHANGED
data/lib/gorails.rb
CHANGED
@@ -9,30 +9,21 @@ CLI::UI::StdoutRouter.enable
|
|
9
9
|
module Gorails
|
10
10
|
class Error < StandardError; end
|
11
11
|
|
12
|
-
extend CLI::Kit::Autocall
|
13
|
-
|
14
12
|
TOOL_NAME = "gorails"
|
15
13
|
ROOT = File.expand_path("../..", __FILE__)
|
16
|
-
LOG_FILE = "/tmp/
|
14
|
+
LOG_FILE = "/tmp/gorails.log"
|
17
15
|
|
18
16
|
autoload(:EntryPoint, "gorails/entry_point")
|
19
17
|
autoload(:Commands, "gorails/commands")
|
20
18
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
autocall(:ErrorHandler) do
|
33
|
-
CLI::Kit::ErrorHandler.new(
|
34
|
-
log_file: LOG_FILE,
|
35
|
-
exception_reporter: nil
|
36
|
-
)
|
37
|
-
end
|
19
|
+
Config = CLI::Kit::Config.new(tool_name: TOOL_NAME)
|
20
|
+
Command = CLI::Kit::BaseCommand
|
21
|
+
|
22
|
+
Executor = CLI::Kit::Executor.new(log_file: LOG_FILE)
|
23
|
+
Resolver = CLI::Kit::Resolver.new(
|
24
|
+
tool_name: TOOL_NAME,
|
25
|
+
command_registry: Gorails::Commands::Registry
|
26
|
+
)
|
27
|
+
|
28
|
+
ErrorHandler = CLI::Kit::ErrorHandler.new(log_file: LOG_FILE)
|
38
29
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
635eab627526f34c7ce15d2c894633246493b1a4
|