haveapi-client 0.13.0 → 0.14.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: d0ef69654a1ce04be90ccdc628dd976c3c6b09d91c24455cce5a1bb9df008185
4
- data.tar.gz: fd976abf5adb0366bb573bbef70074977b61accb2d37013aec3a8a8c30e485da
3
+ metadata.gz: e057fb019eb27f25b11bfeae4459672d87429111c49d57573a4071dc117bc731
4
+ data.tar.gz: def4beeeaaef2272452641faeee82f5fa9383e06c892c9f38ab3dcbbdce7775c
5
5
  SHA512:
6
- metadata.gz: 51e600c0543471f31308f0d8c60fc3e36ae51f048e94a851c0889604b0c22eb97b5880f940903f19aad575a7f6bb73a2ddb9ca6d0313916ce6154f372763907f
7
- data.tar.gz: d37e9baf1f316e2f4d5ea0e03af7b98aa6b010fbdb256cc263bd53da60d43359a5ccb6546e318947f80e883fa3a4c7ccdb75d51988c1ffcc5b689447d9a65b1f
6
+ metadata.gz: 996154c2f4e58ac56014240871205b7815326b11bcdb5c5f16708f318c6960698edbae2a08dcca19c6668848bbea871559d602be6cdf17c99fb4b2875bbf92cc
7
+ data.tar.gz: 18ad80e51d76b2a17ec31e4739b0d192438d5b43846c335f167ba23b3c0c1592a95f13737555864127624fb0cf81d2ad34d1c5434b9173d72ab96939dbc08182
@@ -23,8 +23,8 @@ Gem::Specification.new do |spec|
23
23
 
24
24
  spec.add_runtime_dependency 'activesupport', '>= 4.0'
25
25
  spec.add_runtime_dependency 'require_all', '~> 2.0.0'
26
- spec.add_runtime_dependency 'rest-client', '~> 2.0.2'
26
+ spec.add_runtime_dependency 'rest-client', '~> 2.1.0'
27
27
  spec.add_runtime_dependency 'json'
28
- spec.add_runtime_dependency 'highline', '~> 1.7.8'
29
- spec.add_runtime_dependency 'ruby-progressbar', '~> 1.7.5'
28
+ spec.add_runtime_dependency 'highline', '~> 2.0.3'
29
+ spec.add_runtime_dependency 'ruby-progressbar', '~> 1.11.0'
30
30
  end
@@ -120,7 +120,7 @@ module HaveAPI::Client
120
120
  end
121
121
 
122
122
  def unresolved_args?
123
- prepared_path =~ /:[a-zA-Z\-_]+/
123
+ prepared_path =~ /\{[a-zA-Z\-_]+\}/
124
124
  end
125
125
 
126
126
  def provide_args(*args)
@@ -112,12 +112,8 @@ module HaveAPI::Client::Authentication
112
112
  end
113
113
 
114
114
  def check_validity
115
- if @valid_to && @valid_to < Time.now
116
- if @opts[:user] && @opts[:password]
117
- request_token
118
- else
119
- raise AuthenticationFailed.new('token expired')
120
- end
115
+ if @valid_to && @valid_to < Time.now && @opts[:user] && @opts[:password]
116
+ request_token
121
117
  end
122
118
  end
123
119
 
@@ -153,6 +153,9 @@ module HaveAPI::Client
153
153
  rescue RestClient::ResourceNotFound => e
154
154
  response = parse(e.http_body)
155
155
 
156
+ rescue RestClient::BadRequest => e
157
+ response = parse(e.http_body)
158
+
156
159
  rescue => e
157
160
  return error("Fatal API error: #{e.inspect}")
158
161
  end
@@ -1,6 +1,6 @@
1
1
  module HaveAPI
2
2
  module Client
3
3
  PROTOCOL_VERSION = '2.0'
4
- VERSION = '0.13.0'
4
+ VERSION = '0.14.0'
5
5
  end
6
6
  end
data/shell.nix CHANGED
@@ -6,14 +6,14 @@ in stdenv.mkDerivation rec {
6
6
  name = "haveapi-client";
7
7
 
8
8
  buildInputs = with pkgs;[
9
- ruby
9
+ ruby_2_7
10
10
  git
11
11
  openssl
12
12
  ];
13
13
 
14
14
  shellHook = ''
15
15
  export GEM_HOME=$(pwd)/../../.gems
16
- export PATH="$GEM_HOME/.gems/bin:$PATH"
16
+ export PATH="$GEM_HOME/bin:$PATH"
17
17
  gem install bundler
18
18
  bundle install
19
19
  '';
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haveapi-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakub Skokan
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-16 00:00:00.000000000 Z
11
+ date: 1980-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 2.0.2
75
+ version: 2.1.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 2.0.2
82
+ version: 2.1.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: json
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -100,28 +100,28 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.7.8
103
+ version: 2.0.3
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 1.7.8
110
+ version: 2.0.3
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: ruby-progressbar
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 1.7.5
117
+ version: 1.11.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 1.7.5
124
+ version: 1.11.0
125
125
  description: Ruby API and CLI for HaveAPI
126
126
  email:
127
127
  - jakub.skokan@vpsfree.cz
@@ -183,7 +183,7 @@ homepage: ''
183
183
  licenses:
184
184
  - MIT
185
185
  metadata: {}
186
- post_install_message:
186
+ post_install_message:
187
187
  rdoc_options: []
188
188
  require_paths:
189
189
  - lib
@@ -198,9 +198,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
198
  - !ruby/object:Gem::Version
199
199
  version: '0'
200
200
  requirements: []
201
- rubyforge_project:
202
- rubygems_version: 2.7.6.2
203
- signing_key:
201
+ rubygems_version: 3.2.24
202
+ signing_key:
204
203
  specification_version: 4
205
204
  summary: Ruby API and CLI for HaveAPI
206
205
  test_files: []