spyke 7.1.0 → 7.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +1 -1
- data/.github/workflows/publish_to_rubygems.yml +29 -0
- data/Gemfile +5 -0
- data/lib/spyke/instrumentation/log_subscriber.rb +11 -1
- data/lib/spyke/version.rb +1 -1
- data/spyke.gemspec +3 -1
- data/test/activemodel_dirty_test.rb +1 -1
- data/test/associations_test.rb +1 -1
- data/test/attributes_test.rb +1 -1
- data/test/callbacks_test.rb +1 -1
- data/test/config_test.rb +1 -1
- data/test/custom_request_test.rb +1 -1
- data/test/fallbacks_test.rb +1 -1
- data/test/orm_test.rb +1 -1
- data/test/path_test.rb +1 -1
- data/test/scope_registry_test.rb +1 -1
- data/test/scopes_test.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1e657d3d829e1971f27d8784cb5c63dd67e93ce56c4e2028795383391455403
|
4
|
+
data.tar.gz: 24e67dcd8b72b70d1c1361e48c91b31893637c7afed2dd41c625d2bdadf6664c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f13223de1c42c59a37d7d64266e23917340c1ee672434334b2e87d38e67e3d01116e2a520be3f6f3e1b91f42e1d468a9988182c6c540905395ddb5aab8f34f1
|
7
|
+
data.tar.gz: 75d9cce2277c8cf23686f66347c5b65437c975b72af26b852d6623721fb684ddc020f7a575e5a03878e8716047eed069b5000af76dab674d47db7a6a8518dd6e
|
data/.circleci/config.yml
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
name: Push gem to RubyGems.org
|
2
|
+
|
3
|
+
on:
|
4
|
+
workflow_dispatch:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
push:
|
10
|
+
name: Push gem to RubyGems.org
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
|
13
|
+
permissions:
|
14
|
+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
15
|
+
contents: write # IMPORTANT: this permission is required for `rake release` to push the release tag
|
16
|
+
|
17
|
+
steps:
|
18
|
+
# Set up
|
19
|
+
- uses: actions/checkout@v4
|
20
|
+
- name: Set up Ruby
|
21
|
+
uses: ruby/setup-ruby@v1
|
22
|
+
with:
|
23
|
+
bundler-cache: true
|
24
|
+
ruby-version: ruby
|
25
|
+
|
26
|
+
# Release
|
27
|
+
- uses: rubygems/release-gem@v1
|
28
|
+
with:
|
29
|
+
await-release: false
|
data/Gemfile
CHANGED
@@ -19,8 +19,18 @@ module Spyke
|
|
19
19
|
self.class.runtime += event.duration
|
20
20
|
name = '%s (%.1fms)' % ["Spyke", event.duration]
|
21
21
|
details = "#{event.payload[:method].upcase} #{event.payload[:url]} [#{event.payload[:status]}]"
|
22
|
-
debug " #{color(name, GREEN,
|
22
|
+
debug " #{color(name, GREEN, backwards_compatible_bold)} #{color(details, nil, backwards_compatible_bold)}"
|
23
23
|
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def backwards_compatible_bold
|
28
|
+
if ActiveSupport.gem_version < Gem::Version.new("7.1.0")
|
29
|
+
true
|
30
|
+
else
|
31
|
+
{ bold: true }
|
32
|
+
end
|
33
|
+
end
|
24
34
|
end
|
25
35
|
end
|
26
36
|
end
|
data/lib/spyke/version.rb
CHANGED
data/spyke.gemspec
CHANGED
@@ -14,10 +14,12 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
17
|
-
spec.executables = spec.files.grep(%r{^
|
17
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
+
spec.required_ruby_version = '>= 2.6'
|
22
|
+
|
21
23
|
spec.add_dependency 'activesupport', ENV.fetch('RAILS_TEST_VERSION', '>= 4.0.0')
|
22
24
|
spec.add_dependency 'activemodel', ENV.fetch('RAILS_TEST_VERSION', '>= 4.0.0')
|
23
25
|
spec.add_dependency 'faraday', ENV.fetch('FARADAY_TEST_VERSION', '>= 1.0.0'), '< 3.0'
|
data/test/associations_test.rb
CHANGED
data/test/attributes_test.rb
CHANGED
data/test/callbacks_test.rb
CHANGED
data/test/config_test.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
3
|
module Spyke
|
4
|
-
class ConfigConnectionWarnTest <
|
4
|
+
class ConfigConnectionWarnTest < Minitest::Test
|
5
5
|
def test_config_connection_warn
|
6
6
|
assert_output '', "[DEPRECATION] `Spyke::Config.connection=` is deprecated. Please use `Spyke::Base.connection=` instead.\n" do
|
7
7
|
Spyke::Config.connection = Spyke::Base.connection
|
data/test/custom_request_test.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
3
|
module Spyke
|
4
|
-
class CustomRequestTest <
|
4
|
+
class CustomRequestTest < Minitest::Test
|
5
5
|
def test_custom_get_request_from_class
|
6
6
|
endpoint = stub_request(:get, 'http://sushi.com/recipes/recent').to_return_json(result: [{ id: 1, title: 'Bread' }])
|
7
7
|
recipes = Recipe.with('/recipes/recent').get
|
data/test/fallbacks_test.rb
CHANGED
data/test/orm_test.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
3
|
module Spyke
|
4
|
-
class OrmTest <
|
4
|
+
class OrmTest < Minitest::Test
|
5
5
|
def test_find
|
6
6
|
stub_request(:get, 'http://sushi.com/recipes/1').to_return_json(result: { id: 1, title: 'Sushi' })
|
7
7
|
stub_request(:get, 'http://sushi.com/users/1').to_return_json(result: { id: 1, name: 'Bob' })
|
data/test/path_test.rb
CHANGED
data/test/scope_registry_test.rb
CHANGED
data/test/scopes_test.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
3
|
module Spyke
|
4
|
-
class ScopesTest <
|
4
|
+
class ScopesTest < Minitest::Test
|
5
5
|
def test_all
|
6
6
|
stub_request(:get, 'http://sushi.com/recipes').to_return_json(result: [{ id: 1, title: 'Sushi' }, { id: 2, title: 'Nigiri' }], metadata: 'meta')
|
7
7
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spyke
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Balvig
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -257,12 +257,12 @@ dependencies:
|
|
257
257
|
description: Interact with REST services in an ActiveRecord-like manner
|
258
258
|
email:
|
259
259
|
- jens@balvig.com
|
260
|
-
executables:
|
261
|
-
- console
|
260
|
+
executables: []
|
262
261
|
extensions: []
|
263
262
|
extra_rdoc_files: []
|
264
263
|
files:
|
265
264
|
- ".circleci/config.yml"
|
265
|
+
- ".github/workflows/publish_to_rubygems.yml"
|
266
266
|
- ".gitignore"
|
267
267
|
- Gemfile
|
268
268
|
- LICENSE.txt
|
@@ -324,7 +324,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
324
324
|
requirements:
|
325
325
|
- - ">="
|
326
326
|
- !ruby/object:Gem::Version
|
327
|
-
version: '
|
327
|
+
version: '2.6'
|
328
328
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
329
329
|
requirements:
|
330
330
|
- - ">="
|