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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a17ef6c2aaa7cc1e8c0c6ca0849876cc5312d7696ee8801e4bfe08922c65d02
4
- data.tar.gz: b7883b1ec3992ca998de9346bc31e7a7e6d8288546d243600db18eeacbe8e5bd
3
+ metadata.gz: 783aa6df16e4efc5d2906947b27ec7de5be91f47a81763209ecae28a978a7402
4
+ data.tar.gz: 93bb2d5e1eacc91a48d10e10576e3a6f9d41e14445ec827b32cb0b9220cea305
5
5
  SHA512:
6
- metadata.gz: 54cf9ba6cc10f4a29dd745187bf6b788e47efc5033f5ff98a8cf319186dce026f7a698d4ed12389c5b8a9191fff73afaf1b302fe32053079148bc205a29eb67f
7
- data.tar.gz: f764535a632957d3e16aa6d07c97cd38847ca944b588672d505cfea782b02a3dc5866da76151ff2410f1e31be05cfb9eb27d068784cde6281bd524071d16622b
6
+ metadata.gz: acdda79da630cab079ff38d705344c52d7ecee2f872fb845b189f625005c3f2cf8c96be19488430a30222f5d9dd59311c70231d1a0b3cbfe700ee303eb18c972
7
+ data.tar.gz: 2d532fa31ad34a873ce1c42273a27a6fdabe420ade05ad2d651cf0c941add08ca83552ddc69358180c36d0377e774c3b14ce3e9ef6538e626468666aac6d55a9
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Buildless
4
- VERSION = '0.0.2'
4
+ VERSION = '0.0.3'
5
5
  RAILS_VERSION = '7.1.3.2'
6
6
  end
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buildless-app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paweł Dąbrowski