spyke 7.1.1 → 7.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: afa71f6b303e245253b8b9a3948efce3a294caee1c7732d745e21112af09adbb
4
- data.tar.gz: 95cb5cfaeb6d244c9a1bd40a812ae1cc3c46bb9b878cf995ce26272066da3fb5
3
+ metadata.gz: e1e657d3d829e1971f27d8784cb5c63dd67e93ce56c4e2028795383391455403
4
+ data.tar.gz: 24e67dcd8b72b70d1c1361e48c91b31893637c7afed2dd41c625d2bdadf6664c
5
5
  SHA512:
6
- metadata.gz: ece326bbc2bcf5f56413c8358d739604e4f1699eb1f6f244494bbbb729d65aa19132c196240cfab6d8755c04133bf2781c6fce1a82fea4c21b2d958149892431
7
- data.tar.gz: e68a9130999bd24160a183171bcaa21f39992c64d9044adee457a3a828ad55628db061562257e170fc8ff197934339735925dd9330ba06deb9ff421cd1657986
6
+ metadata.gz: 6f13223de1c42c59a37d7d64266e23917340c1ee672434334b2e87d38e67e3d01116e2a520be3f6f3e1b91f42e1d468a9988182c6c540905395ddb5aab8f34f1
7
+ data.tar.gz: 75d9cce2277c8cf23686f66347c5b65437c975b72af26b852d6623721fb684ddc020f7a575e5a03878e8716047eed069b5000af76dab674d47db7a6a8518dd6e
data/.circleci/config.yml CHANGED
@@ -6,7 +6,7 @@ version: 2.1
6
6
  # See: https://circleci.com/docs/2.0/orb-intro/
7
7
  orbs:
8
8
  ruby: circleci/ruby@0.1.2
9
- coveralls: coveralls/coveralls@1.0.6
9
+ coveralls: coveralls/coveralls@2.2.1
10
10
  node: circleci/node@5.0.0
11
11
 
12
12
  # Define a job to be invoked later in a workflow.
@@ -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
@@ -6,3 +6,8 @@ gemspec
6
6
  if ENV['FARADAY_TEST_VERSION'] == '< 2.0'
7
7
  gem 'faraday_middleware'
8
8
  end
9
+
10
+ # https://github.com/ruby/bigdecimal#which-version-should-you-select
11
+ if ENV['RAILS_TEST_VERSION'] == '~> 4.0'
12
+ gem 'bigdecimal', '1.3.5'
13
+ end
@@ -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, true)} #{color(details, BOLD, true)}"
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
@@ -1,3 +1,3 @@
1
1
  module Spyke
2
- VERSION = '7.1.1'
2
+ VERSION = '7.2.2'
3
3
  end
data/spyke.gemspec CHANGED
@@ -18,6 +18,8 @@ Gem::Specification.new do |spec|
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'
@@ -1,7 +1,7 @@
1
1
  require 'test_helper'
2
2
 
3
3
  module Spyke
4
- class ActiveModelDirtyTest < MiniTest::Test
4
+ class ActiveModelDirtyTest < Minitest::Test
5
5
  def test_attributes_instance_var_compatibility
6
6
  recipe = RecipeWithDirty.new(title: 'Cheeseburger')
7
7
 
@@ -1,7 +1,7 @@
1
1
  require 'test_helper'
2
2
 
3
3
  module Spyke
4
- class AssociationsTest < MiniTest::Test
4
+ class AssociationsTest < Minitest::Test
5
5
  def test_association_independence
6
6
  assert_kind_of Associations::HasMany, Recipe.new.groups
7
7
  assert_raises NoMethodError do
@@ -1,7 +1,7 @@
1
1
  require 'test_helper'
2
2
 
3
3
  module Spyke
4
- class AttributesTest < MiniTest::Test
4
+ class AttributesTest < Minitest::Test
5
5
  def test_block_initialization
6
6
  recipe = Recipe.new do |r|
7
7
  r.title = 'Sushi'
@@ -1,7 +1,7 @@
1
1
  require 'test_helper'
2
2
 
3
3
  module Spyke
4
- class CallbacksTest < MiniTest::Test
4
+ class CallbacksTest < Minitest::Test
5
5
  def setup
6
6
  stub_request(:any, /.*/)
7
7
  end
data/test/config_test.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'test_helper'
2
2
 
3
3
  module Spyke
4
- class ConfigConnectionWarnTest < MiniTest::Test
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
@@ -1,7 +1,7 @@
1
1
  require 'test_helper'
2
2
 
3
3
  module Spyke
4
- class CustomRequestTest < MiniTest::Test
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
@@ -1,7 +1,7 @@
1
1
  require 'test_helper'
2
2
 
3
3
  module Spyke
4
- class FallbacksTest < MiniTest::Test
4
+ class FallbacksTest < Minitest::Test
5
5
  def setup
6
6
  stub_request(:get, "http://sushi.com/recipes/1").to_timeout
7
7
  stub_request(:get, "http://sushi.com/recipes?published=true").to_timeout
data/test/orm_test.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'test_helper'
2
2
 
3
3
  module Spyke
4
- class OrmTest < MiniTest::Test
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
@@ -1,7 +1,7 @@
1
1
  require 'test_helper'
2
2
 
3
3
  module Spyke
4
- class PathTest < MiniTest::Test
4
+ class PathTest < Minitest::Test
5
5
  def test_collection_path
6
6
  assert_equal '/recipes', Path.new('/recipes/(:id)').to_s
7
7
  end
@@ -1,7 +1,7 @@
1
1
  require 'test_helper'
2
2
 
3
3
  module Spyke
4
- class ScopeRegistryTest < MiniTest::Test
4
+ class ScopeRegistryTest < Minitest::Test
5
5
  def test_setting_and_fetching_values
6
6
  ScopeRegistry.set_value_for('foo', 'bar', 1)
7
7
 
data/test/scopes_test.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'test_helper'
2
2
 
3
3
  module Spyke
4
- class ScopesTest < MiniTest::Test
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.1.1
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: 2023-06-12 00:00:00.000000000 Z
11
+ date: 2024-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -262,6 +262,7 @@ extensions: []
262
262
  extra_rdoc_files: []
263
263
  files:
264
264
  - ".circleci/config.yml"
265
+ - ".github/workflows/publish_to_rubygems.yml"
265
266
  - ".gitignore"
266
267
  - Gemfile
267
268
  - LICENSE.txt
@@ -323,7 +324,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
323
324
  requirements:
324
325
  - - ">="
325
326
  - !ruby/object:Gem::Version
326
- version: '0'
327
+ version: '2.6'
327
328
  required_rubygems_version: !ruby/object:Gem::Requirement
328
329
  requirements:
329
330
  - - ">="