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.
- checksums.yaml +4 -4
- data/lib/chef_cached_app_info.rb +5 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9026c0a669de3f99af7fb58a77e8d2364306dfe7c106c6459c1a21a1929a7e31
|
4
|
+
data.tar.gz: 184a259dab8f6adc534fd7c0f327601372e468c9a78c735c1ff3071fe3f674fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30ef41657476387a8ba5a83968da7f8ac433ae5917f5b6fc3ca3c2e63f2703485ef0e1362f25e9851e7145a450070532b4c2c7b804d8dcba4e10b86729d2b26b
|
7
|
+
data.tar.gz: faebd7ee068fca4485064683e9844902d449677f673d3e0445e0bf75463fa376e263f1e7fd8fadf75a671e576524d26aab479eabebd7087c68dea9a4a48594e5
|
data/lib/chef_cached_app_info.rb
CHANGED
@@ -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,
|
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.
|
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.
|
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.
|