nanoc-cli 4.14.5 → 4.14.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 191078418bfab5fce7b2bb91206535f2de223f38f2fb71ecc2da1ef99ccb087d
4
- data.tar.gz: c154a3b129f2f0035d91dda1084793ad057ba9f6fe74fb9c59c6ecf53dd52b47
3
+ metadata.gz: b7e78bf8fdec42df624c8cc9c3fd3611ddb3a19e9d2807d989ac9b59144a3d06
4
+ data.tar.gz: 060d23ac565f5250a60b7cc59fcd0cd77e628af07a8a64023fff0f9f35d23f96
5
5
  SHA512:
6
- metadata.gz: 1aa93f5abe00967b08f362abb27a7545a359f22f897e6bfcf3c3d490cacd1cb52a9f6c07560d2fd50b420a2f3bc2bc2420d3313660c982ed61446584f186fa0a
7
- data.tar.gz: fb09607be4ac2bf5a96b6753e7d5a4d5664fe63c0c00776ee2a744d81c01bcafeef369fff2dcfc95c5b8ca67d36a1624ef8bca939a96870deddacf7ed766af26
6
+ metadata.gz: 2288a826f57548c7ebd4f73e6b054295ced881c976b8ddbe705b4dff16280ca3c1511c58941e3a785a118f7ebc78e7959083eed05a8725c354e63008427c6f46
7
+ data.tar.gz: 0407f1da3ddad9047dfcc5df09edc3bac25f991e9ae290b097871789ef0609b2b6969c7febed8fb2c7fbab0da016d17e616e648a7da05aacc8c62ad7424497ee
@@ -40,7 +40,7 @@ module Nanoc
40
40
  # @return [String] A string colorized using the given attributes
41
41
  def c(str, *attrs)
42
42
  if enabled?
43
- attrs.map { |a| MAPPING[a] }.join('') + str + CLEAR
43
+ attrs.map { |a| MAPPING[a] }.join + str + CLEAR
44
44
  else
45
45
  str
46
46
  end
@@ -18,7 +18,7 @@ module Nanoc::CLI::Commands
18
18
  end
19
19
  end
20
20
 
21
- DEFAULT_GEMFILE = <<~EOS unless defined? DEFAULT_GEMFILE
21
+ DEFAULT_GEMFILE = <<~EOS.freeze unless defined? DEFAULT_GEMFILE
22
22
  # frozen_string_literal: true
23
23
 
24
24
  source 'https://rubygems.org'
@@ -26,7 +26,7 @@ module Nanoc::CLI::Commands
26
26
  gem 'nanoc', '~> #{Nanoc::CLI::VERSION.split('.').take(2).join('.')}'
27
27
  EOS
28
28
 
29
- DEFAULT_CONFIG = <<~EOS unless defined? DEFAULT_CONFIG
29
+ DEFAULT_CONFIG = <<~EOS.freeze unless defined? DEFAULT_CONFIG
30
30
  # A list of file extensions that Nanoc will consider to be textual rather than
31
31
  # binary. If an item with an extension not in this list is found, the file
32
32
  # will be considered as binary.
@@ -46,14 +46,14 @@ module Nanoc::CLI::Commands
46
46
  return
47
47
  rescue LoadError
48
48
  $stderr.puts "Could not find the required 'adsf' gem, " \
49
- 'which is necessary for the view command.'
49
+ 'which is necessary for the view command.'
50
50
  end
51
51
 
52
52
  # Check asdf
53
53
  begin
54
54
  require 'asdf'
55
55
  $stderr.puts "You appear to have 'asdf' installed, " \
56
- "but not 'adsf'. Please install 'adsf' (check the spelling)!"
56
+ "but not 'adsf'. Please install 'adsf' (check the spelling)!"
57
57
  rescue LoadError
58
58
  end
59
59
 
@@ -243,8 +243,8 @@ module Nanoc::CLI
243
243
  when RuntimeError
244
244
  if /^can't modify frozen/.match?(error.message)
245
245
  'You attempted to modify immutable data. Some data cannot ' \
246
- 'be modified once compilation has started. Such data includes ' \
247
- 'content and attributes of items and layouts, and filter arguments.'
246
+ 'be modified once compilation has started. Such data includes ' \
247
+ 'content and attributes of items and layouts, and filter arguments.'
248
248
  end
249
249
  when Errno::EADDRINUSE
250
250
  'There already is a server running. Either shut down that one, or ' \
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Nanoc
4
4
  module CLI
5
- VERSION = '4.14.5'
5
+ VERSION = '4.14.6'
6
6
  end
7
7
  end
data/lib/nanoc/cli.rb CHANGED
@@ -178,7 +178,7 @@ module Nanoc
178
178
  command = Cri::Command.load_file(filename, infer_name: true)
179
179
 
180
180
  # Get supercommand
181
- pieces = filename.gsub(/^#{path}\/|\.rb$/, '').split('/')
181
+ pieces = filename.gsub(%r{^#{path}/|\.rb$}, '').split('/')
182
182
  pieces = pieces[0, pieces.size - 1] || []
183
183
  root = Nanoc::CLI.root_command
184
184
  supercommand = pieces.reduce(root) do |cmd, piece|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanoc-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.14.5
4
+ version: 4.14.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Defreyne
@@ -57,14 +57,14 @@ dependencies:
57
57
  requirements:
58
58
  - - '='
59
59
  - !ruby/object:Gem::Version
60
- version: 4.14.5
60
+ version: 4.14.6
61
61
  type: :runtime
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - '='
66
66
  - !ruby/object:Gem::Version
67
- version: 4.14.5
67
+ version: 4.14.6
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: pry
70
70
  requirement: !ruby/object:Gem::Requirement
@@ -132,7 +132,7 @@ licenses:
132
132
  - MIT
133
133
  metadata:
134
134
  rubygems_mfa_required: 'true'
135
- source_code_uri: https://github.com/nanoc/nanoc/tree/nanoc-cli-v4.14.5/nanoc-cli
135
+ source_code_uri: https://github.com/nanoc/nanoc/tree/nanoc-cli-v4.14.6/nanoc-cli
136
136
  rdoc_options: []
137
137
  require_paths:
138
138
  - lib
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  - !ruby/object:Gem::Version
148
148
  version: '0'
149
149
  requirements: []
150
- rubygems_version: 3.6.9
150
+ rubygems_version: 4.0.3
151
151
  specification_version: 4
152
152
  summary: CLI for Nanoc
153
153
  test_files: []