discourse_api 0.23.0 → 0.23.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee44c6527e47d55c63c5353e2809ade365badbe4
4
- data.tar.gz: 145d522257eab65469e2c7ea4eb4de5a8c3f3fc9
3
+ metadata.gz: 9485215938d611f4385eeff6d7beaeb1a28c50eb
4
+ data.tar.gz: 7aacb63d8ca833acbbacc0b1a1f68db67a32cc94
5
5
  SHA512:
6
- metadata.gz: 41a5eff5e2224de784c3da8b595519f97fb210e8d48fe28f1170c59c2142a515ac6c2fc73b152c72221f6153e6dffe4dd1ccff3768fec7cd5136ec27dffa1ad5
7
- data.tar.gz: 8fcd43d8a93551be14075e70672a88416c3246881b8bc996276310a6262d67ce23e7000c35257ccddb54851f26d11c5cd2d28c3cac05b21bc64df5e192c9f207
6
+ metadata.gz: b5f8b124460687e19f024c207c48c587a1b1fdbf591678ecb7e0f8070e73afc984909ac048b40b7b6746655e74888e37765da81590699c3c46ec1fb76c4c9fb4
7
+ data.tar.gz: 9be117e3d8c81a374f0207d8408f9f2aa040cef020ae7215104a32cc13f189e4e8f5ac8983c6997fbe8dc76429e51e6785c5080418749ac4aabb130cf6076d65
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.23.1] - 2018-05-24
6
+ ### Fixed
7
+ - Can now change `api_username` without creating a new client
8
+
5
9
  ## [0.23.0] - 2018-05-24
6
10
  ### Added
7
11
  - Added `delete_user` method
@@ -23,8 +23,8 @@ require 'discourse_api/api/uploads'
23
23
 
24
24
  module DiscourseApi
25
25
  class Client
26
- attr_accessor :api_key, :api_username
27
- attr_reader :host
26
+ attr_accessor :api_key
27
+ attr_reader :host, :api_username
28
28
 
29
29
  include DiscourseApi::API::Categories
30
30
  include DiscourseApi::API::Search
@@ -52,6 +52,11 @@ module DiscourseApi
52
52
  @use_relative = check_subdirectory(host)
53
53
  end
54
54
 
55
+ def api_username=(api_username)
56
+ @api_username = api_username
57
+ @connection.params['api_username'] = api_username unless @connection.nil?
58
+ end
59
+
55
60
  def connection_options
56
61
  @connection_options ||= {
57
62
  url: @host,
@@ -1,3 +1,3 @@
1
1
  module DiscourseApi
2
- VERSION = "0.23.0"
2
+ VERSION = "0.23.1"
3
3
  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.23.0
4
+ version: 0.23.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron