cukesparse 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NWQwMmUxMjQyM2Y0NWY2NzhjYWZjOTA3ZTdkZDlhNWE1NGYxOTgwNQ==
4
+ NmI2M2UxZGYwN2Q1OTJlM2I3OGU0ZDQ0OTIxMTBkM2YwNjQ5NTg5MA==
5
5
  data.tar.gz: !binary |-
6
- M2MyMjBhMDczYjhjN2JmZTIyMWU4MDk3MzM4ZjQ2NjhiZjAzNmMwYg==
6
+ NTAxNjQ0NDdmZjZiZTBiMzA2YWYyN2U2MTM2NjJmOWExMjdmNjQ0OA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZWZjNDkxOWRkN2UzZDNlNmViNGRiYjI5ZDVlYzc2ZTA4ZDI0YjlmNTU3Mzhm
10
- MjMzMDI3OTFlMTAwODk3MWRjNTViNDc1OTlkODA3YjI5NWEwMDViNmViZGY0
11
- NWQxMmQwMDYyMTVjNjliM2QyZjk5ZmU1YjIyOGE0N2JhZWUwYjk=
9
+ OTRmNzU5NDUxNmY0MzEwNTExYzMxMGVlNzY1MGFiZThlNzlmOTRkOGZjMDEy
10
+ NDNlNjI5ZjYwNDNhOWE5ZWUyOGJiZTc0MGQyM2QxMjNiMTdhYWY1MDE4MGEz
11
+ MjYzYjUyYTE0MjBkOTI3MGZiOTc2N2MzMTdiYzBjMjExZTFjYjY=
12
12
  data.tar.gz: !binary |-
13
- MmY4NmI4NTY1NjY4NDY2YmZhM2M3YTU3ZWUyY2YxMDYzM2M3MTZhNzhmMWMy
14
- NTUwYmM0YzQxYmY4YWUyYWEyNTM0ZWMzYTI3NzVmM2MzYWY2MTdhODdjYzc4
15
- Mjg0Zjg3MjE2M2ZmYmU4ODBiMDhmYTQzNWYzYThkYTE1MzMwMjY=
13
+ ZTZhM2JjMmI5NDViMjA2NjkyMDljMzdkMThhNDA1NGU4YzdjODkzNDM2MGZl
14
+ ZjA4Y2M2NmNlNmZhYTQ3OGZhYzZhMzg0NjYzY2UwYjUzMzY1NDJhMTA3MjIw
15
+ ODNjNTQwOTUzZGQwNGRiNTI1ZmUwYTFmNzZiYzdkZDEwMTUyNjE=
data/.gitignore ADDED
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ coverage
6
+ InstalledFiles
7
+ lib/bundler/man
8
+ pkg
9
+ rdoc
10
+ spec/reports
11
+ test/tmp
12
+ test/version_tmp
13
+ tmp
14
+
15
+ # YARD artifacts
16
+ .yardoc
17
+ _yardoc
18
+ doc/
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0.0
4
+ - 1.9.3
5
+ - 1.9.2
6
+
7
+ script: bundle exec rspec spec/cukesparse_spec.rb
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem 'bundler', '~> 1.1'
4
+ gem "coveralls", "~> 0.6.5", require: false
5
+
6
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,57 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ cukesparse (1.0.6)
5
+ clik (~> 0.1.0)
6
+ colored (~> 1.2)
7
+ cucumber (~> 1.2.5)
8
+
9
+ GEM
10
+ remote: http://rubygems.org/
11
+ specs:
12
+ builder (3.2.0)
13
+ clik (0.1.0)
14
+ colored (1.2)
15
+ colorize (0.5.8)
16
+ coveralls (0.6.5)
17
+ colorize
18
+ multi_json (~> 1.3)
19
+ rest-client
20
+ simplecov (>= 0.7)
21
+ thor
22
+ cucumber (1.2.5)
23
+ builder (>= 2.1.2)
24
+ diff-lcs (>= 1.1.3)
25
+ gherkin (~> 2.11.7)
26
+ multi_json (~> 1.3)
27
+ diff-lcs (1.2.3)
28
+ gherkin (2.11.8)
29
+ multi_json (~> 1.3)
30
+ mime-types (1.22)
31
+ multi_json (1.7.2)
32
+ rake (10.0.4)
33
+ rest-client (1.6.7)
34
+ mime-types (>= 1.16)
35
+ rspec (2.13.0)
36
+ rspec-core (~> 2.13.0)
37
+ rspec-expectations (~> 2.13.0)
38
+ rspec-mocks (~> 2.13.0)
39
+ rspec-core (2.13.1)
40
+ rspec-expectations (2.13.0)
41
+ diff-lcs (>= 1.1.3, < 2.0)
42
+ rspec-mocks (2.13.1)
43
+ simplecov (0.7.1)
44
+ multi_json (~> 1.0)
45
+ simplecov-html (~> 0.7.1)
46
+ simplecov-html (0.7.1)
47
+ thor (0.18.1)
48
+
49
+ PLATFORMS
50
+ ruby
51
+
52
+ DEPENDENCIES
53
+ bundler (~> 1.1)
54
+ coveralls (~> 0.6.5)
55
+ cukesparse!
56
+ rake (~> 10.0.4)
57
+ rspec (~> 2.13.0)
data/README.md ADDED
@@ -0,0 +1,86 @@
1
+ [![Build Status](https://travis-ci.org/jonathanchrisp/cukesparse.png?branch=master)](https://travis-ci.org/jonathanchrisp/cukesparse)
2
+ [![Dependency Status](https://gemnasium.com/jonathanchrisp/cukesparse.png)](https://gemnasium.com/jonathanchrisp/cukesparse)
3
+ [![Coverage Status](https://coveralls.io/repos/jonathanchrisp/cukesparse/badge.png?branch=master)](https://coveralls.io/r/jonathanchrisp/cukesparse)
4
+
5
+ #cukesparse
6
+
7
+ A simple command line parser to pass default and custom arguments into Cucumber.
8
+
9
+ ## Getting Started
10
+ Cukesparse parses command line arguments and sets default arguments from the config/task.yml file. For example please see the example config task below:
11
+
12
+ test_task:
13
+ feature_order: ['features/featureOne', 'features/featureTwo', 'features/featureThree']
14
+ runtime_defaults:
15
+ environment: 'release'
16
+ log_level: 'debug'
17
+ format: 'pretty'
18
+ defaults: ['--format html', '--out coverage/report.html', '-P -s']
19
+
20
+ If you were to run the following command `cukesparse test_task -t test` cukesparse would be passed the following arguments:
21
+
22
+ ["test_task", "-t", "test"]
23
+
24
+ Cukesparse would then collate and produce the following parameters hash:
25
+
26
+ {:tags=>["--tags test"], :environment=>"ENVIRONMENT=release", :log_level=>"LOG_LEVEL=debug", :format=>"FORMAT=pretty"}
27
+
28
+ As no `environment`, `log_level` or `format` arguments were passed the runtime defaults from the config/tasks.yml are used. The following command line output would be produced:
29
+
30
+ bundle exec cucumber --require features/ features/featureOne features/featureTwo features/featureThree --tags test
31
+ ENVIRONMENT=release LOG_LEVEL=debug FORMAT=pretty --format html --out coverage/report.html -P -s
32
+
33
+ ## Parameters
34
+ Cukesparse accepts the following parameters:
35
+
36
+ ### Cucumber options
37
+ '-t' e.g. -t @abc
38
+ '-n --name' e.g. -n Login
39
+ '-f --format' e.g. -f pretty
40
+ '-d --dry-run'
41
+ '-v --verbose'
42
+ '-s --strict'
43
+ '-g --guess'
44
+ '-x --expand'
45
+
46
+ ### Custom options
47
+ All arguments below have been setup for a custom project but are useful.
48
+
49
+ ### Global options
50
+ '-e --environment' e.g. -e release
51
+ '-l --loglevel' e.g. -l debug
52
+ '-c --controller' e.g. -c chrome
53
+ '-h --headless'
54
+
55
+ ### Database options
56
+ '--cleanup'
57
+ '--no-cleanup'
58
+ '--database'
59
+ '--jenkins'
60
+
61
+ ### Retry options
62
+ '--retries' e.g. --retries 5
63
+ '--timeout' e.g. --timeout 60
64
+
65
+ ### Driver Options
66
+ '--screen' e.g. --screen 1024,1280
67
+ '--position' e.g. --position 0,0
68
+ '--screenwidth' e.g. --screenwidth 1024
69
+ '--screenheight' e.g. --screenheight 1280
70
+ '--xposition' e.g. --xposition 0
71
+ '--yposition' e.g. --yposition 0
72
+ '-H --highlight'
73
+
74
+ ### Debug
75
+ The command line option below parses the arguments and displays the original arguments that were passed, the parameters created and the command line that would be passed to system.
76
+ When the `--debug` argument is passed it only outputs what would have been produced and isn't run.
77
+
78
+ '--debug'
79
+
80
+ ## Tests
81
+ There are a number of unit tests which are included as part of this project which are run by rspec. Please run:
82
+
83
+ rspec spec/cukesparse_spec.rb
84
+
85
+ ## Feedback
86
+ I would be more than happy to recieve feedback, please email me at: jonathan.chrisp@gmail.com
data/config/tasks.yml ADDED
@@ -0,0 +1,7 @@
1
+ test_task:
2
+ feature_order: ['features/featureOne', 'features/featureTwo', 'features/featureThree']
3
+ runtime_defaults:
4
+ environment: 'release'
5
+ log_level: 'debug'
6
+ format: 'pretty'
7
+ defaults: ['--format html', '--out coverage/report.html', '-P -s']
@@ -0,0 +1,24 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'cukesparse'
3
+ s.version = '1.0.6'
4
+ s.date = '2013-04-17'
5
+ s.summary = 'Cukesparse - cucumber command line parser'
6
+ s.description = 'A simple command line parser to pass arguments into Cucumber'
7
+ s.author = 'Jonathan Chrisp'
8
+ s.email = 'jonathan.chrisp@gmail.com'
9
+ s.license = 'MIT'
10
+ s.homepage = 'https://github.com/jonathanchrisp/cukesparse'
11
+ s.required_ruby_version = ">= 1.9.2"
12
+
13
+ s.add_development_dependency 'rspec', '~> 2.13.0'
14
+ s.add_development_dependency 'rake', '~> 10.0.4'
15
+
16
+ s.add_runtime_dependency 'clik', '~> 0.1.0'
17
+ s.add_runtime_dependency 'colored', '~> 1.2'
18
+ s.add_runtime_dependency 'cucumber', '~> 1.2.5'
19
+
20
+ s.files = `git ls-files`.split("\n")
21
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
22
+ s.test_files = `git ls-files -- spec/*`.split("\n")
23
+ s.require_paths = ['lib']
24
+ end
data/lib/cukesparse.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require 'clik'
2
- require 'psych'
3
2
  require 'colored'
4
3
 
5
4
  module Cukesparse
@@ -104,9 +103,9 @@ module Cukesparse
104
103
  begin
105
104
  @config = Psych.load_file(@config_file)
106
105
  rescue Psych::SyntaxError
107
- abort 'Your tasks.yml did not parse as expected!'.red.underline
106
+ abort 'Your tasks file did not parse as expected!'.red.underline
108
107
  rescue Errno::ENOENT
109
- abort 'Your tasks.yml file is missing!'.red.underline
108
+ abort 'Your tasks file is missing!'.red.underline
110
109
  end
111
110
 
112
111
  self
@@ -756,7 +756,7 @@ describe "cukesparse" do
756
756
  context "when CLI is run with incorrect task file" do
757
757
  it "will return an error if the task file fails to parse" do
758
758
  Cukesparse.configure {|c| c.config_file = './spec/spec_files/invalid_tasks.yml'}
759
- Cukesparse.should_receive("abort").with("\e[4;31;49mYour tasks.yml did not parse as expected!\e[0m")
759
+ Cukesparse.should_receive("abort").with("\e[4;31;49mYour tasks file did not parse as expected!\e[0m")
760
760
  Cukesparse.load_config
761
761
  end
762
762
  end
@@ -764,7 +764,7 @@ describe "cukesparse" do
764
764
  context "when CLI is run with task file missing" do
765
765
  it "will return an error if the task file is missing" do
766
766
  Cukesparse.configure {|c| c.config_file = './spec/spec_files/missing_tasks.yml'}
767
- Cukesparse.should_receive("abort").with("\e[4;31;49mYour tasks.yml file is missing!\e[0m")
767
+ Cukesparse.should_receive("abort").with("\e[4;31;49mYour tasks file is missing!\e[0m")
768
768
  Cukesparse.load_config
769
769
  end
770
770
  end
@@ -0,0 +1,7 @@
1
+ test_task
2
+ feature_order: ['features/featureOne', 'features/featureTwo', 'features/featureThree']
3
+ runtime_defaults:
4
+ environment
5
+ log_level: 'debug'
6
+ format
7
+ defaults: ['--format html', '--out coverage
@@ -0,0 +1,19 @@
1
+ test_task:
2
+ feature_order: ['features/featureOne', 'features/featureTwo', 'features/featureThree']
3
+ runtime_defaults:
4
+ environment: 'release'
5
+ log_level: 'debug'
6
+ format: 'pretty'
7
+ defaults: ['--format html', '--out coverage/report.html', '-P -s']
8
+
9
+ test_task1:
10
+ feature_order: ['features/featureOne', 'features/featureTwo', 'features/featureThree']
11
+ runtime_defaults:
12
+ environment: 'release'
13
+ log_level: 'debug'
14
+ format: 'pretty'
15
+ defaults: ['--format html', '--out coverage/report.html', '-P -s']
16
+
17
+ no_runtime_defaults:
18
+ feature_order: ['features/featureOne', 'features/featureTwo', 'features/featureThree']
19
+ defaults: ['--format html', '--out coverage/report.html', '-P -s']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cukesparse
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Chrisp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-16 00:00:00.000000000 Z
11
+ date: 2013-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -87,9 +87,18 @@ executables:
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
+ - .gitignore
91
+ - .travis.yml
92
+ - Gemfile
93
+ - Gemfile.lock
94
+ - README.md
95
+ - bin/cukesparse
96
+ - config/tasks.yml
97
+ - cukesparse.gemspec
90
98
  - lib/cukesparse.rb
91
99
  - spec/cukesparse_spec.rb
92
- - bin/cukesparse
100
+ - spec/spec_files/invalid_tasks.yml
101
+ - spec/spec_files/valid_tasks.yml
93
102
  homepage: https://github.com/jonathanchrisp/cukesparse
94
103
  licenses:
95
104
  - MIT
@@ -116,4 +125,6 @@ specification_version: 4
116
125
  summary: Cukesparse - cucumber command line parser
117
126
  test_files:
118
127
  - spec/cukesparse_spec.rb
128
+ - spec/spec_files/invalid_tasks.yml
129
+ - spec/spec_files/valid_tasks.yml
119
130
  has_rdoc: