classnames 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +16 -0
  3. data/lib/classnames.rb +4 -4
  4. metadata +9 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b3ebb80be48cbe732432a7c13cf1701ad657c986
4
- data.tar.gz: d3f8dfc3a45bd3fd6b8b681d880af9464ab0e87e
2
+ SHA256:
3
+ metadata.gz: 88b762e6b34a642b0ba4f61dd0f09c8c29f16d31876f50d047bb065439749eb3
4
+ data.tar.gz: f3204041da28d72417862c608b8ace0b86a8905f21b80a97492f99b9a94913f9
5
5
  SHA512:
6
- metadata.gz: dd4aac17656e307f076bf6174340108f117f56ecfde255b95909bc0366e96981c3e22a51223e09fc5744e67b864e8003f3ece7ca3fab300f6ca391a074012c51
7
- data.tar.gz: 01b5d5778d401b899723c7ff0cc74659aadf942077ba577695295ed11eaaeb51a26c6a366898ac38e89d6fc09ffb90e7730fb8ded10c6f639ae852134100982f
6
+ metadata.gz: ce57408d50b6aa871a05ff17ccd933f45af5f23109ffec1671b2ba9f344ee818f78ce65c582fb89bf6e70e36dd3eb032fa1c5f10f0c06decb06ce42647b07386
7
+ data.tar.gz: 23390c54749faf4a1fc4e793f6e9a8334e8b1aa51a6ca98bcafc1c1cdb4e7a6ca88f68fb2ee007e818c3ff2f08396d455e13459c4e9631e0092229e19bec944c
data/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
1
+ # Changelog
2
+ #
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## Unreleased
9
+
10
+ ### Fixed
11
+
12
+ - Renamed internal method to not clash with `Kernel#format` [[#2](https://github.com/mikker/classnames/pull/2)]
13
+
14
+ ## 1.0.0 - 2016-06-07
15
+
16
+ Initial release.
data/lib/classnames.rb CHANGED
@@ -3,7 +3,7 @@ module ClassNames
3
3
  args = Array(args)
4
4
 
5
5
  args.reduce([]) do |arr, arg|
6
- if value = format(arg)
6
+ if value = format_classnames(arg)
7
7
  arr << value
8
8
  else
9
9
  arr
@@ -13,9 +13,9 @@ module ClassNames
13
13
 
14
14
  private
15
15
 
16
- def format arg
16
+ def format_classnames arg
17
17
  if arg.is_a?(Hash)
18
- format_hash(arg)
18
+ format_classnames_hash(arg)
19
19
  elsif arg.respond_to?(:call)
20
20
  arg.call
21
21
  else
@@ -23,7 +23,7 @@ module ClassNames
23
23
  end
24
24
  end
25
25
 
26
- def format_hash hsh
26
+ def format_classnames_hash hsh
27
27
  hsh.reduce([]) do |result, kv|
28
28
  key, value = kv
29
29
 
metadata CHANGED
@@ -1,22 +1,23 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: classnames
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikkel Malmberg
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-07 00:00:00.000000000 Z
11
+ date: 2021-07-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description:
13
+ description:
14
14
  email:
15
15
  - mikkel@brnbw.com
16
16
  executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
+ - CHANGELOG.md
20
21
  - LICENSE
21
22
  - README.md
22
23
  - lib/classnames.rb
@@ -24,7 +25,7 @@ homepage: https://github.com/mikker/classnames
24
25
  licenses:
25
26
  - MIT
26
27
  metadata: {}
27
- post_install_message:
28
+ post_install_message:
28
29
  rdoc_options: []
29
30
  require_paths:
30
31
  - lib
@@ -39,9 +40,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
39
40
  - !ruby/object:Gem::Version
40
41
  version: '0'
41
42
  requirements: []
42
- rubyforge_project:
43
- rubygems_version: 2.5.1
44
- signing_key:
43
+ rubygems_version: 3.1.6
44
+ signing_key:
45
45
  specification_version: 4
46
- summary: A copy of js' classnames
46
+ summary: Build classname strings using any kind of arguments.
47
47
  test_files: []