warder 0.3.2 → 0.3.4
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 +4 -4
- data/lib/warder/version.rb +1 -1
- metadata +26 -214
- data/.gitignore +0 -20
- data/.travis.yml +0 -15
- data/Gemfile +0 -4
- data/LICENSE.txt +0 -22
- data/README.md +0 -130
- data/Rakefile +0 -53
- data/cucumber.yml +0 -4
- data/features/checks_for_all_issues.feature +0 -36
- data/features/checks_for_rails_best_practices.feature +0 -25
- data/features/checks_for_rails_related_issues.feature +0 -27
- data/features/checks_for_rails_security_issues.feature +0 -25
- data/features/checks_for_sandi_metz_rules.feature +0 -25
- data/features/checks_for_vulnerable_gems.feature +0 -25
- data/features/detects_code_complexity.feature +0 -29
- data/features/detects_code_duplication.feature +0 -32
- data/features/detects_code_smell.feature +0 -29
- data/features/detects_magick_numbers.feature +0 -29
- data/features/quiet.feature +0 -10
- data/features/run.feature +0 -9
- data/features/show_version.feature +0 -8
- data/features/statistics.feature +0 -22
- data/features/step_definitions/checks_for_rails_best_practices_steps.rb +0 -14
- data/features/step_definitions/checks_for_rails_security_issues_steps.rb +0 -24
- data/features/step_definitions/checks_for_sandi_metz_rules_step.rb +0 -7
- data/features/step_definitions/checks_for_vulnerable_gems_steps.rb +0 -15
- data/features/step_definitions/detects_code_complexity_steps.rb +0 -11
- data/features/step_definitions/detects_code_duplication_steps.rb +0 -7
- data/features/step_definitions/detects_code_smell_steps.rb +0 -7
- data/features/step_definitions/detects_magick_numbers_steps.rb +0 -7
- data/features/step_definitions/run_steps.rb +0 -38
- data/features/step_definitions/show_version_steps.rb +0 -3
- data/features/step_definitions/statistics_steps.rb +0 -4
- data/features/step_definitions/validates_coffeescript_style_guide_steps.rb +0 -12
- data/features/step_definitions/validates_ruby_style_guide_steps.rb +0 -7
- data/features/support/env.rb +0 -23
- data/features/validates_coffeescript_style_guide.feature +0 -29
- data/features/validates_ruby_style_guide.feature +0 -29
- data/spec/fixtures/invalid_code_complexity.rb +0 -13
- data/spec/fixtures/invalid_code_duplication.rb +0 -40
- data/spec/fixtures/invalid_code_smell.rb +0 -4
- data/spec/fixtures/invalid_coffee_lint.coffee +0 -6
- data/spec/fixtures/invalid_magick_numbers.rb +0 -1
- data/spec/fixtures/invalid_rails_app/Gemfile +0 -4
- data/spec/fixtures/invalid_rails_app/Gemfile_lock +0 -82
- data/spec/fixtures/invalid_rails_app/Rakefile +0 -6
- data/spec/fixtures/invalid_rails_app/app/assets/javascripts/invalid_coffee_lint.coffee +0 -6
- data/spec/fixtures/invalid_rails_app/app/controllers/application_controller.rb +0 -19
- data/spec/fixtures/invalid_rails_app/app/models/user.rb +0 -5
- data/spec/fixtures/invalid_rails_app/app/views/layouts/application.html.erb +0 -14
- data/spec/fixtures/invalid_rails_app/config.ru +0 -4
- data/spec/fixtures/invalid_rails_app/config/application.rb +0 -24
- data/spec/fixtures/invalid_rails_app/config/boot.rb +0 -4
- data/spec/fixtures/invalid_rails_app/config/database.yml +0 -25
- data/spec/fixtures/invalid_rails_app/config/environment.rb +0 -5
- data/spec/fixtures/invalid_rails_app/config/environments/development.rb +0 -29
- data/spec/fixtures/invalid_rails_app/config/environments/production.rb +0 -80
- data/spec/fixtures/invalid_rails_app/config/environments/test.rb +0 -36
- data/spec/fixtures/invalid_rails_app/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/fixtures/invalid_rails_app/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/fixtures/invalid_rails_app/config/initializers/inflections.rb +0 -16
- data/spec/fixtures/invalid_rails_app/config/initializers/mime_types.rb +0 -5
- data/spec/fixtures/invalid_rails_app/config/initializers/secret_token.rb +0 -12
- data/spec/fixtures/invalid_rails_app/config/initializers/session_store.rb +0 -3
- data/spec/fixtures/invalid_rails_app/config/initializers/wrap_parameters.rb +0 -14
- data/spec/fixtures/invalid_rails_app/config/locales/en.yml +0 -23
- data/spec/fixtures/invalid_rails_app/config/routes.rb +0 -5
- data/spec/fixtures/invalid_rails_app/lib/invalid_code_complexity.rb +0 -13
- data/spec/fixtures/invalid_rails_app/lib/invalid_code_duplication.rb +0 -40
- data/spec/fixtures/invalid_style_guide.rb +0 -3
- data/spec/fixtures/strictly_invalid_style_guide.rb +0 -3
- data/spec/fixtures/valid.rb +0 -1
- data/spec/fixtures/valid_coffee_lint.coffee +0 -6
- data/spec/fixtures/valid_rails_app/Gemfile +0 -5
- data/spec/fixtures/valid_rails_app/Gemfile_lock +0 -105
- data/spec/fixtures/valid_rails_app/Rakefile +0 -7
- data/spec/fixtures/valid_rails_app/app/assets/javascripts/valid.coffee +0 -6
- data/spec/fixtures/valid_rails_app/app/controllers/application_controller.rb +0 -6
- data/spec/fixtures/valid_rails_app/app/views/layouts/application.html.erb +0 -14
- data/spec/fixtures/valid_rails_app/config.ru +0 -4
- data/spec/fixtures/valid_rails_app/config/application.rb +0 -29
- data/spec/fixtures/valid_rails_app/config/boot.rb +0 -4
- data/spec/fixtures/valid_rails_app/config/database.yml +0 -25
- data/spec/fixtures/valid_rails_app/config/environment.rb +0 -5
- data/spec/fixtures/valid_rails_app/config/environments/development.rb +0 -30
- data/spec/fixtures/valid_rails_app/config/environments/production.rb +0 -86
- data/spec/fixtures/valid_rails_app/config/environments/test.rb +0 -37
- data/spec/fixtures/valid_rails_app/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/fixtures/valid_rails_app/config/initializers/mime_types.rb +0 -5
- data/spec/fixtures/valid_rails_app/config/initializers/secret_token.rb +0 -13
- data/spec/fixtures/valid_rails_app/config/initializers/session_store.rb +0 -3
- data/spec/fixtures/valid_rails_app/config/initializers/wrap_parameters.rb +0 -15
- data/spec/fixtures/valid_rails_app/config/locales/en.yml +0 -23
- data/spec/fixtures/valid_rails_app/config/routes.rb +0 -2
- data/spec/spec_helper.rb +0 -8
- data/warder.gemspec +0 -38
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
Feature: detects code smell
|
|
2
|
-
In order to find code smell
|
|
3
|
-
As a ruby developer
|
|
4
|
-
I want to run warder with --code-smell option
|
|
5
|
-
|
|
6
|
-
Scenario: run warder with enabled code smell option
|
|
7
|
-
Given I have valid file in directory
|
|
8
|
-
When I run `warder --code-smell`
|
|
9
|
-
Then warder detects code smell issues
|
|
10
|
-
Then the exit status should be 0
|
|
11
|
-
|
|
12
|
-
Scenario: run warder with enabled code smell option on invalid file
|
|
13
|
-
Given I have invalid_code_smell file in directory
|
|
14
|
-
When I run `warder --code-smell`
|
|
15
|
-
Then warder detects code smell issues
|
|
16
|
-
Then the exit status should be 1
|
|
17
|
-
|
|
18
|
-
Scenario: run warder with enabled code smell option on valid file only
|
|
19
|
-
Given I have valid file in directory
|
|
20
|
-
And I have invalid_code_smell file in directory
|
|
21
|
-
When I run `warder --code-smell valid.rb`
|
|
22
|
-
Then warder does nothing
|
|
23
|
-
Then the exit status should be 0
|
|
24
|
-
|
|
25
|
-
Scenario: run warder with disabled code smell option on invalid file
|
|
26
|
-
Given I have invalid_code_smell file in directory
|
|
27
|
-
When I run `warder --no-code-smell`
|
|
28
|
-
Then warder does nothing
|
|
29
|
-
Then the exit status should be 0
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
Feature: detects magick numbers
|
|
2
|
-
In order to find magick numbers
|
|
3
|
-
As a ruby developer
|
|
4
|
-
I want to run warder with --magick-numbers option
|
|
5
|
-
|
|
6
|
-
Scenario: run warder with enabled magick numbers option
|
|
7
|
-
Given I have valid file in directory
|
|
8
|
-
When I run `warder --magick-numbers`
|
|
9
|
-
Then warder detects magick numbers issues
|
|
10
|
-
Then the exit status should be 0
|
|
11
|
-
|
|
12
|
-
Scenario: run warder with enabled magick numbers option on invalid file
|
|
13
|
-
Given I have invalid_magick_numbers file in directory
|
|
14
|
-
When I run `warder --magick-numbers`
|
|
15
|
-
Then warder detects magick numbers issues
|
|
16
|
-
Then the exit status should be 1
|
|
17
|
-
|
|
18
|
-
Scenario: run warder with enabled magick numbers option on valid file only
|
|
19
|
-
Given I have valid file in directory
|
|
20
|
-
And I have invalid_magick_numbers file in directory
|
|
21
|
-
When I run `warder --magick-numbers valid.rb`
|
|
22
|
-
Then warder does nothing
|
|
23
|
-
Then the exit status should be 0
|
|
24
|
-
|
|
25
|
-
Scenario: run warder with disabled style guide option on invalid file
|
|
26
|
-
Given I have invalid_magick_numbers file in directory
|
|
27
|
-
When I run `warder --no-magick-numbers`
|
|
28
|
-
Then warder does nothing
|
|
29
|
-
Then the exit status should be 0
|
data/features/quiet.feature
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
Feature: run warder in quiet mode
|
|
2
|
-
In order to silent validators output
|
|
3
|
-
As a ruby developer
|
|
4
|
-
I want to run warder with --quiet option
|
|
5
|
-
|
|
6
|
-
Scenario: run warder with enabled quiet option
|
|
7
|
-
Given I have valid file in directory
|
|
8
|
-
When I run `warder --quiet --magick-numbers`
|
|
9
|
-
Then warder detects no magick numbers issues
|
|
10
|
-
And the exit status should be 0
|
data/features/run.feature
DELETED
data/features/statistics.feature
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
Feature: run warder in statistics mode
|
|
2
|
-
In order to get results
|
|
3
|
-
As a ruby developer
|
|
4
|
-
I want to run warder with --stats option
|
|
5
|
-
|
|
6
|
-
Scenario: run warder with enabled stats option
|
|
7
|
-
Given I have valid file in directory
|
|
8
|
-
When I run `warder --stats --magick-numbers`
|
|
9
|
-
Then 0 magick numbers stats should be printed
|
|
10
|
-
And the exit status should be 0
|
|
11
|
-
|
|
12
|
-
Scenario: run warder with enabled stats option on invalid rails app
|
|
13
|
-
Given I have invalid_rails_app project in directory
|
|
14
|
-
When I run `warder --stats --sandi-rules`
|
|
15
|
-
Then the output should contain "broken 3 out of 4 sandi rules"
|
|
16
|
-
And the exit status should be 1
|
|
17
|
-
|
|
18
|
-
Scenario: run warder with disabled stats option
|
|
19
|
-
Given I have valid file in directory
|
|
20
|
-
When I run `warder --no-stats --code-complexity`
|
|
21
|
-
Then 0 code complexity stats should not be printed
|
|
22
|
-
And the exit status should be 0
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
def rails_best_practices_cmd
|
|
2
|
-
'rails_best_practices --without-color --silent --spec --test --features .'
|
|
3
|
-
end
|
|
4
|
-
|
|
5
|
-
def executing_rails_best_practices
|
|
6
|
-
"executing '#{rails_best_practices_cmd}'"
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
def rails_best_practices_output
|
|
10
|
-
`cd tmp/aruba/#{@projectname}/ && #{rails_best_practices_cmd}`
|
|
11
|
-
.split("\n")
|
|
12
|
-
.reject { |line| line.match(/Found \d+ warnings/) }
|
|
13
|
-
.join("\n")
|
|
14
|
-
end
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
def executing_rails_security
|
|
2
|
-
"executing 'brakeman -q -p .'"
|
|
3
|
-
end
|
|
4
|
-
|
|
5
|
-
def rails_security_output
|
|
6
|
-
regexp = Warder::RailsSecurityRunner::PRINTABLE_REGEXP
|
|
7
|
-
`cd tmp/aruba/#{@projectname}/ && brakeman -q -p .`
|
|
8
|
-
.split("\n")
|
|
9
|
-
.reject { |line| !regexp.match(line) }
|
|
10
|
-
.join("\n")
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
Given(/^I have ((in)?valid_rails_app) project in directory$/) do |name, _|
|
|
14
|
-
@projectname = name
|
|
15
|
-
FileUtils.cp_r "spec/fixtures/#{@projectname}", 'tmp/aruba/'
|
|
16
|
-
FileUtils.mv "tmp/aruba/#{@projectname}/Gemfile_lock",
|
|
17
|
-
"tmp/aruba/#{@projectname}/Gemfile.lock"
|
|
18
|
-
expect(`ls tmp/aruba`).to match(@projectname)
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
Given(/^I am on project directory$/) do
|
|
22
|
-
dir = Aruba::ArubaPath.new("tmp/aruba/#{@projectname}")
|
|
23
|
-
aruba.instance_variable_set('@current_directory', dir)
|
|
24
|
-
end
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
def executing_gem_freshness
|
|
2
|
-
"executing 'bundle-audit update &> /dev/null && (cd . && bundle-audit check)'"
|
|
3
|
-
end
|
|
4
|
-
|
|
5
|
-
def gem_freshness_output
|
|
6
|
-
if @projectname
|
|
7
|
-
prep = "cd spec/fixtures/#{@projectname}/ && cp Gemfile_lock Gemfile.lock"
|
|
8
|
-
`#{prep} && bundle-audit check; rm -f Gemfile.lock`
|
|
9
|
-
.split("\n")
|
|
10
|
-
.reject { |line| line.match('ulnerabilities found') }
|
|
11
|
-
.join("\n")
|
|
12
|
-
else
|
|
13
|
-
fail NotImplementedError
|
|
14
|
-
end
|
|
15
|
-
end
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
def executing_code_complexity
|
|
2
|
-
"executing 'flog -a -c -g -m .'"
|
|
3
|
-
end
|
|
4
|
-
|
|
5
|
-
def code_complexity_output
|
|
6
|
-
raw_output = command_output_for_project_or_file('flog -a -c -g -m')
|
|
7
|
-
raw_output.split("\n").reject do |line|
|
|
8
|
-
/total|average/.match(line) ||
|
|
9
|
-
Warder::CodeComplexityRunner::FAILURE_THRESHOLD > line.to_i
|
|
10
|
-
end.join("\n")
|
|
11
|
-
end
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
Before do
|
|
2
|
-
FileUtils.mkdir_p 'tmp/aruba'
|
|
3
|
-
end
|
|
4
|
-
|
|
5
|
-
After do
|
|
6
|
-
FileUtils.rm_rf 'tmp/aruba'
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
Given(/^I have (\w+) file in directory$/) do |name|
|
|
10
|
-
@filename = "#{name}.rb"
|
|
11
|
-
@filename = "#{name}.coffee" unless File.exist? "spec/fixtures/#{@filename}"
|
|
12
|
-
FileUtils.ln_s "../../spec/fixtures/#{@filename}", 'tmp/aruba/'
|
|
13
|
-
expect(`ls tmp/aruba`).to match(@filename)
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
Then(/^warder does nothing$/) do
|
|
17
|
-
step 'the output should match /.{0}/'
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
Then(/^warder detects( no)? (.+) (issues|violations)$/) do |no, what, _|
|
|
21
|
-
executing_output = send(:"executing_#{what.tr(' ', '_')}")
|
|
22
|
-
step "the output should#{' not' if no} contain \"#{executing_output}\""
|
|
23
|
-
|
|
24
|
-
validation_output = send(:"#{what.tr(' ', '_')}_output")
|
|
25
|
-
validation_output.split("\n").each do |string|
|
|
26
|
-
step "the output should#{' not' if no} contain \"#{string}\""
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def command_output_for_project_or_file(cmd)
|
|
31
|
-
if @filename
|
|
32
|
-
`cd spec/fixtures/ && #{cmd} #{'./' unless cmd == 'reek'}#{@filename}`
|
|
33
|
-
elsif @projectname
|
|
34
|
-
`cd spec/fixtures/#{@projectname} && #{cmd} ./`
|
|
35
|
-
else
|
|
36
|
-
fail NotImplementedError
|
|
37
|
-
end
|
|
38
|
-
end
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
def executing_coffee_lint
|
|
2
|
-
"executing 'coffeelint .'"
|
|
3
|
-
end
|
|
4
|
-
|
|
5
|
-
def coffee_lint_output
|
|
6
|
-
output = command_output_for_project_or_file('coffeelint.rb -r .')
|
|
7
|
-
.split("\n")
|
|
8
|
-
.reject { |line| !line.match(/✗ #\d+:/) }
|
|
9
|
-
output.map do |str|
|
|
10
|
-
str.gsub("\e[32m", '').gsub("\e[0m", '').sub('✗', 'ERROR:')
|
|
11
|
-
end.join("\n")
|
|
12
|
-
end
|
data/features/support/env.rb
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
require 'aruba'
|
|
2
|
-
require 'aruba/cucumber'
|
|
3
|
-
require 'aruba/processes/in_process'
|
|
4
|
-
|
|
5
|
-
require 'simplecov'
|
|
6
|
-
SimpleCov.start do
|
|
7
|
-
add_filter '/features/'
|
|
8
|
-
add_filter '/spec/'
|
|
9
|
-
add_filter '/vendor/'
|
|
10
|
-
add_group 'Libraries', 'lib'
|
|
11
|
-
end
|
|
12
|
-
SimpleCov::MINIMUM_COVERAGE = 100
|
|
13
|
-
SimpleCov.minimum_coverage SimpleCov::MINIMUM_COVERAGE
|
|
14
|
-
|
|
15
|
-
bin_path = "#{File.expand_path('../../../bin', __FILE__)}"
|
|
16
|
-
ENV['PATH'] = "#{bin_path}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
|
|
17
|
-
|
|
18
|
-
require 'warder'
|
|
19
|
-
|
|
20
|
-
Aruba.configure do |config|
|
|
21
|
-
config.command_launcher = :in_process
|
|
22
|
-
config.main_class = Warder::CLI
|
|
23
|
-
end
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
Feature: check coffeescript style guide
|
|
2
|
-
In order to check coffeescript style guide
|
|
3
|
-
As a coffeescript developer
|
|
4
|
-
I want to run warder with --coffee-lint option
|
|
5
|
-
|
|
6
|
-
Scenario: run warder with enabled coffee lint option
|
|
7
|
-
Given I have valid_coffee_lint file in directory
|
|
8
|
-
When I run `warder --coffee-lint`
|
|
9
|
-
Then warder detects coffee lint issues
|
|
10
|
-
Then the exit status should be 0
|
|
11
|
-
|
|
12
|
-
Scenario: run warder with enabled coffee lint option on invalid file
|
|
13
|
-
Given I have invalid_coffee_lint file in directory
|
|
14
|
-
When I run `warder --coffee-lint`
|
|
15
|
-
Then warder detects coffee lint issues
|
|
16
|
-
Then the exit status should be 1
|
|
17
|
-
|
|
18
|
-
Scenario: run warder with enabled coffee lint option on valid file only
|
|
19
|
-
Given I have valid_coffee_lint file in directory
|
|
20
|
-
And I have invalid_coffee_lint file in directory
|
|
21
|
-
When I run `warder --coffee-lint valid_coffee_lint.coffee`
|
|
22
|
-
Then warder does nothing
|
|
23
|
-
Then the exit status should be 0
|
|
24
|
-
|
|
25
|
-
Scenario: run warder with disabled coffee lint option on invalid file
|
|
26
|
-
Given I have invalid_coffee_lint file in directory
|
|
27
|
-
When I run `warder --no-coffee-lint`
|
|
28
|
-
Then warder does nothing
|
|
29
|
-
Then the exit status should be 0
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
Feature: check ruby style guide
|
|
2
|
-
In order to check ruby style guide
|
|
3
|
-
As a ruby developer
|
|
4
|
-
I want to run warder with --style-guide option
|
|
5
|
-
|
|
6
|
-
Scenario: run warder with enabled style guide option
|
|
7
|
-
Given I have valid file in directory
|
|
8
|
-
When I run `warder --style-guide`
|
|
9
|
-
Then warder detects style guide issues
|
|
10
|
-
Then the exit status should be 0
|
|
11
|
-
|
|
12
|
-
Scenario: run warder with enabled style guide option on invalid file
|
|
13
|
-
Given I have invalid_style_guide file in directory
|
|
14
|
-
When I run `warder --style-guide`
|
|
15
|
-
Then warder detects style guide issues
|
|
16
|
-
Then the exit status should be 1
|
|
17
|
-
|
|
18
|
-
Scenario: run warder with enabled style guide option on valid file only
|
|
19
|
-
Given I have valid file in directory
|
|
20
|
-
And I have invalid_style_guide file in directory
|
|
21
|
-
When I run `warder --style-guide valid.rb`
|
|
22
|
-
Then warder does nothing
|
|
23
|
-
Then the exit status should be 0
|
|
24
|
-
|
|
25
|
-
Scenario: run warder with disabled style guide option on invalid file
|
|
26
|
-
Given I have invalid_style_guide file in directory
|
|
27
|
-
When I run `warder --no-style-guide`
|
|
28
|
-
Then warder does nothing
|
|
29
|
-
Then the exit status should be 0
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
##
|
|
2
|
-
# I am a dog.
|
|
3
|
-
|
|
4
|
-
class Dog
|
|
5
|
-
def x
|
|
6
|
-
return 1
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
def w
|
|
10
|
-
return 2 + q
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
private
|
|
14
|
-
|
|
15
|
-
def q
|
|
16
|
-
return 3
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
##
|
|
21
|
-
# I
|
|
22
|
-
# am
|
|
23
|
-
# a
|
|
24
|
-
# cat.
|
|
25
|
-
|
|
26
|
-
class Cat
|
|
27
|
-
def y
|
|
28
|
-
return 1
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
def z
|
|
32
|
-
return 2 + s
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
private
|
|
36
|
-
|
|
37
|
-
def s
|
|
38
|
-
return 3
|
|
39
|
-
end
|
|
40
|
-
end
|