coral_plan 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -4,7 +4,8 @@ gem "coral_core", "~> 0.1"
4
4
 
5
5
  group :development do
6
6
  gem "bundler", "~> 1.2"
7
- gem "rspec", "~> 2.10"
8
- gem "rdoc", "~> 3.12"
9
7
  gem "jeweler", "~> 1.8"
8
+ gem "rspec", "~> 2.10"
9
+ gem "rdoc", "~> 3.12"
10
+ gem "yard", "~> 0.8"
10
11
  end
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- coral_core (0.1.1)
4
+ coral_core (0.1.4)
5
5
  git (= 1.2.5)
6
- json (~> 1.7)
6
+ json (>= 1.4)
7
7
  log4r (~> 1.1)
8
8
  diff-lcs (1.1.3)
9
9
  git (1.2.5)
@@ -15,7 +15,7 @@ GEM
15
15
  json (1.7.6)
16
16
  log4r (1.1.10)
17
17
  rake (10.0.3)
18
- rdoc (3.12)
18
+ rdoc (3.12.1)
19
19
  json (~> 1.4)
20
20
  rspec (2.12.0)
21
21
  rspec-core (~> 2.12.0)
@@ -25,6 +25,7 @@ GEM
25
25
  rspec-expectations (2.12.1)
26
26
  diff-lcs (~> 1.1.3)
27
27
  rspec-mocks (2.12.2)
28
+ yard (0.8.4.1)
28
29
 
29
30
  PLATFORMS
30
31
  ruby
@@ -35,3 +36,4 @@ DEPENDENCIES
35
36
  jeweler (~> 1.8)
36
37
  rdoc (~> 3.12)
37
38
  rspec (~> 2.10)
39
+ yard (~> 0.8)
data/Rakefile CHANGED
@@ -1,11 +1,12 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  require 'rubygems'
4
- require 'bundler'
5
4
  require 'rake'
6
- require 'rake/testtask'
7
- require 'rdoc/task'
5
+ require 'bundler'
8
6
  require 'jeweler'
7
+ require 'rspec/core/rake_task'
8
+ require 'rdoc/task'
9
+ require 'yard'
9
10
 
10
11
  require './lib/coral_plan.rb'
11
12
 
@@ -47,22 +48,30 @@ Jeweler::RubygemsDotOrgTasks.new
47
48
  #-------------------------------------------------------------------------------
48
49
  # Testing
49
50
 
50
- Rake::TestTask.new(:test) do |test|
51
- test.libs << 'lib' << 'test'
52
- test.pattern = 'test/**/test_*.rb'
53
- test.verbose = true
51
+ RSpec::Core::RakeTask.new(:spec, :tag) do |spec, task_args|
52
+ options = []
53
+ options << "--tag #{task_args[:tag]}" if task_args.is_a?(Array) && ! task_args[:tag].to_s.empty?
54
+ spec.rspec_opts = options.join(' ')
54
55
  end
55
56
 
56
- task :default => :test
57
+ task :default => :spec
57
58
 
58
59
  #-------------------------------------------------------------------------------
59
60
  # Documentation
60
61
 
61
- Rake::RDocTask.new do |rdoc|
62
- version = Coral::Plan::VERSION
62
+ version = Coral::Plan::VERSION
63
+ doc_title = "coral_plan #{version}"
63
64
 
65
+ Rake::RDocTask.new do |rdoc|
64
66
  rdoc.rdoc_dir = 'rdoc'
65
- rdoc.title = "coral_plan #{version}"
67
+ rdoc.title = doc_title
66
68
  rdoc.rdoc_files.include('README*')
67
69
  rdoc.rdoc_files.include('lib/**/*.rb')
68
70
  end
71
+
72
+ #---
73
+
74
+ YARD::Rake::YardocTask.new do |ydoc|
75
+ ydoc.files = [ 'README*', 'lib/**/*.rb' ]
76
+ ydoc.options = [ "--output-dir yardoc", "--title '#{doc_title}'" ]
77
+ end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -0,0 +1,72 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "coral_plan"
8
+ s.version = "0.1.2"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Adrian Webb"]
12
+ s.date = "2013-02-08"
13
+ s.description = "= coral_plan\n\nThis library provides the ability to create, load, execute, and save \nexecution plans.\n\nThe Coral Plan library contains a system that defines execution plans of \nCLI commands. The goal is to make it easy to create, edit, load, execute,\nand save these plans in a machine readable format (ie; JSON). The system \nis composed of Events, Commands, Actions, and of course Plans. There are a\nfew simple rules:\n \n1. All plans begin with a Command but may have more Commands defined\n that act in sequence unless there are errors with previous commands.\n \n2. Commands can trigger Events of various types, where Events are reading\n and checking (ie; Regular expressions) Command output line by line.\n \n3. Events have different criteria for measuring success and will have \n different fields. For example, a Regexp event contains a 'pattern'\n field.\n \n4. Actions listen for Events and run Commands, with the ability to override\n default Command parameters. Actions may also generate Events on either\n successful execution or failure which can trigger other Actions.\n \nNote: This library is still very early in development!\n\n== Contributing to coral_plan\n \n* Check out the latest master to make sure the feature hasn't been implemented \n or the bug hasn't been fixed yet.\n* Check out the issue tracker to make sure someone already hasn't requested \n it and/or contributed it.\n* Fork the project.\n* Start a feature/bugfix branch.\n* Commit and push until you are happy with your contribution.\n* Make sure to add tests for it. This is important so I don't break it in a \n future version unintentionally.\n* Please try not to mess with the Rakefile, version, or history. If you want \n to have your own version, or is otherwise necessary, that is fine, but \n please isolate to its own commit so I can cherry-pick around it.\n\n== Copyright\n\nLicensed under GPLv3. See LICENSE.txt for further details.\n\nCopyright (c) 2013 Adrian Webb <adrian.webb@coraltech.net>\nCoral Technology Group LLC"
14
+ s.email = "adrian.webb@coraltech.net"
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ "Gemfile",
22
+ "Gemfile.lock",
23
+ "LICENSE.txt",
24
+ "README.rdoc",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "coral_plan.gemspec",
28
+ "lib/coral_plan.rb",
29
+ "lib/coral_plan/action.rb",
30
+ "lib/coral_plan/base.rb",
31
+ "lib/coral_plan/command.rb",
32
+ "lib/coral_plan/event.rb",
33
+ "spec/coral_test_kernel.rb",
34
+ "spec/spec_helper.rb"
35
+ ]
36
+ s.homepage = "http://github.com/coraltech/ruby-coral_plan"
37
+ s.licenses = ["GPLv3"]
38
+ s.rdoc_options = ["--title", "Coral Execution Plan library", "--main", "README.rdoc", "--line-numbers"]
39
+ s.require_paths = ["lib"]
40
+ s.required_ruby_version = Gem::Requirement.new(">= 1.8.1")
41
+ s.rubyforge_project = "coral_plan"
42
+ s.rubygems_version = "1.8.15"
43
+ s.summary = "Provides the ability to create, load, execute, and save execution plans"
44
+
45
+ if s.respond_to? :specification_version then
46
+ s.specification_version = 3
47
+
48
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
49
+ s.add_runtime_dependency(%q<coral_core>, ["~> 0.1"])
50
+ s.add_development_dependency(%q<bundler>, ["~> 1.2"])
51
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8"])
52
+ s.add_development_dependency(%q<rspec>, ["~> 2.10"])
53
+ s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
54
+ s.add_development_dependency(%q<yard>, ["~> 0.8"])
55
+ else
56
+ s.add_dependency(%q<coral_core>, ["~> 0.1"])
57
+ s.add_dependency(%q<bundler>, ["~> 1.2"])
58
+ s.add_dependency(%q<jeweler>, ["~> 1.8"])
59
+ s.add_dependency(%q<rspec>, ["~> 2.10"])
60
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
61
+ s.add_dependency(%q<yard>, ["~> 0.8"])
62
+ end
63
+ else
64
+ s.add_dependency(%q<coral_core>, ["~> 0.1"])
65
+ s.add_dependency(%q<bundler>, ["~> 1.2"])
66
+ s.add_dependency(%q<jeweler>, ["~> 1.8"])
67
+ s.add_dependency(%q<rspec>, ["~> 2.10"])
68
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
69
+ s.add_dependency(%q<yard>, ["~> 0.8"])
70
+ end
71
+ end
72
+
@@ -0,0 +1,22 @@
1
+
2
+ module Kernel
3
+
4
+ #-----------------------------------------------------------------------------
5
+ # Utilities
6
+
7
+ def capture
8
+ out = StringIO.new
9
+ $stdout = out
10
+
11
+ error = StringIO.new
12
+ $stderr = error
13
+
14
+ # Go do stuff!
15
+ yield
16
+ return out, error
17
+
18
+ ensure
19
+ $stdout = STDOUT
20
+ $stderr = STDERR
21
+ end
22
+ end
@@ -0,0 +1,14 @@
1
+
2
+ require 'rspec'
3
+ require 'stringio'
4
+ require 'coral_plan'
5
+
6
+ require 'coral_test_kernel'
7
+
8
+ #-------------------------------------------------------------------------------
9
+
10
+ RSpec.configure do |config|
11
+ config.mock_framework = :rspec
12
+ config.color_enabled = true
13
+ config.formatter = 'documentation'
14
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coral_plan
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Adrian Webb
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-02-07 00:00:00 Z
18
+ date: 2013-02-08 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: coral_core
@@ -48,9 +48,24 @@ dependencies:
48
48
  type: :development
49
49
  version_requirements: *id002
50
50
  - !ruby/object:Gem::Dependency
51
- name: rspec
51
+ name: jeweler
52
52
  prerelease: false
53
53
  requirement: &id003 !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ~>
57
+ - !ruby/object:Gem::Version
58
+ hash: 31
59
+ segments:
60
+ - 1
61
+ - 8
62
+ version: "1.8"
63
+ type: :development
64
+ version_requirements: *id003
65
+ - !ruby/object:Gem::Dependency
66
+ name: rspec
67
+ prerelease: false
68
+ requirement: &id004 !ruby/object:Gem::Requirement
54
69
  none: false
55
70
  requirements:
56
71
  - - ~>
@@ -61,11 +76,11 @@ dependencies:
61
76
  - 10
62
77
  version: "2.10"
63
78
  type: :development
64
- version_requirements: *id003
79
+ version_requirements: *id004
65
80
  - !ruby/object:Gem::Dependency
66
81
  name: rdoc
67
82
  prerelease: false
68
- requirement: &id004 !ruby/object:Gem::Requirement
83
+ requirement: &id005 !ruby/object:Gem::Requirement
69
84
  none: false
70
85
  requirements:
71
86
  - - ~>
@@ -76,22 +91,22 @@ dependencies:
76
91
  - 12
77
92
  version: "3.12"
78
93
  type: :development
79
- version_requirements: *id004
94
+ version_requirements: *id005
80
95
  - !ruby/object:Gem::Dependency
81
- name: jeweler
96
+ name: yard
82
97
  prerelease: false
83
- requirement: &id005 !ruby/object:Gem::Requirement
98
+ requirement: &id006 !ruby/object:Gem::Requirement
84
99
  none: false
85
100
  requirements:
86
101
  - - ~>
87
102
  - !ruby/object:Gem::Version
88
- hash: 31
103
+ hash: 27
89
104
  segments:
90
- - 1
105
+ - 0
91
106
  - 8
92
- version: "1.8"
107
+ version: "0.8"
93
108
  type: :development
94
- version_requirements: *id005
109
+ version_requirements: *id006
95
110
  description: |-
96
111
  = coral_plan
97
112
 
@@ -157,11 +172,14 @@ files:
157
172
  - README.rdoc
158
173
  - Rakefile
159
174
  - VERSION
175
+ - coral_plan.gemspec
160
176
  - lib/coral_plan.rb
161
177
  - lib/coral_plan/action.rb
162
178
  - lib/coral_plan/base.rb
163
179
  - lib/coral_plan/command.rb
164
180
  - lib/coral_plan/event.rb
181
+ - spec/coral_test_kernel.rb
182
+ - spec/spec_helper.rb
165
183
  homepage: http://github.com/coraltech/ruby-coral_plan
166
184
  licenses:
167
185
  - GPLv3