rubygene 0.3.4 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +138 -51
- data/bin/rubygene +80 -0
- data/docs/Readme_pt.md +238 -0
- data/docs/history_pt.md +100 -0
- data/history.md +65 -42
- data/lib/SkeletonMobile/features/support/results/test_failed/.gitkeep +0 -0
- data/lib/SkeletonMobile/features/support/results/test_passed/.gitkeep +0 -0
- data/lib/SkeletonRspecApi/.gitignore +3 -0
- data/lib/SkeletonRspecApi/.rspec +2 -0
- data/lib/SkeletonRspecApi/Gemfile +4 -0
- data/lib/SkeletonRspecApi/README.md +25 -0
- data/lib/SkeletonRspecApi/results/.gitkeep +0 -0
- data/lib/SkeletonRspecApi/services/.gitkeep +0 -0
- data/lib/SkeletonRspecApi/specs/spec_helper.rb +84 -0
- data/lib/SkeletonRspecWeb/.gitignore +3 -0
- data/lib/SkeletonRspecWeb/.rspec +2 -0
- data/lib/SkeletonRspecWeb/Gemfile +10 -0
- data/lib/SkeletonRspecWeb/README.md +26 -0
- data/lib/SkeletonRspecWeb/pages/.gitkeep +0 -0
- data/lib/SkeletonRspecWeb/specs/spec_helper.rb +70 -0
- data/lib/SkeletonRspecWeb/support/data/homolog.yml +1 -0
- data/lib/SkeletonRspecWeb/support/page_helper.rb +6 -0
- data/lib/SkeletonRspecWeb/support/rspec.yml +8 -0
- data/lib/generate_ruby_tests/generate_ruby_test_helper.rb +34 -0
- data/lib/generate_ruby_tests/version.rb +1 -1
- data/lib/locales/en.yml +3 -0
- data/lib/locales/pt.yml +3 -0
- data/lib/templates/specs.tt +6 -0
- data/rubygene.gemspec +1 -1
- metadata +25 -4
data/docs/history_pt.md
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
# Version 0.4.0
|
2
|
+
Release date: 17/11/2018
|
3
|
+
|
4
|
+
### Adicionado
|
5
|
+
|
6
|
+
- Nova funcionalidade para criar projetos web e api em Rspec.
|
7
|
+
- Nova funcionalidade para criar arquivos para projetos web e api em Rspec.
|
8
|
+
- Testes unitários para projetos rspec.
|
9
|
+
- Traduçōes inglês e português no readme e history.
|
10
|
+
|
11
|
+
### Corrigido
|
12
|
+
|
13
|
+
- Adicionando pasta que estavam faltando no relatórios no projeto mobile
|
14
|
+
|
15
|
+
### Mudado
|
16
|
+
|
17
|
+
- Nada
|
18
|
+
|
19
|
+
# Version 0.3.4
|
20
|
+
Release date: 16/09/2018
|
21
|
+
|
22
|
+
### Adicionado
|
23
|
+
|
24
|
+
- Testes unitários.
|
25
|
+
- Cobertura de código com simplecov.
|
26
|
+
|
27
|
+
### Corrigido
|
28
|
+
|
29
|
+
- Carregar arquivo yml da configuração de api que estava yaml
|
30
|
+
|
31
|
+
### Mudado
|
32
|
+
|
33
|
+
- SitePrism foi mudado de '2.15' para '2.15.1', devido a algumas melhorias de performance com o cucumber;
|
34
|
+
- Capybara versão alterada de '3.0.3' para '<3.3', versão aconselhada pelo pessoal do siteprism;
|
35
|
+
- Foi setado a versão do Selenium '~>3.4', versão aconselhada pelo pessoal do siteprism;
|
36
|
+
- Regex no Hooks para obter o nome do relatório foi reduzida para somente uma linha.
|
37
|
+
|
38
|
+
### Removido
|
39
|
+
|
40
|
+
- Nada
|
41
|
+
|
42
|
+
# Version 0.3.3
|
43
|
+
Release date: 14/09/2018
|
44
|
+
|
45
|
+
### Adicionado
|
46
|
+
|
47
|
+
- Nada
|
48
|
+
|
49
|
+
### Corrigido
|
50
|
+
|
51
|
+
- bug da gem ao gerar projeto.
|
52
|
+
|
53
|
+
|
54
|
+
### Mudado
|
55
|
+
|
56
|
+
- Nada
|
57
|
+
|
58
|
+
### Removido
|
59
|
+
|
60
|
+
- Nada
|
61
|
+
|
62
|
+
# Version 0.3.2
|
63
|
+
Release date: 14/09/2018
|
64
|
+
|
65
|
+
### Adicionado
|
66
|
+
|
67
|
+
- Nada
|
68
|
+
|
69
|
+
### Corrigido
|
70
|
+
|
71
|
+
- Ao digitar ```rubygene --version``` não estava funcionando. Agora está corrigido.
|
72
|
+
- Melhorias no código pedidos pelo rubocop.
|
73
|
+
- Melhoria na tradução usando I18n
|
74
|
+
|
75
|
+
### Mudado
|
76
|
+
|
77
|
+
- nada
|
78
|
+
|
79
|
+
### Removido
|
80
|
+
|
81
|
+
- Dependência do gerkin para traduzir as features.
|
82
|
+
|
83
|
+
# Version 0.3.1
|
84
|
+
Release date: 13/09/2018
|
85
|
+
|
86
|
+
### Adicionado
|
87
|
+
|
88
|
+
- Arquivo com histórico da gem das atualizaçōes
|
89
|
+
|
90
|
+
### Corrigido
|
91
|
+
|
92
|
+
- Descrição da gem spec.description
|
93
|
+
|
94
|
+
### Mudado
|
95
|
+
|
96
|
+
- nada
|
97
|
+
|
98
|
+
### Removido
|
99
|
+
|
100
|
+
- nada
|
data/history.md
CHANGED
@@ -1,82 +1,105 @@
|
|
1
|
+
# History version translate
|
2
|
+
|
3
|
+
Version [Portuguese-br] (https://github.com/brunobatista25/RubyGene/blob/master/docs/history_pt.md)
|
4
|
+
|
5
|
+
|
6
|
+
# Version 0.4.0
|
7
|
+
Release date: 11/17/2018
|
8
|
+
|
9
|
+
### Added
|
10
|
+
|
11
|
+
- New functionality to create web projects and api in Rspec.
|
12
|
+
- New functionality to create files for web projects and api in Rspec.
|
13
|
+
- Unit tests for rspec projects.
|
14
|
+
- English and Portuguese translations in readme and history.
|
15
|
+
|
16
|
+
### Adjusted
|
17
|
+
|
18
|
+
- Adding folder that was missing from reports in mobile project
|
19
|
+
|
20
|
+
### Changed
|
21
|
+
|
22
|
+
- nothing
|
23
|
+
|
1
24
|
# Version 0.3.4
|
2
|
-
Release date: 16/
|
25
|
+
Release date: 09/16/2018
|
3
26
|
|
4
|
-
###
|
27
|
+
### Added
|
5
28
|
|
6
|
-
-
|
7
|
-
-
|
29
|
+
- Unitary tests.
|
30
|
+
- Coverage of code with simplecov.
|
8
31
|
|
9
|
-
###
|
32
|
+
### Adjusted
|
10
33
|
|
11
|
-
-
|
34
|
+
- Load yml file from the api configuration that was yaml
|
12
35
|
|
13
|
-
###
|
36
|
+
### Changed
|
14
37
|
|
15
|
-
- SitePrism
|
16
|
-
- Capybara
|
17
|
-
-
|
18
|
-
- Regex
|
38
|
+
- SitePrism was changed from '2.15' to '2.15.1', due to some performance improvements with the cucumber;
|
39
|
+
- Capybara changed version from '3.0.3' to '<3.3', version advised by siteprism personnel;
|
40
|
+
- The version of Selenium '~> 3.4' has been set, a version advised by siteprism personnel;
|
41
|
+
- Regex in Hooks to get the report name was reduced to only one row.
|
19
42
|
|
20
|
-
###
|
43
|
+
### Removed
|
21
44
|
|
22
|
-
-
|
45
|
+
- nothing
|
23
46
|
|
24
47
|
# Version 0.3.3
|
25
|
-
Release date: 14/
|
48
|
+
Release date: 09/14/2018
|
26
49
|
|
27
|
-
###
|
50
|
+
### Added
|
28
51
|
|
29
|
-
-
|
52
|
+
- nothing
|
30
53
|
|
31
|
-
###
|
54
|
+
### Adjusted
|
32
55
|
|
33
|
-
- bug
|
56
|
+
- Gem bug when generating project.
|
34
57
|
|
35
58
|
|
36
|
-
###
|
59
|
+
### Changed
|
37
60
|
|
38
|
-
-
|
61
|
+
- nothing
|
39
62
|
|
40
|
-
###
|
63
|
+
### Removed
|
41
64
|
|
42
|
-
-
|
65
|
+
- nothing
|
43
66
|
|
44
67
|
# Version 0.3.2
|
45
|
-
Release date: 14/
|
68
|
+
Release date: 09/14/2018
|
46
69
|
|
47
|
-
###
|
70
|
+
### Added
|
48
71
|
|
49
|
-
-
|
72
|
+
- nothing
|
50
73
|
|
51
|
-
###
|
74
|
+
### Adjusted
|
52
75
|
|
53
|
-
-
|
54
|
-
-
|
55
|
-
-
|
76
|
+
- Typing `` `rubygene --version``` was not working. Now it's fixed.
|
77
|
+
- Code improvements requested by rubocop.
|
78
|
+
- Improvement in translation using I18n
|
56
79
|
|
57
|
-
###
|
80
|
+
### Changed
|
58
81
|
|
59
|
-
-
|
82
|
+
- nothing
|
60
83
|
|
61
|
-
###
|
84
|
+
### Removed
|
62
85
|
|
63
|
-
-
|
86
|
+
- Dependence of gerkin to translate the features.
|
64
87
|
|
65
88
|
# Version 0.3.1
|
66
|
-
Release date: 13/
|
89
|
+
Release date: 09/13/2018
|
67
90
|
|
68
|
-
###
|
91
|
+
### Added
|
69
92
|
|
70
|
-
-
|
93
|
+
- File with history of the gem of the updates
|
71
94
|
|
72
|
-
###
|
95
|
+
### Adjusted
|
73
96
|
|
74
|
-
-
|
97
|
+
- Gem description spec.description
|
75
98
|
|
76
|
-
###
|
99
|
+
### Changed
|
77
100
|
|
78
|
-
-
|
101
|
+
- nothing
|
79
102
|
|
80
|
-
###
|
103
|
+
### Removed
|
81
104
|
|
82
|
-
-
|
105
|
+
- nothing
|
File without changes
|
File without changes
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# Httparty_rspec
|
2
|
+
Um projeto completo usando rspec, httparty e ruby para servir de exemplo
|
3
|
+
|
4
|
+
## 1-Passo
|
5
|
+
Depois entre na pasta
|
6
|
+
|
7
|
+
```
|
8
|
+
capyabra_rspec/tests
|
9
|
+
```
|
10
|
+
|
11
|
+
## 2-Passo
|
12
|
+
Agora rode o comando:
|
13
|
+
|
14
|
+
```
|
15
|
+
bundle install
|
16
|
+
```
|
17
|
+
|
18
|
+
## 3-Passo
|
19
|
+
Para rodar o projeto basta usar o comando:
|
20
|
+
|
21
|
+
```
|
22
|
+
bundle exec rspec
|
23
|
+
```
|
24
|
+
|
25
|
+
Até mais jovens!
|
File without changes
|
File without changes
|
@@ -0,0 +1,84 @@
|
|
1
|
+
require 'httparty'
|
2
|
+
require 'httparty/request'
|
3
|
+
require 'httparty/response/headers'
|
4
|
+
|
5
|
+
RSpec.configure do |config|
|
6
|
+
config.color = true
|
7
|
+
config.formatter = :documentation
|
8
|
+
# rspec-expectations config goes here. You can use an alternate
|
9
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
10
|
+
# assertions if you prefer.
|
11
|
+
config.expect_with :rspec do |expectations|
|
12
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
13
|
+
# and `failure_message` of custom matchers include text for helper methods
|
14
|
+
# defined using `chain`, e.g.:
|
15
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
16
|
+
# # => "be bigger than 2 and smaller than 4"
|
17
|
+
# ...rather than:
|
18
|
+
# # => "be bigger than 2"
|
19
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
20
|
+
end
|
21
|
+
|
22
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
23
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
24
|
+
config.mock_with :rspec do |mocks|
|
25
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
26
|
+
# a real object. This is generally recommended, and will default to
|
27
|
+
# `true` in RSpec 4.
|
28
|
+
mocks.verify_partial_doubles = true
|
29
|
+
end
|
30
|
+
|
31
|
+
# This option will default to `:apply_to_host_groups` in RSpec 4 (and will
|
32
|
+
# have no way to turn it off -- the option exists only for backwards
|
33
|
+
# compatibility in RSpec 3). It causes shared context metadata to be
|
34
|
+
# inherited by the metadata hash of host groups and examples, rather than
|
35
|
+
# triggering implicit auto-inclusion in groups with matching metadata.
|
36
|
+
config.shared_context_metadata_behavior = :apply_to_host_groups
|
37
|
+
|
38
|
+
# The settings below are suggested to provide a good initial experience
|
39
|
+
# with RSpec, but feel free to customize to your heart's content.
|
40
|
+
=begin
|
41
|
+
# This allows you to limit a spec run to individual examples or groups
|
42
|
+
# you care about by tagging them with `:focus` metadata. When nothing
|
43
|
+
# is tagged with `:focus`, all examples get run. RSpec also provides
|
44
|
+
# aliases for `it`, `describe`, and `context` that include `:focus`
|
45
|
+
# metadata: `fit`, `fdescribe` and `fcontext`, respectively.
|
46
|
+
config.filter_run_when_matching :focus
|
47
|
+
# Allows RSpec to persist some state between runs in order to support
|
48
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
49
|
+
# you configure your source control system to ignore this file.
|
50
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
51
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
52
|
+
# recommended. For more details, see:
|
53
|
+
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
54
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
55
|
+
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
56
|
+
config.disable_monkey_patching!
|
57
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
58
|
+
# be too noisy due to issues in dependencies.
|
59
|
+
config.warnings = true
|
60
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
61
|
+
# file, and it's useful to allow more verbose output when running an
|
62
|
+
# individual spec file.
|
63
|
+
if config.files_to_run.one?
|
64
|
+
# Use the documentation formatter for detailed output,
|
65
|
+
# unless a formatter has already been configured
|
66
|
+
# (e.g. via a command-line flag).
|
67
|
+
config.default_formatter = "doc"
|
68
|
+
end
|
69
|
+
# Print the 10 slowest examples and example groups at the
|
70
|
+
# end of the spec run, to help surface which specs are running
|
71
|
+
# particularly slow.
|
72
|
+
config.profile_examples = 10
|
73
|
+
# Run specs in random order to surface order dependencies. If you find an
|
74
|
+
# order dependency and want to debug it, you can fix the order by providing
|
75
|
+
# the seed, which is printed after each run.
|
76
|
+
# --seed 1234
|
77
|
+
config.order = :random
|
78
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
79
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
80
|
+
# test failures related to randomization by passing the same `--seed` value
|
81
|
+
# as the one that triggered the failure.
|
82
|
+
Kernel.srand config.seed
|
83
|
+
=end
|
84
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# Capybara_rspec
|
2
|
+
Um projeto completo usando rspec, capybara e ruby para servir de exemplo
|
3
|
+
|
4
|
+
|
5
|
+
## 1-Passo
|
6
|
+
Depois entre na pasta
|
7
|
+
|
8
|
+
```
|
9
|
+
cd tests
|
10
|
+
```
|
11
|
+
|
12
|
+
## 2-Passo
|
13
|
+
Agora rode o comando:
|
14
|
+
|
15
|
+
```
|
16
|
+
bundle install
|
17
|
+
```
|
18
|
+
|
19
|
+
## 3-Passo
|
20
|
+
Para rodar o projeto basta usar o comando:
|
21
|
+
|
22
|
+
```
|
23
|
+
bundle exec rspec
|
24
|
+
```
|
25
|
+
|
26
|
+
Até mais jovens!
|
File without changes
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'allure-rspec'
|
4
|
+
require 'capybara'
|
5
|
+
require 'capybara/dsl'
|
6
|
+
require 'capybara/rspec/matchers'
|
7
|
+
require 'faker'
|
8
|
+
require 'logger'
|
9
|
+
require 'rspec'
|
10
|
+
require 'rspec/expectations'
|
11
|
+
require 'selenium-webdriver'
|
12
|
+
require 'site_prism'
|
13
|
+
require 'ostruct'
|
14
|
+
require 'yaml'
|
15
|
+
require_relative '../support/page_helper.rb'
|
16
|
+
|
17
|
+
rspec_yml = YAML.load_file("#{Dir.pwd}/support/rspec.yml")
|
18
|
+
env = YAML.load_file("#{Dir.pwd}/support/data/#{rspec_yml['environment']}.yml")
|
19
|
+
|
20
|
+
RSpec.configure do |config|
|
21
|
+
config.include Capybara::DSL
|
22
|
+
config.include AllureRSpec::Adaptor
|
23
|
+
config.include Capybara::RSpecMatchers
|
24
|
+
config.include Pages
|
25
|
+
config.after(:each) do |scenario|
|
26
|
+
temp_screenshot = '/log/reports/temp_screenshoot.png'
|
27
|
+
new_screenshot = File.new(page.save_screenshot(File.join(Dir.pwd,
|
28
|
+
temp_screenshot)))
|
29
|
+
scenario.attach_file('screenshots', new_screenshot)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
# Escolhendo qual browser se quero chrome ou se quero firefox
|
34
|
+
# E se roda em headless ou sem headless
|
35
|
+
Capybara.register_driver :selenium do |app|
|
36
|
+
if rspec_yml['browser'].eql?('chrome')
|
37
|
+
if rspec_yml['headless'].eql?('headless')
|
38
|
+
option = ::Selenium::WebDriver::Chrome::Options.new(
|
39
|
+
args: ['--headless', '--disable-gpu', '--disable-infobars', '--window-size=1600,1024']
|
40
|
+
)
|
41
|
+
Capybara::Selenium::Driver.new(app, browser: :chrome, options: option)
|
42
|
+
elsif rspec_yml['headless'].eql?('no_headless')
|
43
|
+
option = ::Selenium::WebDriver::Chrome::Options.new(
|
44
|
+
args: ['--disable-infobars', '--window-size=1600,1024']
|
45
|
+
)
|
46
|
+
Capybara::Selenium::Driver.new(app, browser: :chrome, options: option)
|
47
|
+
end
|
48
|
+
elsif rspec_yml['browser'].eql?('firefox')
|
49
|
+
if rspec_yml['headless'].eql?('headless')
|
50
|
+
browser_options = Selenium::WebDriver::Firefox::Options.new(args: ['--headless'])
|
51
|
+
Capybara::Selenium::Driver.new(
|
52
|
+
app, browser: :firefox, options: browser_options
|
53
|
+
)
|
54
|
+
elsif rspec_yml['headless'].eql?('no_headless')
|
55
|
+
Capybara::Selenium::Driver.new(app, browser: :firefox, marionette: true)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
Capybara.configure do |config|
|
61
|
+
config.default_driver = :selenium
|
62
|
+
config.app_host = env['url_home']
|
63
|
+
config.default_max_wait_time = 10
|
64
|
+
end
|
65
|
+
|
66
|
+
AllureRSpec.configure do |config|
|
67
|
+
config.output_dir = 'log/reports'
|
68
|
+
config.clean_dir = true
|
69
|
+
config.logging_level = Logger::WARN
|
70
|
+
end
|