deb_version 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 888af66ba17b645ae1ef3a98bbadf772a7486c59ccb2c6fb4eb7ca8b4a18449c
4
- data.tar.gz: 7a656c657e4189e79f06ea9712d1be5584d42526931efc72d912bc5e36d9938d
3
+ metadata.gz: f72ae7e36419f0ef876d4642f3e06ae058d5168da675477d0d3afc341cb4cb05
4
+ data.tar.gz: 86ae7061b1030633724befc368d3a1dec093f87070d3baba11d5260c9d3b955f
5
5
  SHA512:
6
- metadata.gz: 223bab3293c88121f74f3aa95c5fb489d955131c63548c9d140faabcce94ab1ebcadca37203648da562d21ff5c72992a8aa4a575fbb39f4dded6039303f73220
7
- data.tar.gz: b5a4960c5205ae620092a5523c04a4f0ae8ac1e2b96ceba7225632d9d05e262d624ff98d5d7583b6147b2fcc554cd7aa2780ff0dbed25cc91c3e3f0d8e47c8d6
6
+ metadata.gz: 7960018f5b00825dc38fc58720af204aaed05ed1c74a70e9cdae00640341993e6fe86e7ed5865fc7875a68fd16d54245b154712fea0d6777d715598214c3b6a3
7
+ data.tar.gz: 25aa6034cc10675a821236dea14dd514b471e23c1c648518b7464f70bb4bca77ef890b9f0461483614fc69fa1fe637d60b0f1c80f45b9ce409bea8e6e63ef307
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.0.1] - 2023-05-30
4
+ - Bug fix for versions using `z`
5
+ - Adds a new `to_s` method.
6
+
3
7
  ## [0.1.0] - 2023-05-07
4
8
 
5
9
  - Initial release
data/bin/console ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "deb_version"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ require "irb"
11
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class DebVersion
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deb_version
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nemo
@@ -9,77 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2023-05-30 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: minitest
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '5.18'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '5.18'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '13.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '13.0'
41
- - !ruby/object:Gem::Dependency
42
- name: rubocop
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '1.21'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '1.21'
55
- - !ruby/object:Gem::Dependency
56
- name: rubocop-minitest
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 0.31.0
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 0.31.0
69
- - !ruby/object:Gem::Dependency
70
- name: rubocop-rake
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 0.6.0
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 0.6.0
12
+ dependencies: []
83
13
  description:
84
14
  email:
85
15
  - rubygem@captnemo.in
@@ -87,20 +17,14 @@ executables: []
87
17
  extensions: []
88
18
  extra_rdoc_files: []
89
19
  files:
90
- - ".rubocop.yml"
91
20
  - CHANGELOG.md
92
- - CODE_OF_CONDUCT.md
93
- - Gemfile
94
- - Gemfile.lock
95
- - HACKING.md
96
21
  - LICENSE.txt
97
22
  - README.md
98
- - Rakefile
99
- - deb_version.gemspec
23
+ - bin/console
24
+ - bin/setup
100
25
  - lib/deb_version.rb
101
26
  - lib/deb_version/compare.rb
102
27
  - lib/deb_version/version.rb
103
- - sig/deb_version.rbs
104
28
  homepage: https://github.com/captn3m0/ruby-deb-version
105
29
  licenses:
106
30
  - MIT
data/.rubocop.yml DELETED
@@ -1,22 +0,0 @@
1
- require:
2
- - rubocop-minitest
3
- - rubocop-rake
4
-
5
- Style/StringLiterals:
6
- Enabled: true
7
- EnforcedStyle: double_quotes
8
-
9
- Style/StringLiteralsInInterpolation:
10
- Enabled: true
11
- EnforcedStyle: double_quotes
12
-
13
- Layout/LineLength:
14
- Max: 120
15
- Metrics/MethodLength:
16
- Max: 20
17
-
18
- AllCops:
19
- NewCops: enable
20
- TargetRubyVersion: 3.0
21
- Lint/BinaryOperatorWithIdenticalOperands:
22
- Enabled: false
data/CODE_OF_CONDUCT.md DELETED
@@ -1,84 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
-
7
- We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
-
9
- ## Our Standards
10
-
11
- Examples of behavior that contributes to a positive environment for our community include:
12
-
13
- * Demonstrating empathy and kindness toward other people
14
- * Being respectful of differing opinions, viewpoints, and experiences
15
- * Giving and gracefully accepting constructive feedback
16
- * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
- * Focusing on what is best not just for us as individuals, but for the overall community
18
-
19
- Examples of unacceptable behavior include:
20
-
21
- * The use of sexualized language or imagery, and sexual attention or
22
- advances of any kind
23
- * Trolling, insulting or derogatory comments, and personal or political attacks
24
- * Public or private harassment
25
- * Publishing others' private information, such as a physical or email
26
- address, without their explicit permission
27
- * Other conduct which could reasonably be considered inappropriate in a
28
- professional setting
29
-
30
- ## Enforcement Responsibilities
31
-
32
- Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
-
34
- Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
-
36
- ## Scope
37
-
38
- This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
-
40
- ## Enforcement
41
-
42
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at coc@captnemo.in. All complaints will be reviewed and investigated promptly and fairly.
43
-
44
- All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
-
46
- ## Enforcement Guidelines
47
-
48
- Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
-
50
- ### 1. Correction
51
-
52
- **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
-
54
- **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
-
56
- ### 2. Warning
57
-
58
- **Community Impact**: A violation through a single incident or series of actions.
59
-
60
- **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
-
62
- ### 3. Temporary Ban
63
-
64
- **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
-
66
- **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
-
68
- ### 4. Permanent Ban
69
-
70
- **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
-
72
- **Consequence**: A permanent ban from any sort of public interaction within the community.
73
-
74
- ## Attribution
75
-
76
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
- available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
-
79
- Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
-
81
- [homepage]: https://www.contributor-covenant.org
82
-
83
- For answers to common questions about this code of conduct, see the FAQ at
84
- https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- # Specify your gem's dependencies in deb_version.gemspec
6
- gemspec
data/Gemfile.lock DELETED
@@ -1,55 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- deb_version (1.0.0)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- ast (2.4.2)
10
- json (2.6.3)
11
- json (2.6.3-java)
12
- minitest (5.18.0)
13
- parallel (1.23.0)
14
- parser (3.2.2.1)
15
- ast (~> 2.4.1)
16
- rainbow (3.1.1)
17
- rake (13.0.6)
18
- regexp_parser (2.8.0)
19
- rexml (3.2.5)
20
- rubocop (1.50.2)
21
- json (~> 2.3)
22
- parallel (~> 1.10)
23
- parser (>= 3.2.0.0)
24
- rainbow (>= 2.2.2, < 4.0)
25
- regexp_parser (>= 1.8, < 3.0)
26
- rexml (>= 3.2.5, < 4.0)
27
- rubocop-ast (>= 1.28.0, < 2.0)
28
- ruby-progressbar (~> 1.7)
29
- unicode-display_width (>= 2.4.0, < 3.0)
30
- rubocop-ast (1.28.1)
31
- parser (>= 3.2.1.0)
32
- rubocop-minitest (0.31.0)
33
- rubocop (>= 1.39, < 2.0)
34
- rubocop-rake (0.6.0)
35
- rubocop (~> 1.0)
36
- ruby-progressbar (1.13.0)
37
- unicode-display_width (2.4.2)
38
-
39
- PLATFORMS
40
- universal-java-1.8
41
- universal-java-11
42
- x86_64-darwin
43
- x86_64-darwin-20
44
- x86_64-linux
45
-
46
- DEPENDENCIES
47
- deb_version!
48
- minitest (~> 5.18)
49
- rake (~> 13.0)
50
- rubocop (~> 1.21)
51
- rubocop-minitest (~> 0.31.0)
52
- rubocop-rake (~> 0.6.0)
53
-
54
- BUNDLED WITH
55
- 2.4.12
data/HACKING.md DELETED
@@ -1,37 +0,0 @@
1
- # Development
2
-
3
- The all-debian-versions.lst file is a sorted version of the file
4
- from https://github.com/FauxFaux/deb-version/blob/42c0e61f62b6776fa1bd77b0da3327fa31dcc1c4/all-debian-versions.lst. The sorting was done using the following script:
5
-
6
- ```
7
- import sys
8
- from functools import cmp_to_key
9
- import apt_pkg
10
- apt_pkg.init_system()
11
- def compare_versions(version1, version2):
12
- # Implement your comparison logic here
13
- # Return -1 if version1 < version2
14
- # Return 0 if version1 == version2
15
- # Return 1 if version1 > version2
16
- # You can use apt_pkg.version_compare or any other comparison logic
17
-
18
- # Example comparison logic using apt_pkg.version_compare
19
- return apt_pkg.version_compare(version1, version2)
20
-
21
- def sort_debian_package_numbers(package_numbers):
22
- # Sort the package numbers using cmp_to_key and compare_versions
23
- return sorted(package_numbers, key=cmp_to_key(compare_versions))
24
-
25
- if __name__ == "__main__":
26
- # Read package numbers from stdin
27
- package_numbers = [line.strip() for line in sys.stdin]
28
-
29
- # Sort the package numbers
30
- sorted_package_numbers = sort_debian_package_numbers(package_numbers)
31
-
32
- # Write the sorted list to stdout
33
- for package_number in sorted_package_numbers:
34
- sys.stdout.write(package_number + '\n')
35
- ```
36
-
37
- Keeping a sorted version in the repository lets us avoid the libapt dependency.
data/Rakefile DELETED
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require "rubocop/rake_task"
5
- require "minitest/test_task"
6
-
7
- RuboCop::RakeTask.new
8
-
9
- Minitest::TestTask.create(:test) do |t|
10
- t.warning = false
11
- t.test_globs = ["test.rb"]
12
- end
13
-
14
- task default: :test
data/deb_version.gemspec DELETED
@@ -1,38 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "lib/deb_version/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "deb_version"
7
- spec.version = DebVersion::VERSION
8
- spec.authors = ["Nemo"]
9
- spec.email = ["rubygem@captnemo.in"]
10
-
11
- spec.summary = "A port of Debian Version comparison to Ruby."
12
- spec.homepage = "https://github.com/captn3m0/ruby-deb-version"
13
- spec.license = "MIT"
14
- spec.required_ruby_version = ">= 3.0.0"
15
-
16
- spec.metadata["homepage_uri"] = spec.homepage
17
- spec.metadata["source_code_uri"] = "https://github.com/captn3m0/ruby-deb-version"
18
- spec.metadata["changelog_uri"] = "https://github.com/captn3m0/ruby-deb-version/blob/main/README.md"
19
-
20
- # Specify which files should be added to the gem when it is released.
21
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
- spec.files = Dir.chdir(__dir__) do
23
- `git ls-files -z`.split("\x0").reject do |f|
24
- (File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git all-debian-versions.lst
25
- test.rb])
26
- end
27
- end
28
-
29
- spec.require_paths = ["lib"]
30
-
31
- spec.add_development_dependency "minitest", "~> 5.18"
32
- spec.add_development_dependency "rake", "~> 13.0"
33
- spec.add_development_dependency "rubocop", "~> 1.21"
34
- spec.add_development_dependency "rubocop-minitest", "~> 0.31.0"
35
- spec.add_development_dependency "rubocop-rake", "~> 0.6.0"
36
-
37
- spec.metadata["rubygems_mfa_required"] = "true"
38
- end
data/sig/deb_version.rbs DELETED
@@ -1,4 +0,0 @@
1
- module DebVersion
2
- VERSION: String
3
- # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
- end