dice_bag 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
data/lib/dice_bag/project.rb
CHANGED
@@ -10,40 +10,15 @@ module DiceBag
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def self.config_files(filename)
|
13
|
-
File.join(self.root,
|
14
|
-
end
|
15
|
-
|
16
|
-
# dotNet apps do not have the templates in config/ but in the root of the project
|
17
|
-
# TODO: detect dotNet instead of detecting rails
|
18
|
-
def self.config_dir
|
19
|
-
defined?(Rails) ? 'config' : "."
|
13
|
+
File.join(self.root, filename)
|
20
14
|
end
|
21
15
|
|
22
16
|
def self.root
|
23
17
|
Dir.pwd
|
24
18
|
end
|
25
19
|
|
26
|
-
#local templates always takes preference over generated templates
|
27
20
|
def self.templates_to_generate
|
28
|
-
|
29
|
-
|
30
|
-
# The following ways of identifying template files will be removed prior
|
31
|
-
# to v1.
|
32
|
-
generated_templates = Dir[Project.config_files("**/*.erb")]
|
33
|
-
custom_templates = Dir[Project.config_files("**/*.erb.local")]
|
34
|
-
dotNetTemplates = Dir[Project.config_files("**/*.config.template")]
|
35
|
-
|
36
|
-
legacy_files = generated_templates + custom_templates + dotNetTemplates
|
37
|
-
legacy_files.each do |file|
|
38
|
-
$stderr.puts "DEPRECATION WARNING: Use '.dice' file extension instead for '#{file}'"
|
39
|
-
end
|
40
|
-
|
41
|
-
all_files = legacy_files + dice_templates
|
42
|
-
|
43
|
-
cleaned_templates = all_files.delete_if {|file| custom_templates.include?(file + '.local')}
|
44
|
-
dotNetTemplates = dotNetTemplates.delete_if {|file| file.include?("/bin/")}
|
45
|
-
(cleaned_templates + dotNetTemplates).map { |template| File.basename(template) }
|
21
|
+
Dir['**/*.dice']
|
46
22
|
end
|
47
|
-
|
48
23
|
end
|
49
24
|
end
|
data/lib/dice_bag/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dice_bag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,22 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-03-25 00:00:00.000000000Z
|
14
14
|
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rake
|
17
|
+
requirement: &71579610 !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: *71579610
|
15
26
|
- !ruby/object:Gem::Dependency
|
16
27
|
name: aruba
|
17
|
-
requirement: &
|
28
|
+
requirement: &71579360 !ruby/object:Gem::Requirement
|
18
29
|
none: false
|
19
30
|
requirements:
|
20
31
|
- - ~>
|
@@ -22,10 +33,10 @@ dependencies:
|
|
22
33
|
version: 0.5.1
|
23
34
|
type: :development
|
24
35
|
prerelease: false
|
25
|
-
version_requirements: *
|
36
|
+
version_requirements: *71579360
|
26
37
|
- !ruby/object:Gem::Dependency
|
27
38
|
name: rspec
|
28
|
-
requirement: &
|
39
|
+
requirement: &71579110 !ruby/object:Gem::Requirement
|
29
40
|
none: false
|
30
41
|
requirements:
|
31
42
|
- - ~>
|
@@ -33,7 +44,7 @@ dependencies:
|
|
33
44
|
version: '2.12'
|
34
45
|
type: :development
|
35
46
|
prerelease: false
|
36
|
-
version_requirements: *
|
47
|
+
version_requirements: *71579110
|
37
48
|
description:
|
38
49
|
email:
|
39
50
|
- asmith@mdsol.com
|