bookbindery 8.5.0 → 9.0.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/bookbinder.gemspec +1 -1
- data/lib/bookbinder/cli.rb +36 -55
- data/lib/bookbinder/commands/bind.rb +3 -19
- data/lib/bookbinder/commands/collection.rb +33 -73
- data/lib/bookbinder/commands/components/command_options.rb +3 -22
- data/lib/bookbinder/commands/generate.rb +0 -11
- data/lib/bookbinder/commands/imprint.rb +3 -10
- data/lib/bookbinder/commands/punch.rb +0 -11
- data/lib/bookbinder/commands/update_local_doc_repos.rb +1 -9
- data/lib/bookbinder/commands/watch.rb +1 -10
- data/lib/bookbinder/config/fetcher.rb +2 -18
- data/lib/bookbinder/preprocessing/dita_html_preprocessor.rb +3 -6
- data/lib/bookbinder/preprocessing/dita_pdf_preprocessor.rb +3 -5
- data/lib/bookbinder/terminal.rb +0 -1
- metadata +3 -31
- data/lib/bookbinder/cf_command_runner.rb +0 -123
- data/lib/bookbinder/command_runner.rb +0 -23
- data/lib/bookbinder/command_validator.rb +0 -51
- data/lib/bookbinder/commands/build_and_push_tarball.rb +0 -38
- data/lib/bookbinder/commands/chain.rb +0 -11
- data/lib/bookbinder/commands/help.rb +0 -70
- data/lib/bookbinder/commands/naming.rb +0 -29
- data/lib/bookbinder/commands/push_from_local.rb +0 -132
- data/lib/bookbinder/commands/push_to_prod.rb +0 -66
- data/lib/bookbinder/commands/run_publish_ci.rb +0 -37
- data/lib/bookbinder/commands/version.rb +0 -29
- data/lib/bookbinder/config/aws_credentials.rb +0 -21
- data/lib/bookbinder/config/cf_credentials.rb +0 -62
- data/lib/bookbinder/config/remote_yaml_credential_provider.rb +0 -22
- data/lib/bookbinder/deploy/app_fetcher.rb +0 -36
- data/lib/bookbinder/deploy/archive.rb +0 -102
- data/lib/bookbinder/deploy/artifact.rb +0 -26
- data/lib/bookbinder/deploy/blue_green_app.rb +0 -29
- data/lib/bookbinder/deploy/cf_routes.rb +0 -32
- data/lib/bookbinder/deploy/deployment.rb +0 -55
- data/lib/bookbinder/deploy/distributor.rb +0 -76
- data/lib/bookbinder/deploy/failure.rb +0 -15
- data/lib/bookbinder/deploy/pusher.rb +0 -34
- data/lib/bookbinder/deploy/success.rb +0 -16
- data/lib/bookbinder/deprecated_logger.rb +0 -33
- data/lib/bookbinder/errors/cli_error.rb +0 -6
- data/lib/bookbinder/legacy/cli.rb +0 -71
- data/lib/bookbinder/preprocessing/dita_preprocessor.rb +0 -17
@@ -1,33 +0,0 @@
|
|
1
|
-
require 'ansi'
|
2
|
-
|
3
|
-
class String
|
4
|
-
include ANSI::Mixin
|
5
|
-
end
|
6
|
-
|
7
|
-
module Bookbinder
|
8
|
-
class DeprecatedLogger
|
9
|
-
def log(message)
|
10
|
-
puts message
|
11
|
-
end
|
12
|
-
|
13
|
-
def log_print(message)
|
14
|
-
print message
|
15
|
-
end
|
16
|
-
|
17
|
-
def error(message)
|
18
|
-
puts message.red
|
19
|
-
end
|
20
|
-
|
21
|
-
def success(message)
|
22
|
-
puts message.green
|
23
|
-
end
|
24
|
-
|
25
|
-
def warn(message)
|
26
|
-
puts message.yellow
|
27
|
-
end
|
28
|
-
|
29
|
-
def notify(message)
|
30
|
-
puts message.blue
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
@@ -1,71 +0,0 @@
|
|
1
|
-
require_relative '../command_runner'
|
2
|
-
require_relative '../command_validator'
|
3
|
-
require_relative '../commands/collection'
|
4
|
-
require_relative '../config/cf_credentials'
|
5
|
-
require_relative '../streams/colorized_stream'
|
6
|
-
require_relative '../terminal'
|
7
|
-
|
8
|
-
module Bookbinder
|
9
|
-
module Legacy
|
10
|
-
class Cli
|
11
|
-
def initialize(version_control_system)
|
12
|
-
@version_control_system = version_control_system
|
13
|
-
end
|
14
|
-
|
15
|
-
def run(args)
|
16
|
-
command_name, *command_arguments = args
|
17
|
-
|
18
|
-
logger = DeprecatedLogger.new
|
19
|
-
commands = Commands::Collection.new(
|
20
|
-
logger,
|
21
|
-
colorized_streams,
|
22
|
-
version_control_system
|
23
|
-
)
|
24
|
-
|
25
|
-
command_validator = CommandValidator.new(commands, commands.help.usage_message)
|
26
|
-
command_runner = CommandRunner.new(logger, commands)
|
27
|
-
command_name = command_name ? command_name : '--help'
|
28
|
-
|
29
|
-
colorizer = Colorizer.new
|
30
|
-
terminal = Terminal.new(colorizer)
|
31
|
-
|
32
|
-
user_message = command_validator.validate(command_name)
|
33
|
-
terminal.update(user_message)
|
34
|
-
|
35
|
-
if user_message.error?
|
36
|
-
return 1
|
37
|
-
end
|
38
|
-
|
39
|
-
begin
|
40
|
-
command_runner.run(command_name, command_arguments)
|
41
|
-
|
42
|
-
rescue Config::CfCredentials::CredentialKeyError => e
|
43
|
-
colorized_streams[:err].puts "#{e.message}, in credentials.yml"
|
44
|
-
1
|
45
|
-
rescue KeyError => e
|
46
|
-
colorized_streams[:err].puts "#{e.message} from your configuration."
|
47
|
-
1
|
48
|
-
rescue CliError::UnknownCommand => e
|
49
|
-
colorized_streams[:out].puts e.message
|
50
|
-
1
|
51
|
-
rescue RuntimeError => e
|
52
|
-
colorized_streams[:err].puts e.message
|
53
|
-
1
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
private
|
58
|
-
|
59
|
-
attr_reader :version_control_system
|
60
|
-
|
61
|
-
def colorized_streams
|
62
|
-
{
|
63
|
-
err: Streams::ColorizedStream.new(Colorizer::Colors.red, $stderr),
|
64
|
-
out: $stdout,
|
65
|
-
success: Streams::ColorizedStream.new(Colorizer::Colors.green, $stdout),
|
66
|
-
warn: Streams::ColorizedStream.new(Colorizer::Colors.yellow, $stdout),
|
67
|
-
}
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
module Bookbinder
|
2
|
-
module Preprocessing
|
3
|
-
class DitaPreprocessor
|
4
|
-
|
5
|
-
protected
|
6
|
-
|
7
|
-
def dita_flags(opts)
|
8
|
-
matching_flags = opts.map {|o| o[flag_value_regex("dita-flags"), 1] }
|
9
|
-
matching_flags.compact.first
|
10
|
-
end
|
11
|
-
|
12
|
-
def flag_value_regex(flag_name)
|
13
|
-
Regexp.new(/--#{flag_name}="(.+)"/)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|