boot-cli 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/Boot/Lib/Commands/New.rb +19 -8
- data/lib/Boot/Lib/Core/Template.rb +2 -2
- data/lib/boot.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f9a09d58cf3f9e0c9bb45d59d89a23f2bdb04de1
|
|
4
|
+
data.tar.gz: 5681049a3687bc81922c54df349920b4338409cd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 737ef32093b01b7ea84f76a8724a9656a48d97ff1cf631ef28aec7fa916821ec91ff3cedaee800e44293e7566248e77474183e8547f55119017e123068db3c9d
|
|
7
|
+
data.tar.gz: 2bb10901e46bacdebae8d8df5fb16df9aac156e60fbddea83065e46294a4fdcc2f7cad31c5434ecf01cd0890f763c8615e656c2e21782870834f95d323fbdd64
|
|
@@ -55,13 +55,9 @@ module Boot::Lib::Commands
|
|
|
55
55
|
|
|
56
56
|
# Create a project base on the template
|
|
57
57
|
puts "Creating #{output_path} based on '#{template.name}' template"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
rescue ArgumentError => e
|
|
62
|
-
puts e.message
|
|
63
|
-
end
|
|
64
|
-
}
|
|
58
|
+
|
|
59
|
+
loading_thread = nil
|
|
60
|
+
|
|
65
61
|
loading_thread = Thread.new {
|
|
66
62
|
print "Doing stuff"
|
|
67
63
|
while true do
|
|
@@ -69,9 +65,24 @@ module Boot::Lib::Commands
|
|
|
69
65
|
sleep 0.3
|
|
70
66
|
end
|
|
71
67
|
}
|
|
68
|
+
|
|
69
|
+
creation_thread = Thread.new {
|
|
70
|
+
Thread.current.thread_variable_set("success", true);
|
|
71
|
+
begin
|
|
72
|
+
template.create(template_args, output_path)
|
|
73
|
+
rescue ArgumentError => e
|
|
74
|
+
Thread.current.thread_variable_set("success", false);
|
|
75
|
+
puts "\r" + e.message
|
|
76
|
+
end
|
|
77
|
+
}
|
|
78
|
+
|
|
72
79
|
creation_thread.join
|
|
73
80
|
loading_thread.exit
|
|
74
|
-
|
|
81
|
+
|
|
82
|
+
# Unless an exception occured
|
|
83
|
+
if (creation_thread.thread_variable_get("success"))
|
|
84
|
+
puts "\nDone!"
|
|
85
|
+
end
|
|
75
86
|
}
|
|
76
87
|
@New
|
|
77
88
|
end
|
|
@@ -91,7 +91,7 @@ module Boot::Lib::Core
|
|
|
91
91
|
|
|
92
92
|
@options = Slop::Options.new
|
|
93
93
|
|
|
94
|
-
options.banner = "usage: #{$0} new --template #{name} [--out DIR] [options]"
|
|
94
|
+
options.banner = "usage: #{$0} new --template #{name} [--out DIR] -- [options]"
|
|
95
95
|
|
|
96
96
|
# Validate static folders
|
|
97
97
|
@static_files.each do |static_dir_path|
|
|
@@ -166,7 +166,7 @@ module Boot::Lib::Core
|
|
|
166
166
|
end
|
|
167
167
|
|
|
168
168
|
|
|
169
|
-
# Create a new "project"
|
|
169
|
+
# Create a new "project" based
|
|
170
170
|
# on this template, to the directory
|
|
171
171
|
# "dir".
|
|
172
172
|
def create(args, dir)
|
data/lib/boot.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: boot-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sigurd Berg Svela
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-06-
|
|
11
|
+
date: 2015-06-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Allows you to quickly create new projecets based on templates.
|
|
14
14
|
email: sigurdbergsvela@gmail.com
|