chemistrykit 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -1
- data/README.md +10 -2
- data/Rakefile +17 -0
- data/bin/ckit +10 -1
- data/chemistrykit.gemspec +5 -5
- data/features/exit_status.feature +31 -0
- data/features/new.feature +2 -2
- data/features/step_definitions/steps.rb +10 -0
- data/features/support/env.rb +1 -1
- data/lib/chemistrykit/cli/cli.rb +1 -0
- metadata +11 -12
- data/features/step_definitions/modified_steps.rb +0 -7
- data/spec/chemistrykit/cli_spec.rb +0 -9
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -6,9 +6,9 @@ ChemistryKit
|
|
6
6
|
|
7
7
|
### A simple and opinionated web testing framework for Selenium WebDriver
|
8
8
|
|
9
|
-
This framework was designed to help you get started with Selenium WebDriver quickly, to grow as needed, and to avoid common pitfalls by following convention over configuration.
|
9
|
+
This framework was designed to help you get started with Selenium WebDriver quickly, to grow as needed, and to avoid common pitfalls by following convention over configuration.
|
10
10
|
|
11
|
-
ChemistryKit's inspiration comes from the Saunter Selenium framework which is available in Python and PHP. You can find more about it [here](http://element34.ca/products/saunter).
|
11
|
+
ChemistryKit's inspiration comes from the Saunter Selenium framework which is available in Python and PHP. You can find more about it [here](http://element34.ca/products/saunter).
|
12
12
|
|
13
13
|
## Getting Started
|
14
14
|
|
@@ -30,3 +30,11 @@ This will run ckit and execute your beakers. By default it will run the tests lo
|
|
30
30
|
## Contributing
|
31
31
|
|
32
32
|
This project conforms to the [neverstopbuilding/craftsmanship](https://github.com/neverstopbuilding/craftsmanship) guidelines. Please see them for details.
|
33
|
+
|
34
|
+
### Install Dependencies
|
35
|
+
|
36
|
+
bundle install
|
37
|
+
|
38
|
+
### Run rake task to test code
|
39
|
+
|
40
|
+
rake build
|
data/Rakefile
CHANGED
@@ -1 +1,18 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
|
+
require "cucumber"
|
3
|
+
require "cucumber/rake/task"
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
|
6
|
+
task :default => [:build]
|
7
|
+
|
8
|
+
desc 'Runs standard build activities.'
|
9
|
+
task :build => [:clean, :spec, :cucumber]
|
10
|
+
|
11
|
+
desc 'Removes the build directory.'
|
12
|
+
task :clean do
|
13
|
+
FileUtils.rm_rf('build');
|
14
|
+
end
|
15
|
+
|
16
|
+
RSpec::Core::RakeTask.new(:spec)
|
17
|
+
|
18
|
+
Cucumber::Rake::Task.new(:cucumber)
|
data/bin/ckit
CHANGED
@@ -2,4 +2,13 @@
|
|
2
2
|
|
3
3
|
require 'chemistrykit'
|
4
4
|
|
5
|
-
ChemistryKit::CLI::CKitCLI.start
|
5
|
+
ckit_result = ChemistryKit::CLI::CKitCLI.start
|
6
|
+
|
7
|
+
# Had difficulties getting Thor to return a proper exit status on failure
|
8
|
+
# Will need to revisit
|
9
|
+
|
10
|
+
if ckit_result.is_a? Array
|
11
|
+
exit 0
|
12
|
+
else
|
13
|
+
exit ckit_result
|
14
|
+
end
|
data/chemistrykit.gemspec
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "chemistrykit"
|
3
|
-
s.version = "1.
|
3
|
+
s.version = "1.2.0"
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
|
-
s.authors = ["Dave Haeffner"
|
6
|
-
s.email = ["dave@arrgyle.com"
|
5
|
+
s.authors = ["Dave Haeffner"]
|
6
|
+
s.email = ["dave@arrgyle.com"]
|
7
7
|
s.homepage = "https://github.com/arrgyle/chemistrykit"
|
8
8
|
s.summary = "A simple and opinionated web testing framework for Selenium that follows convention over configuration."
|
9
|
-
s.description = "
|
9
|
+
s.description = "Fixing a bug with exit status codes not returning properly on failure. And bumping to a new version of selenium-connect to get better logging and access to GhostDriver/PhantomJS."
|
10
10
|
s.license = 'MIT'
|
11
11
|
|
12
12
|
s.files = `git ls-files`.split($/)
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.add_dependency "selenium-webdriver", "~> 2.29.0"
|
22
22
|
s.add_dependency "ci_reporter", "~> 1.8.3"
|
23
23
|
s.add_dependency "rest-client", "~> 1.6.7"
|
24
|
-
s.add_dependency "selenium-connect", "~> 1.
|
24
|
+
s.add_dependency "selenium-connect", "~> 1.9.0"
|
25
25
|
|
26
26
|
s.add_development_dependency "rspec", "~> 2.12.0"
|
27
27
|
s.add_development_dependency "aruba", "~> 0.5.1"
|
@@ -0,0 +1,31 @@
|
|
1
|
+
Feature: Exit Status
|
2
|
+
|
3
|
+
Background:
|
4
|
+
Given I run `ckit new cheese`
|
5
|
+
And I cd to "cheese"
|
6
|
+
|
7
|
+
Scenario: Passing
|
8
|
+
And a file named "beaker/test_beaker.rb" with:
|
9
|
+
"""
|
10
|
+
describe "Cheese", :depth => 'shallow' do
|
11
|
+
it "loads an external web page" do
|
12
|
+
@driver.get "http://www.google.com"
|
13
|
+
@driver.title.should include("Google")
|
14
|
+
end
|
15
|
+
end
|
16
|
+
"""
|
17
|
+
When I run `ckit brew`
|
18
|
+
Then the exit code should be 0
|
19
|
+
|
20
|
+
Scenario: Failing
|
21
|
+
And a file named "beaker/test_beaker.rb" with:
|
22
|
+
"""
|
23
|
+
describe "Cheese", :depth => 'shallow' do
|
24
|
+
it "loads an external web page" do
|
25
|
+
@driver.get "http://www.google.com"
|
26
|
+
@driver.title.should_not include("Google")
|
27
|
+
end
|
28
|
+
end
|
29
|
+
"""
|
30
|
+
When I run `ckit brew`
|
31
|
+
Then the exit code should be 1
|
data/features/new.feature
CHANGED
@@ -3,8 +3,8 @@ Feature: ckit new
|
|
3
3
|
Run "ckit new <project_name>" to generate a new ChemistryKit project
|
4
4
|
|
5
5
|
Background: Running ckit new
|
6
|
-
When I run `bundle exec ckit new
|
7
|
-
And I cd to "
|
6
|
+
When I run `bundle exec ckit new new-project`
|
7
|
+
And I cd to "new-project"
|
8
8
|
|
9
9
|
@announce
|
10
10
|
Scenario: Test Harness is created
|
@@ -0,0 +1,10 @@
|
|
1
|
+
When /^I overwrite ([^"]*) with:$/ do |file_name, file_content|
|
2
|
+
#Modified from https://github.com/cucumber/aruba/blob/master/lib/aruba/cucumber.rb
|
3
|
+
require 'erb'
|
4
|
+
data = ERB.new(file_content)
|
5
|
+
overwrite_file(file_name, data.result)
|
6
|
+
end
|
7
|
+
|
8
|
+
Then(/^the exit code should be (\d+)$/) do |exit_status|
|
9
|
+
$?.exitstatus.should == exit_status.to_i
|
10
|
+
end
|
data/features/support/env.rb
CHANGED
data/lib/chemistrykit/cli/cli.rb
CHANGED
metadata
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chemistrykit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Dave Haeffner
|
9
|
-
- Jason Wieringa
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-19 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: thor
|
@@ -99,7 +98,7 @@ dependencies:
|
|
99
98
|
requirements:
|
100
99
|
- - ~>
|
101
100
|
- !ruby/object:Gem::Version
|
102
|
-
version: 1.
|
101
|
+
version: 1.9.0
|
103
102
|
type: :runtime
|
104
103
|
prerelease: false
|
105
104
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -107,7 +106,7 @@ dependencies:
|
|
107
106
|
requirements:
|
108
107
|
- - ~>
|
109
108
|
- !ruby/object:Gem::Version
|
110
|
-
version: 1.
|
109
|
+
version: 1.9.0
|
111
110
|
- !ruby/object:Gem::Dependency
|
112
111
|
name: rspec
|
113
112
|
requirement: !ruby/object:Gem::Requirement
|
@@ -172,11 +171,11 @@ dependencies:
|
|
172
171
|
- - ~>
|
173
172
|
- !ruby/object:Gem::Version
|
174
173
|
version: 10.0.3
|
175
|
-
description:
|
176
|
-
|
174
|
+
description: Fixing a bug with exit status codes not returning properly on failure.
|
175
|
+
And bumping to a new version of selenium-connect to get better logging and access
|
176
|
+
to GhostDriver/PhantomJS.
|
177
177
|
email:
|
178
178
|
- dave@arrgyle.com
|
179
|
-
- jason@arrgyle.com
|
180
179
|
executables:
|
181
180
|
- ckit
|
182
181
|
extensions:
|
@@ -195,8 +194,9 @@ files:
|
|
195
194
|
- chemistrykit.gemspec
|
196
195
|
- ext/mkrf_conf.rb
|
197
196
|
- features/brew.feature
|
197
|
+
- features/exit_status.feature
|
198
198
|
- features/new.feature
|
199
|
-
- features/step_definitions/
|
199
|
+
- features/step_definitions/steps.rb
|
200
200
|
- features/support/env.rb
|
201
201
|
- lib/chemistrykit.rb
|
202
202
|
- lib/chemistrykit/cli/beaker.rb
|
@@ -214,7 +214,6 @@ files:
|
|
214
214
|
- lib/templates/chemistrykit/formulas/.gitkeep
|
215
215
|
- lib/templates/formula.tt
|
216
216
|
- readme2.md
|
217
|
-
- spec/chemistrykit/cli_spec.rb
|
218
217
|
homepage: https://github.com/arrgyle/chemistrykit
|
219
218
|
licenses:
|
220
219
|
- MIT
|
@@ -243,7 +242,7 @@ summary: A simple and opinionated web testing framework for Selenium that follow
|
|
243
242
|
convention over configuration.
|
244
243
|
test_files:
|
245
244
|
- features/brew.feature
|
245
|
+
- features/exit_status.feature
|
246
246
|
- features/new.feature
|
247
|
-
- features/step_definitions/
|
247
|
+
- features/step_definitions/steps.rb
|
248
248
|
- features/support/env.rb
|
249
|
-
- spec/chemistrykit/cli_spec.rb
|