saddle 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +10 -0
- data/Appraisals +18 -0
- data/bin/saddle +5 -0
- data/gemfiles/activesupport_7.1.gemfile +20 -0
- data/gemfiles/faraday_0.x.gemfile +21 -0
- data/gemfiles/faraday_1.gemfile +21 -0
- data/gemfiles/faraday_2.gemfile +20 -0
- data/lib/saddle/endpoint.rb +5 -0
- data/lib/saddle/method_tree_builder.rb +5 -0
- data/lib/saddle/middleware/logging/statsd.rb +5 -0
- data/lib/saddle/middleware/request/encode_json.rb +4 -0
- data/lib/saddle/middleware/response/parse_json.rb +4 -0
- data/lib/saddle/requester.rb +5 -0
- data/lib/saddle/version.rb +1 -1
- data/saddle.gemspec +1 -1
- metadata +10 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4023ece557e6ce616a2716b16f7cbfcd78250ed974b952fa626bd2231d4b40f7
|
4
|
+
data.tar.gz: 0213abb4917acb28ed0a2f7d7400ddf71b2d228d1711d3046d825bfed167cbba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63b0c9c90a6db1cd20a83ccabea81f0f65d96c18ee15f6fb16368c4d1671abebf0c9196fe81610c6a184500a6a4eff06b935fc625a6f7d3fba11bcb52971f029
|
7
|
+
data.tar.gz: 712df18e85b0c9f2614bf8d2997939f3142c9f1d7cf4a637c3a69b7f845b1414eb5f8ab6233974c005906ce49ac207f390a15956119a29daf55db0b0c04a90e5
|
data/.github/workflows/ci.yml
CHANGED
@@ -25,13 +25,23 @@ jobs:
|
|
25
25
|
- activesupport_6.0
|
26
26
|
- activesupport_6.1
|
27
27
|
- activesupport_7.0
|
28
|
+
- activesupport_7.1
|
29
|
+
- faraday_0.x
|
30
|
+
- faraday_1
|
31
|
+
- faraday_2
|
28
32
|
exclude:
|
33
|
+
- ruby-version: 2.6
|
34
|
+
gemfile: activesupport_7.1
|
29
35
|
- ruby-version: 2.6
|
30
36
|
gemfile: activesupport_7.0
|
31
37
|
- ruby-version: '3.0'
|
32
38
|
gemfile: activesupport_4.1
|
33
39
|
- ruby-version: 3.1
|
34
40
|
gemfile: activesupport_4.1
|
41
|
+
- ruby-version: '3.0'
|
42
|
+
gemfile: faraday_0.x
|
43
|
+
- ruby-version: 3.1
|
44
|
+
gemfile: faraday_0.x
|
35
45
|
steps:
|
36
46
|
- uses: actions/checkout@v3
|
37
47
|
|
data/Appraisals
CHANGED
@@ -37,3 +37,21 @@ end
|
|
37
37
|
appraise "activesupport_7.0" do
|
38
38
|
gem "activesupport", "~> 7.0.4"
|
39
39
|
end
|
40
|
+
|
41
|
+
appraise "activesupport_7.1" do
|
42
|
+
gem "activesupport", "~> 7.1.3"
|
43
|
+
end
|
44
|
+
|
45
|
+
appraise "faraday_0.x" do
|
46
|
+
gem "faraday", "~> 0.9"
|
47
|
+
gem "faraday_middleware"
|
48
|
+
end
|
49
|
+
|
50
|
+
appraise "faraday_1" do
|
51
|
+
gem "faraday", "~> 1.0"
|
52
|
+
gem "faraday_middleware"
|
53
|
+
end
|
54
|
+
|
55
|
+
appraise "faraday_2" do
|
56
|
+
gem "faraday", "~> 2.0"
|
57
|
+
end
|
data/bin/saddle
CHANGED
@@ -3,6 +3,11 @@
|
|
3
3
|
require 'erb'
|
4
4
|
require 'ostruct'
|
5
5
|
|
6
|
+
require 'active_support/version'
|
7
|
+
if ActiveSupport::VERSION::STRING >= '7.1'
|
8
|
+
require 'active_support/deprecation'
|
9
|
+
require 'active_support/deprecator'
|
10
|
+
end
|
6
11
|
require 'active_support/core_ext/string'
|
7
12
|
|
8
13
|
require 'saddle'
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "activesupport", "~> 7.1.3"
|
6
|
+
|
7
|
+
group :test do
|
8
|
+
gem "rake"
|
9
|
+
gem "rspec", "~> 3.12"
|
10
|
+
gem "rspec-instafail", "~> 1"
|
11
|
+
gem "airbrake"
|
12
|
+
gem "simple_oauth", "~> 0.2.0"
|
13
|
+
gem "statsd-ruby", require: ["statsd"]
|
14
|
+
end
|
15
|
+
|
16
|
+
group :development, :test do
|
17
|
+
gem "pry"
|
18
|
+
end
|
19
|
+
|
20
|
+
gemspec path: "../"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "faraday", "~> 0.9"
|
6
|
+
gem "faraday_middleware"
|
7
|
+
|
8
|
+
group :test do
|
9
|
+
gem "rake"
|
10
|
+
gem "rspec", "~> 3.12"
|
11
|
+
gem "rspec-instafail", "~> 1"
|
12
|
+
gem "airbrake"
|
13
|
+
gem "simple_oauth", "~> 0.2.0"
|
14
|
+
gem "statsd-ruby", require: ["statsd"]
|
15
|
+
end
|
16
|
+
|
17
|
+
group :development, :test do
|
18
|
+
gem "pry"
|
19
|
+
end
|
20
|
+
|
21
|
+
gemspec path: "../"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "faraday", "~> 1.0"
|
6
|
+
gem "faraday_middleware"
|
7
|
+
|
8
|
+
group :test do
|
9
|
+
gem "rake"
|
10
|
+
gem "rspec", "~> 3.12"
|
11
|
+
gem "rspec-instafail", "~> 1"
|
12
|
+
gem "airbrake"
|
13
|
+
gem "simple_oauth", "~> 0.2.0"
|
14
|
+
gem "statsd-ruby", require: ["statsd"]
|
15
|
+
end
|
16
|
+
|
17
|
+
group :development, :test do
|
18
|
+
gem "pry"
|
19
|
+
end
|
20
|
+
|
21
|
+
gemspec path: "../"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "faraday", "~> 2.0"
|
6
|
+
|
7
|
+
group :test do
|
8
|
+
gem "rake"
|
9
|
+
gem "rspec", "~> 3.12"
|
10
|
+
gem "rspec-instafail", "~> 1"
|
11
|
+
gem "airbrake"
|
12
|
+
gem "simple_oauth", "~> 0.2.0"
|
13
|
+
gem "statsd-ruby", require: ["statsd"]
|
14
|
+
end
|
15
|
+
|
16
|
+
group :development, :test do
|
17
|
+
gem "pry"
|
18
|
+
end
|
19
|
+
|
20
|
+
gemspec path: "../"
|
data/lib/saddle/endpoint.rb
CHANGED
@@ -13,6 +13,10 @@ module Saddle
|
|
13
13
|
CONTENT_TYPE = 'Content-Type'.freeze
|
14
14
|
MIME_TYPE = 'application/json'.freeze
|
15
15
|
|
16
|
+
dependency do
|
17
|
+
require 'json' unless defined?(::JSON)
|
18
|
+
end if Faraday::VERSION < '2'
|
19
|
+
|
16
20
|
def call(env)
|
17
21
|
if env[:saddle][:request_style] == :json
|
18
22
|
# Make sure we're working with a valid body that's not a String
|
data/lib/saddle/requester.rb
CHANGED
@@ -2,6 +2,11 @@ require 'active_support/core_ext/hash'
|
|
2
2
|
require 'active_support/notifications'
|
3
3
|
|
4
4
|
require 'faraday'
|
5
|
+
if Faraday::VERSION < '2'
|
6
|
+
gem 'faraday_middleware'
|
7
|
+
|
8
|
+
require 'faraday_middleware'
|
9
|
+
end
|
5
10
|
require 'saddle/faraday/request'
|
6
11
|
require 'saddle/faraday/rack_builder'
|
7
12
|
|
data/lib/saddle/version.rb
CHANGED
data/saddle.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: saddle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Lewis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: faraday
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.9.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.9.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: appraisal
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,6 +95,10 @@ files:
|
|
95
95
|
- gemfiles/activesupport_6.0.gemfile
|
96
96
|
- gemfiles/activesupport_6.1.gemfile
|
97
97
|
- gemfiles/activesupport_7.0.gemfile
|
98
|
+
- gemfiles/activesupport_7.1.gemfile
|
99
|
+
- gemfiles/faraday_0.x.gemfile
|
100
|
+
- gemfiles/faraday_1.gemfile
|
101
|
+
- gemfiles/faraday_2.gemfile
|
98
102
|
- lib/saddle.rb
|
99
103
|
- lib/saddle/client_attributes.rb
|
100
104
|
- lib/saddle/endpoint.rb
|