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 +4 -4
- data/lib/buildless/version.rb +1 -1
- data/lib/buildless-app.rb +14 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f18b8f1feccd2bce59e86c0ea37c0acf1e1fad39022337ea76a8b697c387d020
|
4
|
+
data.tar.gz: 2c140bde1cc3c6b16afa0f846aa536e4ef03e1f67e5a8021815f7175e5b57715
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b94e0e73d06148356a0bc2cc61e77b391dd7046191871f31eeb5e82fa491f047a9304695f8703d13c6eacc96c8cceb59f778d8bc4cc14fb5b5af539ae54c1f2a
|
7
|
+
data.tar.gz: f1025abf884e53dacd60e23e215898797dc220f7e371d3d6703b3b5e98033cade867a78031a8e2d928f8f26e216afcda91d636344e2d90d6499aa36b3094fe9e
|
data/lib/buildless/version.rb
CHANGED
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
|
-
|
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
|
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.
|
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-
|
11
|
+
date: 2024-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|