talon_one 3.0.1 → 3.0.2

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: 807733e7bea69b97e2c3d88b926455142922874ef6baaccc28dceb512c0a531f
4
- data.tar.gz: a4d40da9042e36d6a8b03bb37fbadcdff00f87b7851fcda51eff04ff348cb360
3
+ metadata.gz: d35e622b6a8dc1a218b28b03415dabfff43983b0748df926b57a450303530ea7
4
+ data.tar.gz: 9e14b4c1020a619cd1d3c53d2deece012985da2ee190c06cbfde18e3373e7c91
5
5
  SHA512:
6
- metadata.gz: 8b996ed3186f343a3e0df7d85361fa80f3cb96ff1277187d0e41418faaadc4d989e608f2fbfc101f99cd7f04180a35907c7be6a840ee2fb6f0bd3bfb946f0e4e
7
- data.tar.gz: d2f71aa2ee5a220b668fe9b3d64302300f21459cfb7adb7429d3102fe737b2934b4ac7db071413c1143b3d67543e0fbc7ed511204ba69a72b1a2af0009462957
6
+ metadata.gz: ca122abd33f28b887417b09071c05e34f681672c4ae6c2def2de83a37b74703850b8019bed05bc108b30e7f8d678379c2d8fb2307a1ced385f85eafa209dde5c
7
+ data.tar.gz: 507b16ce202c6ab43f35121b6897bb40c6c566fd99838d49703b835ebe161451f481a36d7e89bb9e70a0eb872abffa5cb7289352b1fe869a7750a87ff527b768
data/Makefile CHANGED
@@ -1,10 +1,12 @@
1
1
  WORKING_DIR=/tmp/talon-client
2
- VERSION=$(shell grep -om1 -E "VERSION\s\=\s'[0-9\.]+'" $(PWD)/lib/talon_one/version.rb | sed "s/VERSION\s\=\s'\(.*\)'/\1/")
3
- GEM_CREDENTIALS_LOCATION=~/.gem
4
- GEM_CREDENTIALS_FILE=$(GEM_CREDENTIALS_LOCATION)/credentials
2
+ VERSION:=$(shell grep -om1 -E "VERSION\s\=\s'[0-9\.]+'" $(PWD)/lib/talon_one/version.rb | sed "s/VERSION\s\=\s'\(.*\)'/\1/")
3
+ GEM_CREDENTIALS_LOCATION:=~/.gem
4
+ GEM_CREDENTIALS_FILE:=$(GEM_CREDENTIALS_LOCATION)/credentials
5
+
6
+ default: testenv
5
7
 
6
8
  clean:
7
- find -name "talon_one*.gem" -delete
9
+ find -name "talon_one*.gem" -delete -print
8
10
 
9
11
  build: clean
10
12
  docker run \
@@ -30,10 +32,11 @@ endif
30
32
  ruby:2.7 \
31
33
  /bin/bash -c \
32
34
  "mkdir -p $(GEM_CREDENTIALS_LOCATION) \
33
- && curl -u 'talon_one:$(apiKey)' https://rubygems.org/api/v1/api_key.yaml > $(GEM_CREDENTIALS_FILE) \
35
+ && echo -e '---\n:rubygems_api_key: $(apiKey)\n' > $(GEM_CREDENTIALS_FILE) \
34
36
  && chmod 0600 $(GEM_CREDENTIALS_FILE) \
35
- && gem push talon_one-$(VERSION).gem"
37
+ && gem push talon_one-$(VERSION).gem -k rubygems"
36
38
 
39
+ .PHONY: testenv
37
40
  testenv:
38
41
  docker run \
39
42
  --rm -it \
data/README.md CHANGED
@@ -21,7 +21,7 @@ is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
21
21
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
22
22
 
23
23
  - API version:
24
- - Package version: 3.0.1
24
+ - Package version: 3.0.2
25
25
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
26
26
 
27
27
  ## Installation
@@ -37,16 +37,16 @@ gem build talon_one.gemspec
37
37
  Then either install the gem locally:
38
38
 
39
39
  ```shell
40
- gem install ./talon_one-3.0.1.gem
40
+ gem install ./talon_one-3.0.2.gem
41
41
  ```
42
42
 
43
- (for development, run `gem install --dev ./talon_one-3.0.1.gem` to install the development dependencies)
43
+ (for development, run `gem install --dev ./talon_one-3.0.2.gem` to install the development dependencies)
44
44
 
45
45
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
46
46
 
47
47
  Finally add this to the Gemfile:
48
48
 
49
- gem 'talon_one', '~> 3.0.1'
49
+ gem 'talon_one', '~> 3.0.2'
50
50
 
51
51
  ### Install from Git
52
52
 
@@ -68,8 +68,6 @@ Please follow the [installation](#installation) procedure and then run the follo
68
68
 
69
69
  ### Integration API
70
70
 
71
- **Note:** The Integration API's V1 `Update customer session` and `Update customer profile` endpoints are now deprecated. Use their V2 instead. See [Migrating to V2](https://docs.talon.one/docs/dev/tutorials/migrating-to-v2) for more information.
72
-
73
71
  ```ruby
74
72
  # Load the gem
75
73
  require 'talon_one'
@@ -55,7 +55,8 @@ module TalonOne
55
55
 
56
56
  unless response.success?
57
57
  if response.timed_out?
58
- fail ApiError.new('Connection timed out')
58
+ fail ApiError.new(:message => 'Connection timed out',
59
+ :timeout => true)
59
60
  elsif response.code == 0
60
61
  # Errors from libcurl will be made visible here
61
62
  fail ApiError.new(:code => 0,
@@ -12,13 +12,14 @@ OpenAPI Generator version: 4.3.1
12
12
 
13
13
  module TalonOne
14
14
  class ApiError < StandardError
15
- attr_reader :code, :response_headers, :response_body
15
+ attr_reader :code, :response_headers, :response_body, :timeout
16
16
 
17
17
  # Usage examples:
18
18
  # ApiError.new
19
19
  # ApiError.new("message")
20
20
  # ApiError.new(:code => 500, :response_headers => {}, :response_body => "")
21
21
  # ApiError.new(:code => 404, :message => "Not Found")
22
+ # ApiError.new(:message => "Connection timed out", :timeout => true)
22
23
  def initialize(arg = nil)
23
24
  if arg.is_a? Hash
24
25
  if arg.key?(:message) || arg.key?('message')
@@ -47,9 +48,15 @@ module TalonOne
47
48
  msg = @message
48
49
  end
49
50
 
51
+ is_timeout = false
52
+ unless timeout.nil?
53
+ is_timeout = timeout
54
+ end
55
+
50
56
  msg += "\nHTTP status code: #{code}" if code
51
57
  msg += "\nResponse headers: #{response_headers}" if response_headers
52
58
  msg += "\nResponse body: #{response_body}" if response_body
59
+ msg += "\nIs timeout: #{is_timeout}"
53
60
 
54
61
  msg
55
62
  end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.3.1
11
11
  =end
12
12
 
13
13
  module TalonOne
14
- VERSION = '3.0.1'
14
+ VERSION = '3.0.2'
15
15
  end
data/talon_one.gemspec CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
  s.homepage = "https://github.com/talon-one/talon_one.rb/"
25
25
  s.summary = "Talon.One API Ruby Gem"
26
26
  s.description = "The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns."
27
- s.license = 'MIT'
27
+ s.license = "MIT"
28
28
  s.required_ruby_version = ">= 1.9"
29
29
 
30
30
  s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: talon_one
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Talon.One GmbH
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-27 00:00:00.000000000 Z
11
+ date: 2023-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus