hammer_cli 2.3.0 → 2.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96f7adf75924a417c91ebd6a06ffebb31df006263e7c8b756956d8e438bee5f6
4
- data.tar.gz: 3bf87b0c2a7625fe341a5226606755300053f622b9543ee1c34fee2ed9905a35
3
+ metadata.gz: ef5d5eb556461a6873fe0b3b05bcc8a30aea17f88719b3c10c25106c73224884
4
+ data.tar.gz: 564721c9765ccd22b82fee81eea83be8b29da7ee0e415fd492deece64ca55b53
5
5
  SHA512:
6
- metadata.gz: deca360e00c00eda50d96c387f18c47371734b51267c2a4051252b8899c20ef3afb7f769c55a26ff0d0a91af31351f09fc7d6b99333b29275eecb9f8da41c8ad
7
- data.tar.gz: c05d30ecd6439ce5a909d3f2d84f26e78205e82a4f476a035d78970a80f1dc09dc6c39be4b824a8451b47ae0e13baff4f46962a4ec46d48031018ca3ddc7bff5
6
+ metadata.gz: efde2a000ba9e27da2a466496232399da3861bb69705631ca9113ecc88920cc0af9ff344536c858fe4fbb77e60fe886582919885983d03b4235da70b0e80a6dd
7
+ data.tar.gz: a2673ec7bb6c5ed621c7a068e67962fec2c038f99b12abe1f0f19fa85fad3711598aaa3abf52e7896e72db938f74c7726b350e8bebcd5eaf04c6ef02806c96f5
data/bin/hammer-complete CHANGED
@@ -5,9 +5,7 @@ require 'English'
5
5
  $LOAD_PATH.unshift(File.join(@project_root, 'lib'))
6
6
  HAMMER = ENV['HAMMER'] || File.join(@project_root, 'bin/hammer')
7
7
 
8
- require 'yaml'
9
-
10
- completion_cache_file = ENV['HAMMER_COMPLETION_CACHE'] || '~/.cache/hammer_completion.yml'
8
+ completion_cache_file = ENV['HAMMER_COMPLETION_CACHE'] || '~/.cache/hammer_completion.json'
11
9
  completion_cache_file = File.expand_path(completion_cache_file)
12
10
 
13
11
  # build the cache if it does not exist
@@ -45,7 +45,7 @@
45
45
  #:log_pattern: '[%5l %d %c] %m'
46
46
 
47
47
  # Location of cache for bash completion
48
- :completion_cache_file: '~/.cache/hammer_completion.yml'
48
+ :completion_cache_file: '~/.cache/hammer_completion.json'
49
49
 
50
50
  # SSL auth options
51
51
  #:ssl:
data/doc/installation.md CHANGED
@@ -144,7 +144,7 @@ executable specified in `/etc/bash_completion.d/hammer`.
144
144
 
145
145
  Bash completion for hammer needs pre-built cache that holds description of
146
146
  all subcommands and its parameters. The cache is located by default in
147
- `~/.cache/hammer_completion.yml`. The location can be changed in hammer's
147
+ `~/.cache/hammer_completion.json`. The location can be changed in hammer's
148
148
  config file. The cache can be built manually with
149
149
  `hammer prebuild-bash-completion` or is built automatically when completion is
150
150
  used and the cache is missing (this may cause slight delay). The cache expires
data/doc/release_notes.md CHANGED
@@ -1,11 +1,9 @@
1
1
  Release notes
2
2
  =============
3
- ### 2.3.0 (2020-11-03)
4
- * Stop sending empty compute attrs param, [#30815](http://projects.theforeman.org/issues/30815)
5
- * Make fuzzy search work in hammer shell ([PR #335](https://github.com/theforeman/hammer-cli/pull/335)), [#30747](http://projects.theforeman.org/issues/30747)
6
- * Add details to installation from source doc ([PR #334](https://github.com/theforeman/hammer-cli/pull/334)), [#30666](http://projects.theforeman.org/issues/30666)
7
- * Bump to 2.3.0-develop
8
- * Bump to 2.2.0
3
+ ### 2.4.0 (2021-02-01)
4
+ * Expand path for bash completion file, [#30639](http://projects.theforeman.org/issues/30639)
5
+ * Remove release notes written twice
6
+ * Bump to 2.4.0-develop
9
7
 
10
8
  ### 2.3.0 (2020-11-03)
11
9
  * Stop sending empty compute attrs param, [#30815](http://projects.theforeman.org/issues/30815)
@@ -3,10 +3,12 @@ module HammerCLI
3
3
  class PrebuildCompletionCommand < HammerCLI::AbstractCommand
4
4
  def execute
5
5
  map = HammerCLI::MainCommand.completion_map
6
- cache_file = HammerCLI::Settings.get(:completion_cache_file)
6
+ cache_file = File.expand_path(
7
+ HammerCLI::Settings.get(:completion_cache_file)
8
+ )
7
9
  cache_dir = File.dirname(cache_file)
8
10
  FileUtils.mkdir_p(cache_dir) unless File.directory?(cache_dir)
9
- File.write(File.expand_path(cache_file), map.to_json)
11
+ File.write(cache_file, map.to_json)
10
12
 
11
13
  HammerCLI::EX_OK
12
14
  end
@@ -67,7 +67,7 @@ module HammerCLI
67
67
  def self.default_settings
68
68
  {
69
69
  :use_defaults => true,
70
- :completion_cache_file => '~/.cache/hammer_completion.yml'
70
+ :completion_cache_file => '~/.cache/hammer_completion.json'
71
71
  }
72
72
  end
73
73
 
@@ -1,5 +1,5 @@
1
1
  module HammerCLI
2
2
  def self.version
3
- @version ||= Gem::Version.new "2.3.0"
3
+ @version ||= Gem::Version.new "2.4.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hammer_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Bačovský
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-11-03 00:00:00.000000000 Z
12
+ date: 2021-02-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: clamp