empty_cucumber 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +24 -0
- data/Rakefile +1 -0
- data/bin/empty_cucumber +4 -0
- data/empty_cucumber.gemspec +25 -0
- data/lib/empty_cucumber/version.rb +3 -0
- data/lib/empty_cucumber.rb +16 -0
- data/lib/generators/create.rb +47 -0
- data/lib/generators/templates/Gemfile.tt +4 -0
- data/lib/generators/templates/cucumber.yml.tt +1 -0
- data/lib/generators/templates/env.rb.tt +1 -0
- data/lib/generators/templates/feature_example.feature.tt +6 -0
- data/lib/generators/templates/hooks.rb.tt +11 -0
- data/lib/generators/templates/steps_example.rb.tt +11 -0
- metadata +117 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 32d6d6b89770472ff02f9ab64c2c5e8f3cdef1db
|
4
|
+
data.tar.gz: de6dd1c23d42f08fe5a1d6a1961f380c67c91187
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a606ce172f4d30377d01eed06ac6042abcd7d6a4d1afe51931d9c08aa1036af73154b6e65ca593a041256681c85d7e38d449891c645fe9af3cd2b3f42587c58d
|
7
|
+
data.tar.gz: bc690cb91d2ff1f8988812677c107b5eb0bbf0ce5a446992294ef810b7e31030b573977a73527d570297855180e979a83d3816c829664a64215d813914d33547
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Roman Rodriguez
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# EmptyCucumber
|
2
|
+
|
3
|
+
With this gem you can create an empty Cucumber project sctructure
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
$ gem install empty_cucumber
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
Positioned where you want to create a new Cucumber Project you can type:
|
12
|
+
|
13
|
+
$ empty_cucumber <project_name>
|
14
|
+
|
15
|
+
This will create a new folder with the name of <project_name> and a cucumber folders structure in it. Some example files are creted. Ensure to delete them.
|
16
|
+
|
17
|
+
|
18
|
+
## Contributing
|
19
|
+
|
20
|
+
1. Fork it ( http://github.com/<my-github-username>/empty_cucumber/fork )
|
21
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
22
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
23
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
24
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/empty_cucumber
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'empty_cucumber/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "empty_cucumber"
|
8
|
+
spec.version = EmptyCucumber::VERSION
|
9
|
+
spec.authors = ["Roman Rodriguez"]
|
10
|
+
spec.email = ["roman.g.rodriguez@gmail.com"]
|
11
|
+
spec.summary = %q{Create an empty Cucumber project}
|
12
|
+
spec.description = %q{When you need to start a new Cucumber project, just type a command}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
spec.add_dependency "thor"
|
21
|
+
spec.add_dependency "byebug"
|
22
|
+
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.5"
|
24
|
+
spec.add_development_dependency "rake"
|
25
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'thor'
|
2
|
+
|
3
|
+
require_relative 'generators/create'
|
4
|
+
|
5
|
+
module EmptyCucumber
|
6
|
+
class Base < Thor
|
7
|
+
|
8
|
+
desc "create","Creates an empty Cucumber project structure"
|
9
|
+
def prepare(name)
|
10
|
+
|
11
|
+
name.downcase!
|
12
|
+
|
13
|
+
EmptyCucumber::Create.start([name])
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module EmptyCucumber
|
2
|
+
class Create < Thor::Group
|
3
|
+
|
4
|
+
include Thor::Actions
|
5
|
+
|
6
|
+
desc "Generates empty files for a Cucumber project"
|
7
|
+
|
8
|
+
argument :name, :type => :string, :required => true, :desc => "Project name. This will be the root folder."
|
9
|
+
|
10
|
+
def self.source_root
|
11
|
+
File.dirname(__FILE__) + "/templates/"
|
12
|
+
end
|
13
|
+
|
14
|
+
def create_folders
|
15
|
+
empty_directory("#{name}/features")
|
16
|
+
empty_directory("#{name}/features/support")
|
17
|
+
empty_directory("#{name}/features/step_definitions")
|
18
|
+
empty_directory("#{name}/features/support/pages")
|
19
|
+
end
|
20
|
+
|
21
|
+
def copy_env
|
22
|
+
template "env.rb.tt", "#{name}/features/support/env.rb"
|
23
|
+
end
|
24
|
+
|
25
|
+
def copy_hooks
|
26
|
+
template "hooks.rb.tt", "#{name}/features/support/hooks.rb"
|
27
|
+
end
|
28
|
+
|
29
|
+
def copy_feature_template
|
30
|
+
template "feature_example.feature.tt", "#{name}/features/feature_example.feature"
|
31
|
+
end
|
32
|
+
|
33
|
+
def copy_cucumber_yml
|
34
|
+
template "cucumber.yml.tt", "#{name}/features/cucumber.yml"
|
35
|
+
end
|
36
|
+
|
37
|
+
def copy_steps_def_file
|
38
|
+
template "steps_example.rb.tt", "#{name}/features/step_definitions/steps_example.rb"
|
39
|
+
end
|
40
|
+
|
41
|
+
def copy_gemfile
|
42
|
+
template "Gemfile.tt", "#{name}/Gemfile"
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
default: --format pretty
|
@@ -0,0 +1 @@
|
|
1
|
+
# Here you have to put all setup (gems and files requiring, configuration, etc)
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Given (/^a precondition step$/) do
|
2
|
+
# The code that perform this step action
|
3
|
+
end
|
4
|
+
|
5
|
+
When (/^a step that makes the main change$/) do
|
6
|
+
# The code that perform this step action
|
7
|
+
end
|
8
|
+
|
9
|
+
Then (/^a step that assert the expected result$/) do
|
10
|
+
# The code that perform this step action
|
11
|
+
end
|
metadata
ADDED
@@ -0,0 +1,117 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: empty_cucumber
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Roman Rodriguez
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-08-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: byebug
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.5'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.5'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: When you need to start a new Cucumber project, just type a command
|
70
|
+
email:
|
71
|
+
- roman.g.rodriguez@gmail.com
|
72
|
+
executables:
|
73
|
+
- empty_cucumber
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- ".gitignore"
|
78
|
+
- Gemfile
|
79
|
+
- LICENSE.txt
|
80
|
+
- README.md
|
81
|
+
- Rakefile
|
82
|
+
- bin/empty_cucumber
|
83
|
+
- empty_cucumber.gemspec
|
84
|
+
- lib/empty_cucumber.rb
|
85
|
+
- lib/empty_cucumber/version.rb
|
86
|
+
- lib/generators/create.rb
|
87
|
+
- lib/generators/templates/Gemfile.tt
|
88
|
+
- lib/generators/templates/cucumber.yml.tt
|
89
|
+
- lib/generators/templates/env.rb.tt
|
90
|
+
- lib/generators/templates/feature_example.feature.tt
|
91
|
+
- lib/generators/templates/hooks.rb.tt
|
92
|
+
- lib/generators/templates/steps_example.rb.tt
|
93
|
+
homepage: ''
|
94
|
+
licenses:
|
95
|
+
- MIT
|
96
|
+
metadata: {}
|
97
|
+
post_install_message:
|
98
|
+
rdoc_options: []
|
99
|
+
require_paths:
|
100
|
+
- lib
|
101
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '0'
|
106
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
requirements: []
|
112
|
+
rubyforge_project:
|
113
|
+
rubygems_version: 2.2.2
|
114
|
+
signing_key:
|
115
|
+
specification_version: 4
|
116
|
+
summary: Create an empty Cucumber project
|
117
|
+
test_files: []
|