discourse_api 0.6.2 → 0.7.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 +4 -0
- data/discourse_api.gemspec +2 -2
- data/lib/discourse_api/api/users.rb +5 -0
- data/lib/discourse_api/version.rb +1 -1
- data/spec/discourse_api/api/users_spec.rb +16 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c0790579478eedc23d1ee9c2845584fc2eeb35e
|
4
|
+
data.tar.gz: 4fc797b4a90520a46f7ac3b64c51fb8129868149
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ff4ce4800eca2118a78afc0953b65fe1786b6dd0ba1889909e8054ec21e7fdb4c1006b771d149571bc73e63df1ae88ac56849d49d5e31df654945150dff1a42
|
7
|
+
data.tar.gz: 23a89130ee7d7976895713207a95dbec071b6108a7f3d22ef6f3d91c68388004888af27be422907b4667df40200a9af4c321f4d54e7ee20605c2053d790465ff
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
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.7.0] - 2015-12-09
|
6
|
+
### Added
|
7
|
+
- get user by external_id
|
8
|
+
|
5
9
|
## [0.6.2] - 2015-12-02
|
6
10
|
### Fixed
|
7
11
|
- `API::Params` will not work correctly when both optional and defaults are
|
data/discourse_api.gemspec
CHANGED
@@ -6,8 +6,8 @@ require 'discourse_api/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "discourse_api"
|
8
8
|
spec.version = DiscourseApi::VERSION
|
9
|
-
spec.authors = ["Sam Saffron", "John Paul Ashenfelter", "Michael Herold"]
|
10
|
-
spec.email = ["sam.saffron@gmail.com", "john@ashenfelter.com", "michael.j.herold@gmail.com"]
|
9
|
+
spec.authors = ["Sam Saffron", "John Paul Ashenfelter", "Michael Herold", "Blake Erickson"]
|
10
|
+
spec.email = ["sam.saffron@gmail.com", "john@ashenfelter.com", "michael.j.herold@gmail.com", "o.blakeerickson@gmail.com"]
|
11
11
|
spec.description = %q{Discourse API}
|
12
12
|
spec.summary = %q{Allows access to the Discourse API}
|
13
13
|
spec.homepage = "http://github.com/discourse/discourse_api"
|
@@ -208,4 +208,20 @@ describe DiscourseApi::API::Users do
|
|
208
208
|
expect(result['admin_user']['admin']).to eq(true)
|
209
209
|
end
|
210
210
|
end
|
211
|
+
|
212
|
+
describe "#by_external_id" do
|
213
|
+
before do
|
214
|
+
stub_get("http://localhost:3000/users/by-external/1?api_key=test_d7fd0429940&api_username=test_user").to_return(body: fixture("user.json"), headers: { content_type: "application/json" })
|
215
|
+
end
|
216
|
+
|
217
|
+
it "requests the correct resource" do
|
218
|
+
subject.by_external_id(1)
|
219
|
+
expect(a_get("http://localhost:3000/users/by-external/1?api_key=test_d7fd0429940&api_username=test_user")).to have_been_made
|
220
|
+
end
|
221
|
+
|
222
|
+
it "returns the requested user" do
|
223
|
+
user = subject.by_external_id(1)
|
224
|
+
expect(user['id']).to eq 1
|
225
|
+
end
|
226
|
+
end
|
211
227
|
end
|
metadata
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: discourse_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
8
8
|
- John Paul Ashenfelter
|
9
9
|
- Michael Herold
|
10
|
+
- Blake Erickson
|
10
11
|
autorequire:
|
11
12
|
bindir: bin
|
12
13
|
cert_chain: []
|
13
|
-
date: 2015-12-
|
14
|
+
date: 2015-12-09 00:00:00.000000000 Z
|
14
15
|
dependencies:
|
15
16
|
- !ruby/object:Gem::Dependency
|
16
17
|
name: faraday
|
@@ -171,6 +172,7 @@ email:
|
|
171
172
|
- sam.saffron@gmail.com
|
172
173
|
- john@ashenfelter.com
|
173
174
|
- michael.j.herold@gmail.com
|
175
|
+
- o.blakeerickson@gmail.com
|
174
176
|
executables: []
|
175
177
|
extensions: []
|
176
178
|
extra_rdoc_files: []
|