Skip to content

Commit 1b48c2c

Browse files
committed
Prepare release 0.33.0
1 parent aacce91 commit 1b48c2c

13 files changed

+43
-63
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,4 @@ build-iPhoneSimulator/
5252

5353
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
5454
.rvmrc
55+
/.rake_tasks~

.rubocop.yml

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ inherit_from: .rubocop_todo.yml
33
plugins:
44
- rubocop-rake
55
- rubocop-minitest
6-
7-
require:
86
- rubocop-sequel
97

108
AllCops:

.rubocop_todo.yml

+5-31
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,31 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2025-02-26 20:32:58 UTC using RuboCop version 1.73.0.
3+
# on 2025-03-26 12:52:00 UTC using RuboCop version 1.74.0.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
88

9-
# Offense count: 30
9+
# Offense count: 33
1010
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
1111
Metrics/AbcSize:
1212
Enabled: false
1313

14-
# Offense count: 17
14+
# Offense count: 19
1515
# Configuration parameters: AllowedMethods, AllowedPatterns.
1616
Metrics/CyclomaticComplexity:
1717
Max: 12
1818

19-
# Offense count: 14
19+
# Offense count: 16
2020
# Configuration parameters: AllowedMethods, AllowedPatterns.
2121
Metrics/PerceivedComplexity:
2222
Max: 12
2323

24-
# Offense count: 1
25-
Naming/ConstantName:
26-
Exclude:
27-
- 'extra/rest_client.rb'
28-
29-
# Offense count: 1
30-
# This cop supports unsafe autocorrection (--autocorrect-all).
31-
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
32-
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
33-
Naming/MemoizedInstanceVariableName:
34-
Exclude:
35-
- 'lib/refinements.rb'
36-
3724
# Offense count: 2
3825
Rake/DuplicateTask:
3926
Exclude:
4027
- 'Rakefile'
4128

42-
# Offense count: 1
43-
Security/Eval:
44-
Exclude:
45-
- 'Rakefile'
46-
47-
# Offense count: 1
48-
# This cop supports unsafe autocorrection (--autocorrect-all).
49-
# Configuration parameters: EnforcedStyle.
50-
# SupportedStyles: nested, compact
51-
Style/ClassAndModuleChildren:
52-
Exclude:
53-
- 'lib/oxidized/config/vars.rb'
54-
5529
# Offense count: 2
5630
Style/ClassVars:
5731
Exclude:
@@ -77,7 +51,7 @@ Style/OpenStructUse:
7751
Style/SlicingWithRange:
7852
Enabled: false
7953

80-
# Offense count: 94
54+
# Offense count: 99
8155
# This cop supports unsafe autocorrection (--autocorrect-all).
8256
# Configuration parameters: Mode.
8357
Style/StringConcatenation:

CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ configuration is still supported but deprecated. The new configuration works
1010
with oxidized-web 0.16.0 or later.
1111
See [docs/Configuration.md](/docs/Configuration.md#oxidized-web-RESTful-API-and-web-interface).
1212

13+
The docker container includes
14+
[security fixes to ruby-rake](https://ubuntu.com/security/notices/USN-7366-1),
15+
so be sure to update to the latest version.
16+
1317
### Added
1418
- unifiap: new model for Unifi APs, switches, and AirOS APs (@clifcox)
1519
- github: Issue templates for bugs, feature requests and support requests (@robertcheramy)
@@ -19,18 +23,20 @@ See [docs/Configuration.md](/docs/Configuration.md#oxidized-web-RESTful-API-and-
1923
### Changed
2024
- fortios: support for FortiADC (@electrocret)
2125
- output/git: cache commit log to improve performance of oxidized-web. Fixes #3121 (@robertcheramy)
22-
- digest auth handles special characters in passwords by itself (no need to url encode them manually) (@einglasvollkakao)
26+
- input/http: digest auth handles special characters in passwords by itself (no need to url encode them manually) (@einglasvollkakao)
2327
- changed the configuration for oxidized-web from rest: to extensions.oxidized-web (@robertcheramy)
2428
- netgear: add pager-handler workaround, fixes: #2394 and #3341 (@candlerb, @syn-bit)
2529
- Output#version (git/gitcrypt) returns a Time object in its hash for more flexibility in oxidized-web (@robertcheramy)
2630
- ios: hide secret key of aaa radius (@martinberg, @robertcheramy)
31+
- container: update to phusion/baseimage:noble-1.0.1 (@robertcheramy)
2732

2833
### Fixed
2934
- powerconnect: Mask the changing temperature issue for non-stacked switches. Fixes #2088 (@clifcox)
3035
- Fix frozen string literals (@robertcheramy)
3136
- powerconnect: Cleanup login/logout logic. Fixes #3437 (@clifcox)
3237
- aos7: remove extra lines occuring when `show hardware-info` runs slow (@rouven0)
3338
- srosmd: add ignore regex for 64-bit system uptime (@emiliaaah)
39+
- removed some rubocop warnings (@robertcheramy)
3440

3541
## [0.32.2 – 2025-02-27]
3642
This patch release mainly fixes the docker building process, wich resulted in

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ It is light and extensible and supports over 130 operating system types.
1111
Feature highlights:
1212

1313
* Automatically adds/removes threads to meet configured retrieval interval
14-
* Restful API to a move node immediately to head-of-queue (GET/POST /node/next/[NODE])
14+
* Restful API to a move node immediately to head-of-queue (GET/PUT /node/next/[NODE])
1515
* Syslog udp+file example to catch config change events (IOS/JunOS) and trigger a config fetch
1616
* Will signal which IOS/JunOS user made the change, can then be used by output modules (via POST)
1717
* The `git` output module uses this info - 'git blame' will show who changed each line

Rakefile

+1-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ require 'bundler/gem_tasks'
22
require 'rake/testtask'
33
require_relative 'lib/oxidized/version'
44

5-
gemspec = eval(File.read(Dir['*.gemspec'].first))
5+
gemspec = Gem::Specification.load(Dir['*.gemspec'].first)
66
gemfile = [gemspec.name, gemspec.version].join('-') + '.gem'
77

88
# Integrate Rubocop if available
@@ -41,11 +41,6 @@ task :version_set do
4141
Bundler::GemHelper.instance.gemspec.version = Oxidized::VERSION
4242
end
4343

44-
# desc 'Install gem'
45-
# task install: :build do
46-
# system "sudo -Es sh -c \'umask 022; gem install gems/#{gemfile}\'"
47-
# end
48-
4944
desc 'Remove gems'
5045
task :clean do
5146
FileUtils.rm_rf 'pkg'

docs/Model-Notes/HPEAruba.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ is the operating system for the newer CX-Series.
2626
The Oxidized model is [aoscx](/lib/oxidized/model/aoscx.rb).
2727

2828
## Older Models
29-
Older Devices like ProCurve or 3Com/Comware are listed under the Vendor "HP" in
30-
the [Supported OS Types](docs/Supported-OS-Types.md) list.
29+
Older Devices like [ProCurve](/lib/oxidized/model/procurve.rb) or 3Com/Comware
30+
are listed under the Vendor "HP" in the
31+
[Supported OS Types](/docs/Supported-OS-Types.md) list.
3132

docs/Supported-OS-Types.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
|Huawei |VRP |[vrp](/lib/oxidized/model/vrp.rb) | |[VRP-Huawei](Model-Notes/VRP-Huawei.md)
115115
| |SmartAX series |[smartax](/lib/oxidized/model/smartax.rb) | |[SmartAX-Huawei](Model-Notes/SmartAX-Huawei.md)
116116
|Icotera |6400 series |[icotera](/lib/oxidized/model/icotera.rb)
117-
|Ingate |SIParator/Firewalls |[ingate](/lib/oxidized/model/ingate.rb) |@thanegill
117+
|Ingate |SIParator/Firewalls |[ingate](/lib/oxidized/model/ingate.rb) |@thanegill
118118
|IP Infusion |OcNOS |[ocnos](/lib/oxidized/model/ocnos.rb)
119119
|Juniper |JunOS |[junos](/lib/oxidized/model/junos.rb) | |[MX/QFX/EX/SRX/J Series](Model-Notes/JunOS.md)
120120
| |ScreenOS (Netscreen) |[screenos](/lib/oxidized/model/screenos.rb)

docs/Troubleshooting.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ Follow these steps to do so:
9999
5. Restart oxidized - you're done!
100100
101101
Note that slow performance in oxidized-web when listing the versions of a device
102-
are due to the necessity to go through the whole git log to search for the
103-
versions. See Issue #3121, the fix will come with oxidized version 0.32.0.
102+
are due to the necessity to go through the whole git log to search the
103+
history. See Issue #3121, the fix will come with oxidized version 0.33.0.
104104
105105
## Oxidized ignores the changes I made to its git repository
106106
First of all: you shouldn't manipulate the git repository of oxidized. Don't

extra/rest_client.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class RestClient
66
require 'asetus'
77

88
class Config
9-
Root = ENV['OXIDIZED_HOME'] || File.join(Dir.home, '.config', 'oxidized')
9+
ROOT = ENV['OXIDIZED_HOME'] || File.join(Dir.home, '.config', 'oxidized')
1010
end
1111

1212
CFGS = Asetus.new name: 'oxidized', load: false, key_to_s: true

lib/oxidized/config/vars.rb

+18-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
module Oxidized::Config::Vars
2-
# convenience method for accessing node, group or global level user variables
3-
def vars(name)
4-
model_name = @node.model.class.name.to_s.downcase
5-
if @node.vars&.has_key?(name)
6-
@node.vars[name]
7-
elsif Oxidized.config.groups.has_key?(@node.group) && Oxidized.config.groups[@node.group].models.has_key(model_name) && Oxidized.config.groups[@node.group].models[model_name].vars.has_key?(name.to_s)
8-
Oxidized.config.groups[@node.group].models[model_name].vars[name.to_s]
9-
elsif Oxidized.config.groups.has_key?(@node.group) && Oxidized.config.groups[@node.group].vars.has_key?(name.to_s)
10-
Oxidized.config.groups[@node.group].vars[name.to_s]
11-
elsif Oxidized.config.models.has_key(model_name) && Oxidized.config.models[model_name].vars.has_key?(name.to_s)
12-
Oxidized.config.models[model_name].vars[name.to_s]
13-
elsif Oxidized.config.vars.has_key?(name.to_s)
14-
Oxidized.config.vars[name.to_s]
1+
module Oxidized
2+
class Config
3+
module Vars
4+
# convenience method for accessing node, group or global level user variables
5+
def vars(name)
6+
model_name = @node.model.class.name.to_s.downcase
7+
if @node.vars&.has_key?(name)
8+
@node.vars[name]
9+
elsif Oxidized.config.groups.has_key?(@node.group) && Oxidized.config.groups[@node.group].models.has_key(model_name) && Oxidized.config.groups[@node.group].models[model_name].vars.has_key?(name.to_s)
10+
Oxidized.config.groups[@node.group].models[model_name].vars[name.to_s]
11+
elsif Oxidized.config.groups.has_key?(@node.group) && Oxidized.config.groups[@node.group].vars.has_key?(name.to_s)
12+
Oxidized.config.groups[@node.group].vars[name.to_s]
13+
elsif Oxidized.config.models.has_key(model_name) && Oxidized.config.models[model_name].vars.has_key?(name.to_s)
14+
Oxidized.config.models[model_name].vars[name.to_s]
15+
elsif Oxidized.config.vars.has_key?(name.to_s)
16+
Oxidized.config.vars[name.to_s]
17+
end
18+
end
1519
end
1620
end
1721
end

lib/refinements.rb

+2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ def cut_both(head = 1, tail = 1)
2727
# sets @cmd and @name unless @name is already set
2828
def process_cmd(command)
2929
@cmd = command
30+
# rubocop:disable Naming/MemoizedInstanceVariableName
3031
@name ||= @cmd.to_s.strip.gsub(/\s+/, '_') # what to do when command is proc? #to_s seems ghetto
32+
# rubocop:enable Naming/MemoizedInstanceVariableName
3133
end
3234

3335
# Initializes the String instance variables from another String instance

oxidized.gemspec

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Gem::Specification.new do |s|
1212
s.homepage = 'https://github.com/ytti/oxidized'
1313
s.summary = 'feeble attempt at rancid'
1414
s.description = 'software to fetch configuration from network devices and store them'
15-
s.rubyforge_project = s.name
1615
s.files = %x(git ls-files -z).split("\x0").reject { |f| f.match(/^(test|spec|features)\//) }
1716
s.executables = %w[oxidized]
1817
s.require_path = 'lib'
@@ -58,6 +57,6 @@ Gem::Specification.new do |s|
5857
s.add_development_dependency 'simplecov', '~> 0.22.0'
5958

6059
# Dependencies on optional libraries, used for unit tests & development
61-
s.add_development_dependency 'oxidized-web', '>= 0.16.0'
60+
s.add_development_dependency 'oxidized-web', '~> 0.16'
6261
s.add_development_dependency 'sequel', '>= 5.63.0', '<= 5.90.0'
6362
end

0 commit comments

Comments
 (0)