Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e915f16
New methods to get major.minor.patch
jinxka Jun 20, 2018
c341c40
Merge pull request #1 from jinxka/add_new_methods
fwininger Jun 20, 2018
6d480c7
Add benchmark for comparing versions
jinxka Jul 16, 2019
fb9b5e5
Merge pull request #3 from jinxka/add_benchmark
fwininger Jul 16, 2019
b5e92d9
Update SoftwareVersion::Version
jinxka Jul 17, 2019
4fb14b7
Merge pull request #4 from jinxka/update_software_version
fwininger Jul 17, 2019
4ba6dbd
Update gems versions
jinxka Jul 17, 2019
c840751
Merge pull request #5 from jinxka/bundle_update
fwininger Jul 17, 2019
97fd62c
Fix SoftwareVersion::Version#sv
jinxka Jul 18, 2019
f852642
Merge pull request #6 from jinxka/fix_sv
fwininger Jul 18, 2019
b88e922
Update spec fixtures files
jinxka Jul 18, 2019
3f06dc1
Merge pull request #7 from jinxka/update_spec_fixtures
fwininger Jul 18, 2019
fe271ce
Configure rubocop
fwininger Jul 18, 2019
46278b4
Fix unit-tests
fwininger Jul 18, 2019
4855409
Merge pull request #8 from Cyberwatch/configure_travis
fwininger Jul 18, 2019
013a687
Fix travis file
fwininger Jul 18, 2019
bd083bc
Update Readme.
fwininger Jul 18, 2019
03296d5
Update revision
jinxka Apr 28, 2021
22faa71
Update README.md
fwininger Apr 29, 2021
9d3e2f2
Update README.md
fwininger Apr 29, 2021
b2b693d
Fix method patch
jinxka Jan 4, 2022
df28a72
Fix Version#sv regex
jinxka Jan 4, 2022
f7052ca
Update bundler
fwininger Jun 9, 2022
e5d9482
Update Version#version_split_digits to ignore '.'
jinxka Jun 9, 2022
841e2b2
Compare versions after semantic tokenization
fmang Oct 3, 2023
3840a75
Ease the creation of software versions
fmang Oct 16, 2023
3ce39d0
Extract the version components using the tokens
fmang Oct 16, 2023
ccb1471
Lex by hand
fmang Oct 31, 2023
ad58a1e
Replace Token by 2-element arrays
fmang Oct 31, 2023
79decf4
Update gems
fwininger Oct 31, 2023
b586abb
Remove coverall
fwininger Oct 31, 2023
3acbc22
Update rubocop config
fwininger Oct 31, 2023
03e14a6
Suppression de la dependance à rake
fwininger Oct 31, 2023
feafbc1
Add github actions
fwininger Oct 31, 2023
d324512
Remove travis
fwininger Oct 31, 2023
342bf2e
Update Copyright
fwininger Oct 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Run RSpec tests
on: [push]
jobs:
run-rspec-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Run tests
run: bundle exec rspec
14 changes: 14 additions & 0 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Rubocop
on: [push]
jobs:
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Run RuboCop
run: bundle exec rubocop
19 changes: 19 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
inherit_from: .rubocop_todo.yml

require:
- rubocop-performance
- rubocop-rspec

AllCops:
NewCops: enable

Style/FrozenStringLiteralComment:
Enabled: false

Layout/LineLength:
Max: 120
Exclude:
- software_version.gemspec

Naming/MethodName:
Enabled: false
238 changes: 238 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2023-10-31 10:06:04 UTC using RuboCop version 1.57.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Severity, Include.
# Include: **/*.gemspec
Gemspec/DeprecatedAttributeAssignment:
Exclude:
- 'software_version.gemspec'

# Offense count: 6
# Configuration parameters: EnforcedStyle, AllowedGems, Include.
# SupportedStyles: Gemfile, gems.rb, gemspec
# Include: **/*.gemspec, **/Gemfile, **/gems.rb
Gemspec/DevelopmentDependencies:
Exclude:
- 'software_version.gemspec'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Severity, Include.
# Include: **/*.gemspec
Gemspec/RequireMFA:
Exclude:
- 'software_version.gemspec'

# Offense count: 1
# Configuration parameters: Severity, Include.
# Include: **/*.gemspec
Gemspec/RequiredRubyVersion:
Exclude:
- 'software_version.gemspec'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowForAlignment.
Layout/CommentIndentation:
Exclude:
- 'lib/software_version/version.rb'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_braces
Layout/FirstHashElementIndentation:
Exclude:
- 'lib/software_version/version.rb'

# Offense count: 1
# Configuration parameters: AllowComments, AllowEmptyLambdas.
Lint/EmptyBlock:
Exclude:
- 'spec/software_version_spec.rb'

# Offense count: 1
# Configuration parameters: AllowComments.
Lint/EmptyWhen:
Exclude:
- 'lib/software_version/version.rb'

# Offense count: 1
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 28

# Offense count: 1
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
# AllowedMethods: refine
Metrics/BlockLength:
Max: 30

# Offense count: 1
# Configuration parameters: CountComments, CountAsOne.
Metrics/ClassLength:
Max: 147

# Offense count: 1
# Configuration parameters: AllowedMethods, AllowedPatterns.
Metrics/CyclomaticComplexity:
Max: 15

# Offense count: 3
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
Metrics/MethodLength:
Max: 36

# Offense count: 1
# Configuration parameters: CountComments, CountAsOne.
Metrics/ModuleLength:
Max: 269

# Offense count: 1
# Configuration parameters: AllowedMethods, AllowedPatterns.
Metrics/PerceivedComplexity:
Max: 11

# Offense count: 2
# Configuration parameters: AllowedPatterns.
# SupportedStyles: snake_case, camelCase
Naming/MethodName:
EnforcedStyle: snake_case

# Offense count: 9
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpec/BeEq:
Exclude:
- 'spec/software_version/common_spec.rb'

# Offense count: 5
RSpec/BeforeAfterAll:
Exclude:
- '**/spec/spec_helper.rb'
- '**/spec/rails_helper.rb'
- '**/spec/support/**/*.rb'
- 'spec/software_version/arch_spec.rb'
- 'spec/software_version/common_spec.rb'
- 'spec/software_version/deb_spec.rb'
- 'spec/software_version/rpm_spec.rb'
- 'spec/software_version/windows_application_spec.rb'

# Offense count: 4
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
RSpec/ContextWording:
Exclude:
- 'spec/software_version/arch_spec.rb'
- 'spec/software_version/deb_spec.rb'
- 'spec/software_version/rpm_spec.rb'
- 'spec/software_version/windows_application_spec.rb'

# Offense count: 100
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: SkipBlocks, EnforcedStyle.
# SupportedStyles: described_class, explicit
RSpec/DescribedClass:
Exclude:
- 'spec/software_version/arch_spec.rb'
- 'spec/software_version/common_spec.rb'
- 'spec/software_version/deb_spec.rb'
- 'spec/software_version/rpm_spec.rb'
- 'spec/software_version/windows_application_spec.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpec/EmptyExampleGroup:
Exclude:
- 'spec/software_version_spec.rb'

# Offense count: 5
# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Max: 22

# Offense count: 9
RSpec/MultipleExpectations:
Max: 7

# Offense count: 18
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
# SupportedStyles: always, named_only
RSpec/NamedSubject:
Exclude:
- 'spec/software_version/common_spec.rb'

# Offense count: 10
RSpec/RepeatedDescription:
Exclude:
- 'spec/software_version/arch_spec.rb'
- 'spec/software_version/common_spec.rb'
- 'spec/software_version/deb_spec.rb'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
# SupportedStyles: assign_to_condition, assign_inside_condition
Style/ConditionalAssignment:
Exclude:
- 'lib/software_version/version.rb'

# Offense count: 3
# Configuration parameters: AllowedConstants.
Style/Documentation:
Exclude:
- 'spec/**/*'
- 'test/**/*'
- 'lib/software_version.rb'
- 'lib/software_version/version.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/EmptyLambdaParameter:
Exclude:
- 'lib/software_version/version.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/FileRead:
Exclude:
- 'spec/spec_helper.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: line_count_dependent, lambda, literal
Style/Lambda:
Exclude:
- 'lib/software_version/version.rb'

# Offense count: 4
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
# SupportedStyles: predicate, comparison
Style/NumericPredicate:
Exclude:
- 'spec/**/*'
- 'bin/sort_with_dpkg.rb'
- 'lib/software_version/version.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Mode.
Style/StringConcatenation:
Exclude:
- 'spec/spec_helper.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyleForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
Style/TrailingCommaInHashLiteral:
Exclude:
- 'lib/software_version/version.rb'
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
source 'https://rubygems.org'

gemspec

gem 'coveralls', require: false
Loading