flexirest 1.11.2 → 1.12.0

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: '069a842d7b7b6db2e2aa7cff28191a02d70e0ebe3bc6f49aadf569b8006b7cc4'
4
- data.tar.gz: 9db8212da8ed8698bc4a1d48137fe2e0e9ce8d75c94366d72fe1f78d986855e0
3
+ metadata.gz: 530331988751770dc906ba6b17ffafa88cc5213f8c99a67fb8e6335af2152082
4
+ data.tar.gz: a55ce84b1ac4e3b1e17df27abefd3e2d9c7250a22e4368c5806a318a29ac72cd
5
5
  SHA512:
6
- metadata.gz: fb73957659a29bb35ab8f08b9127e32f36e733e9a37830c09e42f221774531c18edbbb4767bccd1fcc4713a938fb9c195daa4863af39c128b312d582b6245fc2
7
- data.tar.gz: b9e91c14da366548a6a618eae2d634ad26cf60e1ed20d957b577bb4e1e777c32eea594ebc2a37990f61eeb59c41e34912ed591477f0a80005bfc7435dac7aa3d
6
+ metadata.gz: ef1ac1a698388648711b665eccbb43f0f52d751a75abe156221081f84198cdd3c426d6643db563f9bd57af9813c3ede8049114f1859603572105bec20357bfff
7
+ data.tar.gz: 7f0ef624a7a958b33fcecd69f0d397e480ab98ffef1cbe3029cf87d2c290d02cb8be4b9f4c97903b6b495564dcb94607b64991ac530ec68851b13e7c474158b6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.12.0
4
+
5
+ Bugfix:
6
+
7
+ - Add compatibility with Ruby on Rails 7.1 (requires a method on the logger)
8
+
9
+ ## 1.11.3
10
+
11
+ Bugfix:
12
+
13
+ - Forward all Flexirest::ResultIterator#index arguments to allow for code like `result.index { |i| i == "z" }` (thanks to Stevo-S for the PR)
14
+
3
15
  ## 1.11.2
4
16
 
5
17
  Bugfix:
@@ -230,7 +242,7 @@ Features:
230
242
 
231
243
  Fix:
232
244
 
233
- - plain requests to URLs that are just the domain e.g. "https://www.example.com" should also work (i.e. without any trailing path, even a '/')
245
+ - plain requests to URLs that are just the domain e.g. "<https://www.example.com>" should also work (i.e. without any trailing path, even a '/')
234
246
 
235
247
  ## 1.7.7
236
248
 
@@ -16,6 +16,14 @@ module Flexirest
16
16
  @messages = []
17
17
  end
18
18
 
19
+ def self.level
20
+ if defined?(Rails) && Rails.logger.present?
21
+ Rails.logger.level
22
+ else
23
+ 0
24
+ end
25
+ end
26
+
19
27
  def self.debug(message)
20
28
  if defined?(Rails) && Rails.logger.present?
21
29
  Rails.logger.debug(message)
@@ -33,8 +33,8 @@ module Flexirest
33
33
  @items.join(*args)
34
34
  end
35
35
 
36
- def index(value)
37
- @items.index(value)
36
+ def index(...)
37
+ @items.index(...)
38
38
  end
39
39
 
40
40
  def empty?
@@ -1,3 +1,3 @@
1
1
  module Flexirest
2
- VERSION = "1.11.2"
2
+ VERSION = "1.12.0"
3
3
  end
@@ -74,6 +74,7 @@ describe Flexirest::ResultIterator do
74
74
  result << "a"
75
75
  result << "z"
76
76
  expect(result.index("z")).to eq(1)
77
+ expect(result.index { |i| i == "z" }).to eq(1)
77
78
  end
78
79
 
79
80
  it "should implement empty?" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flexirest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.2
4
+ version: 1.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Jeffries
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-04 00:00:00.000000000 Z
11
+ date: 2023-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler