buildless-app 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/buildless/version.rb +1 -1
- data/lib/buildless-app.rb +10 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e37691927afe6386fbbe83ce9e479ff306106f16af92eef485acf5b7c39f791
|
4
|
+
data.tar.gz: a01031d0bf2835bcfc974184527a3c4d715b1c1753ff1167ab72d3b51dd716a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86f1056a239d782c8e069f66db52b0de67260d70721861b88f604102755ebca9f7a8118e18b26f717446ef33ab95d1fe2970fac16a1be5d46d9c99976c88b076
|
7
|
+
data.tar.gz: 3863c1f95ead8c3f5cfb53e285586951b4b073c58071b4d56d275bdd991553596cd3871a90a1aeda76dc500961f3598409a0499da8991f0480f146b8b4d72fa8
|
data/lib/buildless/version.rb
CHANGED
data/lib/buildless-app.rb
CHANGED
@@ -15,6 +15,7 @@ module Buildless
|
|
15
15
|
def apply(template)
|
16
16
|
verify_rails_installation
|
17
17
|
generate_project(template)
|
18
|
+
generate_files(template['files'])
|
18
19
|
end
|
19
20
|
|
20
21
|
private
|
@@ -30,5 +31,14 @@ module Buildless
|
|
30
31
|
|
31
32
|
Dir.chdir(template['name'])
|
32
33
|
end
|
34
|
+
|
35
|
+
def generate_files(files)
|
36
|
+
files.each do |file|
|
37
|
+
puts "-> \e[1;32;49mCreate\e[0m #{file['file_path']}"
|
38
|
+
file_path = File.join(Dir.pwd, file['file_path'])
|
39
|
+
FileUtils.mkdir_p(File.dirname(file_path))
|
40
|
+
File.write(file_path, file['content'])
|
41
|
+
end
|
42
|
+
end
|
33
43
|
end
|
34
44
|
end
|