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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 113a1635d8b52e8ad875680df5c22f26f4b4a31a
4
- data.tar.gz: 1cab1f0e69adf3d67bac015ccba796831efbcf5b
3
+ metadata.gz: f9a09d58cf3f9e0c9bb45d59d89a23f2bdb04de1
4
+ data.tar.gz: 5681049a3687bc81922c54df349920b4338409cd
5
5
  SHA512:
6
- metadata.gz: b967c7b3be504a742067e59cd4b955abb5cd7c95c9e3461be03e41f8a40e62e0594775c2bbbf9c86cd479ca9fc2a7ed2ba164209c5b48634303f064fc792910f
7
- data.tar.gz: 040e309eec454bc822ef2b98bf692170cb52aaab6e05a621a846906d765c6d3f45d784127bcfd8c28c87a70c18dd405cc390d1a3533f7b11886bbd5f9db84894
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
- creation_thread = Thread.new {
59
- begin
60
- template.create(template_args, output_path)
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
- puts "\nDone!"
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" base
169
+ # Create a new "project" based
170
170
  # on this template, to the directory
171
171
  # "dir".
172
172
  def create(args, dir)
@@ -2,7 +2,7 @@ require_relative 'Boot/Lib/autoload.rb'
2
2
  require 'JSON'
3
3
 
4
4
  module Boot
5
- VERSION = "0.3.0"
5
+ VERSION = "0.3.1"
6
6
 
7
7
  def self.main
8
8
  # Open and parse default config
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.0
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-02 00:00:00.000000000 Z
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