updox 0.8.0 → 0.9.0

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
  SHA256:
3
- metadata.gz: fca147e076b5e76f0b8d8f27ddcb6e60549759eff142a04a87bccf7062a415f5
4
- data.tar.gz: 0cc871b61d72c3c957b6b8a80deb12498df8825dbc06fafa4eeee516e948a384
3
+ metadata.gz: f843a1291c9ff0193399fb046a0ff896ae91b572fa538b4c9f12fb8f60033c75
4
+ data.tar.gz: ee983a76110a37992d4b5a3c1df2635a7960e61e426a39922cae72a242b417bb
5
5
  SHA512:
6
- metadata.gz: a521d5ca966afff2f700e6a69f42af44568afb3313f1894113bdfcc04f08eb7518481213cb9913dc9fb92d4a65bdb576d99bbefeee161d4b27b02809c558c2a8
7
- data.tar.gz: 75f0714582c950c2e4c0ef9d601c024ea0a4812c32bb23d385b7f36090d5bb1de4936ac96de590e9804854c943b63f04e0eb154a7d7f3c63b24fa9a61ccf296f
6
+ metadata.gz: 209cf6d78a8ed693e050022ef4fe5c9e201b94a3754d562f03538c33172549beb751b8c639027d2f205d3e546fd503f31c35d921ff82983fdb16cd4deb143e95
7
+ data.tar.gz: 764c3e8086b75bfd7517daefe85c968fabfa23567059f6314ccead6d2e69734cf43c37d158f3b33cd1fbfc6d1053eb58e08f6cc692f14791944c9106e5e18914
data/CHANGELOG.md CHANGED
@@ -4,7 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
- ## [0.8.0] - [UNRELEASED]
7
+ ## [0.9.0] - [2020-02-19]
8
+ ### Fixed
9
+ - User#create had wrong authorization
10
+ - User#exists? had bug in call type
11
+
12
+ ## [0.8.0] - [2020-02-19]
8
13
  ### Added
9
14
  - Model#exists? for all models to share if `find` is implemented
10
15
 
@@ -67,7 +72,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
67
72
  ### Added
68
73
  - Initial Release with ability to ping Updox api
69
74
 
70
- [0.7.0]: https://github.com/WeInfuse/updox/compare/v0.6.0...HEAD
75
+ [0.9.0]: https://github.com/WeInfuse/updox/compare/v0.8.0...HEAD
76
+ [0.8.0]: https://github.com/WeInfuse/updox/compare/v0.7.0...v0.8.0
77
+ [0.7.0]: https://github.com/WeInfuse/updox/compare/v0.6.0...v0.7.0
71
78
  [0.6.0]: https://github.com/WeInfuse/updox/compare/v0.5.0...v0.6.0
72
79
  [0.5.0]: https://github.com/WeInfuse/updox/compare/v0.4.0...v0.5.0
73
80
  [0.4.0]: https://github.com/WeInfuse/updox/compare/v0.3.0...v0.4.0
@@ -35,7 +35,12 @@ module Updox
35
35
 
36
36
  def self.exists?(item_id, account_id: , cached_query: nil)
37
37
  raise UpdoxException.new('Not implemented on this model.') unless self.respond_to?(:find)
38
- false == self.find(item_id, account_id: account_id, cached_query: cached_query).nil?
38
+ opts = { account_id: account_id }
39
+ opts[:cached_query] = cached_query unless cached_query.nil?
40
+
41
+ response = self.find(item_id, **opts)
42
+
43
+ false == response.nil? && (false == response.class.const_defined?(:FIND_ENDPOINT) || response.successful?)
39
44
  end
40
45
 
41
46
  def self.sync(items, account_id: , batch_size: RECOMMENDED_BATCH_SIZE, endpoint: self.const_get(:SYNC_ENDPOINT))
@@ -30,8 +30,8 @@ module Updox
30
30
  alias_method :last_name, :lastName
31
31
  alias_method :login_password, :loginPassword
32
32
 
33
- def create
34
- self.class.request(endpoint: SAVE_ENDPOINT, body: self.to_h, required_auths: Updox::Models::Auth::AUTH_APP)
33
+ def create(account_id: )
34
+ self.class.request(endpoint: SAVE_ENDPOINT, body: self.to_h, auth: {accountId: account_id}, required_auths: Updox::Models::Auth::AUTH_ACCT)
35
35
  end
36
36
 
37
37
  def self.find(user_id, account_id: )
data/lib/updox/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Updox
2
- VERSION = '0.8.0'.freeze
2
+ VERSION = '0.9.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: updox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Crockett