tater 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -2
- data/lib/tater.rb +2 -2
- data/test/tater_test.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f47c6fb87ebbbaa22bd33575dc6009a31e62fcbf81c9de5bd3d9a9e46d59e79
|
4
|
+
data.tar.gz: 3ba6ff030c7f2aa67163c2d230a2839f43b16381a295f3258d2b538c03283251
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c95c9b85915657d2327d1c92488dda8041fd8a3fc0f8cbdf27681c972723b2a26009b26f021b6b937114c7690acb4c27c58d99e6693fb870c0f905860d267b17
|
7
|
+
data.tar.gz: 5cb0d1ad507632d7ba48368d8df5c26047e1ee7beca54eb591dd7f6e3ab37869ae5eb077d3dc5f5bb7e8c56dd5339904b6a91a4abf49ada5e98a6def48137e1a
|
data/README.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
# Tater
|
1
|
+
# Tater
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/tater.svg)](https://badge.fury.io/rb/tater)
|
4
|
+
[![Build Status](https://secure.travis-ci.org/evanleck/tater.svg)](https://travis-ci.org/evanleck/tater)
|
2
5
|
|
3
6
|
Tater is an internationalization (i18n) and localization (l10n) library designed
|
4
7
|
for simplicity. It doesn't do everything that other libraries do, but that's by
|
@@ -11,7 +14,8 @@ interpolation. That's probably 90% of what Tater does.
|
|
11
14
|
|
12
15
|
## Installation
|
13
16
|
|
14
|
-
|
17
|
+
Tater requires Ruby 2.5 or higher. To install Tater, add this line to your
|
18
|
+
application's Gemfile (or gems.rb):
|
15
19
|
|
16
20
|
```ruby
|
17
21
|
gem 'tater'
|
@@ -33,6 +37,8 @@ gem install tater
|
|
33
37
|
## Usage
|
34
38
|
|
35
39
|
```ruby
|
40
|
+
require 'tater'
|
41
|
+
|
36
42
|
messages = {
|
37
43
|
'some' => {
|
38
44
|
'key' => 'This here string!'
|
data/lib/tater.rb
CHANGED
@@ -178,8 +178,8 @@ class Tater
|
|
178
178
|
when '%^b' then lookup('date.abbreviated_months', locale_override)[object.mon - 1].upcase
|
179
179
|
when '%B' then lookup('date.months', locale_override)[object.mon - 1]
|
180
180
|
when '%^B' then lookup('date.months', locale_override)[object.mon - 1].upcase
|
181
|
-
when '%p' then lookup("time.#{ object.hour < 12 ? 'am' : 'pm' }", locale_override).upcase if object.respond_to?(:hour) # rubocop:disable
|
182
|
-
when '%P' then lookup("time.#{ object.hour < 12 ? 'am' : 'pm' }", locale_override).downcase if object.respond_to?(:hour) # rubocop:disable
|
181
|
+
when '%p' then lookup("time.#{ object.hour < 12 ? 'am' : 'pm' }", locale_override).upcase if object.respond_to?(:hour) # rubocop:disable Metrics/BlockNesting
|
182
|
+
when '%P' then lookup("time.#{ object.hour < 12 ? 'am' : 'pm' }", locale_override).downcase if object.respond_to?(:hour) # rubocop:disable Metrics/BlockNesting
|
183
183
|
end
|
184
184
|
end
|
185
185
|
|
data/test/tater_test.rb
CHANGED
@@ -92,7 +92,7 @@ describe Tater do
|
|
92
92
|
end
|
93
93
|
|
94
94
|
it 'returns an array with the available locales (i.e. the top-level keys in our messages hash)' do
|
95
|
-
assert_equal %w[en delimiter_only separator_only fr], i18n.available
|
95
|
+
assert_equal %w[en delimiter_only separator_only fr].sort, i18n.available.sort
|
96
96
|
end
|
97
97
|
end
|
98
98
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tater
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Lecklider
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -66,7 +66,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
66
66
|
requirements:
|
67
67
|
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
69
|
+
version: 2.5.0
|
70
70
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - ">="
|