spyke 7.1.0 → 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: ca624f63700e74017c15893ad2f23920542f759237f83f316535cfd81b14e216
4
- data.tar.gz: 35ca71cf3a87125da7e90072c10a3dfb5c82a7929edf67c9c94c896bca7b655a
3
+ metadata.gz: e1e657d3d829e1971f27d8784cb5c63dd67e93ce56c4e2028795383391455403
4
+ data.tar.gz: 24e67dcd8b72b70d1c1361e48c91b31893637c7afed2dd41c625d2bdadf6664c
5
5
  SHA512:
6
- metadata.gz: b0c2253eb6830f67713298257187d1764b1a786fac279a8c03df1802d38416fb1119815bcf1fe37edc8e3f701d1266e8ffa591ec361275c93d8124c5486be0ef
7
- data.tar.gz: 56352820b1263594eb1d77394e0b90766a77890b706e77e46454fe4bae21f94b05c1cdac9016bdec3eb10ba0bf3375a3efd6a27e7858957c3448471979582f48
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.0'
2
+ VERSION = '7.2.2'
3
3
  end
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{^bin/}) { |f| File.basename(f) }
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'
@@ -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.0
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-07 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
@@ -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: '0'
327
+ version: '2.6'
328
328
  required_rubygems_version: !ruby/object:Gem::Requirement
329
329
  requirements:
330
330
  - - ">="