rbcli 0.4.2 → 0.4.3
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/VERSION +1 -1
- data/exe/rbcli +6 -5
- data/lib/rbcli/components/logger/logger.rb +2 -1
- data/lib/rbcli/util/string_compression.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4add8447859e80f6c1d2910502a78a4911c019c4af21401209a8d47a599542c6
|
4
|
+
data.tar.gz: '03093dd355b1de99102263e30748d4ab974da53feb7076db65476520692f51e4'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e5e246e1ff008da76b399fb252f847ee60241500467a82bf762c5880e1847030ccbad6c00a9bd47c7f0f4b172c455cd1ead9968f77827fd0875d81f1530b867
|
7
|
+
data.tar.gz: d7bc977ee1e2e1b384f1808467a03d75c93eb9e7577ee2406a9ce89c214a40e5c71bdcbb1347ceafe836ad78138a8e27fc30cced89f19199cb886761a2e364b9
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.3
|
data/exe/rbcli
CHANGED
@@ -35,7 +35,7 @@ end
|
|
35
35
|
|
36
36
|
Rbcli.command "portable" do
|
37
37
|
description 'Creates a portable Rbcli executable'
|
38
|
-
usage "(--(
|
38
|
+
usage "(--(a)nnotate|--use-(b)undler|--(f)orce) <application_name>"
|
39
39
|
helptext <<~HELPTEXT
|
40
40
|
This will initialize a portable Rbcli project in the current directory.
|
41
41
|
|
@@ -72,7 +72,7 @@ end
|
|
72
72
|
|
73
73
|
Rbcli.command "gem" do
|
74
74
|
description 'Creates an full Rbcli-based gem project'
|
75
|
-
usage "(--(f)orce) <application_name>"
|
75
|
+
usage "(--(a)nnotate|--(f)orce) <application_name>"
|
76
76
|
helptext <<~HELPTEXT
|
77
77
|
This will initialize an complete Rbcli project in the current directory.
|
78
78
|
|
@@ -84,6 +84,7 @@ Rbcli.command "gem" do
|
|
84
84
|
If you'd prefer a single-file executable script, run `rbcli portable --help` for more information.
|
85
85
|
HELPTEXT
|
86
86
|
|
87
|
+
parameter :annotate, "Add annotations and examples for a more guided build"
|
87
88
|
parameter :force, "Overwrite files without prompting"
|
88
89
|
|
89
90
|
action do |opts, params, args, config, env|
|
@@ -94,9 +95,9 @@ Rbcli.command "gem" do
|
|
94
95
|
end
|
95
96
|
vars = {
|
96
97
|
appname: args.first,
|
97
|
-
use_bundler:
|
98
|
+
use_bundler: false,
|
98
99
|
development: env[:development],
|
99
|
-
showdocs: params[:
|
100
|
+
showdocs: params[:annotate]
|
100
101
|
}
|
101
102
|
project_dir = File.join(Dir.getwd, vars[:appname])
|
102
103
|
config_dir = File.join(project_dir, 'lib', 'config')
|
@@ -121,7 +122,7 @@ Rbcli.command "gem" do
|
|
121
122
|
Rbcli.log.info "Running bundler gem", 'TOOL'
|
122
123
|
`bundle gem --exe --coc #{vars[:appname]}`
|
123
124
|
Rbcli.log.debug "Creating Rbcli project identifier", 'TOOL'
|
124
|
-
FileUtils.touch(File.join(project_dir
|
125
|
+
FileUtils.touch(File.join(project_dir, '.rbcli'))
|
125
126
|
Rbcli.log.debug "Creating additional directories", 'TOOL'
|
126
127
|
[config_dir, command_dir, scripts_dir].each { |dir| FileUtils.mkdir_p(dir) }
|
127
128
|
FileUtils.touch(File.join(scripts_dir, '.keep'))
|
@@ -89,8 +89,9 @@ class Rbcli::Logger
|
|
89
89
|
self.add(Logger::ERROR, message, progname, &block)
|
90
90
|
end
|
91
91
|
|
92
|
-
def fatal message, progname = nil, &block
|
92
|
+
def fatal message, progname = nil, exit_status: nil, &block
|
93
93
|
self.add(Logger::FATAL, message, progname, &block)
|
94
|
+
Rbcli.exit(exit_status) unless exit_status.nil?
|
94
95
|
end
|
95
96
|
|
96
97
|
def unknown message, progname = nil, &block
|
@@ -6,5 +6,5 @@
|
|
6
6
|
require 'base64'
|
7
7
|
require 'zlib'
|
8
8
|
|
9
|
-
String.instance_eval { define_method(:compress) { Base64.
|
10
|
-
String.instance_eval { define_method(:decompress) { Zlib::Inflate.inflate(Base64.
|
9
|
+
String.instance_eval { define_method(:compress) { Base64.strict_encode64(Zlib::Deflate.deflate(self)) } }
|
10
|
+
String.instance_eval { define_method(:decompress) { Zlib::Inflate.inflate(Base64.strict_decode64(self)) } }
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbcli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Khoury
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: rake
|
@@ -276,7 +276,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
276
276
|
- !ruby/object:Gem::Version
|
277
277
|
version: '0'
|
278
278
|
requirements: []
|
279
|
-
rubygems_version: 3.6.
|
279
|
+
rubygems_version: 3.6.9
|
280
280
|
specification_version: 4
|
281
281
|
summary: A CLI Application/Tooling Framework for Ruby
|
282
282
|
test_files: []
|