Class: NeetoCompliance::RubyVersionVerifier
- Inherits:
-
Base
- Object
- Base
- NeetoCompliance::RubyVersionVerifier
show all
- Defined in:
- lib/neeto_compliance/verifiers/ruby_version_verifier.rb
Instance Method Summary
collapse
Methods inherited from Base
#app_is_exception?, #app_name, #apps_exception_list, #audit, #auto_correct!, #autofix_suggestion, #error_message, #print_description, #process, #verifier_name
Instance Method Details
#autofix_command ⇒ Object
21
22
23
|
# File 'lib/neeto_compliance/verifiers/ruby_version_verifier.rb', line 21
def autofix_command
"cp #{commons_copy} #{local_copy}"
end
|
#commons_copy ⇒ Object
9
10
11
|
# File 'lib/neeto_compliance/verifiers/ruby_version_verifier.rb', line 9
def commons_copy
NeetoCompliance::NeetoCommons.path.join "common_files/.ruby-version"
end
|
#local_copy ⇒ Object
5
6
7
|
# File 'lib/neeto_compliance/verifiers/ruby_version_verifier.rb', line 5
def local_copy
".ruby-version"
end
|
#valid? ⇒ Boolean
17
18
19
|
# File 'lib/neeto_compliance/verifiers/ruby_version_verifier.rb', line 17
def valid?
`#{verify_command}`.empty?
end
|
#verify_command ⇒ Object
13
14
15
|
# File 'lib/neeto_compliance/verifiers/ruby_version_verifier.rb', line 13
def verify_command
"diff -N #{commons_copy} #{local_copy}"
end
|