jabber_admin 1.3.4 → 1.4.0

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: cea376d0db09cde039d2ce7dee6c11dec9a45ebf450470fba0b1b5a6ba322bc4
4
- data.tar.gz: c7c4dc264ebcdc35316825dde83aaba4ff3846c732e3ae2f25b1cf090f389dfa
3
+ metadata.gz: 9456a35e8ad22426e8e27ddbd157c614fd92533324c280c3bb11fd235dac31c5
4
+ data.tar.gz: 05c3750afd3f862405206eab6a8b25398be58617601831c4d5140e79a381e225
5
5
  SHA512:
6
- metadata.gz: 415fe8c34fa49cc70e2d24625e5f20e0b5f1388b5c2199f7e2d31f906872c905217d398e59756f4a7d9ae94336152312363d62cd0fc350e080824ed8b584c82b
7
- data.tar.gz: 96fb1bbad1c8d0162ad50a768ab62b7317095f4db6e226827f4e4cfcdb718fce306822919b684961687eb09edccda56c739709c9a801dec7dfc5903d08f07eeb
6
+ metadata.gz: 55b2d011af88ecd7e0d26825de7aae04e95f58b85c341de30f290a8462afe001773263ad60fbf7c0a7cdd22a62853b638dcd31f432e2a5c0cac92a6aeb4c63b5
7
+ data.tar.gz: 1059978f0ac40003853bcab9861b1de4f31248184687bacdb8988da5882f2f5636fc614c485caae23cc2538591391c98e8764de80a41b328e01c0a9300feb5ec
@@ -18,8 +18,8 @@ jobs:
18
18
  strategy:
19
19
  fail-fast: false
20
20
  matrix:
21
- ruby: ['2.7']
22
- rails: ['5.2', '6.1', '7.1']
21
+ ruby: ['2.7', '3.0']
22
+ rails: ['6.1', '7.1']
23
23
  env:
24
24
  BUNDLE_GEMFILE: 'gemfiles/rails_${{ matrix.rails }}.gemfile'
25
25
  steps:
data/.rubocop.yml CHANGED
@@ -13,7 +13,7 @@ AllCops:
13
13
  SuggestExtensions: false
14
14
  DisplayCopNames: true
15
15
  TargetRubyVersion: 2.7
16
- TargetRailsVersion: 5.2
16
+ TargetRailsVersion: 6.1
17
17
  Exclude:
18
18
  - bin/**/*
19
19
  - vendor/**/*
data/.yardopts CHANGED
@@ -4,3 +4,4 @@
4
4
  -
5
5
  README.md
6
6
  doc/examples/**/*.rb
7
+ doc/*.md
data/Appraisals CHANGED
@@ -1,9 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- appraise 'rails-5.2' do
4
- gem 'activesupport', '~> 5.2.0'
5
- end
6
-
7
3
  appraise 'rails-6.1' do
8
4
  gem 'activesupport', '~> 6.1.0'
9
5
  end
data/CHANGELOG.md CHANGED
@@ -2,32 +2,36 @@
2
2
 
3
3
  * TODO: Replace this bullet point with an actual description of a change.
4
4
 
5
- ### 1.3.4
5
+ ### 1.4.0 (3 January 2025)
6
+
7
+ * Raised minimum supported Ruby/Rails version to 2.7/6.1 (#15)
8
+
9
+ ### 1.3.4 (15 August 2024)
6
10
 
7
11
  * Just a retag of 1.3.1
8
12
 
9
- ### 1.3.3
13
+ ### 1.3.3 (15 August 2024)
10
14
 
11
15
  * Just a retag of 1.3.1
12
16
 
13
- ### 1.3.2
17
+ ### 1.3.2 (9 August 2024)
14
18
 
15
19
  * Just a retag of 1.3.1
16
20
 
17
- ### 1.3.1
21
+ ### 1.3.1 (9 August 2024)
18
22
 
19
23
  * Added API docs building to continuous integration (#14)
20
24
 
21
- ### 1.3.0
25
+ ### 1.3.0 (8 July 2024)
22
26
 
23
27
  * Moved the development dependencies from the gemspec to the Gemfile (#12)
24
28
  * Dropped support for Ruby <2.7 (#13)
25
29
 
26
- ### 1.2.0
30
+ ### 1.2.0 (24 February 2023)
27
31
 
28
32
  * Added support for Gem release automation
29
33
 
30
- ### 1.1.0
34
+ ### 1.1.0 (18 January 2023)
31
35
 
32
36
  * Bundler >= 2.3 is from now on required as minimal version (#11)
33
37
  * Dropped support for Ruby < 2.5 (#11)
@@ -35,32 +39,32 @@
35
39
  * Updated all development/runtime gems to their latest
36
40
  Ruby 2.5 compatible version (#11)
37
41
 
38
- ### 1.0.5
42
+ ### 1.0.5 (20 January 2022)
39
43
 
40
44
  * Added support for the predefined command `get_room_affiliations` (#10)
41
45
  * Added the top-level helper `JabberAdmin.room_exist?` to determine whether
42
46
  a room exists or not (#10)
43
47
 
44
- ### 1.0.4
48
+ ### 1.0.4 (11 November 2021)
45
49
 
46
50
  * Added support for the predefined command `destroy_room`
47
51
 
48
- ### 1.0.3
52
+ ### 1.0.3 (15 October 2021)
49
53
 
50
54
  * Migrated to Github Actions
51
55
  * Migrated to our own coverage reporting
52
56
  * Added the code statistics to the test process
53
57
 
54
- ### 1.0.2
58
+ ### 1.0.2 (12 May 2021)
55
59
 
56
60
  * Corrected the GNU Make release target
57
61
  * Corrected the empty arguments check
58
62
 
59
- ### 1.0.1
63
+ ### 1.0.1 (13 October 2020)
60
64
 
61
65
  * Gracefully handle a missing vCard when a vCard field is queried (#7)
62
66
 
63
- ### 1.0.0
67
+ ### 1.0.0 (13 October 2020)
64
68
 
65
69
  * All `JabberAdmin` errors `[UnknownCommandError, CommandError, RequestError]`
66
70
  now ship the response object correctly (was always set to `nil` previously)
@@ -71,7 +75,7 @@
71
75
  * Dropped support for Ruby <2.5 (#6)
72
76
  * Added some versioning helpers (eg. `JabberAdmin.version`)
73
77
 
74
- ### 0.2.0
78
+ ### 0.2.0 (14 May 2018)
75
79
 
76
80
  * [BC] The configuration has changed
77
81
  * `api_host` => `url`, we require now the full base URL of the REST API, this
@@ -94,7 +98,7 @@
94
98
  * The testcases were rewritten and tested with VCR against a real ejabberd
95
99
  server (18.01)
96
100
 
97
- ### 0.1.4
101
+ ### 0.1.4 (23 January 2018)
98
102
 
99
103
  * Added support for predefined commands
100
104
  * ban_account
data/Gemfile CHANGED
@@ -13,7 +13,7 @@ gem 'bundler', '~> 2.3'
13
13
  gem 'countless', '~> 1.1'
14
14
  gem 'guard-rspec', '~> 4.7'
15
15
  gem 'irb', '~> 1.2'
16
- gem 'railties', '>= 5.2'
16
+ gem 'railties', '>= 6.1'
17
17
  gem 'rake', '~> 13.0'
18
18
  gem 'rspec', '~> 3.12'
19
19
  gem 'rubocop', '~> 1.28'
@@ -7,7 +7,7 @@ gem "bundler", "~> 2.3"
7
7
  gem "countless", "~> 1.1"
8
8
  gem "guard-rspec", "~> 4.7"
9
9
  gem "irb", "~> 1.2"
10
- gem "railties", ">= 5.2"
10
+ gem "railties", ">= 6.1"
11
11
  gem "rake", "~> 13.0"
12
12
  gem "rspec", "~> 3.12"
13
13
  gem "rubocop", "~> 1.28"
@@ -7,7 +7,7 @@ gem "bundler", "~> 2.3"
7
7
  gem "countless", "~> 1.1"
8
8
  gem "guard-rspec", "~> 4.7"
9
9
  gem "irb", "~> 1.2"
10
- gem "railties", ">= 5.2"
10
+ gem "railties", ">= 6.1"
11
11
  gem "rake", "~> 13.0"
12
12
  gem "rspec", "~> 3.12"
13
13
  gem "rubocop", "~> 1.28"
data/jabber_admin.gemspec CHANGED
@@ -33,6 +33,6 @@ Gem::Specification.new do |spec|
33
33
 
34
34
  spec.required_ruby_version = '>= 2.7'
35
35
 
36
- spec.add_runtime_dependency 'activesupport', '>= 5.2'
37
- spec.add_runtime_dependency 'rest-client', '~> 2.1'
36
+ spec.add_dependency 'activesupport', '>= 6.1'
37
+ spec.add_dependency 'rest-client', '~> 2.1'
38
38
  end
@@ -108,25 +108,25 @@ module JabberAdmin
108
108
  # code which accepts the same arguments as the instance initialize method.
109
109
  # (+#new+)
110
110
  #
111
- # @param command [String] the command to execute
112
- # @param payload [Hash] the request payload, empty by default
111
+ # @param args [Array<Mixed>] the initializer arguments
112
+ # @param kwargs [Hash{Symbol => Mixed}] the initializer arguments
113
113
  # @return [RestClient::Response] the API call response
114
- def self.perform(*args)
115
- new(*args).perform
114
+ def self.perform(*args, **kwargs)
115
+ new(*args, **kwargs).perform
116
116
  end
117
117
 
118
118
  # A simple class level shortcut of the +perform!+ method. This is just DSL
119
119
  # code which accepts the same arguments as the instance initialize method.
120
120
  # (+#new+)
121
121
  #
122
- # @param command [String] the command to execute
123
- # @param payload [Hash] the request payload, empty by default
122
+ # @param args [Array<Mixed>] the initializer arguments
123
+ # @param kwargs [Hash{Symbol => Mixed}] the initializer arguments
124
124
  # @return [RestClient::Response] the API call response
125
125
  #
126
126
  # @raise JabberAdmin::ApiError
127
127
  # @raise JabberAdmin::CommandError
128
- def self.perform!(*args)
129
- new(*args).perform!
128
+ def self.perform!(*args, **kwargs)
129
+ new(*args, **kwargs).perform!
130
130
  end
131
131
  end
132
132
  end
@@ -3,7 +3,7 @@
3
3
  # The gem version details.
4
4
  module JabberAdmin
5
5
  # The version of the +jabber_admin+ gem
6
- VERSION = '1.3.4'
6
+ VERSION = '1.4.0'
7
7
 
8
8
  class << self
9
9
  # Returns the version of gem as a string.
data/lib/jabber_admin.rb CHANGED
@@ -82,12 +82,15 @@ module JabberAdmin
82
82
  # it is present)
83
83
  #
84
84
  # @param method [Symbol, String, #to_s] the name of the command to run
85
- # @param args all additional payload to pass down to the API call
85
+ # @param args [Array<Mixed>] all additional API call payload
86
+ # @param kwargs [Hash{Symbol => Mixed}] all additional API call payload
86
87
  # @return [RestClient::Response] the actual response of the command
87
- def self.method_missing(method, *args)
88
- predefined_command(method).call(predefined_callable(method), *args)
88
+ def self.method_missing(method, *args, **kwargs)
89
+ predefined_command(method).call(
90
+ predefined_callable(method), *args, **kwargs
91
+ )
89
92
  rescue NameError
90
- predefined_callable(method).call(method.to_s.chomp('!'), *args)
93
+ predefined_callable(method).call(method.to_s.chomp('!'), *args, **kwargs)
91
94
  end
92
95
 
93
96
  # Try to find the given name as a predefined command. When there is no such
@@ -109,7 +112,13 @@ module JabberAdmin
109
112
  # @return [Proc] the API call wrapper
110
113
  def self.predefined_callable(name)
111
114
  method = name.to_s.end_with?('!') ? 'perform!' : 'perform'
112
- proc { |*args| ApiCall.send(method, *args) }
115
+ proc do |*args, **kwargs|
116
+ if kwargs.empty?
117
+ ApiCall.send(method, *args)
118
+ else
119
+ ApiCall.send(method, *args, **kwargs)
120
+ end
121
+ end
113
122
  end
114
123
 
115
124
  # Determine if a room exists. This is a convenience method for the
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jabber_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hermann Mayer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2024-08-15 00:00:00.000000000 Z
12
+ date: 2025-01-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '5.2'
20
+ version: '6.1'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: '5.2'
27
+ version: '6.1'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rest-client
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -74,7 +74,6 @@ files:
74
74
  - config/docker/.inputrc
75
75
  - doc/assets/project.svg
76
76
  - docker-compose.yml
77
- - gemfiles/rails_5.2.gemfile
78
77
  - gemfiles/rails_6.1.gemfile
79
78
  - gemfiles/rails_7.1.gemfile
80
79
  - jabber_admin.gemspec
@@ -1,23 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "appraisal", "~> 2.4"
6
- gem "bundler", "~> 2.3"
7
- gem "countless", "~> 1.1"
8
- gem "guard-rspec", "~> 4.7"
9
- gem "irb", "~> 1.2"
10
- gem "railties", ">= 5.2"
11
- gem "rake", "~> 13.0"
12
- gem "rspec", "~> 3.12"
13
- gem "rubocop", "~> 1.28"
14
- gem "rubocop-rails", "~> 2.14"
15
- gem "rubocop-rspec", "~> 2.10"
16
- gem "simplecov", ">= 0.22"
17
- gem "vcr", "~> 6.0"
18
- gem "webmock", "~> 3.18"
19
- gem "yard", ">= 0.9.28"
20
- gem "yard-activesupport-concern", ">= 0.0.1"
21
- gem "activesupport", "~> 5.2.0"
22
-
23
- gemspec path: "../"