bddfire 1.0.2 → 1.0.3
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.
- checksums.yaml +8 -8
- data/.gitignore +8 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +107 -0
- data/LICENSE +3 -0
- data/README.markdown +21 -0
- data/Rakefile +19 -0
- data/bddfire.gemspec +30 -0
- data/bin/bddfire +7 -0
- data/features/cucumber_template.feature +7 -0
- data/features/step_definitions/all_steps.rb +11 -0
- data/features/support/env.rb +6 -0
- data/features/support/support_code.rb +0 -0
- data/lib/bddfire/app.rb +130 -0
- data/lib/bddfire/extensions/string.rb +11 -0
- data/lib/bddfire/tasks.rb +30 -0
- data/lib/bddfire/version.rb +3 -0
- data/lib/bddfire.rb +6 -0
- data/scaffold/features/support/env.rb +22 -0
- data/scaffold/features/support/helpers.erb +6 -0
- data/scaffold/features/support/hooks.rb +0 -0
- data/scaffold/lib/project/version.erb +3 -0
- data/scaffold/lib/project.erb +2 -0
- data/scaffold/rake_tasks/cucumber.rb +13 -0
- data/scaffold/rake_tasks/cuke_sniffer.rb +4 -0
- data/scaffold/rake_tasks/rspec.rb +12 -0
- data/scaffold/rake_tasks/rubocop.rb +8 -0
- data/scaffold/rake_tasks/yard.rb +5 -0
- data/scaffold/spec/spec_helper.rb +8 -0
- metadata +32 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTFiMmVmNDIxYmMwZThlYWZhOWFkZWQwODg0MTg0MmYwM2RjNGE1MA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODdlNDA3NDZlNjNlZDc0YTEyY2NhNmU3MGQzYjlhMTdhMjA0MmY1Nw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzJkNzhmNDFiYTU1N2U3OWNlMzBhNDAyMTQxYzM1OGE4MTYxZWU4NmM0MDhl
|
10
|
+
NjUyMDQwOTRhYzZlMjY4Mzc5MjMyMTBiYmFmM2UwNWI5NGQ2MWExNTdlYmNj
|
11
|
+
ODdhMGQ4NDljY2NmNjYyZmNhY2E3NDc3MzYwYTdhNzk3MTMyYzU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTRkNmJlZmJmYjYzN2YxZjM1ODNmYjJhMTQzMWY2YzZlNGNhZjBiNjYyYTQw
|
14
|
+
M2YzZTgzNTc2MmY3ZGNjYjE4YjVmZTUwMDkzZTZmNDE4ZGIzZjdhMTg0NzAw
|
15
|
+
N2IzNTFjOGU1ZWE2NTE3M2E4NzcxYzhlODZhNmQ1MzljMDczZjY=
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,107 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
bddfire (1.0.0)
|
5
|
+
thor
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: http://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activesupport (4.1.4)
|
11
|
+
i18n (~> 0.6, >= 0.6.9)
|
12
|
+
json (~> 1.7, >= 1.7.7)
|
13
|
+
minitest (~> 5.1)
|
14
|
+
thread_safe (~> 0.1)
|
15
|
+
tzinfo (~> 1.1)
|
16
|
+
archive-tar-minitar (0.5.2)
|
17
|
+
aruba (0.6.0)
|
18
|
+
childprocess (>= 0.3.6)
|
19
|
+
cucumber (>= 1.1.1)
|
20
|
+
rspec-expectations (>= 2.7.0)
|
21
|
+
ast (2.0.0)
|
22
|
+
bluecloth (2.2.0)
|
23
|
+
builder (3.2.2)
|
24
|
+
childprocess (0.5.3)
|
25
|
+
ffi (~> 1.0, >= 1.0.11)
|
26
|
+
cucumber (1.3.15)
|
27
|
+
builder (>= 2.1.2)
|
28
|
+
diff-lcs (>= 1.1.3)
|
29
|
+
gherkin (~> 2.12)
|
30
|
+
multi_json (>= 1.7.5, < 2.0)
|
31
|
+
multi_test (>= 0.1.1)
|
32
|
+
cuke_sniffer (0.0.8)
|
33
|
+
roxml
|
34
|
+
diff-lcs (1.2.5)
|
35
|
+
ffi (1.9.3)
|
36
|
+
gherkin (2.12.2)
|
37
|
+
multi_json (~> 1.3)
|
38
|
+
i18n (0.6.11)
|
39
|
+
json (1.8.1)
|
40
|
+
mime-types (2.3)
|
41
|
+
mini_portile (0.6.0)
|
42
|
+
minitest (5.4.0)
|
43
|
+
multi_json (1.10.1)
|
44
|
+
multi_test (0.1.1)
|
45
|
+
netrc (0.7.7)
|
46
|
+
nokogiri (1.6.2.1)
|
47
|
+
mini_portile (= 0.6.0)
|
48
|
+
parallel (1.0.0)
|
49
|
+
parallel_tests (1.0.0)
|
50
|
+
parallel
|
51
|
+
parser (2.2.0.pre.3)
|
52
|
+
ast (>= 1.1, < 3.0)
|
53
|
+
slop (~> 3.4, >= 3.4.5)
|
54
|
+
powerpack (0.0.9)
|
55
|
+
rainbow (2.0.0)
|
56
|
+
rake (10.3.2)
|
57
|
+
relish (0.7)
|
58
|
+
archive-tar-minitar (>= 0.5.2)
|
59
|
+
json (>= 1.4.6)
|
60
|
+
rest-client (>= 1.6.1)
|
61
|
+
rest-client (1.7.1)
|
62
|
+
mime-types (>= 1.16, < 3.0)
|
63
|
+
netrc (~> 0.7)
|
64
|
+
roxml (3.3.1)
|
65
|
+
activesupport (>= 2.3.0)
|
66
|
+
nokogiri (>= 1.3.3)
|
67
|
+
rspec (3.0.0)
|
68
|
+
rspec-core (~> 3.0.0)
|
69
|
+
rspec-expectations (~> 3.0.0)
|
70
|
+
rspec-mocks (~> 3.0.0)
|
71
|
+
rspec-core (3.0.2)
|
72
|
+
rspec-support (~> 3.0.0)
|
73
|
+
rspec-expectations (3.0.2)
|
74
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
75
|
+
rspec-support (~> 3.0.0)
|
76
|
+
rspec-mocks (3.0.2)
|
77
|
+
rspec-support (~> 3.0.0)
|
78
|
+
rspec-support (3.0.2)
|
79
|
+
rubocop (0.24.1)
|
80
|
+
json (>= 1.7.7, < 2)
|
81
|
+
parser (>= 2.2.0.pre.3, < 3.0)
|
82
|
+
powerpack (~> 0.0.6)
|
83
|
+
rainbow (>= 1.99.1, < 3.0)
|
84
|
+
ruby-progressbar (~> 1.4)
|
85
|
+
ruby-progressbar (1.5.1)
|
86
|
+
slop (3.5.0)
|
87
|
+
thor (0.19.1)
|
88
|
+
thread_safe (0.3.4)
|
89
|
+
tzinfo (1.2.1)
|
90
|
+
thread_safe (~> 0.1)
|
91
|
+
yard (0.8.7.4)
|
92
|
+
|
93
|
+
PLATFORMS
|
94
|
+
ruby
|
95
|
+
|
96
|
+
DEPENDENCIES
|
97
|
+
aruba
|
98
|
+
bddfire!
|
99
|
+
bluecloth
|
100
|
+
cucumber
|
101
|
+
cuke_sniffer
|
102
|
+
parallel_tests
|
103
|
+
rake
|
104
|
+
relish
|
105
|
+
rspec
|
106
|
+
rubocop
|
107
|
+
yard
|
data/LICENSE
ADDED
data/README.markdown
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# bddfire
|
2
|
+
|
3
|
+
Generate default toolkit around BDD with cucumber and friends
|
4
|
+
## Installation
|
5
|
+
|
6
|
+
The usual:
|
7
|
+
|
8
|
+
$ gem install bddfire
|
9
|
+
|
10
|
+
## Usage
|
11
|
+
|
12
|
+
In your project's root directory...
|
13
|
+
|
14
|
+
### Cucumber
|
15
|
+
|
16
|
+
$ bddfire cucumber
|
17
|
+
|
18
|
+
This will create a `features` directory with all the files you need to hit the
|
19
|
+
|
20
|
+
If you don't already have a `Gemfile` or `Rakefile`, one will be created.
|
21
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
require 'yard'
|
4
|
+
require 'bundler/setup'
|
5
|
+
|
6
|
+
Bundler::GemHelper.install_tasks
|
7
|
+
|
8
|
+
# Cucumber tasks
|
9
|
+
require 'cucumber/rake/task'
|
10
|
+
YARD::Rake::YardocTask.new(:yard) do |t|
|
11
|
+
t.files = ['features/**/*.feature', 'features/**/*.rb']
|
12
|
+
#t.options = ['--any', '--extra', '--opts'] # optional
|
13
|
+
end
|
14
|
+
|
15
|
+
Cucumber::Rake::Task.new(:features) do |t|
|
16
|
+
t.cucumber_opts = "features --format pretty"
|
17
|
+
end
|
18
|
+
|
19
|
+
task :default => [:features]
|
data/bddfire.gemspec
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "bddfire/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "bddfire"
|
7
|
+
s.version = BDDfire::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Shashikant Jagtap"]
|
10
|
+
s.email = ["shashikant.jagtap@aol.co.uk"]
|
11
|
+
s.homepage = "https://github.com/Shashikant86/bddfire"
|
12
|
+
s.license = 'MIT'
|
13
|
+
s.summary = %q{Generate template project for the cucumber BDD with related tools}
|
14
|
+
s.description = %q{Blue print for the cucumber, capybara, cuke_sniffer, rubocop, relish, yard and many of them libraries}
|
15
|
+
s.add_dependency "thor"
|
16
|
+
s.add_development_dependency "rake"
|
17
|
+
s.add_development_dependency "rspec"
|
18
|
+
s.add_development_dependency "cucumber"
|
19
|
+
s.add_development_dependency "aruba"
|
20
|
+
s.add_development_dependency "yard"
|
21
|
+
s.add_development_dependency "bluecloth"
|
22
|
+
s.add_development_dependency "rubocop"
|
23
|
+
s.add_development_dependency "relish"
|
24
|
+
s.add_development_dependency "cuke_sniffer"
|
25
|
+
s.add_development_dependency "parallel_tests"
|
26
|
+
s.files = `git ls-files`.split("\n")
|
27
|
+
s.test_files = `git ls-files -- {features}/*`.split("\n")
|
28
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
29
|
+
s.require_paths = ["lib"]
|
30
|
+
end
|
data/bin/bddfire
ADDED
File without changes
|
data/lib/bddfire/app.rb
ADDED
@@ -0,0 +1,130 @@
|
|
1
|
+
require 'thor'
|
2
|
+
require 'bddfire/version'
|
3
|
+
|
4
|
+
module BDDfire
|
5
|
+
class App < Thor
|
6
|
+
include Thor::Actions
|
7
|
+
map %w(-v -V --version) => :version
|
8
|
+
def self.source_root
|
9
|
+
File.expand_path('../../scaffold', File.dirname(__FILE__))
|
10
|
+
end
|
11
|
+
|
12
|
+
desc "version", "current version"
|
13
|
+
def version
|
14
|
+
say BDDfire::VERSION
|
15
|
+
end
|
16
|
+
|
17
|
+
desc "cucumber", "Set up cucumber"
|
18
|
+
def cucumber
|
19
|
+
genarate_gemfile
|
20
|
+
insert_gem 'cucumber'
|
21
|
+
insert_gem 'capybara'
|
22
|
+
insert_gem 'selenium-webdriver'
|
23
|
+
insert_gem 'poltergeist'
|
24
|
+
generate_rakefile
|
25
|
+
add_task BDDfire::Tasks.cucumber
|
26
|
+
add_file "features/step_definitions/#{project_name}_steps.rb"
|
27
|
+
add_file "features/#{project_name}.feature"
|
28
|
+
add_file "cucumber.yml"
|
29
|
+
add_file ".rubocop.yml"
|
30
|
+
add_file ".relish"
|
31
|
+
add_file ".ruby-version"
|
32
|
+
add_file ".travis.yml"
|
33
|
+
copy_file "features/support/env.rb"
|
34
|
+
copy_file "features/support/hooks.rb"
|
35
|
+
template "features/support/helpers.erb", "features/support/helpers.rb"
|
36
|
+
init_gitignore
|
37
|
+
append_file ".gitignore", ".ruby-version\n"
|
38
|
+
append_file ".gitignore", ".travis.yml\n"
|
39
|
+
end
|
40
|
+
|
41
|
+
desc "rspec", "Set up rspec"
|
42
|
+
def rspec
|
43
|
+
genarate_gemfile
|
44
|
+
insert_gem 'rspec'
|
45
|
+
generate_rakefile
|
46
|
+
add_task BDDfire::Tasks.rspec
|
47
|
+
copy_file "spec/spec_helper.rb"
|
48
|
+
end
|
49
|
+
|
50
|
+
desc "yard", "Set up Yard"
|
51
|
+
def yard
|
52
|
+
genarate_gemfile
|
53
|
+
insert_gem 'yard'
|
54
|
+
|
55
|
+
generate_rakefile
|
56
|
+
add_task BDDfire::Tasks.yard(project_name)
|
57
|
+
|
58
|
+
init_gitignore
|
59
|
+
append_file ".gitignore", "doc/*\n"
|
60
|
+
append_file ".gitignore", ".yardoc\n"
|
61
|
+
end
|
62
|
+
|
63
|
+
desc "cuke_sniffer", "Set up cuke_sniffer"
|
64
|
+
def cuke_sniffer
|
65
|
+
genarate_gemfile
|
66
|
+
insert_gem 'cuke_sniffer'
|
67
|
+
|
68
|
+
generate_rakefile
|
69
|
+
add_task BDDfire::Tasks.cuke_sniffer
|
70
|
+
end
|
71
|
+
|
72
|
+
desc "rubocop", "Set up rubocop"
|
73
|
+
def cuke_sniffer
|
74
|
+
genarate_gemfile
|
75
|
+
insert_gem 'rubocop'
|
76
|
+
|
77
|
+
generate_rakefile
|
78
|
+
add_task BDDfire::Tasks.rubocop
|
79
|
+
end
|
80
|
+
|
81
|
+
private
|
82
|
+
|
83
|
+
def project_name
|
84
|
+
destination_root.split(/\/|\\/).last
|
85
|
+
end
|
86
|
+
|
87
|
+
def genarate_gemfile
|
88
|
+
unless destination_file_exists?("Gemfile")
|
89
|
+
add_file "Gemfile"
|
90
|
+
append_file "Gemfile" do
|
91
|
+
"source 'http://rubygems.org'\n\n" +
|
92
|
+
"gem 'rake'\n"
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
def generate_rakefile
|
98
|
+
unless destination_file_exists?("Rakefile")
|
99
|
+
add_file "Rakefile"
|
100
|
+
append_file "Rakefile" do
|
101
|
+
"require 'rubygems'\n" +
|
102
|
+
"require 'bundler'\n" +
|
103
|
+
"require 'bundler/setup'\n\n"
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
def init_gitignore
|
109
|
+
add_file ".gitignore" unless destination_file_exists?(".gitignore")
|
110
|
+
ensure_eof_newline(".gitignore")
|
111
|
+
end
|
112
|
+
|
113
|
+
def destination_file_exists?(filename)
|
114
|
+
File.exist?(File.join(destination_root, filename))
|
115
|
+
end
|
116
|
+
|
117
|
+
def insert_gem(gem_name)
|
118
|
+
ensure_eof_newline("Gemfile")
|
119
|
+
append_file "Gemfile", "gem '#{gem_name}'\n"
|
120
|
+
end
|
121
|
+
|
122
|
+
def add_task(the_task)
|
123
|
+
append_file "Rakefile", "\n\n#{the_task}\n"
|
124
|
+
end
|
125
|
+
|
126
|
+
def ensure_eof_newline(filename)
|
127
|
+
gsub_file(filename, /([^\n])\z/, "\\1\n")
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module BDDfire
|
2
|
+
class Tasks
|
3
|
+
def self.cucumber
|
4
|
+
@cucumber_tasks ||= read_task_file('cucumber.rb')
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.rspec
|
8
|
+
@rspec_tasks ||= read_task_file('rspec.rb')
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.rubocop
|
12
|
+
@rubocop_tasks ||= read_task_file('rubocop.rb')
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.cuke_sniffer
|
16
|
+
@cuke_sniffer_tasks ||= read_task_file('cuke_sniffer.rb')
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.yard(project_name)
|
20
|
+
@yard_tasks ||= read_task_file('yard.rb').gsub(
|
21
|
+
'{{project_name}}', project_name
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
def self.read_task_file(filename)
|
27
|
+
File.read(File.join(BDDfire::App.source_root, 'rake_tasks', filename))
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/lib/bddfire.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler/setup'
|
3
|
+
require "Capybara/cucumber"
|
4
|
+
require "rspec"
|
5
|
+
require 'capybara/poltergeist'
|
6
|
+
require 'selenium-webdriver'
|
7
|
+
|
8
|
+
Capybara.default_driver = :selenium
|
9
|
+
|
10
|
+
Capybara.register_driver :poltergeist do |app|
|
11
|
+
|
12
|
+
options = {
|
13
|
+
:js_errors => true,
|
14
|
+
:timeout => 120,
|
15
|
+
:debug => false,
|
16
|
+
:phantomjs_options => ['--load-images=no', '--disk-cache=false'],
|
17
|
+
:inspector => true,
|
18
|
+
|
19
|
+
}
|
20
|
+
|
21
|
+
Capybara::Poltergeist::Driver.new(app, options)
|
22
|
+
end
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'cucumber/rake/task'
|
2
|
+
Cucumber::Rake::Task.new(:features) do |features|
|
3
|
+
features.cucumber_opts = "features --tags ~@wip --format progress"
|
4
|
+
end
|
5
|
+
namespace :features do
|
6
|
+
Cucumber::Rake::Task.new(:pretty, "Run Cucumber features with output in pretty format") do |features|
|
7
|
+
features.cucumber_opts = "features --tags ~@wip --format pretty"
|
8
|
+
end
|
9
|
+
Cucumber::Rake::Task.new(:wip, "Run @wip (Work In Progress) Cucumber features") do |features|
|
10
|
+
features.cucumber_opts = "features --tags @wip --format progress"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'rspec/core/rake_task'
|
2
|
+
desc "Run specs"
|
3
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
4
|
+
t.rspec_opts = %w(--color)
|
5
|
+
end
|
6
|
+
namespace :spec do
|
7
|
+
desc "Run specs with output in documentation format"
|
8
|
+
RSpec::Core::RakeTask.new(:doc) do |t|
|
9
|
+
t.rspec_opts = ["--color", "--format d"]
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bddfire
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shashikant Jagtap
|
@@ -168,10 +168,39 @@ description: Blue print for the cucumber, capybara, cuke_sniffer, rubocop, relis
|
|
168
168
|
yard and many of them libraries
|
169
169
|
email:
|
170
170
|
- shashikant.jagtap@aol.co.uk
|
171
|
-
executables:
|
171
|
+
executables:
|
172
|
+
- bddfire
|
172
173
|
extensions: []
|
173
174
|
extra_rdoc_files: []
|
174
|
-
files:
|
175
|
+
files:
|
176
|
+
- .gitignore
|
177
|
+
- Gemfile
|
178
|
+
- Gemfile.lock
|
179
|
+
- LICENSE
|
180
|
+
- README.markdown
|
181
|
+
- Rakefile
|
182
|
+
- bddfire.gemspec
|
183
|
+
- bin/bddfire
|
184
|
+
- features/cucumber_template.feature
|
185
|
+
- features/step_definitions/all_steps.rb
|
186
|
+
- features/support/env.rb
|
187
|
+
- features/support/support_code.rb
|
188
|
+
- lib/bddfire.rb
|
189
|
+
- lib/bddfire/app.rb
|
190
|
+
- lib/bddfire/extensions/string.rb
|
191
|
+
- lib/bddfire/tasks.rb
|
192
|
+
- lib/bddfire/version.rb
|
193
|
+
- scaffold/features/support/env.rb
|
194
|
+
- scaffold/features/support/helpers.erb
|
195
|
+
- scaffold/features/support/hooks.rb
|
196
|
+
- scaffold/lib/project.erb
|
197
|
+
- scaffold/lib/project/version.erb
|
198
|
+
- scaffold/rake_tasks/cucumber.rb
|
199
|
+
- scaffold/rake_tasks/cuke_sniffer.rb
|
200
|
+
- scaffold/rake_tasks/rspec.rb
|
201
|
+
- scaffold/rake_tasks/rubocop.rb
|
202
|
+
- scaffold/rake_tasks/yard.rb
|
203
|
+
- scaffold/spec/spec_helper.rb
|
175
204
|
homepage: https://github.com/Shashikant86/bddfire
|
176
205
|
licenses:
|
177
206
|
- MIT
|