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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40349fa3b434064564e6060fafbfede9327e3ad28d28035ecc6ce3eefebc096d
4
- data.tar.gz: 68d77c929a14a18571ec4be49fa2daf0e207840add48e3424220643a68c57be5
3
+ metadata.gz: 4023ece557e6ce616a2716b16f7cbfcd78250ed974b952fa626bd2231d4b40f7
4
+ data.tar.gz: 0213abb4917acb28ed0a2f7d7400ddf71b2d228d1711d3046d825bfed167cbba
5
5
  SHA512:
6
- metadata.gz: d84f468133bedaa13ecb030dc2819a0f23b39255b1e500301b5e220d638b2d125106ebea591f2b25628e366fc433e9f440217a94a84f30367a4acb471cbfb0a1
7
- data.tar.gz: ab8fccb3facdd3d186627c6c76569e3209b8d7cad3608125a4c24799ba7eaf58c4e2ac04f5793d23c9d989a0a4c6bace879952ffa658bd5a76653aaa9547f85e
6
+ metadata.gz: 63b0c9c90a6db1cd20a83ccabea81f0f65d96c18ee15f6fb16368c4d1671abebf0c9196fe81610c6a184500a6a4eff06b935fc625a6f7d3fba11bcb52971f029
7
+ data.tar.gz: 712df18e85b0c9f2614bf8d2997939f3142c9f1d7cf4a637c3a69b7f845b1414eb5f8ab6233974c005906ce49ac207f390a15956119a29daf55db0b0c04a90e5
@@ -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: "../"
@@ -1,3 +1,8 @@
1
+ require 'active_support/version'
2
+ if ActiveSupport::VERSION::STRING >= '7.1'
3
+ require 'active_support/deprecation'
4
+ require 'active_support/deprecator'
5
+ end
1
6
  require 'active_support/core_ext/string'
2
7
 
3
8
 
@@ -1,3 +1,8 @@
1
+ require 'active_support/version'
2
+ if ActiveSupport::VERSION::STRING >= '7.1'
3
+ require 'active_support/deprecation'
4
+ require 'active_support/deprecator'
5
+ end
1
6
  require 'active_support/core_ext/string'
2
7
 
3
8
  require 'saddle/endpoint'
@@ -1,3 +1,8 @@
1
+ require 'active_support/version'
2
+ if ActiveSupport::VERSION::STRING >= '7.1'
3
+ require 'active_support/deprecation'
4
+ require 'active_support/deprecator'
5
+ end
1
6
  require 'active_support/core_ext/string'
2
7
 
3
8
  require 'statsd'
@@ -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
@@ -10,6 +10,10 @@ module Saddle
10
10
  CONTENT_TYPE = 'Content-Type'.freeze
11
11
  MIME_TYPE = 'application/json'.freeze
12
12
 
13
+ dependency do
14
+ require 'json' unless defined?(::JSON)
15
+ end if Faraday::VERSION < '2'
16
+
13
17
  def call(env)
14
18
  result = @app.call(env)
15
19
 
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module Saddle
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
data/saddle.gemspec CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
25
25
  s.required_ruby_version = '>= 2.6'
26
26
 
27
27
  s.add_dependency 'activesupport', '>= 3.2'
28
- s.add_dependency 'faraday', '~> 2.1'
28
+ s.add_dependency 'faraday', '>= 0.9.0'
29
29
 
30
30
  s.add_development_dependency 'appraisal'
31
31
  end
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.1
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: 2023-06-06 00:00:00.000000000 Z
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: '2.1'
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: '2.1'
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