repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/slice_configurable_spec.rb
spec/unit/hanami/slice_configurable_spec.rb
# frozen_string_literal: true require "hanami/app" require "hanami/slice_configurable" RSpec.describe Hanami::SliceConfigurable, :app_integration do before do module TestApp class App < Hanami::App register_slice :main register_slice :admin end class BaseClass extend H...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/slice_spec.rb
spec/unit/hanami/slice_spec.rb
require "hanami/slice" RSpec.describe Hanami::Slice, :app_integration do before do module TestApp class App < Hanami::App end end end describe ".app" do subject(:slice) { Hanami.app.register_slice(:main) } it "returns the top-level Hanami App slice" do expect(slice.app).to eq ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/helpers/form_helper_spec.rb
spec/unit/hanami/helpers/form_helper_spec.rb
# frozen_string_literal: true require "hanami/helpers/form_helper" require "hanami/view/erb/template" RSpec.describe Hanami::Helpers::FormHelper do subject(:obj) { Class.new { include Hanami::Helpers::FormHelper attr_reader :_context def initialize(context) @_context = context ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
true
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/helpers/assets_helper/stylesheet_tag_spec.rb
spec/unit/hanami/helpers/assets_helper/stylesheet_tag_spec.rb
# frozen_string_literal: true RSpec.describe Hanami::Helpers::AssetsHelper, "#stylesheet", :app_integration do subject(:obj) { helpers = described_class Class.new { include helpers attr_reader :_context def initialize(context) @_context = context end }.new(context) } ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/helpers/assets_helper/asset_url_spec.rb
spec/unit/hanami/helpers/assets_helper/asset_url_spec.rb
# frozen_string_literal: true RSpec.describe Hanami::Helpers::AssetsHelper, "#asset_url", :app_integration do subject(:obj) { helpers = described_class Class.new { include helpers attr_reader :_context def initialize(context) @_context = context end }.new(context) } ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/helpers/assets_helper/image_tag_spec.rb
spec/unit/hanami/helpers/assets_helper/image_tag_spec.rb
# frozen_string_literal: true RSpec.describe Hanami::Helpers::AssetsHelper, "#image", :app_integration do subject(:obj) { helpers = described_class Class.new { include helpers attr_reader :_context def initialize(context) @_context = context end }.new(context) } def...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/helpers/assets_helper/favicon_tag_spec.rb
spec/unit/hanami/helpers/assets_helper/favicon_tag_spec.rb
# frozen_string_literal: true RSpec.describe Hanami::Helpers::AssetsHelper, "#favicon", :app_integration do subject(:obj) { helpers = described_class Class.new { include helpers attr_reader :_context def initialize(context) @_context = context end }.new(context) } d...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/helpers/assets_helper/audio_tag_spec.rb
spec/unit/hanami/helpers/assets_helper/audio_tag_spec.rb
# frozen_string_literal: true RSpec.describe Hanami::Helpers::AssetsHelper, "#audio", :app_integration do subject(:obj) { helpers = described_class Class.new { include helpers attr_reader :_context def initialize(context) @_context = context end }.new(context) } def...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/helpers/assets_helper/video_tag_spec.rb
spec/unit/hanami/helpers/assets_helper/video_tag_spec.rb
# frozen_string_literal: true RSpec.describe Hanami::Helpers::AssetsHelper, "#video", :app_integration do subject(:obj) { helpers = described_class Class.new { include helpers attr_reader :_context def initialize(context) @_context = context end }.new(context) } def...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/helpers/assets_helper/javascript_tag_spec.rb
spec/unit/hanami/helpers/assets_helper/javascript_tag_spec.rb
# frozen_string_literal: true RSpec.describe Hanami::Helpers::AssetsHelper, "#javascript", :app_integration do subject(:obj) { helpers = described_class Class.new { include helpers attr_reader :_context def initialize(context) @_context = context end }.new(context) } ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/settings/env_store_spec.rb
spec/unit/hanami/settings/env_store_spec.rb
# frozen_string_literal: true require "hanami/settings/env_store" RSpec.describe Hanami::Settings::EnvStore do it "defaults to using ENV as the store" do orig_env = ENV.to_h ENV["FOO"] = "bar" expect(described_class.new.fetch("FOO")).to eq "bar" ENV.replace(orig_env) end describe "#fetch" do ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/extensions/view/context_spec.rb
spec/unit/hanami/extensions/view/context_spec.rb
require "hanami/view" require "hanami/view/context" require "hanami/extensions/view/context" RSpec.describe(Hanami::View::Context) do subject(:context) { described_class.new(**args) } let(:args) { {} } describe "#assets" do context "assets given" do let(:args) { {assets: assets} } let(:assets) {...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/providers/db/config_spec.rb
spec/unit/hanami/providers/db/config_spec.rb
# frozen_string_literal: true require "dry/system" require "hanami/providers/db" RSpec.describe "Hanami::Providers::DB.config", :app_integration do subject(:config) { provider.source.config } let(:provider) { Hanami.app.prepare Hanami.app.configure_provider(:db) Hanami.app.container.providers[:db] ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/providers/db/config/gateway_spec.rb
spec/unit/hanami/providers/db/config/gateway_spec.rb
# frozen_string_literal: true require "dry/system" require "hanami/providers/db" RSpec.describe "Hanami::Providers::DB / Config / Gateway config", :app_integration do subject(:config) { provider.source.config } let(:provider) { Hanami.app.prepare Hanami.app.configure_provider(:db) Hanami.app.containe...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/providers/db/config/default_config_spec.rb
spec/unit/hanami/providers/db/config/default_config_spec.rb
# frozen_string_literal: true require "dry/system" require "hanami/providers/db" RSpec.describe "Hanami::Providers::DB / Config / Default config", :app_integration do subject(:config) { provider.source.config } let(:provider) { Hanami.app.prepare Hanami.app.configure_provider(:db) Hanami.app.containe...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/config/slices_spec.rb
spec/unit/hanami/config/slices_spec.rb
# frozen_string_literal: true require "dry/inflector" require "hanami/config" require "hanami/slice_name" RSpec.describe Hanami::Config, "#slices" do subject(:config) { described_class.new(app_name: app_name, env: :development) } let(:app_name) { Hanami::SliceName.new(double(name: "MyApp::App"), inflector: Dry::I...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/config/console_spec.rb
spec/unit/hanami/config/console_spec.rb
# frozen_string_literal: true require "hanami/config" RSpec.describe Hanami::Config, "#console" do let(:config) { described_class.new(app_name: app_name, env: :development) } let(:app_name) { "MyApp::App" } subject(:console) { config.console } it "is a full console configuration" do is_expected.to be_an...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/config/inflector_spec.rb
spec/unit/hanami/config/inflector_spec.rb
# frozen_string_literal: true require "hanami/config" RSpec.describe Hanami::Config do subject(:config) { described_class.new(app_name: app_name, env: :development) } let(:app_name) { "MyApp::app" } describe "inflector" do it "defaults to a Dry::Inflector instance" do expect(config.inflector).to be_k...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/config/router_spec.rb
spec/unit/hanami/config/router_spec.rb
# frozen_string_literal: true require "hanami/config" RSpec.describe Hanami::Config, "#router" do let(:config) { described_class.new(app_name: app_name, env: :development) } let(:app_name) { "MyApp::app" } subject(:router) { config.router } context "hanami-router is bundled" do it "is a full router conf...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/config/render_detailed_errors_spec.rb
spec/unit/hanami/config/render_detailed_errors_spec.rb
# frozen_string_literal: true require "dry/inflector" RSpec.describe Hanami::Config, "#render_detailed_errors" do let(:config) { described_class.new(app_name: app_name, env: env) } let(:app_name) { Hanami::SliceName.new(double(name: "MyApp::App"), inflector: Dry::Inflector.new) } subject(:render_detailed_error...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/config/actions_spec.rb
spec/unit/hanami/config/actions_spec.rb
# frozen_string_literal: true require "hanami/config" require "hanami/action" RSpec.describe Hanami::Config, "#actions" do let(:config) { described_class.new(app_name: app_name, env: :development) } let(:app_name) { "MyApp::app" } subject(:actions) { config.actions } context "hanami-controller is bundled" d...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/config/logger_spec.rb
spec/unit/hanami/config/logger_spec.rb
# frozen_string_literal: true require "hanami/config/logger" require "hanami/slice_name" require "dry/inflector" require "logger" require "stringio" RSpec.describe Hanami::Config::Logger do subject do described_class.new(app_name: app_name, env: env) end let(:app_name) do Hanami::SliceName.new(double(n...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/config/base_url_spec.rb
spec/unit/hanami/config/base_url_spec.rb
# frozen_string_literal: true require "hanami/config" require "uri" RSpec.describe Hanami::Config, "base_url" do subject(:config) { described_class.new(app_name: app_name, env: :development) } let(:app_name) { "MyApp::app" } it "defaults to a URI of 'http://0.0.0.0:2300'" do expect(config.base_url).to eq U...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/config/views_spec.rb
spec/unit/hanami/config/views_spec.rb
# frozen_string_literal: true require "hanami/config" require "saharspec/matchers/dont" RSpec.describe Hanami::Config, "#views" do let(:config) { described_class.new(app_name: app_name, env: :development) } let(:app_name) { "MyApp::app" } subject(:views) { config.views } context "hanami-view is bundled" do ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/config/render_errors_spec.rb
spec/unit/hanami/config/render_errors_spec.rb
# frozen_string_literal: true require "dry/inflector" RSpec.describe Hanami::Config, "#render_errors" do let(:config) { described_class.new(app_name: app_name, env: env) } let(:app_name) { Hanami::SliceName.new(double(name: "MyApp::App"), inflector: Dry::Inflector.new) } subject(:render_errors) { config.render...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/config/db_spec.rb
spec/unit/hanami/config/db_spec.rb
# frozen_string_literal: true require "hanami/config" RSpec.describe Hanami::Config, "#db" do let(:config) { described_class.new(app_name: app_name, env: :development) } let(:app_name) { "MyApp::App" } subject(:db) { config.db } context "hanami-router is bundled" do it "is a full router configuration" d...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/config/actions/cookies_spec.rb
spec/unit/hanami/config/actions/cookies_spec.rb
# frozen_string_literal: true require "hanami/config/actions" RSpec.describe Hanami::Config::Actions, "#cookies" do let(:config) { described_class.new } subject(:cookies) { config.cookies } context "default config" do it "is enabled" do expect(cookies).to be_enabled end it "is an empty hash"...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/config/actions/csrf_protection_spec.rb
spec/unit/hanami/config/actions/csrf_protection_spec.rb
# frozen_string_literal: true require "hanami/config/actions" RSpec.describe Hanami::Config::Actions, "#csrf_protection" do let(:app_config) { Hanami::Config.new(app_name: "MyApp::App", env: :development) } let(:config) { app_config.actions } subject(:value) { config.csrf_protection } context "non-finalized ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/config/actions/default_values_spec.rb
spec/unit/hanami/config/actions/default_values_spec.rb
# frozen_string_literal: true require "hanami/config/actions" RSpec.describe Hanami::Config::Actions, "default values" do let(:app_config) { Hanami::Config.new(app_name: "MyApp::App", env: :development) } subject(:config) { app_config.actions } describe "sessions" do specify { expect(config.sessions).not_t...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/config/actions/sessions_spec.rb
spec/unit/hanami/config/actions/sessions_spec.rb
# frozen_string_literal: true require "hanami/config/actions" RSpec.describe Hanami::Config::Actions, "#sessions" do let(:config) { described_class.new } subject(:sessions) { config.sessions } context "no session config specified" do it "is not enabled" do expect(sessions).not_to be_enabled end ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/config/actions/content_security_policy_spec.rb
spec/unit/hanami/config/actions/content_security_policy_spec.rb
# frozen_string_literal: true require "hanami/config/actions" RSpec.describe Hanami::Config::Actions, "#content_security_policy" do let(:app_config) { Hanami::Config.new(app_name: "MyApp::App", env: :development) } let(:config) { app_config.actions } subject(:content_security_policy) { config.content_security_p...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/router/errors/not_found_error_spec.rb
spec/unit/hanami/router/errors/not_found_error_spec.rb
# frozen_string_literal: true require "hanami/router" require "hanami/extensions/router/errors" RSpec.describe(Hanami::Router::NotFoundError) do subject(:error) { described_class.new(env) } let(:env) { Rack::MockRequest.env_for("http://example.com/example", method: "GET") } it "is a Hanami::Router::Error" do ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/router/errors/not_allowed_error_spec.rb
spec/unit/hanami/router/errors/not_allowed_error_spec.rb
# frozen_string_literal: true require "hanami/router" require "hanami/extensions/router/errors" RSpec.describe(Hanami::Router::NotAllowedError) do subject(:error) { described_class.new(env, allowed_methods) } let(:env) { Rack::MockRequest.env_for("http://example.com/example", method: "POST") } let(:allowed_met...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/spec/unit/hanami/web/rack_logger_spec.rb
spec/unit/hanami/web/rack_logger_spec.rb
# frozen_string_literal: true require "hanami/web/rack_logger" require "dry/logger" require "stringio" require "rack/mock" RSpec.describe Hanami::Web::RackLogger do subject { described_class.new(logger) } let(:logger) do Dry.Logger( app_name, stream: stream, level: :debug, filters: fi...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami.rb
lib/hanami.rb
# frozen_string_literal: true require "pathname" require "zeitwerk" require_relative "hanami/constants" # A complete web framework for Ruby # # @since 0.1.0 # # @see http://hanamirb.org module Hanami @_mutex = Mutex.new @_bundled = {} # @api private # @since 2.0.0 def self.loader @loader ||= Zeitwerk::...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/rake_tasks.rb
lib/hanami/rake_tasks.rb
# frozen_string_literal: true require "hanami/cli" Hanami::CLI::RakeTasks.register_tasks do desc "Load the app environment" task :environment do require "hanami/prepare" end # Ruby ecosystem compatibility # # Most of the hosting SaaS automatic tasks are designed after Ruby on Rails. # They expect t...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/slice.rb
lib/hanami/slice.rb
# frozen_string_literal: true require "zeitwerk" require "dry/system" require_relative "constants" require_relative "errors" module Hanami # A slice represents any distinct area of concern within an Hanami app. # # For smaller apps, a slice may encompass the whole app itself (see # {Hanami::App}), whereas la...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
true
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/port.rb
lib/hanami/port.rb
# frozen_string_literal: true module Hanami # @since 2.0.1 # @api private module Port # @since 2.0.1 # @api private DEFAULT = 2300 # @since 2.0.1 # @api private ENV_VAR = "HANAMI_PORT" # @since 2.0.1 # @api private def self.call(value, env = ENV.fetch(ENV_VAR, nil)) re...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/slice_name.rb
lib/hanami/slice_name.rb
# frozen_string_literal: true require_relative "constants" module Hanami # Represents the name of an {App} or {Slice}. # # @see Slice::ClassMethods#slice_name # @see App::ClassMethods#app_name # # @api public # @since 2.0.0 class SliceName # Returns a new SliceName for the slice or app. # ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/version.rb
lib/hanami/version.rb
# frozen_string_literal: true module Hanami # Hanami version # # @since 0.9.0 # @api private module Version # @api public VERSION = "2.3.2" # @since 0.9.0 # @api private def self.version VERSION end # @since 0.9.0 # @api private def self.gem_requirement if pr...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/extensions.rb
lib/hanami/extensions.rb
# frozen_string_literal: true if Hanami.bundled?("hanami-db") require_relative "extensions/db/repo" end if Hanami.bundled?("hanami-controller") require_relative "extensions/action" end if Hanami.bundled?("hanami-view") require "hanami/view" require_relative "extensions/view" require_relative "extensions/vi...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/setup.rb
lib/hanami/setup.rb
# frozen_string_literal: true require "bundler/setup" require "hanami" Hanami.setup
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/errors.rb
lib/hanami/errors.rb
# frozen_string_literal: true module Hanami # Base class for all Hanami errors. # # @api public # @since 2.0.0 Error = Class.new(StandardError) # Error raised when {Hanami::App} fails to load. # # @api public # @since 2.0.0 AppLoadError = Class.new(Error) # Error raised when an {Hanami::Slice} ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/routes.rb
lib/hanami/routes.rb
# frozen_string_literal: true require_relative "constants" require_relative "errors" require_relative "slice/router" module Hanami # App routes # # Users are expected to inherit from this class to define their app # routes. # # @example # # config/routes.rb # # frozen_string_literal: true # # ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/constants.rb
lib/hanami/constants.rb
# frozen_string_literal: true module Hanami # @api private CONTAINER_KEY_DELIMITER = "." private_constant :CONTAINER_KEY_DELIMITER # @api private MODULE_DELIMITER = "::" private_constant :MODULE_DELIMITER # @api private PATH_DELIMITER = "/" private_constant :PATH_DELIMITER # @api private APP_P...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/env.rb
lib/hanami/env.rb
# frozen_string_literal: true module Hanami module Env # @since 2.0.1 # @api private @_loaded = false # Uses [dotenv](https://github.com/bkeepers/dotenv) (if available) to populate `ENV` from # various `.env` files. # # For a given `HANAMI_ENV` environment, the `.env` files are looked up...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/prepare.rb
lib/hanami/prepare.rb
# frozen_string_literal: true require_relative "setup" Hanami.prepare
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/app.rb
lib/hanami/app.rb
# frozen_string_literal: true require_relative "constants" require_relative "env" module Hanami # The Hanami app is a singular slice tasked with managing the core components of the app and # coordinating overall app boot. # # For smaller apps, the app may be the only slice present, whereas larger apps may con...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/settings.rb
lib/hanami/settings.rb
# frozen_string_literal: true require "dry/core/constants" require "dry/configurable" require_relative "errors" module Hanami # Provides user-defined settings for an Hanami app or slice. # # Define your own settings by inheriting from this class in `config/settings.rb` within an app or # slice. Your settings ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/provider_registrar.rb
lib/hanami/provider_registrar.rb
# frozen_string_literal: true # @api private # @since 2.2.0 module Hanami class ProviderRegistrar < Dry::System::ProviderRegistrar def self.for_slice(slice) Class.new(self) do define_singleton_method(:new) do |container| super(container, slice) end end end attr_read...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/slice_configurable.rb
lib/hanami/slice_configurable.rb
# frozen_string_literal: true require_relative "constants" require_relative "errors" module Hanami # Calls `configure_for_slice(slice)` on the extended class whenever it is first # subclassed within a module namespace corresponding to a slice. # # @example # class BaseClass # extend Hanami::SliceCon...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/config.rb
lib/hanami/config.rb
# frozen_string_literal: true require "uri" require "pathname" require "dry/configurable" require "dry/inflector" require_relative "constants" require_relative "config/console" module Hanami # Hanami app config # # @since 2.0.0 class Config include Dry::Configurable # @!attribute [rw] root # S...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/slice_registrar.rb
lib/hanami/slice_registrar.rb
# frozen_string_literal: true require_relative "constants" module Hanami # @api private class SliceRegistrar VALID_SLICE_NAME_RE = /^[a-z][a-z0-9_]*$/ SLICE_DELIMITER = CONTAINER_KEY_DELIMITER attr_reader :parent, :slices private :parent, :slices def initialize(parent) @parent = parent...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/boot.rb
lib/hanami/boot.rb
# frozen_string_literal: true require_relative "setup" Hanami.boot
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/helpers/assets_helper.rb
lib/hanami/helpers/assets_helper.rb
# frozen_string_literal: true require "uri" require "hanami/view" require_relative "../constants" # rubocop:disable Metrics/ModuleLength module Hanami module Helpers # HTML assets helpers # # Inject these helpers in a view # # @since 2.1.0 # # @see http://www.rubydoc.info/gems/hanami-he...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/helpers/form_helper.rb
lib/hanami/helpers/form_helper.rb
# frozen_string_literal: true require "hanami/view" module Hanami module Helpers # Helper methods for generating HTML forms. # # These helpers will be automatically available in your view templates, part classes and scope # classes. # # This module provides one primary method: {#form_for}, y...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/helpers/form_helper/values.rb
lib/hanami/helpers/form_helper/values.rb
# frozen_string_literal: true module Hanami module Helpers module FormHelper # Values from params and form helpers. # # It's responsible to populate input values with data coming from params # and inline values specified via form helpers like `text_field`. # # @since 2.1.0 ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/helpers/form_helper/form_builder.rb
lib/hanami/helpers/form_helper/form_builder.rb
# frozen_string_literal: true require "hanami/view" require_relative "values" module Hanami module Helpers module FormHelper # A range of convenient methods for building the fields within an HTML form, integrating with # request params and template locals to populate the fields with appropriate valu...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
true
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/settings/env_store.rb
lib/hanami/settings/env_store.rb
# frozen_string_literal: true require "dry/core/constants" module Hanami class Settings # The default store for {Hanami::Settings}, loading setting values from `ENV`. # # If your app loads the dotenv gem, then `ENV` will also be populated from various `.env` files when # you subclass `Hanami::App`. ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/middleware/public_errors_app.rb
lib/hanami/middleware/public_errors_app.rb
# frozen_string_literal: true require "rack" module Hanami module Middleware # The errors app given to {Hanami::Middleware::RenderErrors}, which renders error responses # from HTML pages kept in `public/` as simple JSON structures. # # @see Hanami::Middleware::RenderErrors # # @api private ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/middleware/assets.rb
lib/hanami/middleware/assets.rb
# frozen_string_literal: true require "rack/static" module Hanami module Middleware class Assets < Rack::Static def initialize(app, options = {}, config: Hanami.app.config) root = config.actions.public_directory urls = [config.assets.path_prefix] defaults = { root: root,...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/middleware/render_errors.rb
lib/hanami/middleware/render_errors.rb
# frozen_string_literal: true require "rack" # rubocop:disable Lint/RescueException module Hanami module Middleware # Rack middleware that rescues errors raised by the app renders friendly error responses, via a # given "errors app". # # By default, this is enabled only in production mode. # ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/middleware/content_security_policy_nonce.rb
lib/hanami/middleware/content_security_policy_nonce.rb
# frozen_string_literal: true require "rack" require "securerandom" require_relative "../constants" module Hanami module Middleware # Generates a random per request nonce value like `mSMnSwfVZVe+LyQy1SPCGw==`, stores it as # `"hanami.content_security_policy_nonce"` in the Rack environment, and replaces all ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/extensions/view.rb
lib/hanami/extensions/view.rb
# frozen_string_literal: true require "hanami/view" require_relative "view/slice_configured_view" module Hanami # @api private module Extensions # Integrated behavior for `Hanami::View` classes within Hanami apps. # # @see Hanami::View # # @api public # @since 2.1.0 module View #...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/extensions/operation.rb
lib/hanami/extensions/operation.rb
# frozen_string_literal: true require "dry/operation" module Hanami module Extensions # Integrated behavior for `Dry::Operation` classes within Hanami apps. # # @see https://github.com/dry-rb/dry-operation # # @api public # @since 2.2.0 module Operation require_relative "operation/...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/extensions/action.rb
lib/hanami/extensions/action.rb
# frozen_string_literal: true require "hanami/action" require_relative "action/slice_configured_action" module Hanami # @api private module Extensions # Integrated behavior for `Hanami::Action` classes within Hanami apps. # # @see InstanceMethods # @see https://github.com/hanami/controller # ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/extensions/db/repo.rb
lib/hanami/extensions/db/repo.rb
# frozen_string_literal: true require "hanami/db" module Hanami module Extensions # @api private # @since 2.2.0 module DB # @api private # @since 2.2.0 module Repo def self.included(repo_class) super repo_class.extend(Hanami::SliceConfigurable) re...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/extensions/action/slice_configured_action.rb
lib/hanami/extensions/action/slice_configured_action.rb
# frozen_string_literal: true module Hanami module Extensions module Action # Provides slice-specific configuration and behavior for any action class defined # within a slice's module namespace. # # @api private # @since 2.0.0 class SliceConfiguredAction < Module attr_...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/extensions/operation/slice_configured_db_operation.rb
lib/hanami/extensions/operation/slice_configured_db_operation.rb
# frozen_string_literal: true module Hanami module Extensions module Operation # Extends operations to support the database. # # Add an initializer accepting a `rom:` dependency, which is supplied automatically from the # `"db.rom"` component in the operation's slice. # # @api...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/extensions/view/standard_helpers.rb
lib/hanami/extensions/view/standard_helpers.rb
# frozen_string_literal: true module Hanami module Extensions module View # Module including the standard library of Hanami helpers # # @api public # @since 2.1.0 module StandardHelpers include Hanami::View::Helpers::EscapeHelper include Hanami::View::Helpers::Number...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/extensions/view/slice_configured_view.rb
lib/hanami/extensions/view/slice_configured_view.rb
# frozen_string_literal: true module Hanami module Extensions module View # Provides slice-specific configuration and behavior for any view class defined within a # slice's module namespace. # # @api public # @since 2.1.0 class SliceConfiguredView < Module TEMPLATES_DI...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/extensions/view/scope.rb
lib/hanami/extensions/view/scope.rb
# frozen_string_literal: true require_relative "slice_configured_helpers" require_relative "standard_helpers" module Hanami module Extensions module View # @api private # @since 2.1.0 module Scope # @api private # @since 2.1.0 def self.included(scope_class) su...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/extensions/view/slice_configured_part.rb
lib/hanami/extensions/view/slice_configured_part.rb
# frozen_string_literal: true module Hanami module Extensions module View # Provides slice-specific configuration and behavior for any view part class defined within a # slice's module namespace. # # @api public # @since 2.1.0 class SliceConfiguredPart < Module attr_re...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/extensions/view/context.rb
lib/hanami/extensions/view/context.rb
# frozen_string_literal: true require_relative "../../errors" require_relative "slice_configured_context" module Hanami module Extensions module View # View context for views in Hanami apps. # # @api public # @since 2.1.0 module Context class << self # Returns a c...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/extensions/view/slice_configured_helpers.rb
lib/hanami/extensions/view/slice_configured_helpers.rb
# frozen_string_literal: true module Hanami module Extensions module View # Provides slice-specific helper methods for any view object requiring access to helpers. # # @api public # @since 2.1.0 class SliceConfiguredHelpers < Module attr_reader :slice # @api private...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/extensions/view/slice_configured_context.rb
lib/hanami/extensions/view/slice_configured_context.rb
# frozen_string_literal: true module Hanami module Extensions module View # Provides slice-specific configuration and behavior for any view context class defined within # a slice's module namespace. # # @api public # @since 2.1.0 class SliceConfiguredContext < Module a...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/extensions/view/part.rb
lib/hanami/extensions/view/part.rb
# frozen_string_literal: true require_relative "standard_helpers" require_relative "slice_configured_part" module Hanami module Extensions module View # @api public # @since 2.1.0 module Part # @api private # @since 2.1.0 def self.included(part_class) super ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/extensions/router/errors.rb
lib/hanami/extensions/router/errors.rb
# frozen_string_literal: true require "hanami/router" module Hanami class Router # Error raised when a request is made for a missing route. # # Raised only when using hanami-router as part of a full Hanami app. When using hanami-router # standalone, the behavior for such requests is to return a "Not...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/providers/logger.rb
lib/hanami/providers/logger.rb
# frozen_string_literal: true module Hanami # @api private module Providers # Provider source to register logger component in Hanami slices. # # @see Hanami::Config#logger # # @api private # @since 2.0.0 class Logger < Hanami::Provider::Source # @api private def start ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/providers/db.rb
lib/hanami/providers/db.rb
# frozen_string_literal: true require "dry/configurable" require "dry/core" require "uri" require_relative "../constants" module Hanami module Providers # @api private # @since 2.2.0 class DB < Hanami::Provider::Source extend Dry::Core::Cache include Dry::Configurable(config_class: Provider...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/providers/inflector.rb
lib/hanami/providers/inflector.rb
# frozen_string_literal: true module Hanami # @api private module Providers # Provider source to register inflector component in Hanami slices. # # @api private # @since 2.0.0 class Inflector < Hanami::Provider::Source # @api private def start register :inflector, Hanami.app...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/providers/rack.rb
lib/hanami/providers/rack.rb
# frozen_string_literal: true module Hanami # @api private module Providers # Provider source to register Rack integration components in Hanami slices. # # @see Hanami::Providers::Logger # @see Hanami::Web::RackLogger # @see https://github.com/rack/rack # @see https://dry-rb.org/gems/dry-mo...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/providers/routes.rb
lib/hanami/providers/routes.rb
# frozen_string_literal: true module Hanami # @api private module Providers # Provider source to register routes helper component in Hanami slices. # # @see Hanami::Slice::RoutesHelper # # @api private # @since 2.0.0 class Routes < Hanami::Provider::Source # @api private def...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/providers/relations.rb
lib/hanami/providers/relations.rb
# frozen_string_literal: true module Hanami module Providers # @api private # @since 2.2.0 class Relations < Hanami::Provider::Source def start start_and_import_parent_relations and return if slice.parent && slice.config.db.import_from_parent slice.start :db register_relat...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/providers/db_logging.rb
lib/hanami/providers/db_logging.rb
# frozen_string_literal: true module Hanami module Providers # @api private # @since 2.2.0 class DBLogging < Hanami::Provider::Source # @api private # @since 2.2.0 def prepare require "dry/monitor/sql/logger" slice["notifications"].register_event :sql end # ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/providers/assets.rb
lib/hanami/providers/assets.rb
# frozen_string_literal: true module Hanami # @api private module Providers # Provider source to register routes helper component in Hanami slices. # # @see Hanami::Slice::RoutesHelper # # @api private # @since 2.0.0 class Assets < Hanami::Provider::Source # @api private def...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/providers/db/gateway.rb
lib/hanami/providers/db/gateway.rb
# frozen_string_literal: true require "dry/configurable" require "dry/core" module Hanami module Providers class DB < Hanami::Provider::Source # @api public # @since 2.2.0 class Gateway include Dry::Core::Constants include Dry::Configurable setting :database_url ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/providers/db/adapter.rb
lib/hanami/providers/db/adapter.rb
# frozen_string_literal: true require "dry/configurable" module Hanami module Providers class DB < Hanami::Provider::Source # @api public # @since 2.2.0 class Adapter include Dry::Configurable # @api public # @since 2.2.0 setting :plugins, mutable: true ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/providers/db/config.rb
lib/hanami/providers/db/config.rb
# frozen_string_literal: true require "dry/core" module Hanami module Providers class DB < Hanami::Provider::Source # @api public # @since 2.2.0 class Config < Dry::Configurable::Config include Dry::Core::Constants # @api public # @since 2.2.0 def gateway(key) ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/providers/db/adapters.rb
lib/hanami/providers/db/adapters.rb
# frozen_string_literal: true module Hanami module Providers class DB < Hanami::Provider::Source # @api public # @since 2.2.0 class Adapters # @api private # @since 2.2.0 ADAPTER_CLASSES = Hash.new(Adapter).update( sql: SQLAdapter ).freeze priva...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/providers/db/sql_adapter.rb
lib/hanami/providers/db/sql_adapter.rb
# frozen_string_literal: true module Hanami module Providers class DB < Hanami::Provider::Source # @api public # @since 2.2.0 class SQLAdapter < Adapter # @api public # @since 2.2.0 setting :extensions, mutable: true # @api public # @since 2.2.0 ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/provider/source.rb
lib/hanami/provider/source.rb
# frozen_string_literal: true module Hanami module Provider class Source < Dry::System::Provider::Source attr_reader :slice def initialize(slice:, **options, &block) @slice = slice super(**options, &block) end def target_container = slice end end end
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/config/actions.rb
lib/hanami/config/actions.rb
# frozen_string_literal: true require "dry/configurable" require "hanami/action" module Hanami class Config # Hanami actions config # # This exposes all the settings from the standalone `Hanami::Action` class, pre-configured with # sensible defaults for actions within a full Hanami app. It also prov...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/config/logger.rb
lib/hanami/config/logger.rb
# frozen_string_literal: true require "dry/configurable" require "dry/logger" module Hanami class Config # Hanami logger config # # @api public # @since 2.0.0 class Logger include Dry::Configurable # @return [Hanami::SliceName] # # @api private # @since 2.0.0 ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/config/db.rb
lib/hanami/config/db.rb
# frozen_string_literal: true require "dry/configurable" module Hanami class Config # Hanami DB config # # @since 2.2.0 # @api public class DB include Dry::Configurable setting :configure_from_parent, default: true setting :import_from_parent, default: false private ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/config/views.rb
lib/hanami/config/views.rb
# frozen_string_literal: true require "dry/configurable" require "hanami/view" module Hanami class Config # Hanami views config # # This exposes all the settings from the standalone `Hanami::View` class, pre-configured with # sensible defaults for actions within a full Hanami app. It also provides a...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/config/router.rb
lib/hanami/config/router.rb
# frozen_string_literal: true require "dry/configurable" require_relative "../slice/routing/resolver" module Hanami class Config # Hanami router config # # @since 2.0.0 # @api private class Router include Dry::Configurable # Base config is provided so router config can include the `...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/config/console.rb
lib/hanami/config/console.rb
# frozen_string_literal: true require "dry/configurable" module Hanami class Config # Hanami console config # # @since 2.3.0 # @api public class Console include Dry::Configurable # @!attribute [rw] engine # Sets or returns the interactive console engine to be used by `hanami ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/config/null_config.rb
lib/hanami/config/null_config.rb
# frozen_string_literal: true require "dry/configurable" module Hanami class Config # NullConfig can serve as a fallback config object when out-of-gem config objects are not # available (specifically, when the hanami-controller, hanami-router or hanami-view gems are not # loaded) class NullConfig ...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false
hanami/hanami
https://github.com/hanami/hanami/blob/ccc7e5df285595191fb467729bb5ddc53f77f077/lib/hanami/config/assets.rb
lib/hanami/config/assets.rb
# frozen_string_literal: true require "dry/configurable" require "hanami/assets" module Hanami class Config # Hanami assets config # # This exposes all the settings from the standalone `Hanami::Assets` class, pre-configured with # sensible defaults for actions within a full Hanami app. It also provi...
ruby
MIT
ccc7e5df285595191fb467729bb5ddc53f77f077
2026-01-04T15:40:32.670663Z
false