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 CHANGED
@@ -1,3 +1,7 @@
1
+ == 1.2.1 2011/05/26
2
+
3
+ * made cookbook pick up alternate attributes files
4
+
1
5
  == 1.2.0 2011/05/23
2
6
 
3
7
  * updated to run on 1.9.2, jruby
@@ -39,12 +39,12 @@ module Linecook
39
39
  GEMS_KEY = 'gems'
40
40
  REWRITE_KEY = 'rewrite'
41
41
 
42
- PATTERNS = {
43
- 'attributes' => ['attributes', '.rb'],
44
- 'files' => ['files'],
45
- 'recipes' => ['recipes', '.rb'],
46
- 'templates' => ['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.each_pair do |type, (dirname, extname)|
108
- resource_dir = File.expand_path(File.join(path, dirname), project_dir)
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 extname
115
+ name.chomp!(File.extname(full_path)) if chomp_extname
117
116
 
118
117
  manifest[type][name] = full_path
119
118
  end
@@ -1,7 +1,7 @@
1
1
  module Linecook
2
2
  MAJOR = 1
3
3
  MINOR = 2
4
- TINY = 0
4
+ TINY = 1
5
5
 
6
6
  VERSION = "#{MAJOR}.#{MINOR}.#{TINY}"
7
7
  WEBSITE = "http://github.com/pinnacol/linecook"
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: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 0
10
- version: 1.2.0
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-23 00:00:00 -06:00
18
+ date: 2011-05-26 00:00:00 -06:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency