Skip to content

Commit

Permalink
Upgrading Faraday
Browse files Browse the repository at this point in the history
  • Loading branch information
hermeswaldemarin committed May 25, 2023
1 parent ae9c4be commit 5957789
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 30 deletions.
33 changes: 8 additions & 25 deletions Gemfile.lock
@@ -1,9 +1,10 @@
PATH
remote: .
specs:
absmartly-sdk (1.0.7)
absmartly-sdk (1.0.8)
arraybuffer (~> 0.0.6)
faraday (~> 1.10.3)
faraday (~> 2.0)
faraday-retry (~> 2.0)
murmurhash3 (~> 0.1.7)

GEM
Expand All @@ -13,34 +14,16 @@ GEM
ast (2.4.2)
byebug (11.1.3)
diff-lcs (1.5.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
faraday (2.7.4)
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday-net_http (3.0.2)
faraday-retry (2.1.0)
faraday (~> 2.0)
io-console (0.5.6)
irb (1.2.6)
reline (>= 0.1.5)
json (2.6.2)
multipart-post (2.1.1)
murmurhash3 (0.1.7)
parallel (1.22.1)
parser (3.1.2.0)
Expand Down
3 changes: 2 additions & 1 deletion absmartly.gemspec
Expand Up @@ -32,7 +32,8 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_dependency "faraday", "~> 1.10.3"
spec.add_dependency "faraday", "~> 2.0"
spec.add_dependency "faraday-retry", "~> 2.0"
spec.add_dependency "murmurhash3", "~> 0.1.7"
spec.add_dependency "arraybuffer", "~> 0.0.6"

Expand Down
6 changes: 3 additions & 3 deletions example/example.rb
Expand Up @@ -12,7 +12,7 @@

# define a new context request
context_config = Absmartly.create_context_config
context_config.set_unit("session_id", "bf06d8cb5d8137290c4abb64155584fbdb64d8")
#context_config.set_unit("session_id", "bf06d8cb5d8137290c4abb64155584fbdb64d8")
context_config.set_unit("user_id", "123456")

ctx = Absmartly.create_context(context_config)
Expand All @@ -26,8 +26,8 @@
treatment3 = ctx.treatment("test")
puts(treatment3) # 1

ctx.set_unit("db_user_id", 1000013)
ctx.set_units(db_user_id2: 1000013, session_id2: 12311)
#ctx.set_unit("db_user_id", 1000013)
#ctx.set_units(db_user_id2: 1000013, session_id2: 12311)

ctx.set_attribute("user_agent", "Chrome 2022")
ctx.set_attributes(
Expand Down
2 changes: 1 addition & 1 deletion lib/absmartly/version.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Absmartly
VERSION = "1.0.7"
VERSION = "1.0.8"
end
1 change: 1 addition & 0 deletions lib/default_http_client.rb
@@ -1,6 +1,7 @@
# frozen_string_literal: true

require "faraday"
require 'faraday/retry'
require "uri"
require_relative "http_client"

Expand Down

0 comments on commit 5957789

Please sign in to comment.