captify 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/captify.gemspec +2 -2
- data/lib/captify/template.rb +8 -6
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/captify.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "captify"
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Huiming Teo"]
|
12
|
-
s.date = "2012-06-
|
12
|
+
s.date = "2012-06-11"
|
13
13
|
s.description = "Capistrano capify with canned templates."
|
14
14
|
s.email = "teohuiming@gmail.com"
|
15
15
|
s.executables = ["captify"]
|
data/lib/captify/template.rb
CHANGED
@@ -1,11 +1,9 @@
|
|
1
1
|
module Captify
|
2
2
|
class Template
|
3
|
-
|
4
3
|
def self.load_all
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
end
|
4
|
+
Gem.find_files('captify_template').each do |path|
|
5
|
+
load path if File.exist? path
|
6
|
+
end
|
9
7
|
end
|
10
8
|
|
11
9
|
def self.template_files(template_name)
|
@@ -23,7 +21,11 @@ module Captify
|
|
23
21
|
@@templates ||= {}
|
24
22
|
dirs.each do |dir|
|
25
23
|
name, files = extract_template_name_and_files dir
|
26
|
-
@@templates[name]
|
24
|
+
if @@templates[name].nil?
|
25
|
+
@@templates[name] = files
|
26
|
+
else
|
27
|
+
puts "[captify] warn: template `#{name}' already loaded, ignore `#{file_path}'"
|
28
|
+
end
|
27
29
|
end
|
28
30
|
end
|
29
31
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: captify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|
@@ -109,7 +109,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
109
109
|
version: '0'
|
110
110
|
segments:
|
111
111
|
- 0
|
112
|
-
hash: -
|
112
|
+
hash: -4468582315802394336
|
113
113
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
114
|
none: false
|
115
115
|
requirements:
|