ood_support 0.0.2 → 0.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 74117abef87ed8fce6977b36e54d99795db90ba2
4
- data.tar.gz: f82d7ee819ed4bacece8ea084a3bb472e47105e9
2
+ SHA256:
3
+ metadata.gz: 646b7459fdab45e78a1bc46aada89aa24c9434f0af8017e5086966e9c87db297
4
+ data.tar.gz: 79a6ff76689e1c71de156b0e48ac4fc92a76a994c16656dbe51005ff1fe39355
5
5
  SHA512:
6
- metadata.gz: 61abe8f3a20b7d6a9b6c3094d7b3490459dbf6629efd2559c420981ebb7257f7d617399177319fa84801ec48cd13dc44bb336ea1e50e5a35feeac42b43c13cee
7
- data.tar.gz: 173d29d517fc5f9da03cefe598e32a195301eb3752d7f982edf74997f0e2cfbc1d0591f4907a0fe7f091bd2e79aadb597f6dbec20ba7ca2eae2c5f1696958644
6
+ metadata.gz: 4eb3570e062a7898aa88598b4991e6c1c5144be13ffc8cefad9eb76de6948808dae52ba237fa655c3c26d1cfec543a60e35c4754f13fb43bb0981ae0a5df794f
7
+ data.tar.gz: e56b1bc263ddc7f6cd9e5c6226d3ed99b37416455a10c2343168ea68aafb055d39d5ae233e35b0e2ec35a3f59cc2a3c88f51b9c2b30baa98b6851fcec1ca13ba
@@ -0,0 +1,8 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "10:00"
8
+ open-pull-requests-limit: 10
@@ -0,0 +1,43 @@
1
+ name: Publish Gem
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "*"
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - name: Set version
14
+ id: version
15
+ run: echo "version=${GITHUB_REF#refs/*/v}" >> $GITHUB_OUTPUT
16
+
17
+ - name: checkout
18
+ uses: actions/checkout@v3
19
+
20
+ - name: Setup Ruby using Bundler
21
+ uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: "2.7.1"
24
+ bundler-cache: true
25
+ bundler: "2.2"
26
+
27
+ - name: install gems
28
+ run: bundle install
29
+
30
+ - name: Setup Rubygems credentials
31
+ run: |
32
+ set +x
33
+ mkdir -p ~/.gem
34
+ cat << EOF > ~/.gem/credentials
35
+ ---
36
+ :rubygems_api_key: ${{ secrets.OSC_ROBOT_RUBYGEMS_TOKEN }}
37
+ EOF
38
+ chmod 0600 ~/.gem/credentials
39
+
40
+ - name: Publish Gem
41
+ run: |
42
+ bundle exec rake build
43
+ gem push pkg/ood_support-${{ steps.version.outputs.version }}.gem
data/CHANGELOG.md CHANGED
@@ -1,12 +1,41 @@
1
- ## Unreleased
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
2
3
 
3
- ## 0.0.2 (2016-08-26)
4
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
+ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
4
6
 
5
- Bugfixes:
7
+ ## [Unreleased]
6
8
 
7
- - added aliases `User#home` and `User#member_of_group?` for backwards
8
- compatibility
9
+ ## [0.0.5] - 2023-02-24
9
10
 
10
- ## 0.0.1 (2016-07-01)
11
+ - No functional difference with 0.0.4. This is only updates to the automation.
11
12
 
12
- Initial release!
13
+ ## [0.0.4] - 2023-02-24
14
+
15
+ ### Fixed
16
+ - [12](https://github.com/OSC/ood_support/issues/12) adds initial support for Ruby 3.
17
+
18
+ ## [0.0.3] - 2017-11-17
19
+ ### Changed
20
+ - Updated the `CHANGELOG.md` formatting.
21
+ [#3](https://github.com/OSC/ood_support/issues/3)
22
+ - Updated `LICENSE.txt` dates.
23
+
24
+ ### Fixed
25
+ - Added support for Ruby 2.4 by replacing deprecated `Fixnum` with `Integer`.
26
+ [#4](https://github.com/OSC/ood_support/issues/4)
27
+
28
+ ## [0.0.2] - 2016-08-26
29
+ ### Fixed
30
+ - Added aliases `User#home` and `User#member_of_group?` for backwards
31
+ compatibility.
32
+
33
+ ## 0.0.1 - 2016-07-01
34
+ ### Added
35
+ - Initial release!
36
+
37
+ [Unreleased]: https://github.com/OSC/ood_support/compare/v0.0.5...HEAD
38
+ [0.0.5]: https://github.com/OSC/ood_support/compare/v0.0.4...v0.0.5
39
+ [0.0.4]: https://github.com/OSC/ood_support/compare/v0.0.3...v0.0.4
40
+ [0.0.3]: https://github.com/OSC/ood_support/compare/v0.0.2...v0.0.3
41
+ [0.0.2]: https://github.com/OSC/ood_support/compare/v0.0.1...v0.0.2
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2015-2016 Ohio Supercomputer Center
1
+ Copyright (c) 2015-2017 Ohio Supercomputer Center
2
2
 
3
3
  MIT License
4
4
 
@@ -21,7 +21,7 @@ module OodSupport
21
21
  new(entries: entries, **kwargs)
22
22
  end
23
23
 
24
- # @param entries [#to_s] list of entries
24
+ # @param entries [Array<ACLEntry>] list of entries
25
25
  # @param default [Boolean] default allow, otherwise deny
26
26
  def initialize(entries:, default: false)
27
27
  @entries = entries
@@ -63,7 +63,7 @@ module OodSupport
63
63
  end
64
64
 
65
65
  # Generates a hash value for this object
66
- # @return [Fixnum] hash value of object
66
+ # @return [Integer] hash value of object
67
67
  def hash
68
68
  [self.class, to_h].hash
69
69
  end
@@ -13,7 +13,8 @@ module OodSupport
13
13
  # @raise [InvalidACLEntry] unable to parse entry string
14
14
  # @return [ACLEntry] entry generated by string
15
15
  def self.parse(entry, **kwargs)
16
- new(parse_entry(entry).merge(kwargs))
16
+ args = parse_entry(entry).merge(kwargs)
17
+ new(**args)
17
18
  end
18
19
 
19
20
  # @param principle [#to_s] principle for this ACL entry
@@ -62,7 +63,7 @@ module OodSupport
62
63
  end
63
64
 
64
65
  # Generates a hash value for this object
65
- # @return [Fixnum] hash value of object
66
+ # @return [Integer] hash value of object
66
67
  def hash
67
68
  [self.class, to_s].hash
68
69
  end
@@ -93,7 +93,7 @@ module OodSupport
93
93
  # @param group [#to_s] name of group
94
94
  # @see ACL#initialize
95
95
  def initialize(owner:, group:, **kwargs)
96
- super(kwargs.merge(default: false))
96
+ super(**kwargs.merge(default: false))
97
97
  @owner = owner.to_s
98
98
  @group = group.to_s
99
99
  end
@@ -160,7 +160,7 @@ module OodSupport
160
160
  @flags = flags.map(&:to_sym)
161
161
  @domain = domain.to_s
162
162
  @permissions = permissions.map(&:to_sym)
163
- super(kwargs)
163
+ super(**kwargs)
164
164
  end
165
165
 
166
166
  # Is this an "allow" ACL entry
@@ -6,16 +6,16 @@ module OodSupport
6
6
  include Comparable
7
7
 
8
8
  # The id of the group
9
- # @return [Fixnum] the group id
9
+ # @return [Integer] the group id
10
10
  attr_reader :id
11
11
 
12
12
  # The name of the group
13
13
  # @return [String] the group name
14
14
  attr_reader :name
15
15
 
16
- # @param group [Fixnum, #to_s] the group id or name
16
+ # @param group [Integer, #to_s] the group id or name
17
17
  def initialize(group = Process.group)
18
- if group.is_a?(Fixnum)
18
+ if group.is_a?(Integer)
19
19
  @id = group
20
20
  @name = Etc.getgrgid(@id).name
21
21
  else
@@ -26,7 +26,7 @@ module OodSupport
26
26
 
27
27
  # The comparison operator for sorting values
28
28
  # @param other [#to_s] group to compare against
29
- # @return [Fixnum] how groups compare
29
+ # @return [Integer] how groups compare
30
30
  def <=>(other)
31
31
  name <=> other
32
32
  end
@@ -40,7 +40,7 @@ module OodSupport
40
40
  end
41
41
 
42
42
  # Generates a hash value for this object
43
- # @return [Fixnum] hash value of object
43
+ # @return [Integer] hash value of object
44
44
  def hash
45
45
  [self.class, name].hash
46
46
  end
@@ -30,9 +30,9 @@ module OodSupport
30
30
 
31
31
  alias_method :home, :dir
32
32
 
33
- # @param user [Fixnum, #to_s] user id or name
33
+ # @param user [Integer, #to_s] user id or name
34
34
  def initialize(user = Process.user)
35
- @passwd = user.is_a?(Fixnum) ? Etc.getpwuid(user) : Etc.getpwnam(user.to_s)
35
+ @passwd = user.is_a?(Integer) ? Etc.getpwuid(user) : Etc.getpwnam(user.to_s)
36
36
  end
37
37
 
38
38
  # Determine whether user is part of specified group
@@ -51,14 +51,14 @@ module OodSupport
51
51
  end
52
52
 
53
53
  # List of all groups that user belongs to
54
- # @return [Array<String>] list of groups user is in
54
+ # @return [Array<Group>] list of groups user is in
55
55
  def groups
56
56
  @groups ||= get_groups
57
57
  end
58
58
 
59
59
  # The comparison operator for sorting values
60
60
  # @param other [#to_s] user to compare against
61
- # @return [Fixnum] how users compare
61
+ # @return [Integer] how users compare
62
62
  def <=>(other)
63
63
  name <=> other
64
64
  end
@@ -72,7 +72,7 @@ module OodSupport
72
72
  end
73
73
 
74
74
  # Generates a hash value for this object
75
- # @return [Fixnum] hash value of object
75
+ # @return [Integer] hash value of object
76
76
  def hash
77
77
  [self.class, name].hash
78
78
  end
@@ -1,4 +1,4 @@
1
1
  module OodSupport
2
2
  # The current version of {OodSupport}
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.5"
4
4
  end
data/ood_support.gemspec CHANGED
@@ -18,6 +18,6 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_development_dependency "bundler", "~> 1.7"
22
- spec.add_development_dependency "rake", "~> 10.0"
21
+ spec.add_development_dependency "bundler", "~> 2.2"
22
+ spec.add_development_dependency "rake", "~> 13.0.1"
23
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ood_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Nicklas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-26 00:00:00.000000000 Z
11
+ date: 2023-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.7'
19
+ version: '2.2'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.7'
26
+ version: '2.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: 13.0.1
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: 13.0.1
41
41
  description: Provides an interface to working with the local OS installed on the HPC
42
42
  Center's web node.
43
43
  email:
@@ -46,6 +46,8 @@ executables: []
46
46
  extensions: []
47
47
  extra_rdoc_files: []
48
48
  files:
49
+ - ".github/dependabot.yml"
50
+ - ".github/workflows/publish.yml"
49
51
  - ".gitignore"
50
52
  - CHANGELOG.md
51
53
  - Gemfile
@@ -82,10 +84,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
84
  - !ruby/object:Gem::Version
83
85
  version: '0'
84
86
  requirements: []
85
- rubyforge_project:
86
- rubygems_version: 2.4.5
87
+ rubygems_version: 3.1.2
87
88
  signing_key:
88
89
  specification_version: 4
89
90
  summary: Open OnDemand gem that adds useful support methods for an HPC Center.
90
91
  test_files: []
91
- has_rdoc: