chef_cached_app_info 0.1.0 → 0.2.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/chef_cached_app_info.rb +5 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a47de09c0ed3701cac0e5a1cfb440dc2eb0e289b16bd23ab6d8db5699879740d
4
- data.tar.gz: e11ec18af6793b235e66f8105384b1455182f2747169c4da6a72963c1468337c
3
+ metadata.gz: 9026c0a669de3f99af7fb58a77e8d2364306dfe7c106c6459c1a21a1929a7e31
4
+ data.tar.gz: 184a259dab8f6adc534fd7c0f327601372e468c9a78c735c1ff3071fe3f674fd
5
5
  SHA512:
6
- metadata.gz: 99354cec2b999bd0497634d388a80f90b090e5b9e7d458fb28bcc995794630aa5332b91a4296e1b520b6d3e7478d9d2714003d012cd1d6460efbb8e9ca918b44
7
- data.tar.gz: b4971cae84dd2b5359f78aa6b88fe64893e12808f062ea7142eca41b56095b6fb865ea0a8b6521504856af8d038253f6244fa34b1b667435ba918067626f8ad1
6
+ metadata.gz: 30ef41657476387a8ba5a83968da7f8ac433ae5917f5b6fc3ca3c2e63f2703485ef0e1362f25e9851e7145a450070532b4c2c7b804d8dcba4e10b86729d2b26b
7
+ data.tar.gz: faebd7ee068fca4485064683e9844902d449677f673d3e0445e0bf75463fa376e263f1e7fd8fadf75a671e576524d26aab479eabebd7087c68dea9a4a48594e5
@@ -1,12 +1,13 @@
1
1
  require 'json'
2
2
 
3
3
  class AppCache
4
- def self.at(cookbook_path)
5
- AppCache.new(cookbook_path)
4
+ def self.at(cookbook_path, cache_file = nil)
5
+ AppCache.new(cookbook_path, cache_file)
6
6
  end
7
7
 
8
- def initialize(cookbook_path)
8
+ def initialize(cookbook_path, cache_file = nil)
9
9
  @cookbook_path = cookbook_path
10
+ @cache_file = cache_file.nil? ? 'files/default/app_cache/chef_cached_app_info.json' : cache_file
10
11
  end
11
12
 
12
13
  def cache_versions(origin_file)
@@ -24,7 +25,7 @@ class AppCache
24
25
  end
25
26
 
26
27
  def cached_app_info_file
27
- info_file = File.join(@cookbook_path, 'cached_app_info.json')
28
+ info_file = File.join(@cookbook_path, @cache_file)
28
29
  IO.write(info_file, '{}') unless File.exist?(info_file)
29
30
  info_file
30
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef_cached_app_info
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - foxfire206
@@ -37,7 +37,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
37
37
  version: '0'
38
38
  requirements: []
39
39
  rubyforge_project:
40
- rubygems_version: 2.7.6
40
+ rubygems_version: 2.7.7
41
41
  signing_key:
42
42
  specification_version: 4
43
43
  summary: Cache info for role cookbooks in Chef.