jabber_admin 1.3.4 → 1.4.0
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 +4 -4
- data/.github/workflows/test.yml +2 -2
- data/.rubocop.yml +1 -1
- data/.yardopts +1 -0
- data/Appraisals +0 -4
- data/CHANGELOG.md +19 -15
- data/Gemfile +1 -1
- data/gemfiles/rails_6.1.gemfile +1 -1
- data/gemfiles/rails_7.1.gemfile +1 -1
- data/jabber_admin.gemspec +2 -2
- data/lib/jabber_admin/api_call.rb +8 -8
- data/lib/jabber_admin/version.rb +1 -1
- data/lib/jabber_admin.rb +14 -5
- metadata +4 -5
- data/gemfiles/rails_5.2.gemfile +0 -23
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9456a35e8ad22426e8e27ddbd157c614fd92533324c280c3bb11fd235dac31c5
|
|
4
|
+
data.tar.gz: 05c3750afd3f862405206eab6a8b25398be58617601831c4d5140e79a381e225
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 55b2d011af88ecd7e0d26825de7aae04e95f58b85c341de30f290a8462afe001773263ad60fbf7c0a7cdd22a62853b638dcd31f432e2a5c0cac92a6aeb4c63b5
|
|
7
|
+
data.tar.gz: 1059978f0ac40003853bcab9861b1de4f31248184687bacdb8988da5882f2f5636fc614c485caae23cc2538591391c98e8764de80a41b328e01c0a9300feb5ec
|
data/.github/workflows/test.yml
CHANGED
data/.rubocop.yml
CHANGED
data/.yardopts
CHANGED
data/Appraisals
CHANGED
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
|
|
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
data/gemfiles/rails_6.1.gemfile
CHANGED
data/gemfiles/rails_7.1.gemfile
CHANGED
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.
|
|
37
|
-
spec.
|
|
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
|
|
112
|
-
# @param
|
|
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
|
|
123
|
-
# @param
|
|
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
|
data/lib/jabber_admin/version.rb
CHANGED
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
|
|
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(
|
|
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
|
|
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.
|
|
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:
|
|
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: '
|
|
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: '
|
|
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
|
data/gemfiles/rails_5.2.gemfile
DELETED
|
@@ -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: "../"
|