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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a17ef6c2aaa7cc1e8c0c6ca0849876cc5312d7696ee8801e4bfe08922c65d02
4
- data.tar.gz: b7883b1ec3992ca998de9346bc31e7a7e6d8288546d243600db18eeacbe8e5bd
3
+ metadata.gz: 6e37691927afe6386fbbe83ce9e479ff306106f16af92eef485acf5b7c39f791
4
+ data.tar.gz: a01031d0bf2835bcfc974184527a3c4d715b1c1753ff1167ab72d3b51dd716a6
5
5
  SHA512:
6
- metadata.gz: 54cf9ba6cc10f4a29dd745187bf6b788e47efc5033f5ff98a8cf319186dce026f7a698d4ed12389c5b8a9191fff73afaf1b302fe32053079148bc205a29eb67f
7
- data.tar.gz: f764535a632957d3e16aa6d07c97cd38847ca944b588672d505cfea782b02a3dc5866da76151ff2410f1e31be05cfb9eb27d068784cde6281bd524071d16622b
6
+ metadata.gz: 86f1056a239d782c8e069f66db52b0de67260d70721861b88f604102755ebca9f7a8118e18b26f717446ef33ab95d1fe2970fac16a1be5d46d9c99976c88b076
7
+ data.tar.gz: 3863c1f95ead8c3f5cfb53e285586951b4b073c58071b4d56d275bdd991553596cd3871a90a1aeda76dc500961f3598409a0499da8991f0480f146b8b4d72fa8
@@ -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.4'
5
5
  RAILS_VERSION = '7.1.3.2'
6
6
  end
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
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.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paweł Dąbrowski