discourse_api 0.20.0 → 0.20.1

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
  SHA1:
3
- metadata.gz: f274e6981e46cd2e393462cb9df4f24c8933aa5a
4
- data.tar.gz: de4fded436009054fd23e9b889a3437ae6350452
3
+ metadata.gz: c81ac1a3d794e656c8653a7ee8a4a03974ed4736
4
+ data.tar.gz: 279465d7b0f4c73134b4f06df0b2cd107428bb77
5
5
  SHA512:
6
- metadata.gz: 255799bc16658b2c84945ba46e349126a095590dd869d2b715a58dc2a03e3a3cf4e008764b2e8fab29c3d544301391a77068f5a84ff433fa69ffceffec2a51ab
7
- data.tar.gz: 61d1bb2ce5287e6666be41546948477a9baad9a122d14d004ed12156bd6d22aa967bace0160b9d31b0ccdda5463dbd0ac548c81f9761704b8336e8f24d099395
6
+ metadata.gz: 7be49f0583b2d08a819cf9f6def284a795353f68c71db20c414beb22092805235971e673d170c658163f77bb5edcc6ddb5e94defa05f14a9fd82e9fda22a7c2d
7
+ data.tar.gz: 0f493aea9db9218deb6d52b0aac68ff35395bf4b2f62985d0773c47d1080dfe21e46ead3c80c430f92227f36ea9f8acc1ea2104144d2211eabbfe2fd9dcc3af1
@@ -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("/admin/groups/#{group_id}", group: args)
57
+ put("/groups/#{group_id}", group: args)
58
58
  end
59
59
 
60
60
  def groups
61
- response = get("/admin/groups.json")
61
+ response = get("/groups.json")
62
62
  response.body
63
63
  end
64
64
 
@@ -1,3 +1,3 @@
1
1
  module DiscourseApi
2
- VERSION = "0.20.0"
2
+ VERSION = "0.20.1"
3
3
  end
@@ -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/admin/groups.json?api_key=test_d7fd0429940&api_username=test_user").to_return(body: fixture("groups.json"), headers: { content_type: "application/json" })
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/admin/groups.json?api_key=test_d7fd0429940&api_username=test_user")).to have_been_made
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/admin/groups/42?api_key=test_d7fd0429940&api_username=test_user")
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/admin/groups/42?api_key=test_d7fd0429940&api_username=test_user").
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.0
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: 2017-12-13 00:00:00.000000000 Z
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.8
310
+ rubygems_version: 2.6.13
311
311
  signing_key:
312
312
  specification_version: 4
313
313
  summary: Allows access to the Discourse API