foreman_templates 1.3.2 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/foreman_templates/engine.rb +5 -0
- data/lib/foreman_templates/version.rb +1 -1
- data/lib/templates.rake +3 -3
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c88da13b131f090eecf394afa3476bc1ea4a741
|
4
|
+
data.tar.gz: a94453ad5d7b5bfd93af2f682b23b017f31ac736
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d225ed09a20895ed2f4266788fabe274a33e9b4796dd9e59ae44ba28ae92d8ecda51fae819eee908d408caad65322ee7462a09f5cc5347519d6408a178d682d2
|
7
|
+
data.tar.gz: 8dbcc358c09dae4602088c2238f9ce8ffc07d150b4cac374d47b5c45690784cf74a1d8354eaae8c13e2f6eb3fc44b3d884477df4e7465a21db1d8fdb6731031e
|
@@ -5,6 +5,11 @@ module ForemanTemplates
|
|
5
5
|
#Thus, inhereits from ::Rails::Engine and not from Rails::Engine
|
6
6
|
class Engine < ::Rails::Engine
|
7
7
|
|
8
|
+
initializer 'foreman_templates.register_plugin', :after=> :finisher_hook do |app|
|
9
|
+
Foreman::Plugin.register :foreman_templates do
|
10
|
+
end if (Rails.env == "development" or defined? Foreman::Plugin)
|
11
|
+
end
|
12
|
+
|
8
13
|
rake_tasks do
|
9
14
|
load "templates.rake"
|
10
15
|
end
|
data/lib/templates.rake
CHANGED
@@ -10,7 +10,7 @@ end
|
|
10
10
|
|
11
11
|
def metadata(text)
|
12
12
|
# Pull out the first erb comment only - /m is for a multiline regex
|
13
|
-
extracted = text.match(/<%\#(.+?)
|
13
|
+
extracted = text.match(/<%\#(.+?).-?%>/m)
|
14
14
|
extracted == nil ? {} : YAML.load(extracted[1])
|
15
15
|
end
|
16
16
|
|
@@ -134,6 +134,8 @@ namespace :templates do
|
|
134
134
|
# Build a list of ERB files to parse
|
135
135
|
Dir["#{dir}#{dirname}/**/*.erb"].each do |template|
|
136
136
|
@text = File.read(template)
|
137
|
+
puts "Parsing: " + template.gsub(/#{dir}#{dirname}/,'') if @verbose
|
138
|
+
|
137
139
|
@metadata = metadata(@text)
|
138
140
|
|
139
141
|
# Get the name and filter
|
@@ -143,8 +145,6 @@ namespace :templates do
|
|
143
145
|
@name = [prefix, @name].compact.join(' ')
|
144
146
|
next if filter and not @name.match(/#{filter}/i)
|
145
147
|
|
146
|
-
puts "Parsing: " + template.gsub(/#{dir}#{dirname}/,'') if @verbose
|
147
|
-
|
148
148
|
unless @metadata['kind']
|
149
149
|
puts " Error: Must specify template kind"
|
150
150
|
next
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_templates
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Sutcliffe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: diffy
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
description: Engine to sychronise provisioning templates from GitHub
|
@@ -32,13 +32,13 @@ extra_rdoc_files:
|
|
32
32
|
- LICENSE
|
33
33
|
- README.md
|
34
34
|
files:
|
35
|
+
- LICENSE
|
36
|
+
- README.md
|
37
|
+
- Rakefile
|
35
38
|
- lib/foreman_templates.rb
|
36
|
-
- lib/templates.rake
|
37
39
|
- lib/foreman_templates/engine.rb
|
38
40
|
- lib/foreman_templates/version.rb
|
39
|
-
-
|
40
|
-
- Rakefile
|
41
|
-
- README.md
|
41
|
+
- lib/templates.rake
|
42
42
|
homepage: http://github.com/theforeman/foreman_templates
|
43
43
|
licenses:
|
44
44
|
- GPL-3
|
@@ -49,17 +49,17 @@ require_paths:
|
|
49
49
|
- lib
|
50
50
|
required_ruby_version: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
|
-
- -
|
57
|
+
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: '0'
|
60
60
|
requirements: []
|
61
61
|
rubyforge_project:
|
62
|
-
rubygems_version: 2.0
|
62
|
+
rubygems_version: 2.2.0
|
63
63
|
signing_key:
|
64
64
|
specification_version: 4
|
65
65
|
summary: Template-syncing engine for Foreman
|