mustard_client 0.1.6 → 0.1.7

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: 2e79c5594915fe270d8a953b75927e615481c8cc
4
- data.tar.gz: 18027c6c7aba9bb062b24b0060d9d1edc4f88376
3
+ metadata.gz: 3e94612a0ac284b7d06f69b0ac38c63c7f0086a3
4
+ data.tar.gz: c559784d15bc8641a0f2359d7b4932ea349818b8
5
5
  SHA512:
6
- metadata.gz: c8ebdb313b4e3dbe02e6125c3e12e5c7aa9c3072342d329573f235f3cd8f5a3d54b445a3c1e4ba0c954e416b992a0fa3cb565f1693f4f97ed70d550cb062d4f7
7
- data.tar.gz: 7c46550d545de90755fc1fb62341ed9195f473219890bb4040e3005c10cffe8c58fe4e8a520cabc0ee34df51592ad61c992e7332f1ce27b05d541e5faf89a03b
6
+ metadata.gz: 795c7a19830919a1f198401edac8a3cd450d73bb2d2f7e945863fa783e44683dfcd196d0692de9031877320948cdacb5db92dbfd3a6af62f89462eaaade2a64f
7
+ data.tar.gz: 9db9be08a00776802a2be0cae8f3594b6a2b4f93f74be5cfba42d2cf1ad5e45ecb668cdccc546ebe8f84214fe9a36497986abdd2647c1fc7ce02a4c0e4f1feeb
@@ -1,3 +1,4 @@
1
+ require 'MustardClient/mustard_errors'
1
2
  module MustardClient
2
3
  class Client
3
4
 
@@ -23,6 +24,7 @@ module MustardClient
23
24
  end
24
25
  rescue RestClient::ExceptionWithResponse => e
25
26
  r =e.response
27
+ raise SessionExpiredError if r['error'] = "Invalid User Token"
26
28
  end
27
29
 
28
30
  JSON.parse(r)
@@ -0,0 +1,8 @@
1
+ module MustardClient
2
+ class SessionExpiredError < StandardError
3
+ def initialize(msg="Mustard session has expired. You will need to re-authenticate")
4
+ super(msg)
5
+ end
6
+ end
7
+
8
+ end
@@ -1,3 +1,3 @@
1
1
  module MustardClient
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mustard_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Watson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-27 00:00:00.000000000 Z
11
+ date: 2016-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -54,6 +54,7 @@ files:
54
54
  - lib/MustardClient/client.rb
55
55
  - lib/MustardClient/environments.rb
56
56
  - lib/MustardClient/executions.rb
57
+ - lib/MustardClient/mustard_errors.rb
57
58
  - lib/MustardClient/projects.rb
58
59
  - lib/MustardClient/results.rb
59
60
  - lib/MustardClient/teams.rb