nutella_framework 0.4.10 → 0.4.11

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
  SHA1:
3
- metadata.gz: 28ef8c583dc652a1bba99dddd436a49fd56073fe
4
- data.tar.gz: c622511fa7132362a60442c3d41c9ade82e6f215
3
+ metadata.gz: 9172faccd58a12b7b71e6b98b23bdabae149cba2
4
+ data.tar.gz: 41ddccdf48c2216534ca3ac1fc6b8a8e69c6217b
5
5
  SHA512:
6
- metadata.gz: 3e99c1a182712c8f8440741c19e098ca4928a09dfea595645dc6669da4801197b94d6d5691451c73972cd0e617c283bea1c026d191e08ac37c0c528386bfcbf5
7
- data.tar.gz: 526168dbc44d62bb1ae64b5bfd4c3739f401bb7f579e59d094cb63bf8a9c9970e5848e861822efacb0ec199e456b948508c95c79cfb694648592e7b29ddbc39f
6
+ metadata.gz: 8b6091ed6ab787a2dedcf3ea31c124dcda6ba528d2d23a9e2a1f42b18ae28d3bf54ae309a64ea64a8442a6bdf1d21980292aa080a50759ebab27b1d16fac36f0
7
+ data.tar.gz: 49da081ac45ecd83adb657cc5f7abe35ed99a75a9a35bdc6cd7fa5e12e1c7d2dd5d1e95bdf4f740a74196aa772a1a55992c9c6d58f36e2a17344651fe9822016
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "http://rubygems.org"
1
+ source 'http://rubygems.org'
2
2
 
3
3
  gem 'semantic', '~> 1.4'
4
4
  gem 'logging', '~> 1.8'
@@ -7,7 +7,7 @@ gem 'sinatra', '~>1.4'
7
7
  gem 'thin', '~>1.6'
8
8
  gem 'nokogiri', '~>1.6'
9
9
  gem 'slop', '~>4.0'
10
- gem 'nutella_lib','~>0.4.10'
10
+ gem 'nutella_lib','~>0.4', '>=0.4.11'
11
11
 
12
12
 
13
13
  group :development do
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.10
1
+ 0.4.11
@@ -1,4 +1,4 @@
1
- require 'commands/meta/command'
1
+ require 'commands/meta/run_command'
2
2
  require 'tmux/tmux'
3
3
 
4
4
  module Nutella
@@ -22,7 +22,7 @@ module Nutella
22
22
 
23
23
  app_id, app_path = fetch_app_details
24
24
 
25
- if no_bot_to_start(app_id, app_path, params)
25
+ if no_app_bot_to_start app_id, app_path, params
26
26
  console.warn "Run #{run} not created: your application bots are already started and you specified no regular bots exclusively for this run"
27
27
  return
28
28
  end
@@ -65,7 +65,7 @@ module Nutella
65
65
 
66
66
  # Returns true if both the list of run level bots is empty and the app bots
67
67
  # have been started already
68
- def no_bot_to_start(app_id, app_path, params)
68
+ def no_app_bot_to_start(app_id, app_path, params)
69
69
  ComponentsList.run_level_bots_list(app_path, params).empty? && app_bots_started?(app_id)
70
70
  end
71
71
 
@@ -106,7 +106,7 @@ module Nutella
106
106
 
107
107
  def print_confirmation( run_id, params, app_id, app_path )
108
108
  # If there are no run-level bots to start, do not create the run and error out
109
- if ComponentsList.run_level_bots_list(app_path, params).empty?
109
+ if ComponentsList.run_level_bots_list(app_path, params).empty? && !Nutella.runlist.app_has_no_bots(app_id)
110
110
  console.warn 'This run doesn\'t seem to have any components. No run was created.'
111
111
  return
112
112
  end
@@ -123,11 +123,16 @@ module Nutella
123
123
  unless app_bots_list.nil? || app_bots_list.empty?
124
124
  console.success "Do `tmux attach-session -t #{Tmux.app_bot_session_name(app_id)}` to monitor your app bots."
125
125
  end
126
- # Output rest of monitoring info
127
- console.success "Do `tmux attach-session -t #{Tmux.session_name(app_id,run_id)}` to monitor your bots."
126
+ # Only print bots monitoring info if there bots in the run
127
+ unless Nutella.runlist.app_has_no_bots app_id
128
+ console.success "Do `tmux attach-session -t #{Tmux.session_name(app_id,run_id)}` to monitor your bots."
129
+ end
130
+ # Main interface is always available
128
131
  console.success "Go to http://localhost:#{Nutella.config['main_interface_port']}/#{app_id}/#{run_id} to access your interfaces"
129
132
  end
130
133
 
134
+
135
+
131
136
  end
132
137
 
133
138
  end
@@ -143,13 +143,19 @@ module Nutella
143
143
  def clean_list
144
144
  all_runs.each do |app, _|
145
145
  runs_for_app(app).each do |run|
146
- unless Tmux.session_exist? Tmux.session_name(app, run)
146
+ unless Tmux.session_exist?(Tmux.session_name(app, run)) || app_has_no_bots(app)
147
147
  delete? app, run
148
148
  end
149
149
  end
150
150
  end
151
151
  end
152
152
 
153
+
154
+ # Returns true if the app has no bots
155
+ def app_has_no_bots( app_id )
156
+ Dir.entries("#{app_path(app_id)}/bots").select{|entry| File.directory?(entry) && !(entry =='.' || entry == '..') }.empty?
157
+ end
158
+
153
159
  end
154
160
 
155
161
 
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: nutella_framework 0.4.10 ruby lib
5
+ # stub: nutella_framework 0.4.11 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "nutella_framework"
9
- s.version = "0.4.10"
9
+ s.version = "0.4.11"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Alessandro Gnoli"]
14
- s.date = "2015-04-08"
14
+ s.date = "2015-04-22"
15
15
  s.description = "utella is a framework to create and run RoomApps"
16
16
  s.email = "tebemis@gmail.com"
17
17
  s.executables = ["nutella"]
@@ -161,7 +161,7 @@ Gem::Specification.new do |s|
161
161
  s.add_runtime_dependency(%q<thin>, ["~> 1.6"])
162
162
  s.add_runtime_dependency(%q<nokogiri>, ["~> 1.6"])
163
163
  s.add_runtime_dependency(%q<slop>, ["~> 4.0"])
164
- s.add_runtime_dependency(%q<nutella_lib>, ["~> 0.4.10"])
164
+ s.add_runtime_dependency(%q<nutella_lib>, [">= 0.4.11", "~> 0.4"])
165
165
  s.add_development_dependency(%q<shoulda>, ["~> 3.0"])
166
166
  s.add_development_dependency(%q<yard>, ["~> 0.8"])
167
167
  s.add_development_dependency(%q<rdoc>, ["~> 4.0"])
@@ -176,7 +176,7 @@ Gem::Specification.new do |s|
176
176
  s.add_dependency(%q<thin>, ["~> 1.6"])
177
177
  s.add_dependency(%q<nokogiri>, ["~> 1.6"])
178
178
  s.add_dependency(%q<slop>, ["~> 4.0"])
179
- s.add_dependency(%q<nutella_lib>, ["~> 0.4.10"])
179
+ s.add_dependency(%q<nutella_lib>, [">= 0.4.11", "~> 0.4"])
180
180
  s.add_dependency(%q<shoulda>, ["~> 3.0"])
181
181
  s.add_dependency(%q<yard>, ["~> 0.8"])
182
182
  s.add_dependency(%q<rdoc>, ["~> 4.0"])
@@ -192,7 +192,7 @@ Gem::Specification.new do |s|
192
192
  s.add_dependency(%q<thin>, ["~> 1.6"])
193
193
  s.add_dependency(%q<nokogiri>, ["~> 1.6"])
194
194
  s.add_dependency(%q<slop>, ["~> 4.0"])
195
- s.add_dependency(%q<nutella_lib>, ["~> 0.4.10"])
195
+ s.add_dependency(%q<nutella_lib>, [">= 0.4.11", "~> 0.4"])
196
196
  s.add_dependency(%q<shoulda>, ["~> 3.0"])
197
197
  s.add_dependency(%q<yard>, ["~> 0.8"])
198
198
  s.add_dependency(%q<rdoc>, ["~> 4.0"])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nutella_framework
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.10
4
+ version: 0.4.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Gnoli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-08 00:00:00.000000000 Z
11
+ date: 2015-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: semantic
@@ -112,16 +112,22 @@ dependencies:
112
112
  name: nutella_lib
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: 0.4.11
115
118
  - - "~>"
116
119
  - !ruby/object:Gem::Version
117
- version: 0.4.10
120
+ version: '0.4'
118
121
  type: :runtime
119
122
  prerelease: false
120
123
  version_requirements: !ruby/object:Gem::Requirement
121
124
  requirements:
125
+ - - ">="
126
+ - !ruby/object:Gem::Version
127
+ version: 0.4.11
122
128
  - - "~>"
123
129
  - !ruby/object:Gem::Version
124
- version: 0.4.10
130
+ version: '0.4'
125
131
  - !ruby/object:Gem::Dependency
126
132
  name: shoulda
127
133
  requirement: !ruby/object:Gem::Requirement