lucid 0.3.0 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +9 -9
- data/.travis.yml +3 -2
- data/Gemfile +4 -6
- data/HISTORY.md +7 -2
- data/README.md +10 -8
- data/Rakefile +10 -5
- data/bin/lucid +1 -3
- data/lib/lucid/cli/configuration.rb +1 -1
- data/lib/lucid/factory.rb +26 -26
- data/lib/lucid/platform.rb +1 -1
- data/lib/lucid/runtime/orchestrator.rb +1 -1
- data/lucid.gemspec +42 -32
- data/spec/lucid/app_spec.rb +7 -24
- data/spec/lucid/factory_spec.rb +3 -3
- data/spec/spec_helper.rb +9 -6
- metadata +36 -64
- data/lib/autotest/discover.rb +0 -11
- data/lib/autotest/lucid.rb +0 -6
- data/lib/autotest/lucid_mixin.rb +0 -134
- data/lib/autotest/lucid_rails.rb +0 -6
- data/lib/autotest/lucid_rails_rspec.rb +0 -6
- data/lib/autotest/lucid_rails_rspec2.rb +0 -6
- data/lib/autotest/lucid_rspec.rb +0 -6
- data/lib/autotest/lucid_rspec2.rb +0 -6
- data/lib/lucid/rspec/allow_doubles.rb +0 -20
- data/lib/lucid/rspec/disallow_options.rb +0 -27
- data/lib/lucid/wire_support/configuration.rb +0 -38
- data/lib/lucid/wire_support/connection.rb +0 -61
- data/lib/lucid/wire_support/request_handler.rb +0 -32
- data/lib/lucid/wire_support/wire_exception.rb +0 -32
- data/lib/lucid/wire_support/wire_language.rb +0 -54
- data/lib/lucid/wire_support/wire_packet.rb +0 -34
- data/lib/lucid/wire_support/wire_protocol.rb +0 -43
- data/lib/lucid/wire_support/wire_protocol/requests.rb +0 -125
- data/lib/lucid/wire_support/wire_step_definition.rb +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b01bc3ff174ec61a65f17cfb82cc08d924a4a10e
|
4
|
+
data.tar.gz: 45c1a13af33973644456fdb92fe08a3c7878b936
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3df8d6b4f7e87deabbe95b6a5ef1bfa2d8bae7241e6d4627b20ca92c9598da4c6f33928d813ca640e8c902861ef3b66e53aae3a398cef09be8ba5b28827b418f
|
7
|
+
data.tar.gz: d8f0da9e0190bfb05f27bd3b61cf8748608f3efd02d7a262ac78e9253d36f4cf74a6b6cfec93d1692b8dc44888f230a12dde78a9e1e5ac12d07fa94f5b590a6f
|
data/.gitignore
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
*.pyc
|
4
|
+
*.tgz
|
5
|
+
*.swp
|
6
|
+
*.swo
|
7
|
+
*.log
|
8
|
+
*.pid
|
1
9
|
.eprj
|
2
10
|
.idea
|
3
11
|
.rvmrc
|
@@ -7,6 +15,7 @@
|
|
7
15
|
.tmtags
|
8
16
|
.DS_Store
|
9
17
|
.sass-cache
|
18
|
+
.rubocop.yml
|
10
19
|
Gemfile.lock
|
11
20
|
pkg
|
12
21
|
doc
|
@@ -22,16 +31,7 @@ InstalledFiles
|
|
22
31
|
lib/bundler/man
|
23
32
|
test/version_tmp
|
24
33
|
rerun.txt
|
25
|
-
*.log
|
26
|
-
*.pid
|
27
34
|
*~
|
28
|
-
*.swp
|
29
|
-
*.swo
|
30
35
|
*.tmproj
|
31
36
|
.#*
|
32
|
-
*.pyc
|
33
|
-
*.rbc
|
34
37
|
._*
|
35
|
-
*.tgz
|
36
|
-
*.gem
|
37
|
-
*.rbc
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -1,8 +1,6 @@
|
|
1
|
-
source
|
1
|
+
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
# gem 'gherkin', :path => '../gherkin'
|
3
|
+
gem 'simplecov', '>= 0.8.0', '< 1.0'
|
4
|
+
gem 'coveralls', require: false
|
7
5
|
|
8
|
-
|
6
|
+
gemspec
|
data/HISTORY.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
Change Log and History
|
2
2
|
======================
|
3
3
|
|
4
|
+
Version 0.3.3 / 2013-02-13
|
5
|
+
--------------------------
|
6
|
+
|
7
|
+
This patch release reverts patch releases 0.3.1 and 0.3.2. Both of those patches were put in place to start on a different execution mode for Lucid. That execution mode, however, has proven more problematic than I would have preferred. Patch 0.3.3 essentially puts Lucid back to 0.3.0, albeit with a few structural enhancements.
|
8
|
+
|
4
9
|
Version 0.3.0 / 2013-11-05
|
5
10
|
--------------------------
|
6
11
|
|
@@ -16,7 +21,7 @@ The project generator for creating Fluent projects has been updated. The main ch
|
|
16
21
|
Version 0.2.1 / 2013-10-21
|
17
22
|
--------------------------
|
18
23
|
|
19
|
-
This is a small patch release. The patch is in the project generator. The [Symbiont](https://github.com/jnyman/symbiont) test framework is being deprecated in favor of [Fluent](https://github.com/jnyman/fluent). The project generator has been updated accordingly.
|
24
|
+
This is a small patch release. The patch is in the project generator. The [Symbiont](https://github.com/jnyman/symbiont) test framework is being deprecated in favor of [Fluent](https://github.com/jnyman/fluent). The project generator has been updated accordingly.
|
20
25
|
|
21
26
|
|
22
27
|
Version 0.2.0 / 2013-09-28
|
@@ -106,4 +111,4 @@ This is very much an alpha release to determine how feasible Lucid is as a tool.
|
|
106
111
|
Versions 0.0.1 to 0.0.4
|
107
112
|
-----------------------
|
108
113
|
|
109
|
-
These initial versions of Lucid were designed to serve as nothing more than a wrapper for Cucumber. The goal was to allow for an easier way to work around the opinionated nature of tools like Cucumber in terms of how they expected your projects to be setup.
|
114
|
+
These initial versions of Lucid were designed to serve as nothing more than a wrapper for Cucumber. The goal was to allow for an easier way to work around the opinionated nature of tools like Cucumber in terms of how they expected your projects to be setup.
|
data/README.md
CHANGED
@@ -2,14 +2,16 @@ Lucid
|
|
2
2
|
=====
|
3
3
|
|
4
4
|
[![Build Status](https://secure.travis-ci.org/jnyman/lucid.png)](http://travis-ci.org/jnyman/lucid)
|
5
|
+
[![Coverage Status](https://coveralls.io/repos/jnyman/lucid/badge.png?branch=master)](https://coveralls.io/r/jnyman/lucid)
|
6
|
+
[![Code Climate](https://codeclimate.com/github/jnyman/lucid.png)](https://codeclimate.com/github/jnyman/lucid)
|
5
7
|
[![Dependency Status](https://gemnasium.com/jnyman/lucid.png)](https://gemnasium.com/jnyman/lucid)
|
6
8
|
[![Gem Version](https://badge.fury.io/rb/lucid.png)](http://badge.fury.io/rb/lucid)
|
7
|
-
|
9
|
+
|
8
10
|
|
9
11
|
Description
|
10
12
|
-----------
|
11
13
|
|
12
|
-
Lucid is a Test Description Language (TDL) execution engine. It is
|
14
|
+
Lucid is a Test Description Language (TDL) specification and execution engine. It is a clone of the popular tool [Cucumber](http://cukes.info/). Lucid is diverging in many ways from Cucumber but it does owe much of its initial structure to it. Lucid will also be incorporating some of the good ideas that have come to light in tools like [Spinach](https://github.com/codegram/spinach) and [Turnip](https://github.com/jnicklas/turnip).
|
13
15
|
|
14
16
|
This is an alpha release of Lucid as it strives to become its own entity in the world of BDD tools.
|
15
17
|
|
@@ -41,7 +43,7 @@ In order to to check what options are available to you from the command line, do
|
|
41
43
|
|
42
44
|
$ lucid --help
|
43
45
|
|
44
|
-
You should also check out some of my [blog posts related to Lucid](http://testerstories.com
|
46
|
+
You should also check out some of my [blog posts related to Lucid](http://testerstories.com/category/lucid/). They will take you through various aspects of using the framework.
|
45
47
|
|
46
48
|
|
47
49
|
Contributing
|
@@ -51,8 +53,8 @@ Contributing
|
|
51
53
|
|
52
54
|
To work on Lucid:
|
53
55
|
|
54
|
-
1. Fork the project.
|
55
|
-
2. Create
|
56
|
-
3. Commit your changes (`git commit -am '
|
57
|
-
4. Push
|
58
|
-
5. Create a new [pull request](https://help.github.com/articles/using-pull-requests)
|
56
|
+
1. [Fork the project](http://gun.io/blog/how-to-github-fork-branch-and-pull-request/).
|
57
|
+
2. Create a feature branch. (`git checkout -b my-new-feature`)
|
58
|
+
3. Commit your changes. (`git commit -am 'new feature'`)
|
59
|
+
4. Push the branch. (`git push origin my-new-feature`)
|
60
|
+
5. Create a new [pull request](https://help.github.com/articles/using-pull-requests).
|
data/Rakefile
CHANGED
@@ -2,10 +2,15 @@
|
|
2
2
|
require 'bundler/gem_tasks'
|
3
3
|
require 'rspec/core/rake_task'
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
namespace :spec do
|
6
|
+
RSpec::Core::RakeTask.new(:all) do |config|
|
7
|
+
options = %w(--color)
|
8
|
+
options += %w(--format documentation)
|
9
|
+
options += %w(--format html --out spec/reports/unit-test-report.html)
|
10
|
+
options += %w(--format nested --out spec/reports/unit-test-report.txt)
|
11
|
+
|
12
|
+
config.rspec_opts = options
|
13
|
+
end
|
9
14
|
end
|
10
15
|
|
11
|
-
task :
|
16
|
+
task default: %w(spec:all)
|
data/bin/lucid
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift(app_lib) unless $LOAD_PATH.include?(app_lib)
|
3
|
+
$LOAD_PATH << File.dirname(__FILE__) + '/../lib'
|
5
4
|
|
6
|
-
require 'lucid/rspec/disallow_options'
|
7
5
|
require 'lucid/cli/app'
|
8
6
|
|
9
7
|
Lucid::CLI::App.new(ARGV.dup).start!
|
data/lib/lucid/factory.rb
CHANGED
@@ -1,37 +1,37 @@
|
|
1
1
|
module Lucid
|
2
|
-
module
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
try += 1
|
7
|
-
names = phrase.split('::')
|
8
|
-
names.shift if names.empty? || names.first.empty?
|
2
|
+
module Factory
|
3
|
+
# @param type [String] Object representation
|
4
|
+
def create_object_of(type)
|
5
|
+
require path_for_type(type)
|
9
6
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
constant
|
15
|
-
rescue NameError => e
|
16
|
-
require underscore(phrase)
|
17
|
-
if try < 2
|
18
|
-
retry
|
19
|
-
else
|
20
|
-
raise e
|
21
|
-
end
|
7
|
+
names = parse_type(type)
|
8
|
+
constant = ::Object
|
9
|
+
|
10
|
+
names.each do |name|
|
11
|
+
constant = provide_object_name(constant, name)
|
22
12
|
end
|
23
|
-
end
|
24
13
|
|
25
|
-
|
26
|
-
phrase.to_s.gsub(/::/, '/').
|
27
|
-
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
|
28
|
-
gsub(/([a-z\d])([A-Z])/,'\1_\2').
|
29
|
-
tr("-", "_").
|
30
|
-
downcase
|
14
|
+
constant
|
31
15
|
end
|
32
16
|
|
33
17
|
private
|
34
18
|
|
19
|
+
def path_for_type(type)
|
20
|
+
type.to_s.gsub(/::/, '/')
|
21
|
+
.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
|
22
|
+
.gsub(/([a-z\d])([A-Z])/, '\1_\2')
|
23
|
+
.tr('-', '_')
|
24
|
+
.downcase
|
25
|
+
end
|
26
|
+
|
27
|
+
def parse_type(type)
|
28
|
+
names = type.split('::')
|
29
|
+
names.shift if names.empty? || names.first.empty?
|
30
|
+
names
|
31
|
+
end
|
32
|
+
|
33
|
+
# @param constant [Object] class or module reference
|
34
|
+
# @param name [String] class or module reference
|
35
35
|
def provide_object_name(constant, name)
|
36
36
|
if constant.const_defined?(name, false)
|
37
37
|
constant.const_get(name, false)
|
data/lib/lucid/platform.rb
CHANGED
@@ -2,7 +2,7 @@ require 'rbconfig'
|
|
2
2
|
|
3
3
|
module Lucid
|
4
4
|
unless defined?(Lucid::VERSION)
|
5
|
-
VERSION = '0.3.
|
5
|
+
VERSION = '0.3.3'
|
6
6
|
BINARY = File.expand_path(File.dirname(__FILE__) + '/../../bin/lucid')
|
7
7
|
LIBDIR = File.expand_path(File.dirname(__FILE__) + '/../../lib')
|
8
8
|
JRUBY = defined?(JRUBY_VERSION)
|
data/lucid.gemspec
CHANGED
@@ -1,43 +1,53 @@
|
|
1
|
-
#
|
1
|
+
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
|
5
5
|
require 'lucid/platform'
|
6
6
|
|
7
|
-
Gem::Specification.new do |
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'lucid'
|
9
|
+
spec.version = Lucid::VERSION
|
10
|
+
spec.author = 'Jeff Nyman'
|
11
|
+
spec.email = 'jeffnyman@gmail.com'
|
12
|
+
spec.summary = %q{Test Description Language Specification and Execution Engine}
|
13
|
+
spec.description = <<-EOF
|
14
|
+
Lucid is a test framework that is designed to treat testing as a
|
15
|
+
design activity by allowing requirements to be defined as tests.
|
16
|
+
Those tests can then be executed via an automation layer. This is
|
17
|
+
the basis of creating executable specifications.
|
18
|
+
EOF
|
19
|
+
spec.homepage = 'https://github.com/jnyman/lucid'
|
20
|
+
spec.licenses = %w(MIT)
|
21
|
+
spec.platform = Gem::Platform::RUBY
|
22
|
+
|
23
|
+
spec.files = `git ls-files -z`.split("\x0")
|
24
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
25
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
26
|
+
spec.require_paths = %w(lib)
|
27
|
+
|
28
|
+
spec.required_ruby_version = '>= 1.9.3'
|
29
|
+
spec.required_rubygems_version = '>= 1.6.1'
|
30
|
+
|
31
|
+
spec.add_development_dependency 'bundler', '~> 1.5'
|
32
|
+
spec.add_development_dependency 'rake'
|
33
|
+
|
34
|
+
spec.add_runtime_dependency 'builder', '>= 3.2.2'
|
35
|
+
spec.add_runtime_dependency 'multi_json', '>= 1.8.0', '< 2.0'
|
36
|
+
spec.add_runtime_dependency 'gherkin', '>= 2.12.0'
|
37
|
+
spec.add_runtime_dependency 'rspec', '>= 2.14'
|
38
|
+
|
39
|
+
spec.post_install_message = %{
|
31
40
|
(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)
|
32
41
|
|
33
|
-
|
42
|
+
Lucid #{Lucid::VERSION} has been installed.
|
43
|
+
|
44
|
+
Run the following command to get help:
|
45
|
+
lucid --help
|
46
|
+
|
47
|
+
Information on Lucid can be found under the 'lucid'
|
48
|
+
category at:
|
49
|
+
http://testerstories.com/category/lucid/
|
34
50
|
|
35
51
|
(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)
|
36
52
|
}
|
37
|
-
|
38
|
-
gem.files = `git ls-files`.split($/)
|
39
|
-
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
40
|
-
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
41
|
-
gem.rdoc_options = ["--charset=UTF-8"]
|
42
|
-
gem.require_paths = %w(lib)
|
43
53
|
end
|
data/spec/lucid/app_spec.rb
CHANGED
@@ -16,11 +16,11 @@ module Lucid
|
|
16
16
|
describe 'start' do
|
17
17
|
context 'passed a runtime' do
|
18
18
|
let(:runtime) { double('runtime').as_null_object }
|
19
|
-
|
19
|
+
|
20
20
|
def do_start
|
21
21
|
subject.start!(runtime)
|
22
22
|
end
|
23
|
-
|
23
|
+
|
24
24
|
it 'configures the runtime' do
|
25
25
|
configuration = double('Configuration').as_null_object
|
26
26
|
Configuration.stub(:new => configuration)
|
@@ -28,7 +28,7 @@ module Lucid
|
|
28
28
|
kernel.should_receive(:exit).with(1)
|
29
29
|
do_start
|
30
30
|
end
|
31
|
-
|
31
|
+
|
32
32
|
it 'uses that runtime for running and reporting results' do
|
33
33
|
results = double('results', :failure? => true)
|
34
34
|
runtime.should_receive(:run)
|
@@ -55,7 +55,7 @@ module Lucid
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
end
|
58
|
-
|
58
|
+
|
59
59
|
describe 'verbose execution' do
|
60
60
|
before(:each) do
|
61
61
|
b = Lucid::Parser::TDLBuilder.new('specs/test.spec')
|
@@ -77,35 +77,18 @@ module Lucid
|
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
80
|
-
describe '--format with a formatter' do
|
81
|
-
it 'should fail if it cannot resolve a Formatter class' do
|
82
|
-
cli = App.new(%w{--format ZooModule::MonkeyFormatterClass}, stdin, stdout, stderr, kernel)
|
83
|
-
mock_module = double('module')
|
84
|
-
Object.stub(:const_defined?).and_return(true)
|
85
|
-
mock_module.stub(:const_defined?).and_return(true)
|
86
|
-
|
87
|
-
f = double('formatter').as_null_object
|
88
|
-
|
89
|
-
Object.should_receive(:const_get).with('ZooModule', false).and_return(mock_module)
|
90
|
-
mock_module.should_receive(:const_get).with('MonkeyFormatterClass', false).and_return(double('formatter class', :new => f))
|
91
|
-
|
92
|
-
kernel.should_receive(:exit).with(1)
|
93
|
-
cli.start!
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
80
|
describe 'handling exceptions' do
|
98
81
|
[ProfilesNotDefinedError, YmlLoadError, ProfileNotFound].each do |exception_class|
|
99
82
|
it "rescues #{exception_class}, prints the message to the error stream" do
|
100
83
|
Configuration.stub(:new).and_return(configuration = double('configuration'))
|
101
84
|
configuration.stub(:parse).and_raise(exception_class.new('error message'))
|
102
|
-
|
85
|
+
|
103
86
|
subject.start!
|
104
87
|
stderr.string.should == "error message\n"
|
105
88
|
end
|
106
89
|
end
|
107
90
|
end
|
108
|
-
|
91
|
+
|
109
92
|
end
|
110
93
|
end
|
111
|
-
end
|
94
|
+
end
|
data/spec/lucid/factory_spec.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require_relative '../spec_helper'
|
2
2
|
|
3
3
|
module Lucid
|
4
|
-
describe
|
5
|
-
include
|
4
|
+
describe Factory do
|
5
|
+
include Factory
|
6
6
|
|
7
7
|
it 'should load a valid formatter' do
|
8
8
|
generated_class = create_object_of('Lucid::Formatter::Html')
|
@@ -13,4 +13,4 @@ module Lucid
|
|
13
13
|
expect { create_object_of('Lucid::Formatter::Testing') }.to raise_error(LoadError)
|
14
14
|
end
|
15
15
|
end
|
16
|
-
end
|
16
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
2
|
|
3
|
+
require 'simplecov'
|
3
4
|
require 'coveralls'
|
5
|
+
|
4
6
|
Coveralls.wear!
|
5
7
|
|
6
8
|
SimpleCov.add_filter '/spec'
|
@@ -10,10 +12,11 @@ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
|
10
12
|
Coveralls::SimpleCov::Formatter
|
11
13
|
]
|
12
14
|
|
13
|
-
SimpleCov.
|
14
|
-
|
15
|
-
SimpleCov.
|
16
|
-
|
15
|
+
SimpleCov.start do
|
16
|
+
add_filter '/spec'
|
17
|
+
coverage_dir "#{SimpleCov.root}/spec/reports/coverage"
|
18
|
+
minimum_coverage 70
|
19
|
+
maximum_coverage_drop 5
|
17
20
|
end
|
18
21
|
|
19
|
-
require 'lucid'
|
22
|
+
require 'lucid'
|