Skip to content

Commit 5c39e3d

Browse files
committed
capitalize clsx
1 parent 0828b34 commit 5c39e3d

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

clsx.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require_relative "lib/clsx/version"
44

55
Gem::Specification.new do |spec|
66
spec.name = "clsx"
7-
spec.version = Clsx::VERSION
7+
spec.version = CLSX::VERSION
88
spec.authors = ["Seth Horsley"]
99
spec.email = ["[email protected]"]
1010

lib/clsx.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require_relative "clsx/version"
44
require "clsx/railtie" if defined?(Rails)
55

6-
module Clsx
6+
module CLSX
77
class Error < StandardError; end
88

99
def self.clsx(*args)

lib/clsx/railtie.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Railtie < Rails::Railtie
1212

1313
module Helper
1414
def clsx(*)
15-
Clsx.clsx(*)
15+
CLSX.clsx(*)
1616
end
1717
end
1818
end

lib/clsx/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

3-
module Clsx
3+
module CLSX
44
VERSION = "0.1.0"
55
end

sig/clsx.rbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module Clsx
1+
module CLSX
22
VERSION: String
33
# See the writing guide of rbs: https://github.com/ruby/rbs#guides
44
end

test/test_clsx.rb

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44

55
class ClsxTest < Minitest::Test
66
def test_strings
7-
assert_equal "foo bar baz", Clsx.clsx("foo", true && "bar", "baz")
7+
assert_equal "foo bar baz", CLSX.clsx("foo", true && "bar", "baz")
88
end
99

1010
def test_objects
11-
assert_equal "foo baz", Clsx.clsx({foo: true, bar: false, baz: true})
11+
assert_equal "foo baz", CLSX.clsx({foo: true, bar: false, baz: true})
1212
end
1313

1414
def test_objects_variadic
15-
assert_equal "foo --foobar", Clsx.clsx({foo: true}, {bar: false}, nil, {"--foobar" => "hello"})
15+
assert_equal "foo --foobar", CLSX.clsx({foo: true}, {bar: false}, nil, {"--foobar" => "hello"})
1616
end
1717

1818
def test_arrays
19-
assert_equal "foo bar", Clsx.clsx(["foo", 0, false, "bar"])
19+
assert_equal "foo bar", CLSX.clsx(["foo", 0, false, "bar"])
2020
end
2121

2222
def test_arrays_variadic
23-
assert_equal "foo bar baz hello there", Clsx.clsx(["foo"], ["", 0, false, "bar"], [["baz", [["hello"], "there"]]])
23+
assert_equal "foo bar baz hello there", CLSX.clsx(["foo"], ["", 0, false, "bar"], [["baz", [["hello"], "there"]]])
2424
end
2525

2626
def test_kitchen_sink
27-
assert_equal "foo bar hello world cya", Clsx.clsx("foo", [1 && "bar", {baz: false, bat: nil}, ["hello", ["world"]]], "cya")
27+
assert_equal "foo bar hello world cya", CLSX.clsx("foo", [1 && "bar", {baz: false, bat: nil}, ["hello", ["world"]]], "cya")
2828
end
2929
end

0 commit comments

Comments
 (0)