hoodie 0.2.9 → 0.3.1
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/hoodie/rash.rb +13 -21
- data/lib/hoodie/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c75473209ad451c48645c1497a50544e6255f180
|
|
4
|
+
data.tar.gz: 9a5a69aef6017aa8eee8215980c5ff324238d56d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 74cc2321a5fad2e06c4171a4053ada32eae4e0306d4a60d375a531e8de00e9af5048367d308a6ddba42348298523fd1ec40f3d4854524b640f6cca3fd7c7f677
|
|
7
|
+
data.tar.gz: f439b63e3b335496a0f43e69e64100684023cf9d519c765776e84c9f365e33c60a586c883c1c0d0f4334c13f390a4b3388ee6ce20ce544409bc6257d86111fc5
|
data/lib/hoodie/rash.rb
CHANGED
|
@@ -24,9 +24,16 @@ require 'hoodie/memoizable' unless defined?(Memoizable)
|
|
|
24
24
|
class Rash
|
|
25
25
|
include Memoizable
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
# Initializes a new store object.
|
|
28
|
+
#
|
|
29
|
+
# @param data [Hash] (optional) data to load into the stash.
|
|
30
|
+
#
|
|
31
|
+
# @return nothing.
|
|
32
|
+
#
|
|
33
|
+
def initialize(url, path)
|
|
34
|
+
@url = url
|
|
35
|
+
@path = path
|
|
36
|
+
memoize [:fetch], Stash.new(DiskStash::Cache.new)
|
|
30
37
|
@store ||= fetch
|
|
31
38
|
end
|
|
32
39
|
|
|
@@ -58,29 +65,14 @@ class Rash
|
|
|
58
65
|
|
|
59
66
|
private # P R O P R I E T À P R I V A T A Vietato L'accesso
|
|
60
67
|
|
|
61
|
-
#
|
|
62
|
-
#
|
|
63
|
-
# @return [String] partial path to file repo
|
|
64
|
-
#
|
|
65
|
-
def version_path
|
|
66
|
-
win_version = Chef::ReservedNames::Win32::Version.new
|
|
67
|
-
version_path = case # Targeted platform path
|
|
68
|
-
when win_version.windows_server_2008? then @node[:winini][:w2k8_package_path]
|
|
69
|
-
when win_version.windows_server_2008_r2? then @node[:winini][:w2k8r2_package_path]
|
|
70
|
-
when win_version.windows_server_2012_r2? then @node[:winini][:w2k12r2_package_path]
|
|
71
|
-
else Chef::Log.warn 'This is not a supported Windows platform.'
|
|
72
|
-
end
|
|
73
|
-
version_path
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
# Creates or retrieves the rash key/value store for the node
|
|
68
|
+
# Loads a rash hash of data into the rash or create a new one.
|
|
77
69
|
#
|
|
78
|
-
# @return nothing
|
|
70
|
+
# @return nothing.
|
|
79
71
|
#
|
|
80
72
|
def fetch
|
|
81
73
|
results = []
|
|
82
74
|
Anemone.crawl(@url, discard_page_bodies: true) do |anemone|
|
|
83
|
-
anemone.on_pages_like(/\/#{
|
|
75
|
+
anemone.on_pages_like(/\/#{@path}\/\w+\/\w+\.(ini|zip)$/i) do |page|
|
|
84
76
|
results << page.to_hash
|
|
85
77
|
end
|
|
86
78
|
end
|
data/lib/hoodie/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hoodie
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stefano Harding
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-09-
|
|
11
|
+
date: 2014-09-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: anemone
|