dynflow 0.6.2 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/test/test_helper.rb CHANGED
@@ -16,6 +16,7 @@ require 'pry'
16
16
 
17
17
  require 'support/code_workflow_example'
18
18
  require 'support/middleware_example'
19
+ require 'support/rescue_example'
19
20
 
20
21
  class TestExecutionLog
21
22
 
@@ -111,9 +112,11 @@ module WorldInstance
111
112
  @adapter ||= Dynflow::LoggerAdapters::Simple.new $stderr, 4
112
113
  end
113
114
 
114
- def self.create_world
115
- Dynflow::SimpleWorld.new logger_adapter: logger_adapter,
116
- auto_terminate: false
115
+ def self.create_world(options = {})
116
+ options = { logger_adapter: logger_adapter,
117
+ auto_terminate: false,
118
+ auto_rescue: false }.merge(options)
119
+ Dynflow::SimpleWorld.new(options)
117
120
  end
118
121
 
119
122
  def self.create_remote_world(world)
@@ -63,6 +63,10 @@ table.flow table {
63
63
  width: 100%;
64
64
  }
65
65
 
66
+ ul.plan-step p.step-label {
67
+ cursor: pointer;
68
+ }
69
+
66
70
  table.flow td.success span.step-label {
67
71
  color: #468847;
68
72
  }
@@ -11,9 +11,13 @@
11
11
  [ <%= duration_to_s(step.real_time) %> / <%= duration_to_s(step.execution_time) %> ]
12
12
  <% end %>
13
13
  </span>
14
- <% if @plan.state == :paused && step.state == :error %>
14
+ <% if @plan.state == :paused && step.skippable? %>
15
15
  <a href="<%= url("/#{@plan.id}/skip/#{step.id}") %>" class="postlink">Skip</a>
16
16
  <% end %>
17
+ <% if step.cancellable? %>
18
+ <a href="<%= url("/#{@plan.id}/cancel/#{step.id}") %>" class="postlink">Cancel</a>
19
+ <% end %>
20
+
17
21
  <div class="action">
18
22
  <% unless @plan.state == :pending %>
19
23
  <p><b>Started at:</b> <%= h(step.started_at) %></p>
data/web/views/show.erb CHANGED
@@ -1,4 +1,6 @@
1
- <p id="notice"><%= h(@notice) %></p>
1
+ <% if @notice %>
2
+ <div id="notice" class="alert alert-warning"><%= h(@notice) %></div>
3
+ <% end %>
2
4
 
3
5
 
4
6
  <p>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.7.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-15 00:00:00.000000000 Z
12
+ date: 2014-06-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -218,21 +218,24 @@ files:
218
218
  - README.md
219
219
  - Rakefile
220
220
  - doc/images/logo.png
221
+ - doc/images/screenshot.png
221
222
  - dynflow.gemspec
222
- - examples/generate_work_for_daemon.rb
223
+ - examples/example_helper.rb
223
224
  - examples/orchestrate.rb
224
- - examples/run_daemon.rb
225
- - examples/web_console.rb
225
+ - examples/orchestrate_evented.rb
226
+ - examples/remote_executor.rb
226
227
  - lib/dynflow.rb
227
228
  - lib/dynflow/action.rb
228
- - lib/dynflow/action/cancellable_polling.rb
229
+ - lib/dynflow/action/cancellable.rb
229
230
  - lib/dynflow/action/format.rb
230
231
  - lib/dynflow/action/missing.rb
231
232
  - lib/dynflow/action/polling.rb
232
233
  - lib/dynflow/action/progress.rb
234
+ - lib/dynflow/action/rescue.rb
233
235
  - lib/dynflow/action/suspended.rb
234
236
  - lib/dynflow/clock.rb
235
237
  - lib/dynflow/daemon.rb
238
+ - lib/dynflow/errors.rb
236
239
  - lib/dynflow/execution_plan.rb
237
240
  - lib/dynflow/execution_plan/dependency_graph.rb
238
241
  - lib/dynflow/execution_plan/output_reference.rb
@@ -314,8 +317,10 @@ files:
314
317
  - test/middleware_test.rb
315
318
  - test/persistance_adapters_test.rb
316
319
  - test/remote_via_socket_test.rb
320
+ - test/rescue_test.rb
317
321
  - test/support/code_workflow_example.rb
318
322
  - test/support/middleware_example.rb
323
+ - test/support/rescue_example.rb
319
324
  - test/test_helper.rb
320
325
  - test/testing_test.rb
321
326
  - test/web_console_test.rb
@@ -372,8 +377,10 @@ test_files:
372
377
  - test/middleware_test.rb
373
378
  - test/persistance_adapters_test.rb
374
379
  - test/remote_via_socket_test.rb
380
+ - test/rescue_test.rb
375
381
  - test/support/code_workflow_example.rb
376
382
  - test/support/middleware_example.rb
383
+ - test/support/rescue_example.rb
377
384
  - test/test_helper.rb
378
385
  - test/testing_test.rb
379
386
  - test/web_console_test.rb
@@ -1,24 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- root_path = File.expand_path(File.join(File.dirname(__FILE__), '..'))
4
- dynflow_path = File.join(root_path, 'lib')
5
- $LOAD_PATH << dynflow_path unless $LOAD_PATH.include? dynflow_path
6
-
7
- require 'dynflow'
8
- require 'tmpdir'
9
-
10
- socket_path = File.join(Dir.tmpdir, 'dynflow_socket')
11
- persistence_adapter = Dynflow::PersistenceAdapters::Sequel.new ARGV[0] || 'sqlite://db.sqlite'
12
-
13
- world = Dynflow::SimpleWorld.new do |world|
14
- { persistence_adapter: persistence_adapter,
15
- executor: Dynflow::Executors::RemoteViaSocket.new(world, socket_path) }
16
- end
17
-
18
- load File.join(root_path, 'test', 'code_workflow_example.rb')
19
-
20
- loop do
21
- world.trigger Dynflow::CodeWorkflowExample::Slow, 1
22
- sleep 0.5
23
- p 'tick'
24
- end
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- root_path = File.expand_path(File.join(File.dirname(__FILE__), '..'))
4
- dynflow_path = File.join(root_path, 'lib')
5
- $LOAD_PATH << dynflow_path unless $LOAD_PATH.include? dynflow_path
6
-
7
- require 'dynflow'
8
- require 'tmpdir'
9
-
10
- socket = File.join(Dir.tmpdir, 'dynflow_socket')
11
- persistence_adapter = Dynflow::PersistenceAdapters::Sequel.new ARGV[0] || 'sqlite://db.sqlite'
12
- world = Dynflow::SimpleWorld.new persistence_adapter: persistence_adapter
13
- listener = Dynflow::Listeners::Socket.new world, socket
14
-
15
- load File.join(root_path, 'test', 'code_workflow_example.rb')
16
-
17
- Dynflow::Daemon.new(listener, world).run
@@ -1,29 +0,0 @@
1
- # Demo for Dynflow web console
2
- # usage: ruby web_console.rb
3
-
4
- $:.unshift(File.expand_path('../../lib', __FILE__))
5
-
6
- require 'dynflow'
7
- require_relative 'orchestrate'
8
-
9
- world = Dynflow::SimpleWorld.new
10
-
11
- require 'dynflow/web_console'
12
- dynflow_console = Dynflow::WebConsole.setup do
13
- set :world, world
14
- end
15
-
16
- 3.times do
17
- Thread.new do
18
- 3.times do
19
- world.trigger(Orchestrate::CreateInfrastructure)
20
- end
21
- end
22
- end
23
-
24
- puts <<MESSAGE
25
- =============================================
26
- See the console at http://localhost:4567/
27
- =============================================
28
- MESSAGE
29
- dynflow_console.run!