bddfire 1.7.5 → 1.7.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
- NWQwNTY3ODVlZDE3NzMwODZhMTEzNWJiZmQ4ZWM0MzMzMjNjZjVmYw==
4
+ MTVmYTZiNWJkNWQ5YWRjMDI1YjA2YzAxNTljNDA4ZTAyNGY5YmQzYw==
5
5
  data.tar.gz: !binary |-
6
- OTg3MDA4M2JlNDgxZjU4ODJmZGRkY2EwNzY1ZDgyZGE4Zjc0NmUyZg==
6
+ MDRlMzM3ZDY0ZGViOGQ0NWJhNzIzZWE3YWNjYTc2MWVkODNkNWE3Yw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NmNkNmQzN2M1NzJkYjBiOWQ0OTE1MzEyMjgzOWVjOGExZjg0ZmE0ZGNjOGUx
10
- N2Q0MWQ3YzQyZjljNzVjMGU5MmY0YTdjMDUzNmRlMTc2YzMzMWNkNzIxYjJi
11
- NGIwZmY3MDU3YWNhMjFlZTI2ODc1MzY3ZjdhYmNmYzIxMTc4M2Q=
9
+ Y2Q3YTY1OGYxMzcwMzk0MTJkYWMyYzM0ZmZhYzVhOGVjODViZGJiOWRjYjUw
10
+ YTk2Mzg3NDhmNGY0MjgzZmE0OWJkNDE5NGFjODE2OWI1NDA3NzhlOWQ2NzY0
11
+ OTk4OTNiZDZkZjRmZmMzYjE1N2ExNjVkMTJjOGM4YWM0MTdlOWE=
12
12
  data.tar.gz: !binary |-
13
- OTY3ODlkMDYxZTM0YmJjODEzYjQyN2E2OGQwNjZkZTdhNjIxZTExNTg0MjQ4
14
- N2M2YzY4MjRlNmZmNGFkY2EwZTc1MjEyNjAxNWRjN2ZhZGI1MTlmNTlkZDRj
15
- MDdjZDQzYjgyMGM5ZGRlZTlmNThmNjUxODAyNjIxM2JjNzYwOWQ=
13
+ ZjRiMmZkN2ViNDUzZWE2NWNmMGJlM2I3OTMyZGFjMzQ5MDY1ZjJiZmI3YmMz
14
+ ZjViZTM2Y2Y5NWQ0Zjc1Zjc2YmFiYTI1NDNkNDhhNjk4MzUxMTQ5NDYwOTcy
15
+ ZmM0ZmE0ZjEzN2Q3YWFkYTEwM2ZhZmNmZTZmYTQ3NmU1MWI1ZDQ=
data/README.markdown CHANGED
@@ -35,32 +35,6 @@ One command will install Ruby Cucumber framework with all possibly supported too
35
35
 
36
36
  If you don't already have a `Gemfile` or `Rakefile`, one will be created.
37
37
 
38
- Output will look like this:
39
-
40
- append Gemfile
41
- create Rakefile
42
- create features/step_definitions/google_steps.rb
43
- create features/step_definitions/{project_nemae}_steps.rb
44
- create features/{project_nemae}.feature
45
- create features/google.feature
46
- create cucumber.yml
47
- create .rubocop.yml
48
- create .ruby-version
49
- create .travis.yml
50
- create .relish
51
- create .yard.yml
52
- create browser.json
53
- create package.json
54
- create README.md
55
- create ci_script
56
- create features/support/env.rb
57
- create features/support/hooks.rb
58
- create features/support/responsive.rb
59
- create features/pages/HomePage.rb
60
- create features/pages/Abstract.rb
61
- create features/support/helpers.rb
62
- create .gitignore
63
-
64
38
 
65
39
  ### Install & Run BDDfire framework
66
40
 
@@ -152,3 +126,11 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
152
126
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
153
127
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
154
128
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
129
+
130
+ ## Contributing
131
+
132
+ 1. Fork it ( https://github.com/Shashikant86/bddfire/fork )
133
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
134
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
135
+ 4. Push to the branch (`git push origin my-new-feature`)
136
+ 5. Create a new Pull Request
data/bddfire.gemspec CHANGED
@@ -13,9 +13,6 @@ Gem::Specification.new do |s|
13
13
  s.required_ruby_version = '>= 1.9.3'
14
14
  s.summary = %q{Get started with BDD, Cucumber and friends in a minute}
15
15
  s.description = %q{Instant BDD Framework - Ruby, Cucumber, Capybara, selenium, Appium, Saucelabs, Browserstack, Testingbot, poltergeist, cuke_sniffer, rubocop, relish, yard and many more awesome libraries}
16
- s.add_dependency "thor"
17
- s.add_development_dependency "aruba", '~> 0'
18
- s.add_development_dependency "bluecloth", '~> 0'
19
16
  s.add_runtime_dependency "cucumber", '~> 1.3', '>= 1.3.18'
20
17
  s.add_runtime_dependency "capybara", '~> 2.4.4', '>= 2.4.1'
21
18
  s.add_runtime_dependency "rspec", '~> 3.2.0', '>= 3.0.0'
data/bin/bddfire CHANGED
@@ -1,15 +1,177 @@
1
1
  #!/usr/bin/env ruby
2
- require 'thor'
3
- require 'rubygems'
4
- require 'bddfire'
2
+ require 'bddfire/version'
3
+ require 'fileutils'
4
+ require 'tempfile'
5
+ require 'json'
6
+ require "rubygems"
5
7
 
6
8
  lib_dir = File.expand_path("../lib", File.dirname(__FILE__))
7
9
  $:.unshift lib_dir unless $:.include?(lib_dir)
8
- # require 'fileutils'
9
- require 'bddfire/version'
10
- BDDfire::App.start
11
10
 
12
- # @root_dir =File.join(FileUtils.pwd, "framework")
13
- # @source_dir = File.join(File.dirname(__FILE__), '..', 'scaffold')
14
- #
15
- # FileUtils.cp_r(@source_dir, @root_dir)
11
+ @root_dir =File.join(FileUtils.pwd, "cucumber")
12
+ @root_feature_dir =File.join(@root_dir, "features")
13
+ @root_lib_dir =File.join(@root_dir, "lib")
14
+ @root_scripts_dir =File.join(@root_dir, "script")
15
+ @source_dir = File.join(File.dirname(__FILE__), '..', 'scaffold')
16
+ @source_feature_dir =File.join(@source_dir, "features")
17
+ @source_lib_dir =File.join(@source_dir, "lib")
18
+ @source_scripts_dir =File.join(@source_dir, "scripts")
19
+ @source_config_dir =File.join(@source_dir, "config_files")
20
+
21
+ def bddfire_scaffold
22
+ if File.exists?(@root_feature_dir)
23
+ puts "There is already features directory. Please remane existing features directory to carry on "
24
+ exit 1
25
+ end
26
+
27
+ msg("Info") do
28
+ puts "=======Copying all config files for cucumber projects============\n"
29
+ sleep (2)
30
+ puts "=======Copying Gemfile containing all required Gems============\n"
31
+ sleep (2)
32
+ puts "=======Copying cucumber.yml file with profiles of all Capybara Drivers============\n"
33
+ sleep (2)
34
+ puts "=======Copying pakage.json file with required npm dependencies============\n"
35
+ sleep (2)
36
+ puts "=======Copying README.md file with template usage============\n"
37
+ sleep (2)
38
+ puts "=======Copying browser.json file with browsers and devices config for cloud testng============\n"
39
+ sleep (2)
40
+ puts "=======Copying .relish file, you need to add your relish api key============\n"
41
+ sleep (2)
42
+ puts "=======Copying .rubocop.yml file to check Ruby code============\n"
43
+ sleep (2)
44
+ puts "=======Copying c.ruby-version file ============\n"
45
+ sleep (2)
46
+ puts "=======Copying .travis.yml, you can delete if you are using other CI tool============\n"
47
+ sleep (2)
48
+ puts "=======Copying .yard.yml to generate YARD documentation for your project============\n"
49
+ sleep (2)
50
+ end
51
+
52
+ FileUtils.cp_r(@source_config_dir, @root_dir)
53
+
54
+ msg("Info") do
55
+ puts "All Config files created. \n"
56
+ end
57
+
58
+ if File.exists?(@root_feature_dir)
59
+ puts "There is already features directory. Please remane existing features directory to carry on "
60
+ exit 1
61
+ end
62
+
63
+ msg("Info") do
64
+ puts "=======Copying features and support directories for cucumber projects============\n"
65
+ sleep (2)
66
+ puts "=======Copying Pages directories with Page Object Classes============\n"
67
+ sleep (2)
68
+ puts "=======Copying step_definitions directoy============\n"
69
+ sleep (2)
70
+ puts "=======Copying Suppoort directory with all Capybara driver setup============\n"
71
+ sleep (2)
72
+ puts "=======Creating env.rb and setting Selenium, Poltergeist, Saucelabs, Appium, browerstack drivers============\n"
73
+ sleep (2)
74
+ puts "=======Creating responsive.rb file to run scenarios with different viewports============\n"
75
+ sleep (2)
76
+ end
77
+
78
+ FileUtils.cp_r(@source_feature_dir, @root_feature_dir)
79
+
80
+ msg("Info") do
81
+ puts "features and subdirectories created. \n"
82
+ end
83
+
84
+ if File.exists?(@root_lib_dir)
85
+ puts "There is already lib directory. Please remane existing lib directory to carry on "
86
+ exit 1
87
+ end
88
+ msg("Info") do
89
+ puts "=======Copying lib directory to put ruby config files for cucumber projects============\n"
90
+ sleep (2)
91
+ end
92
+
93
+ FileUtils.cp_r(@source_lib_dir, @root_lib_dir)
94
+
95
+ msg("Info") do
96
+ puts "lib subdirectory created. \n"
97
+ end
98
+
99
+ if File.exists?(@root_scripts_dir)
100
+ puts "There is already scripts directory. Please remane existing scripts directory to carry on "
101
+ exit 1
102
+ end
103
+ msg("Info") do
104
+ puts "=======Copying lib directory to put ruby config files for cucumber projects============\n"
105
+ sleep (2)
106
+ end
107
+
108
+ FileUtils.cp_r(@source_scripts_dir, @root_scripts_dir)
109
+
110
+ msg("Info") do
111
+ puts "Scripts subdirectory created. \n"
112
+ end
113
+ end
114
+
115
+ def msg(title, &block)
116
+ puts "\n" + "-"*10 + title + "-"*10
117
+ block.call
118
+ puts "-"*10 + "-------" + "-"*10 + "\n"
119
+ end
120
+
121
+ def print_usage
122
+ puts <<EOF
123
+
124
+ Usage: bddfire <command-name> [parameters] [options]
125
+
126
+ <command-name> can be one of
127
+ help
128
+ prints more detailed help information.
129
+ fire_cucumber
130
+ generate a features folder structure.
131
+ version
132
+ prints the gem version
133
+
134
+ <options> can be
135
+ -v, --verbose Turns on verbose logging
136
+ EOF
137
+ end
138
+
139
+ def print_help
140
+ puts <<EOF
141
+
142
+ Usage: bddfire <command-name> [parameters] [options]
143
+
144
+ <command-name> can be one of
145
+ help
146
+ fire_cucumber
147
+ version
148
+
149
+ Commands:
150
+ help : prints more detailed help information.
151
+
152
+ fire_cucumber : creates a skeleton features dir. This is usually used once when
153
+ setting up selnium-cucumber to ensure that the features folder contains
154
+ the right step definitions and environment to run with cucumber.
155
+
156
+ version : prints the gem version
157
+
158
+ <Options>
159
+ -v, --verbose Turns on verbose logging
160
+ EOF
161
+ end
162
+
163
+
164
+ if (ARGV.length == 0)
165
+ print_usage
166
+ else
167
+ cmd = ARGV.shift
168
+ if cmd == "help"
169
+ print_help
170
+ elsif cmd == "fire_cucumber"
171
+ applinium_scaffold
172
+ elsif cmd == "version"
173
+ puts BDDfire::VERSION
174
+ else
175
+ print_usage
176
+ end
177
+ end
data/lib/bddfire.rb CHANGED
@@ -1,7 +1,6 @@
1
- require 'bddfire/extensions/string'
2
1
  Dir[File.dirname(__FILE__) + '/bddfire/*.rb'].each {|file| require file }
3
2
 
4
3
  module BDDfire
5
- autoload :App, "bddfire/app"
6
- autoload :Tasks, "bddfire/tasks"
4
+
5
+
7
6
  end
@@ -0,0 +1,33 @@
1
+ require_relative 'web/web_methods'
2
+
3
+ Given(/^I am on the page "(.*?)"$/) do |url|
4
+ visit(url)
5
+ end
6
+
7
+ When(/^I go forward using browser$/) do
8
+ go_forward
9
+ end
10
+
11
+ When(/^I go back using browser$/) do
12
+ go_back
13
+ end
14
+
15
+ When(/^browser is refreshed$/) do
16
+ page.driver.browser.refresh
17
+ end
18
+
19
+ When(/^I have switched to another window "(.*?)"$/) do |handle|
20
+ switch_to_window(handle)
21
+ end
22
+
23
+ When(/^browser window is resized to width "(.*?)" and height "(.*?)"$/) do |width, height|
24
+ resize_to(width, height)
25
+ end
26
+
27
+ When(/^browser window is maximized$/) do
28
+ maximize_window
29
+ end
30
+
31
+ When(/^I closed browser window$/) do
32
+ close_window
33
+ end
@@ -1,13 +1 @@
1
- # require_relative 'mobile/mobile_methods'
2
- #
3
- # Given(/^I am on "(.*?)"$/) do |url|
4
- # visit(url)
5
- # end
6
- #
7
- # When(/^I fill in "(.*?)" with "(.*?)"$/) do |element, text|
8
- # fill_in element, with: text
9
- # end
10
- #
11
- # Then(/^I should see "(.*?)"$/) do |text|
12
- # page.should have_content text
13
- # end
1
+ require_relative 'mobile/mobile_methods'
@@ -1,3 +1,3 @@
1
1
  module BDDfire
2
- VERSION = "1.7.5"
2
+ VERSION = "1.7.6"
3
3
  end
@@ -1,2 +1,19 @@
1
1
  require 'net/https'
2
2
  require_relative 'required_files'
3
+
4
+
5
+ def check_valid_locator_type? type
6
+ %w(id class css name xpath).include? type
7
+ end
8
+
9
+ def check_selector type
10
+ raise "Please use correct locator only id,name,css,xpath are supported - #{type}" unless check_valid_locator_type? type
11
+ end
12
+
13
+ def check_valid_option_by? option_by
14
+ %w(text value index).include? option_by
15
+ end
16
+
17
+ def validate_option_by option_by
18
+ raise "Please select valid option, invalid option - #{option_by}" unless check_valid_option_by? option_by
19
+ end
@@ -11,3 +11,43 @@ end
11
11
  Then(/^I should see "(.*?)"$/) do |text|
12
12
  page.should have_content text
13
13
  end
14
+
15
+ When(/^I fill "(.*?)" into field with (.+) "(.*?)"$/) do |data, type, locator|
16
+ fill_in locator, with: data
17
+ end
18
+
19
+ When(/^I click on element "(.*?)"$/) do |link|
20
+ click_link(link)
21
+ end
22
+
23
+ When(/^I click on button "(.*?)"$/) do |button|
24
+ click_button(button)
25
+ end
26
+
27
+ When(/^I click on link having text "(.*?)"$/) do |text|
28
+ click_link(text)
29
+ end
30
+
31
+ When(/^I checked checkbox "(.*?)"$/) do |box|
32
+ check(box)
33
+ end
34
+
35
+ When(/^I unchecked checkbox "(.*?)"$/) do |box|
36
+ uncheck(box)
37
+ end
38
+
39
+ When(/^I choose radio button"(.*?)"$/) do |radiobutton|
40
+ choose(radiobutton)
41
+ end
42
+
43
+ When(/^I select option "(.*?)" from dropdown "(.*?)"$/) do |option, dropdown|
44
+ select(option, :from => dropdown)
45
+ end
46
+
47
+ When(/^I attached file "(.*?)" to field "(.*?)"$/) do |file, locator|
48
+ attach_file(locator, file)
49
+ end
50
+
51
+ When(/^I hover over element"(.*?)"$/) do |element|
52
+ page.find(element).hover
53
+ end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +1,3 @@
1
1
  require 'bddfire'
2
2
 
3
- # Implement your custom steps here if not in the BDDfire
3
+ # Implement your custom steps here if not in the BDDfire
@@ -0,0 +1,15 @@
1
+ #!/bin/bash
2
+ RAKETASK=$1
3
+ rm -rf ${WORKSPACE}/target/
4
+ rm -rf ${WORKSPACE}/.yarddoc/
5
+ rm -rf ${WORKSPACE}/doc/
6
+ mkdir -p ${WORKSPACE}/target/
7
+ bundle install --path vendor/bundle --binstubs
8
+ bundle exec yard config load_plugins true
9
+ bundle exec yardoc 'example/**/*.rb' 'example/**/*.feature'
10
+ bundle exec rake yard
11
+ cd ${WORKSPACE}/features
12
+ bundle exec cuke_sniffer --out html ${WORKSPACE}/target/cuke_sniffer.html
13
+ bundle exec rubocop ${WORKSPACE}/features/ --require rubocop/formatter/checkstyle_formatter --format Rubocop::Formatter::CheckstyleFormatter --no-color --silent --rails --out ${WORKSPACE}/target/checkstyle.xml
14
+ cd ${WORKSPACE}
15
+ bundle exec rake "${RAKETASK}"
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.7.5
4
+ version: 1.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shashikant Jagtap
@@ -10,48 +10,6 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2015-04-05 00:00:00.000000000 Z
12
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: aruba
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ~>
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
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: bluecloth
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ~>
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ~>
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
13
  - !ruby/object:Gem::Dependency
56
14
  name: cucumber
57
15
  requirement: !ruby/object:Gem::Requirement
@@ -144,7 +102,6 @@ extra_rdoc_files: []
144
102
  files:
145
103
  - .gitignore
146
104
  - Gemfile
147
- - Gemfile.lock
148
105
  - LICENSE
149
106
  - README.markdown
150
107
  - Rakefile
@@ -155,26 +112,25 @@ files:
155
112
  - features/support/env.rb
156
113
  - features/support/support_code.rb
157
114
  - lib/bddfire.rb
158
- - lib/bddfire/app.rb
159
- - lib/bddfire/extensions/string.rb
115
+ - lib/bddfire/browser_actions.rb
160
116
  - lib/bddfire/mobile/mobile_methods.rb
161
117
  - lib/bddfire/mobile/required_files.rb
162
118
  - lib/bddfire/mobile_steps.rb
163
- - lib/bddfire/tasks.rb
164
119
  - lib/bddfire/version.rb
165
120
  - lib/bddfire/web/required_files.rb
166
121
  - lib/bddfire/web/web_methods.rb
167
122
  - lib/bddfire/web_steps.rb
168
- - scaffold/.relish
169
- - scaffold/.rubocop.yml
170
- - scaffold/.ruby-version
171
- - scaffold/.travis.yml
172
- - scaffold/.yard.yml
173
- - scaffold/Gemfile
174
- - scaffold/README.md
175
- - scaffold/browser.json
176
- - scaffold/ci_script
177
- - scaffold/cucumber.yml
123
+ - scaffold/config_files/.relish
124
+ - scaffold/config_files/.rubocop.yml
125
+ - scaffold/config_files/.ruby-version
126
+ - scaffold/config_files/.travis.yml
127
+ - scaffold/config_files/.yard.yml
128
+ - scaffold/config_files/Gemfile
129
+ - scaffold/config_files/README.md
130
+ - scaffold/config_files/browser.json
131
+ - scaffold/config_files/ci_script
132
+ - scaffold/config_files/cucumber.yml
133
+ - scaffold/config_files/package.json
178
134
  - scaffold/features/google.feature
179
135
  - scaffold/features/pages/Abstract.rb
180
136
  - scaffold/features/pages/HomePage.rb
@@ -185,12 +141,12 @@ files:
185
141
  - scaffold/features/support/responsive.rb
186
142
  - scaffold/lib/project.erb
187
143
  - scaffold/lib/project/version.erb
188
- - scaffold/package.json
189
144
  - scaffold/rake_tasks/cucumber.rb
190
145
  - scaffold/rake_tasks/cuke_sniffer.rb
191
146
  - scaffold/rake_tasks/rspec.rb
192
147
  - scaffold/rake_tasks/rubocop.rb
193
148
  - scaffold/rake_tasks/yard.rb
149
+ - scaffold/scripts/ci_script
194
150
  - scaffold/spec/spec_helper.rb
195
151
  homepage: https://github.com/Shashikant86/bddfire
196
152
  licenses:
data/Gemfile.lock DELETED
@@ -1,135 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- bddfire (1.5.5)
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
- capybara (2.4.1)
25
- mime-types (>= 1.16)
26
- nokogiri (>= 1.3.3)
27
- rack (>= 1.0.0)
28
- rack-test (>= 0.5.4)
29
- xpath (~> 2.0)
30
- childprocess (0.5.3)
31
- ffi (~> 1.0, >= 1.0.11)
32
- cliver (0.3.2)
33
- cucumber (1.3.15)
34
- builder (>= 2.1.2)
35
- diff-lcs (>= 1.1.3)
36
- gherkin (~> 2.12)
37
- multi_json (>= 1.7.5, < 2.0)
38
- multi_test (>= 0.1.1)
39
- cuke_sniffer (0.0.8)
40
- roxml
41
- diff-lcs (1.2.5)
42
- ffi (1.9.3)
43
- gherkin (2.12.2)
44
- multi_json (~> 1.3)
45
- i18n (0.6.11)
46
- json (1.8.1)
47
- mime-types (2.3)
48
- mini_portile (0.6.0)
49
- minitest (5.4.0)
50
- multi_json (1.10.1)
51
- multi_test (0.1.1)
52
- netrc (0.7.7)
53
- nokogiri (1.6.2.1)
54
- mini_portile (= 0.6.0)
55
- parallel (1.1.2)
56
- parallel_tests (1.0.2)
57
- parallel
58
- parser (2.2.0.pre.3)
59
- ast (>= 1.1, < 3.0)
60
- slop (~> 3.4, >= 3.4.5)
61
- poltergeist (1.5.1)
62
- capybara (~> 2.1)
63
- cliver (~> 0.3.1)
64
- multi_json (~> 1.0)
65
- websocket-driver (>= 0.2.0)
66
- powerpack (0.0.9)
67
- rack (1.5.2)
68
- rack-test (0.6.2)
69
- rack (>= 1.0)
70
- rainbow (2.0.0)
71
- rake (10.3.2)
72
- relish (0.7)
73
- archive-tar-minitar (>= 0.5.2)
74
- json (>= 1.4.6)
75
- rest-client (>= 1.6.1)
76
- rest-client (1.7.2)
77
- mime-types (>= 1.16, < 3.0)
78
- netrc (~> 0.7)
79
- roxml (3.3.1)
80
- activesupport (>= 2.3.0)
81
- nokogiri (>= 1.3.3)
82
- rspec (3.0.0)
83
- rspec-core (~> 3.0.0)
84
- rspec-expectations (~> 3.0.0)
85
- rspec-mocks (~> 3.0.0)
86
- rspec-core (3.0.2)
87
- rspec-support (~> 3.0.0)
88
- rspec-expectations (3.0.2)
89
- diff-lcs (>= 1.2.0, < 2.0)
90
- rspec-support (~> 3.0.0)
91
- rspec-mocks (3.0.2)
92
- rspec-support (~> 3.0.0)
93
- rspec-support (3.0.2)
94
- rubocop (0.24.1)
95
- json (>= 1.7.7, < 2)
96
- parser (>= 2.2.0.pre.3, < 3.0)
97
- powerpack (~> 0.0.6)
98
- rainbow (>= 1.99.1, < 3.0)
99
- ruby-progressbar (~> 1.4)
100
- ruby-progressbar (1.5.1)
101
- rubyzip (1.1.6)
102
- selenium-webdriver (2.42.0)
103
- childprocess (>= 0.5.0)
104
- multi_json (~> 1.0)
105
- rubyzip (~> 1.0)
106
- websocket (~> 1.0.4)
107
- slop (3.6.0)
108
- thor (0.19.1)
109
- thread_safe (0.3.4)
110
- tzinfo (1.2.1)
111
- thread_safe (~> 0.1)
112
- websocket (1.0.7)
113
- websocket-driver (0.3.4)
114
- xpath (2.0.0)
115
- nokogiri (~> 1.3)
116
- yard (0.8.7.4)
117
-
118
- PLATFORMS
119
- ruby
120
-
121
- DEPENDENCIES
122
- aruba
123
- bddfire!
124
- bluecloth
125
- capybara
126
- cucumber
127
- cuke_sniffer
128
- parallel_tests
129
- poltergeist
130
- rake
131
- relish
132
- rspec
133
- rubocop
134
- selenium-webdriver
135
- yard
data/lib/bddfire/app.rb DELETED
@@ -1,121 +0,0 @@
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 "fire_cucumber", "Set up cucumber framework with all the directories and standard templates, supporting all the available tools around cucumber"
18
- def fire_cucumber
19
- generate_rakefile
20
- add_task BDDfire::Tasks.cucumber
21
- add_task BDDfire::Tasks.cuke_sniffer
22
- add_task BDDfire::Tasks.rubocop
23
- copy_file "features/step_definitions/google_steps.rb"
24
- add_file "features/step_definitions/#{project_name}_steps.rb"
25
- add_file "features/#{project_name}.feature"
26
- copy_file "features/google.feature"
27
- copy_file "Gemfile"
28
- copy_file "cucumber.yml"
29
- copy_file ".rubocop.yml"
30
- copy_file ".ruby-version"
31
- copy_file ".travis.yml"
32
- copy_file ".relish"
33
- copy_file ".yard.yml"
34
- copy_file "browser.json"
35
- copy_file "package.json"
36
- copy_file "README.md"
37
- copy_file "ci_script"
38
- copy_file "features/support/env.rb"
39
- copy_file "features/support/hooks.rb"
40
- copy_file "features/support/responsive.rb"
41
- copy_file "features/pages/HomePage.rb"
42
- copy_file "features/pages/Abstract.rb"
43
- template "features/support/helpers.erb", "features/support/helpers.rb"
44
- init_gitignore
45
- append_file ".gitignore", ".ruby-version\n"
46
- append_file ".gitignore", ".travis.yml\n"
47
- end
48
-
49
- desc "fire_rspec", "Set up rspec framework with skeleton directories"
50
- def fire_rspec
51
- genarate_gemfile
52
- insert_gem 'rspec'
53
- generate_rakefile
54
- add_task BDDfire::Tasks.rspec
55
- copy_file "spec/spec_helper.rb"
56
- end
57
-
58
- desc "generate_yard", "This will generate yard documentation for your cucumber project"
59
- def generate_yard
60
- genarate_gemfile
61
- insert_gem 'yard'
62
-
63
- generate_rakefile
64
- add_task BDDfire::Tasks.yard(project_name)
65
-
66
- init_gitignore
67
- append_file ".gitignore", "doc/*\n"
68
- append_file ".gitignore", ".yardoc\n"
69
- end
70
-
71
- private
72
-
73
- def project_name
74
- destination_root.split(/\/|\\/).last
75
- end
76
-
77
- def genarate_gemfile
78
- unless destination_file_exists?("Gemfile")
79
- add_file "Gemfile"
80
- append_file "Gemfile" do
81
- "source 'http://rubygems.org'\n\n" +
82
- "gem 'rake'\n"
83
- "gem 'nokogiri', '1.6.1'\n"
84
- end
85
- end
86
- end
87
-
88
- def generate_rakefile
89
- unless destination_file_exists?("Rakefile")
90
- add_file "Rakefile"
91
- append_file "Rakefile" do
92
- "require 'rubygems'\n" +
93
- "require 'bundler'\n" +
94
- "require 'bundler/setup'\n\n"
95
- end
96
- end
97
- end
98
-
99
- def init_gitignore
100
- add_file ".gitignore" unless destination_file_exists?(".gitignore")
101
- ensure_eof_newline(".gitignore")
102
- end
103
-
104
- def destination_file_exists?(filename)
105
- File.exist?(File.join(destination_root, filename))
106
- end
107
-
108
- def insert_gem(gem_name)
109
- ensure_eof_newline("Gemfile")
110
- append_file "Gemfile", "gem '#{gem_name}'\n"
111
- end
112
-
113
- def add_task(the_task)
114
- append_file "Rakefile", "\n\n#{the_task}\n"
115
- end
116
-
117
- def ensure_eof_newline(filename)
118
- gsub_file(filename, /([^\n])\z/, "\\1\n")
119
- end
120
- end
121
- end
@@ -1,11 +0,0 @@
1
- module BDDfire
2
- module Extensions
3
- module String
4
- def camelize
5
- self.capitalize.gsub(/[ _\-]+([a-z])?/) { $1.upcase }
6
- end
7
- end
8
- end
9
- end
10
-
11
- String.send(:include, BDDfire::Extensions::String)
data/lib/bddfire/tasks.rb DELETED
@@ -1,30 +0,0 @@
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