buildless-app 0.0.2 → 0.0.3
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 +12 -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: 783aa6df16e4efc5d2906947b27ec7de5be91f47a81763209ecae28a978a7402
|
4
|
+
data.tar.gz: 93bb2d5e1eacc91a48d10e10576e3a6f9d41e14445ec827b32cb0b9220cea305
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acdda79da630cab079ff38d705344c52d7ecee2f872fb845b189f625005c3f2cf8c96be19488430a30222f5d9dd59311c70231d1a0b3cbfe700ee303eb18c972
|
7
|
+
data.tar.gz: 2d532fa31ad34a873ce1c42273a27a6fdabe420ade05ad2d651cf0c941add08ca83552ddc69358180c36d0377e774c3b14ce3e9ef6538e626468666aac6d55a9
|
data/lib/buildless/version.rb
CHANGED
data/lib/buildless-app.rb
CHANGED
@@ -15,6 +15,9 @@ module Buildless
|
|
15
15
|
def apply(template)
|
16
16
|
verify_rails_installation
|
17
17
|
generate_project(template)
|
18
|
+
generate_files(template['files'])
|
19
|
+
|
20
|
+
system("cd #{template['name']}")
|
18
21
|
end
|
19
22
|
|
20
23
|
private
|
@@ -30,5 +33,14 @@ module Buildless
|
|
30
33
|
|
31
34
|
Dir.chdir(template['name'])
|
32
35
|
end
|
36
|
+
|
37
|
+
def generate_files(files)
|
38
|
+
files.each do |file|
|
39
|
+
puts "-> \e[1;32;49mCreate\e[0m #{file['file_path']}"
|
40
|
+
file_path = File.join(Dir.pwd, file['file_path'])
|
41
|
+
FileUtils.mkdir_p(File.dirname(file_path))
|
42
|
+
File.write(file_path, file['content'])
|
43
|
+
end
|
44
|
+
end
|
33
45
|
end
|
34
46
|
end
|