mirror of
https://github.com/usetrmnl/trmnl-api.git
synced 2026-04-29 13:35:13 -07:00
Updated gem dependencies
Necessary to leverage gems that are on Ruby 4.0.0 and higher. Further details can be found here: * link:https://alchemists.io/projects[Alchemists] * link:https://dry-rb.org[Dry RB] The biggest change is leveraging the new RSpec helper provided by link:https://alchemists.io/projects/inspectable[Inspectable]. Milestone: minor
This commit is contained in:
@@ -8,7 +8,7 @@ gemspec
|
||||
|
||||
group :quality do
|
||||
gem "caliber", "~> 0.83"
|
||||
gem "git-lint", "~> 9.0"
|
||||
gem "git-lint", "~> 10.0"
|
||||
gem "reek", "~> 6.5", require: false
|
||||
gem "simplecov", "~> 0.22", require: false
|
||||
end
|
||||
@@ -18,14 +18,14 @@ group :development do
|
||||
end
|
||||
|
||||
group :test do
|
||||
gem "http-fake", "~> 4.2"
|
||||
gem "refinements", "~> 13.0"
|
||||
gem "http-fake", "~> 5.0"
|
||||
gem "refinements", "~> 14.0"
|
||||
gem "rspec", "~> 3.13"
|
||||
end
|
||||
|
||||
group :tools do
|
||||
gem "amazing_print", "~> 2.0"
|
||||
gem "debug", "~> 1.10"
|
||||
gem "irb-kit", "~> 1.1"
|
||||
gem "debug", "~> 1.11"
|
||||
gem "irb-kit", "~> 2.0"
|
||||
gem "repl_type_completor", "~> 0.1"
|
||||
end
|
||||
|
||||
@@ -21,15 +21,15 @@ module TRMNL
|
||||
]
|
||||
|
||||
include Inspectable[
|
||||
endpoint_categories: :class,
|
||||
endpoint_current_screen: :class,
|
||||
endpoint_display: :class,
|
||||
endpoint_firmware: :class,
|
||||
endpoint_ip_addresses: :class,
|
||||
endpoint_log: :class,
|
||||
endpoint_models: :class,
|
||||
endpoint_palettes: :class,
|
||||
endpoint_setup: :class
|
||||
endpoint_categories: :type,
|
||||
endpoint_current_screen: :type,
|
||||
endpoint_display: :type,
|
||||
endpoint_firmware: :type,
|
||||
endpoint_ip_addresses: :type,
|
||||
endpoint_log: :type,
|
||||
endpoint_models: :type,
|
||||
endpoint_palettes: :type,
|
||||
endpoint_setup: :type
|
||||
]
|
||||
|
||||
def initialize(**)
|
||||
|
||||
@@ -10,7 +10,7 @@ module TRMNL
|
||||
class Category
|
||||
include TRMNL::API::Dependencies[:requester, contract: "contracts.category"]
|
||||
|
||||
include Inspectable[contract: :class]
|
||||
include Inspectable[contract: :type]
|
||||
include Pipeable
|
||||
|
||||
def call
|
||||
|
||||
@@ -14,7 +14,7 @@ module TRMNL
|
||||
model: "models.current_screen"
|
||||
]
|
||||
|
||||
include Inspectable[contract: :class]
|
||||
include Inspectable[contract: :type]
|
||||
include Pipeable
|
||||
|
||||
def call token:
|
||||
|
||||
@@ -14,7 +14,7 @@ module TRMNL
|
||||
model: "models.display"
|
||||
]
|
||||
|
||||
include Inspectable[contract: :class]
|
||||
include Inspectable[contract: :type]
|
||||
include Pipeable
|
||||
|
||||
def call token:
|
||||
|
||||
@@ -14,7 +14,7 @@ module TRMNL
|
||||
model: "models.firmware"
|
||||
]
|
||||
|
||||
include Inspectable[contract: :class]
|
||||
include Inspectable[contract: :type]
|
||||
include Pipeable
|
||||
|
||||
def call
|
||||
|
||||
@@ -14,7 +14,7 @@ module TRMNL
|
||||
model: "models.ip_address"
|
||||
]
|
||||
|
||||
include Inspectable[contract: :class]
|
||||
include Inspectable[contract: :type]
|
||||
include Pipeable
|
||||
|
||||
def call
|
||||
|
||||
@@ -14,7 +14,7 @@ module TRMNL
|
||||
model: "models.model"
|
||||
]
|
||||
|
||||
include Inspectable[contract: :class]
|
||||
include Inspectable[contract: :type]
|
||||
include Pipeable
|
||||
|
||||
def call
|
||||
|
||||
@@ -14,7 +14,7 @@ module TRMNL
|
||||
model: "models.palette"
|
||||
]
|
||||
|
||||
include Inspectable[contract: :class]
|
||||
include Inspectable[contract: :type]
|
||||
include Pipeable
|
||||
|
||||
def call
|
||||
|
||||
@@ -14,7 +14,7 @@ module TRMNL
|
||||
model: "models.setup"
|
||||
]
|
||||
|
||||
include Inspectable[contract: :class]
|
||||
include Inspectable[contract: :type]
|
||||
include Pipeable
|
||||
|
||||
def call id:
|
||||
|
||||
@@ -113,16 +113,16 @@ RSpec.describe TRMNL::API::Client do
|
||||
end
|
||||
|
||||
describe "#inspect" do
|
||||
it "answers endpoint classes" do
|
||||
expect(client.inspect).to include(
|
||||
"@endpoint_current_screen=TRMNL::API::Endpoints::CurrentScreen, " \
|
||||
"@endpoint_display=TRMNL::API::Endpoints::Display, " \
|
||||
"@endpoint_firmware=TRMNL::API::Endpoints::Firmware, " \
|
||||
"@endpoint_ip_addresses=TRMNL::API::Endpoints::IPAddress, " \
|
||||
"@endpoint_log=TRMNL::API::Endpoints::Log, " \
|
||||
"@endpoint_models=TRMNL::API::Endpoints::Model, " \
|
||||
"@endpoint_palettes=TRMNL::API::Endpoints::Palette, " \
|
||||
"@endpoint_setup=TRMNL::API::Endpoints::Setup, "
|
||||
it "has inspected attributes" do
|
||||
expect(described_class.new.inspect).to match_inspection(
|
||||
endpoint_current_screen: "TRMNL::API::Endpoints::CurrentScreen",
|
||||
endpoint_display: "TRMNL::API::Endpoints::Display",
|
||||
endpoint_firmware: "TRMNL::API::Endpoints::Firmware",
|
||||
endpoint_ip_addresses: "TRMNL::API::Endpoints::IPAddress",
|
||||
endpoint_log: "TRMNL::API::Endpoints::Log",
|
||||
endpoint_models: "TRMNL::API::Endpoints::Model",
|
||||
endpoint_palettes: "TRMNL::API::Endpoints::Palette",
|
||||
endpoint_setup: "TRMNL::API::Endpoints::Setup"
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -58,6 +58,8 @@ RSpec.describe TRMNL::API::Endpoints::Category do
|
||||
end
|
||||
|
||||
describe "#inspect" do
|
||||
it_behaves_like "an inspectable endpoint", described_class.new
|
||||
it "has inspected attributes" do
|
||||
expect(described_class.new.inspect).to match_inspection(contract: "Dry::Schema::JSON")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -65,6 +65,8 @@ RSpec.describe TRMNL::API::Endpoints::CurrentScreen do
|
||||
end
|
||||
|
||||
describe "#inspect" do
|
||||
it_behaves_like "an inspectable endpoint", described_class.new
|
||||
it "has inspected attributes" do
|
||||
expect(described_class.new.inspect).to match_inspection(contract: "Dry::Schema::JSON")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -71,6 +71,8 @@ RSpec.describe TRMNL::API::Endpoints::Display do
|
||||
end
|
||||
|
||||
describe "#inspect" do
|
||||
it_behaves_like "an inspectable endpoint", described_class.new
|
||||
it "has inspected attributes" do
|
||||
expect(described_class.new.inspect).to match_inspection(contract: "Dry::Schema::JSON")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -59,6 +59,8 @@ RSpec.describe TRMNL::API::Endpoints::Firmware do
|
||||
end
|
||||
|
||||
describe "#inspect" do
|
||||
it_behaves_like "an inspectable endpoint", described_class.new
|
||||
it "has inspected attributes" do
|
||||
expect(described_class.new.inspect).to match_inspection(contract: "Dry::Schema::JSON")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -61,6 +61,8 @@ RSpec.describe TRMNL::API::Endpoints::IPAddress do
|
||||
end
|
||||
|
||||
describe "#inspect" do
|
||||
it_behaves_like "an inspectable endpoint", described_class.new
|
||||
it "has inspected attributes" do
|
||||
expect(described_class.new.inspect).to match_inspection(contract: "Dry::Schema::JSON")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -110,6 +110,8 @@ RSpec.describe TRMNL::API::Endpoints::Model do
|
||||
end
|
||||
|
||||
describe "#inspect" do
|
||||
it_behaves_like "an inspectable endpoint", described_class.new
|
||||
it "has inspected attributes" do
|
||||
expect(described_class.new.inspect).to match_inspection(contract: "Dry::Schema::JSON")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -71,6 +71,8 @@ RSpec.describe TRMNL::API::Endpoints::Palette do
|
||||
end
|
||||
|
||||
describe "#inspect" do
|
||||
it_behaves_like "an inspectable endpoint", described_class.new
|
||||
it "has inspected attributes" do
|
||||
expect(described_class.new.inspect).to match_inspection(contract: "Dry::Schema::JSON")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -65,6 +65,8 @@ RSpec.describe TRMNL::API::Endpoints::Setup do
|
||||
end
|
||||
|
||||
describe "#inspect" do
|
||||
it_behaves_like "an inspectable endpoint", described_class.new
|
||||
it "has inspected attributes" do
|
||||
expect(described_class.new.inspect).to match_inspection(contract: "Dry::Schema::JSON")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
+1
-1
@@ -17,6 +17,7 @@ Bundler.require :tools
|
||||
|
||||
require "dry/monads"
|
||||
require "http/fake"
|
||||
require "inspectable/rspec/matchers/match_inspection"
|
||||
require "refinements"
|
||||
require "trmnl/api"
|
||||
|
||||
@@ -25,7 +26,6 @@ SPEC_ROOT = Pathname(__dir__).realpath.freeze
|
||||
using Refinements::Pathname
|
||||
|
||||
Pathname.require_tree SPEC_ROOT.join("support/shared_contexts")
|
||||
Pathname.require_tree SPEC_ROOT.join("support/shared_examples")
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.color = true
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user