cuculungwa 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/lib/cuculungwa.rb +62 -0
- metadata +44 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
M2UyYzgzZWVjYTgzYmQwZGQzOTY5NDY2ZTQwODg0MTVlZjJjZmFhNQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MGVhNTI3OWMxMTIyOTMwYTMyNDUzMGRiMTViYzZkZDdiNTg2NDI1Yw==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZjcxOWVmZTcxOTRiODk5YTI2YzIwOTUwZjMzZTA1ZmE0NDJlZDliMjVhYjQy
|
10
|
+
OWZmOGI2N2NiNDQwMTAwZGFlNjczZmFiMWRjODRjNTg0ZDAyYzMwYzEzYzBm
|
11
|
+
MjY1MTI1ZmFiNWIzMzNiMTBjNjk3NjVlOWI5MGE5MzE0NjhhMzA=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
OTE1YzkxNWNhMjlhM2JiZDIzZjQ4ZmJiMjg0YjA0ZWMxNjJlNTFlZWVlMTky
|
14
|
+
YmY3MzE5ZmRjMTk2MDAyNmFkNzM3ZmQ1MzY1OTU2ZWZmMzRmYWVjYjUwM2Q3
|
15
|
+
ODAxNzExZTBmZThmNWM0MWRjNmI4M2FjZmUzM2RjOTczODNkMTg=
|
data/lib/cuculungwa.rb
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
require 'i18n'
|
2
|
+
require 'capybara'
|
3
|
+
require 'capybara/dsl'
|
4
|
+
require 'capybara/cucumber'
|
5
|
+
require 'capybara/poltergeist'
|
6
|
+
require 'capybara-screenshot'
|
7
|
+
require 'capybara-screenshot/cucumber'
|
8
|
+
require 'rspec/expectations'
|
9
|
+
require 'site_prism'
|
10
|
+
require 'yaml'
|
11
|
+
|
12
|
+
config = YAML::load(File.open('config/config.yml'))
|
13
|
+
|
14
|
+
loc = { polish: :pl }
|
15
|
+
I18n.enforce_available_locales = false
|
16
|
+
I18n.locale = :pl
|
17
|
+
I18n.default_locale = loc
|
18
|
+
I18n.load_path = Dir[config['framework']['I18n_locales_dir']]
|
19
|
+
I18n.backend.load_translations
|
20
|
+
|
21
|
+
if config['capybara']['browser']=='phantomjs'
|
22
|
+
Capybara.register_driver :poltergeist do |app|
|
23
|
+
Capybara::Poltergeist::Driver.new app,
|
24
|
+
phantomjs_options: config['capybara']['phantomjs_specific']['options'],
|
25
|
+
window_size: config['capybara']['phantomjs_specific']['window_size']
|
26
|
+
end
|
27
|
+
Capybara.default_driver = :poltergeist
|
28
|
+
else
|
29
|
+
Capybara.register_driver :selenium do |app|
|
30
|
+
Capybara::Selenium::Driver.new(app, :browser => config['capybara']['browser'].to_sym)
|
31
|
+
end
|
32
|
+
Capybara.default_driver = :selenium
|
33
|
+
end
|
34
|
+
|
35
|
+
Capybara.save_and_open_page_path = config['capybara']['save_and_open_page_path']
|
36
|
+
Capybara.app_host = config['project']['default_host']
|
37
|
+
Capybara.default_wait_time = config['capybara']['default_wait_time']
|
38
|
+
World(Capybara)
|
39
|
+
|
40
|
+
def override_method(obj, method_name, &block)
|
41
|
+
klass = class <<obj; self; end
|
42
|
+
klass.send(:undef_method, method_name)
|
43
|
+
klass.send(:define_method, method_name, block)
|
44
|
+
end
|
45
|
+
|
46
|
+
AfterConfiguration do |configuration|
|
47
|
+
override_method(configuration, :feature_files) do
|
48
|
+
potential_feature_files = with_default_features_path(paths).map do |path|
|
49
|
+
path = path.chomp('/')
|
50
|
+
if File.directory?(path)
|
51
|
+
Dir["#{path}" + config['framework']['features_regexp']].sort
|
52
|
+
elsif path[0..0] == '@' and
|
53
|
+
File.file?(path[1..-1])
|
54
|
+
IO.read(path[1..-1]).split
|
55
|
+
else
|
56
|
+
path
|
57
|
+
end
|
58
|
+
end.flatten.uniq
|
59
|
+
remove_excluded_files_from(potential_feature_files)
|
60
|
+
potential_feature_files.shuffle
|
61
|
+
end
|
62
|
+
end
|
metadata
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cuculungwa
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Michal Kaftanski
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-09-23 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Cucumber based framework for purpose of automated tests
|
14
|
+
email: michal.kaftanski@currency-one.com
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/cuculungwa.rb
|
20
|
+
homepage: http://rubygems.org/gems/cuculungwa
|
21
|
+
licenses:
|
22
|
+
- MIT
|
23
|
+
metadata: {}
|
24
|
+
post_install_message:
|
25
|
+
rdoc_options: []
|
26
|
+
require_paths:
|
27
|
+
- lib
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
requirements: []
|
39
|
+
rubyforge_project:
|
40
|
+
rubygems_version: 2.4.1
|
41
|
+
signing_key:
|
42
|
+
specification_version: 4
|
43
|
+
summary: Cuculungwa testing framework
|
44
|
+
test_files: []
|