buildless-app 0.0.6 → 0.0.7

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: 6ad8d64dfbc8635e93004addff1b880a120a0a52e2f1968da4d920f7a8d92817
4
- data.tar.gz: 18d3a7c60d2ec635c14f04126d4d0fe100c27580ea245aa23966cedee281ac6b
3
+ metadata.gz: f18b8f1feccd2bce59e86c0ea37c0acf1e1fad39022337ea76a8b697c387d020
4
+ data.tar.gz: 2c140bde1cc3c6b16afa0f846aa536e4ef03e1f67e5a8021815f7175e5b57715
5
5
  SHA512:
6
- metadata.gz: 892efe4ea39105f50755518815701d0652c18b091f94a09ca2f10da36b234f06f4a7d3648fc88602ab5205a21667936acd90162a39b3beb261152a2a70650f5f
7
- data.tar.gz: c3a73b8ca037ade6d2de193446a074d2c7402c9121d21936859abf9daa2e8f19d2c865d025ba90c96dd4ca08e68d3a98a164ffb2d649d5dd7104d2ceb017c5ad
6
+ metadata.gz: b94e0e73d06148356a0bc2cc61e77b391dd7046191871f31eeb5e82fa491f047a9304695f8703d13c6eacc96c8cceb59f778d8bc4cc14fb5b5af539ae54c1f2a
7
+ data.tar.gz: f1025abf884e53dacd60e23e215898797dc220f7e371d3d6703b3b5e98033cade867a78031a8e2d928f8f26e216afcda91d636344e2d90d6499aa36b3094fe9e
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Buildless
4
- VERSION = '0.0.6'
4
+ VERSION = '0.0.7'
5
5
  RAILS_VERSION = '7.1.3.2'
6
6
  end
data/lib/buildless-app.rb CHANGED
@@ -21,10 +21,11 @@ module Buildless
21
21
  verify_rails_installation
22
22
  generate_project(template)
23
23
  generate_files(template['files'])
24
- run_bundle_commands(template['bundle_commands'])
24
+ run_commands(template['commands'])
25
25
  clone_files(template['clones'])
26
26
  inject_code(template['inject_code'])
27
27
  append_code(template['append_code'])
28
+ update_files(template['gsub'])
28
29
 
29
30
  puts 'Time for coding! 🚀'
30
31
  end
@@ -52,8 +53,9 @@ module Buildless
52
53
  end
53
54
  end
54
55
 
55
- def run_bundle_commands(commands)
56
+ def run_commands(commands)
56
57
  commands.each do |command|
58
+ puts "-> \e[1;32;49mRun\e[0m #{command}"
57
59
  system command
58
60
  end
59
61
  end
@@ -78,6 +80,16 @@ module Buildless
78
80
  end
79
81
  end
80
82
 
83
+ def update_files(updates)
84
+ return if updates.nil? || updates.empty?
85
+
86
+ thor_app = ::Buildless::RailsApp.new
87
+
88
+ updates.each do |update|
89
+ thor_app.gsub_file(update['file_path'], update['pattern'], update['value'])
90
+ end
91
+ end
92
+
81
93
  def clone_files(files)
82
94
  return if files.nil? || files.empty?
83
95
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buildless-app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paweł Dąbrowski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-25 00:00:00.000000000 Z
11
+ date: 2024-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client