discourse_api 0.30.0 → 0.31.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 +5 -0
- data/lib/discourse_api/api/users.rb +4 -0
- data/lib/discourse_api/client.rb +1 -1
- data/lib/discourse_api/version.rb +1 -1
- data/spec/discourse_api/api/users_spec.rb +16 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbdfe96da34bba86f5ce76180d61e442e368ab0a5264188c60c893d30e485e27
|
4
|
+
data.tar.gz: 107d25837187abc721710043a6ca35c59a5d4fa28431f9f3c3c7c3fbe350c3eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96358eb77b7f4b083abef89c1048b0b2ba1f81cd1e64460ca978730f884e00584d2589cefa590b8f45611ca478b692d4a92ce8b9dbdeeb31360913cb31fe4981
|
7
|
+
data.tar.gz: 1d9ac7f182197efd003a3a98487359d09cec4f50091c56903f01b197de53e84bef06b96c0f3053d2fb8325b1f95bdc9c39942826f4bd48925c11808444856bea
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
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.31.0] - 2019-02-07
|
6
|
+
### Added
|
7
|
+
- Added `deactivate` method
|
8
|
+
- Added 201 and 204 as valid POST responses
|
9
|
+
|
5
10
|
## [0.30.0] - 2018-12-19
|
6
11
|
### Added
|
7
12
|
- Add params hash to `list_users`
|
data/lib/discourse_api/client.rb
CHANGED
@@ -318,4 +318,20 @@ describe DiscourseApi::API::Users do
|
|
318
318
|
end
|
319
319
|
end
|
320
320
|
end
|
321
|
+
|
322
|
+
describe "#deactivate" do
|
323
|
+
before do
|
324
|
+
stub_put("http://localhost:3000/admin/users/15/deactivate?api_key=test_d7fd0429940&api_username=test_user").to_return(body: nil)
|
325
|
+
end
|
326
|
+
|
327
|
+
it "makes the put request" do
|
328
|
+
subject.deactivate(15)
|
329
|
+
expect(a_put("http://localhost:3000/admin/users/15/deactivate?api_key=test_d7fd0429940&api_username=test_user")).to have_been_made
|
330
|
+
end
|
331
|
+
|
332
|
+
it "returns success" do
|
333
|
+
response = subject.deactivate(15)
|
334
|
+
expect(response.status).to eq(200)
|
335
|
+
end
|
336
|
+
end
|
321
337
|
end
|
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.31.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:
|
14
|
+
date: 2019-02-07 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: faraday
|