discourse_api 0.28.1 → 0.29.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/discourse_api/api/sso.rb +2 -0
- data/lib/discourse_api/api/users.rb +2 -2
- data/lib/discourse_api/version.rb +1 -1
- data/spec/discourse_api/api/users_spec.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a00878a336f2139033487d13fd9776ce0f2443cfc68e5e53fd11f603f1a87da
|
4
|
+
data.tar.gz: 4c0243c10aa788883ea9c1b49389e561cda4d7cbf8fd330d65bf453f8a8773a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4de2908304fe5e24b2d49e8c44ac18a612d1fe676f1a8a842508c8a3a3a88421d7b45a586152bd0be8b0c201e3856a6f0201acfdc0f4f63bb94b94c44a3bbd33
|
7
|
+
data.tar.gz: d5fa86fbe900c68b06fdfb80a90e0d5cc202672819727976ecb5876e1d4052011f79d7dcc9a054d80329b1f8c10c32a0f16bcb6046c522dbbf256c70e93e21eb
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
|
5
|
+
## [0.29.0] - 2018-12-07
|
6
|
+
### Added
|
7
|
+
- Add `add_groups` and `remove_groups` to `sync_sso`
|
8
|
+
|
9
|
+
## [0.28.2] - 2018-11-26
|
10
|
+
### Fixed
|
11
|
+
- Updated arguments for suspending a user
|
12
|
+
|
5
13
|
## [0.28.1] - 2018-10-26
|
6
14
|
### Fixed
|
7
15
|
- Fixed non-URI chars in `check_username` method
|
@@ -12,6 +12,8 @@ module DiscourseApi
|
|
12
12
|
sso.avatar_url = params[:avatar_url]
|
13
13
|
sso.title = params[:title]
|
14
14
|
sso.avatar_force_update = params[:avatar_force_update] === true
|
15
|
+
sso.add_groups = params[:add_groups]
|
16
|
+
sso.remove_groups = params[:remove_groups]
|
15
17
|
params.keys.select{|key| key.to_s.start_with?("custom") }.each do |custom_key|
|
16
18
|
sso.custom_fields[custom_key] = params[custom_key]
|
17
19
|
end
|
@@ -81,8 +81,8 @@ module DiscourseApi
|
|
81
81
|
response[:body]['user']
|
82
82
|
end
|
83
83
|
|
84
|
-
def suspend(user_id,
|
85
|
-
put("/admin/users/#{user_id}/suspend", {
|
84
|
+
def suspend(user_id, suspend_until, reason)
|
85
|
+
put("/admin/users/#{user_id}/suspend", {suspend_until: suspend_until, reason: reason})
|
86
86
|
end
|
87
87
|
|
88
88
|
def unsuspend(user_id)
|
@@ -249,7 +249,7 @@ describe DiscourseApi::API::Users do
|
|
249
249
|
end
|
250
250
|
|
251
251
|
it "makes the correct put request" do
|
252
|
-
result = subject.suspend(11,
|
252
|
+
result = subject.suspend(11, '2030-01-01', "no reason")
|
253
253
|
url = "http://localhost:3000/admin/users/11/suspend?api_key=test_d7fd0429940&api_username=test_user"
|
254
254
|
expect(a_put(url)).to have_been_made
|
255
255
|
expect(result.status).to eq(200)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: discourse_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.29.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2018-
|
14
|
+
date: 2018-12-07 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: faraday
|
@@ -313,7 +313,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
313
313
|
version: '0'
|
314
314
|
requirements: []
|
315
315
|
rubyforge_project:
|
316
|
-
rubygems_version: 2.7.
|
316
|
+
rubygems_version: 2.7.8
|
317
317
|
signing_key:
|
318
318
|
specification_version: 4
|
319
319
|
summary: Allows access to the Discourse API
|