lusnoc 1.0.0.44554 → 1.0.1.81647

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: 90445dafb1e54e6853fa95ce716a864d07807123f098f4672a529aeea213ca94
4
- data.tar.gz: 98ffc60ae582648aa55f505e720e065099de188f84936f9628f8df15726a976a
3
+ metadata.gz: 50b154f750c90199db9d2fdf86287bbc5baf66a81487ae159ad967acf46648ed
4
+ data.tar.gz: f26b45a43f07cb5b74b65a2668e57604d400d76725b4e9ad6dbf65ed3bb3203c
5
5
  SHA512:
6
- metadata.gz: b3845f4ae750adba61aa04bb1a5a87dcfef791d82cd01363b45a0a89bc60db6da5621ebf3cca6ae9461eac2555dc5a80f01ba1a8263a774b04312f10b7b1ddca
7
- data.tar.gz: 147f9fda2cadfa4f20d25bc039549e7bb1b0eb8f5300c80b24d29145a3e7d078f1791391fde519f471f4135b8b6cd7734bd318d0b84a64c7015a2c10d3ee8846
6
+ metadata.gz: 277c9b797899a742a635f4ab8fc58bbf0d92992d5f9e9019f32dd29469cf30abcc933880da135e5ce1f7d44a6607e33813d07642db27ff14d59506562a469d3b
7
+ data.tar.gz: 0fb138ae084b8639ff087427bea5e97540a94bcd1ee870a92d3e35b37bdbd3e54583849dd60705bfc5d4b06141c16c22cc78dd3efebb30075cf9775b65414db1
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014-2019 Рнд Софт
1
+ Copyright (c) 2014-2022 Рнд Софт
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
@@ -63,7 +63,7 @@ module Lusnoc
63
63
  def create_session(name, ttl)
64
64
  resp = Lusnoc.http_put(build_url('/v1/session/create'),
65
65
  { Name: name, TTL: "#{ttl}s", LockDelay: '5s' },
66
- { timeout: 1 })
66
+ **{ timeout: 1 })
67
67
  session_id = JSON.parse(resp.body)['ID']
68
68
  @expired_at = Time.now + ttl
69
69
  logger.info "Session[#{name}:#{session_id}] created. TTL:#{ttl}s. Next expiration: #{@expired_at}"
@@ -1,6 +1,6 @@
1
1
  module Lusnoc
2
2
 
3
- VERSION = '1.0.0'.freeze
3
+ VERSION = '1.0.1'.freeze
4
4
 
5
5
  end
6
6
 
data/lib/lusnoc.rb CHANGED
@@ -24,7 +24,7 @@ module Lusnoc
24
24
  yield(configuration)
25
25
  end
26
26
 
27
- def http_get(url, timeout: 1)
27
+ def http_get(url, timeout: 5)
28
28
  uri = URI(url)
29
29
 
30
30
  with_http(uri, timeout: timeout) do |http|
@@ -36,7 +36,7 @@ module Lusnoc
36
36
  end
37
37
  end
38
38
 
39
- def http_put(url, value = nil, timeout: 1)
39
+ def http_put(url, value = nil, timeout: 5)
40
40
  uri = URI(url)
41
41
  data = value.is_a?(String) ? value : JSON.generate(value) unless value.nil?
42
42
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lusnoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.44554
4
+ version: 1.0.1.81647
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samoilenko Yuri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-13 00:00:00.000000000 Z
11
+ date: 2022-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler