tater 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -2
  3. data/lib/tater.rb +2 -2
  4. data/test/tater_test.rb +1 -1
  5. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '04904502e539d0ef7eab036d0a3b6c22a635863cdc76e56b27648c9d1005e12c'
4
- data.tar.gz: 1ab472fa93cff9180ed718bc54a1209a2151c7a7be77f5ed045047a5865bdfa3
3
+ metadata.gz: 2f47c6fb87ebbbaa22bd33575dc6009a31e62fcbf81c9de5bd3d9a9e46d59e79
4
+ data.tar.gz: 3ba6ff030c7f2aa67163c2d230a2839f43b16381a295f3258d2b538c03283251
5
5
  SHA512:
6
- metadata.gz: 1faf70fb545ce2e0d2211f9af52830421c13f331e0b0519fe1c92b2e9443e1230c5c63ea19c4660d4f8468da4572b304022c8a7d93bf2aa9862b6cbb0e55cd08
7
- data.tar.gz: e87befcdfd969ebbce3350c1427070099224bfa24b4cafaafe246b0c1e3917d0e64d09fa5c1fca06678170f6411ffe548b7c3363888ab56061d16ab98657a8ae
6
+ metadata.gz: c95c9b85915657d2327d1c92488dda8041fd8a3fc0f8cbdf27681c972723b2a26009b26f021b6b937114c7690acb4c27c58d99e6693fb870c0f905860d267b17
7
+ data.tar.gz: 5cb0d1ad507632d7ba48368d8df5c26047e1ee7beca54eb591dd7f6e3ab37869ae5eb077d3dc5f5bb7e8c56dd5339904b6a91a4abf49ada5e98a6def48137e1a
data/README.md CHANGED
@@ -1,4 +1,7 @@
1
- # Tater the Translator
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
- Add this line to your application's Gemfile:
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 Metric/BlockNesting
182
- when '%P' then lookup("time.#{ object.hour < 12 ? 'am' : 'pm' }", locale_override).downcase if object.respond_to?(:hour) # rubocop:disable Metric/BlockNesting
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.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-16 00:00:00.000000000 Z
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: '0'
69
+ version: 2.5.0
70
70
  required_rubygems_version: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - ">="