Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 8d5e958

Browse files
committed
Rename Citrine::Pipe::I18n to Citrine::I18n::Handler
This completes the transition to a shard that is not Amber-specific.
1 parent 4e31894 commit 8d5e958

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

spec/citrine-i18n_spec.cr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ require "http"
55
I18n.load_path += ["./spec/fixtures/"]
66
I18n.init
77

8-
describe Citrine::Pipe::I18n do
8+
describe Citrine::I18n::Handler do
99

1010
it "should set language from header" do
1111
request = HTTP::Request.new("GET", "/")
1212
request.headers["Accept-Language"] = "fr,en-US;q=0.7,en;q=0.3"
1313
context = create_context(request)
14-
handler = Citrine::Pipe::I18n.new
14+
handler = Citrine::I18n::Handler.new
1515
handler.call(context)
1616
I18n.locale.should eq "fr"
1717
end
@@ -20,7 +20,7 @@ describe Citrine::Pipe::I18n do
2020
request = HTTP::Request.new("GET", "/")
2121
request.headers["Accept-Language"] = "fr;q=0.6,en-US;q=0.7"
2222
context = create_context(request)
23-
handler = Citrine::Pipe::I18n.new
23+
handler = Citrine::I18n::Handler.new
2424
handler.call(context)
2525
I18n.locale.should eq "en"
2626
end

src/citrine-i18n.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require "amber"
22
require "i18n"
33
require "./citrine-i18n/parser"
4-
require "./citrine-i18n/pipes/i18n"
4+
require "./citrine-i18n/handler"
55

66
module Citrine::I18n
77
def self.configure
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Citrine
2-
module Pipe
2+
module I18n
33
# Handler to initialize I18n for the request.
4-
class I18n
4+
class Handler
55
include HTTP::Handler
66
HEADER = "Accept-Language"
77

0 commit comments

Comments
 (0)