discourse_api 0.20.0 → 0.20.1
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/CHANGELOG.md +5 -0
- data/lib/discourse_api/api/groups.rb +2 -2
- data/lib/discourse_api/version.rb +1 -1
- data/spec/discourse_api/api/groups_spec.rb +4 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c81ac1a3d794e656c8653a7ee8a4a03974ed4736
|
4
|
+
data.tar.gz: 279465d7b0f4c73134b4f06df0b2cd107428bb77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7be49f0583b2d08a819cf9f6def284a795353f68c71db20c414beb22092805235971e673d170c658163f77bb5edcc6ddb5e94defa05f14a9fd82e9fda22a7c2d
|
7
|
+
data.tar.gz: 0f493aea9db9218deb6d52b0aac68ff35395bf4b2f62985d0773c47d1080dfe21e46ead3c80c430f92227f36ea9f8acc1ea2104144d2211eabbfe2fd9dcc3af1
|
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.21.0] - 2018-04-23
|
6
|
+
### Fixed
|
7
|
+
- Update GET groups api route
|
8
|
+
- Update PUT groups api route
|
9
|
+
|
5
10
|
## [0.20.0] - 2017-12-13
|
6
11
|
### Added
|
7
12
|
- Add base error class
|
@@ -54,11 +54,11 @@ module DiscourseApi
|
|
54
54
|
:owner_usernames,
|
55
55
|
:membership_request_template)
|
56
56
|
.to_h
|
57
|
-
put("/
|
57
|
+
put("/groups/#{group_id}", group: args)
|
58
58
|
end
|
59
59
|
|
60
60
|
def groups
|
61
|
-
response = get("/
|
61
|
+
response = get("/groups.json")
|
62
62
|
response.body
|
63
63
|
end
|
64
64
|
|
@@ -5,12 +5,12 @@ describe DiscourseApi::API::Groups do
|
|
5
5
|
|
6
6
|
describe "#groups" do
|
7
7
|
before do
|
8
|
-
stub_get("http://localhost:3000/
|
8
|
+
stub_get("http://localhost:3000/groups.json?api_key=test_d7fd0429940&api_username=test_user").to_return(body: fixture("groups.json"), headers: { content_type: "application/json" })
|
9
9
|
end
|
10
10
|
|
11
11
|
it "requests the correct resource" do
|
12
12
|
subject.groups
|
13
|
-
expect(a_get("http://localhost:3000/
|
13
|
+
expect(a_get("http://localhost:3000/groups.json?api_key=test_d7fd0429940&api_username=test_user")).to have_been_made
|
14
14
|
end
|
15
15
|
|
16
16
|
it "returns the requested groups" do
|
@@ -35,10 +35,10 @@ describe DiscourseApi::API::Groups do
|
|
35
35
|
end
|
36
36
|
|
37
37
|
it "update an existing group" do
|
38
|
-
stub_put("http://localhost:3000/
|
38
|
+
stub_put("http://localhost:3000/groups/42?api_key=test_d7fd0429940&api_username=test_user")
|
39
39
|
subject.update_group(42, name: "test_group")
|
40
40
|
params = escape_params("group[name]" => "test_group", "group[visibility_level]" => 0)
|
41
|
-
expect(a_put("http://localhost:3000/
|
41
|
+
expect(a_put("http://localhost:3000/groups/42?api_key=test_d7fd0429940&api_username=test_user").
|
42
42
|
with(body: params)
|
43
43
|
).to have_been_made
|
44
44
|
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.20.
|
4
|
+
version: 0.20.1
|
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: 2018-04-23 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: faraday
|
@@ -307,7 +307,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
307
307
|
version: '0'
|
308
308
|
requirements: []
|
309
309
|
rubyforge_project:
|
310
|
-
rubygems_version: 2.6.
|
310
|
+
rubygems_version: 2.6.13
|
311
311
|
signing_key:
|
312
312
|
specification_version: 4
|
313
313
|
summary: Allows access to the Discourse API
|