linecook 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History +4 -0
- data/lib/linecook/cookbook.rb +10 -11
- data/lib/linecook/version.rb +1 -1
- metadata +4 -4
data/History
CHANGED
data/lib/linecook/cookbook.rb
CHANGED
@@ -39,12 +39,12 @@ module Linecook
|
|
39
39
|
GEMS_KEY = 'gems'
|
40
40
|
REWRITE_KEY = 'rewrite'
|
41
41
|
|
42
|
-
PATTERNS =
|
43
|
-
|
44
|
-
'files'
|
45
|
-
'recipes'
|
46
|
-
'templates'
|
47
|
-
|
42
|
+
PATTERNS = [
|
43
|
+
['attributes', '**/*{.rb,.yaml,.yml,.json}', true],
|
44
|
+
['files', '**/*'],
|
45
|
+
['recipes', '**/*.rb', true],
|
46
|
+
['templates', '**/*']
|
47
|
+
]
|
48
48
|
|
49
49
|
attr_reader :project_dir
|
50
50
|
attr_reader :config
|
@@ -104,16 +104,15 @@ module Linecook
|
|
104
104
|
manifest = Hash.new {|hash, key| hash[key] = {} }
|
105
105
|
|
106
106
|
paths.each do |path|
|
107
|
-
PATTERNS.
|
108
|
-
resource_dir = File.expand_path(File.join(path,
|
109
|
-
|
110
|
-
pattern = File.join(resource_dir, "**/*#{extname}")
|
107
|
+
PATTERNS.each do |(type, glob, chomp_extname)|
|
108
|
+
resource_dir = File.expand_path(File.join(path, type), project_dir)
|
109
|
+
pattern = File.join(resource_dir, glob)
|
111
110
|
|
112
111
|
Dir.glob(pattern).each do |full_path|
|
113
112
|
next unless File.file?(full_path)
|
114
113
|
|
115
114
|
name = relative_path(resource_dir, full_path)
|
116
|
-
name.chomp!(extname) if
|
115
|
+
name.chomp!(File.extname(full_path)) if chomp_extname
|
117
116
|
|
118
117
|
manifest[type][name] = full_path
|
119
118
|
end
|
data/lib/linecook/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: linecook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
9
|
+
- 1
|
10
|
+
version: 1.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Simon Chiang
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-05-
|
18
|
+
date: 2011-05-26 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|