rapp 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rapp/builder.rb +1 -5
- data/lib/rapp/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73e9abf5c8f9d574aead36787b16b0dc3fdab168
|
4
|
+
data.tar.gz: b4dcad3ea8bd4e9b36b9aa67b9b575374343fa4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d83da45f2c2675d93b3de934bf653b0c6666a2fb307807f01e744c640aa567d2d7ede0ef12e751cf4541b1ab257af906d751291738c6914b9145bdfdfaf5eae2
|
7
|
+
data.tar.gz: ccb2b464c2d428b38719b26b2f3ee8e8f809f17a254f0a9dfaa114550077e8ea7c132baf9407bf643bd9cf5e3b54ab7afe44649342f20d9f461ad4684f2a6e06
|
data/lib/rapp/builder.rb
CHANGED
@@ -49,7 +49,7 @@ module Rapp
|
|
49
49
|
|
50
50
|
# Skip spec dirs unless they said they wanted it
|
51
51
|
# My intention here is to use "or" specifically, because it does not short-circuit. The second check is very important
|
52
|
-
Dir["#{template_root}/**/*"].reject { |p|
|
52
|
+
Dir["#{template_root}/**/*"].reject { |p| File.directory? p or p.include?('spec') }.each do |template|
|
53
53
|
template_data = File.read(template)
|
54
54
|
relative_name = template.split("templates/")[1][0..-5]
|
55
55
|
# Hack to make the entry point ruby file share the same name as the app
|
@@ -77,11 +77,8 @@ module Rapp
|
|
77
77
|
|
78
78
|
# Create the directory structrue
|
79
79
|
SpecStructure.each do |dir|
|
80
|
-
puts "dir is #{dir}"
|
81
80
|
name = dir.gsub!('app_name', app_name) if dir.include?("app_name")
|
82
|
-
puts "name is #{name}"
|
83
81
|
dir_name = "#{root_dir}/#{name}"
|
84
|
-
#puts "dirname #{dir_name}"
|
85
82
|
FileUtils.mkdir_p(dir_name) unless File.directory?(dir_name)
|
86
83
|
end
|
87
84
|
|
@@ -97,7 +94,6 @@ module Rapp
|
|
97
94
|
template_data = File.read(template)
|
98
95
|
relative_name = template.split("templates/")[1][0..-5]
|
99
96
|
relative_name = relative_name.gsub!('app_name', app_name) if relative_name.include?("app_name")
|
100
|
-
puts "template #{template} rel path #{relative_name}"
|
101
97
|
result = ERB.new(template_data).result(template_binding.instance_eval {binding})
|
102
98
|
File.write("#{root_dir}/#{relative_name}", result)
|
103
99
|
end
|
data/lib/rapp/version.rb
CHANGED