quest 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/quest +20 -1
  3. data/lib/quest/api.rb +1 -0
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f44a8be44d1dabdcf3496a45686269255c4af45c
4
- data.tar.gz: e3c77ca330b15ba15d9b20d84f82325c6115f901
3
+ metadata.gz: c66cfb267fcd754fe8e2a0c949e4610eac6e204d
4
+ data.tar.gz: 4cd930f58fd05a058a0e3e1254e4218d21ac6ea0
5
5
  SHA512:
6
- metadata.gz: 293f9cd835a9d13c1efc8b162ea15bdbe20a1e9bcb6a914f3a1aecb4934b79cdab8275ef5a3ce4d7bf1920a2f718c9097d6332aee9fa4a6f81f4e200df1d587a
7
- data.tar.gz: b353bfcbb12b6ccfc0071f13d2289c21f4aac540e6ddf06baff0d78130c8b6e803cfa7f16d44d6e3dad62385f28c04ed8b187affdf2446587cf0c146e093a234
6
+ metadata.gz: 26c6326285e9f30c771e0c7458f68ea52120f9a2471cc8d3b5fabb0d071ed92c615fcc2397ebe1ce4952a0b332b282012dcf6035185ec3a59941231c6a3b1e33
7
+ data.tar.gz: cdb53cad5ea57442e1a9d3ee85364a64474f9b73a2c69232f94fe4caa4ba9a020aa20797bfd8d676a5e91207f5a65f8f5784aab2861de789a8ad39e198cf2c36
data/bin/quest CHANGED
@@ -65,6 +65,22 @@ module GLIWrapper
65
65
  output << "#{complete_count} of #{summary['example_count']} tasks."
66
66
  end
67
67
 
68
+ def wait_spinner
69
+ chars = %w[| / - \\]
70
+ iter = 0
71
+ spinner = Thread.new do
72
+ while iter do
73
+ print chars[(iter+=1) % chars.length]
74
+ sleep 0.5
75
+ print "\b"
76
+ end
77
+ end
78
+ yield.tap{
79
+ iter = false
80
+ spinner.join
81
+ }
82
+ end
83
+
68
84
  program_desc 'Track the status of quests and tasks.'
69
85
 
70
86
  desc 'Begin a quest'
@@ -79,7 +95,10 @@ module GLIWrapper
79
95
  elsif OFFER_BAILOUT and not get_path('status/', 'summary/', 'failure_count') == '0'
80
96
  offer_bailout("The current quest is not complete. If you begin a new quest, your agent nodes will be reset. Your master node and Puppet code will not be affected.\n")
81
97
  end
82
- post_path({}, 'begin/', args[0])
98
+ puts "Please wait a moment while the #{args[0]} quest is set up..."
99
+ wait_spinner do
100
+ post_path({}, 'begin/', args[0])
101
+ end
83
102
  puts "You have started the #{args[0]} quest."
84
103
  end
85
104
  end
@@ -77,6 +77,7 @@ module Quest
77
77
 
78
78
  post '/begin/:quest' do
79
79
  messenger.begin_quest(params[:quest])
80
+ "ok"
80
81
  end
81
82
  end
82
83
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Henner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-23 00:00:00.000000000 Z
11
+ date: 2017-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport