yake 0.5.0 → 0.5.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6688bf834975490165ca48ff259e22402ec5dc417099c8c2291b4796eb76b5b2
4
- data.tar.gz: d92d5faec4b6bd8b60a65962af51493176a4184a87a52de188f84367bce4002b
3
+ metadata.gz: 3bcd08008b6aaa58e9015fd1b06cf8bf18f5c1bc1ecc7a272b375e0c8e5eea98
4
+ data.tar.gz: 632228bc6b6f69ba3a059e4df951571f3d0dbe1d0ee655982c94594010eff480
5
5
  SHA512:
6
- metadata.gz: 2cf319bba7cd22f2c5f58a66c401dd77dfc2d050214d39d755748d9dc78baed88c603dbfdbbe3d233385e35270c73ec19ab9d3edae394ef9e6dbc2c89c9c1a34
7
- data.tar.gz: 2221a9a8108091b59c9e0eeeb7959c675faee09385847ed5fbf9a75ebbc788be6a734c13eec4a948af883ce1210d9d7fe45401c1e0f3b0cba2efceab03a88df5
6
+ metadata.gz: c6ba2c9ccaba3f6c9e9a567fcf2ab1332f98df97852bd96b16206fa46f0fe3f7873090f13e575475d9c68a04814af14e76eab574119f2893b0e6913f78dbdbde
7
+ data.tar.gz: 9c7072a8eee8193edf16a07f2557faae7d4cd1c671eea54713c8d1c9514071f4fc642e3203ee4c352cfa17f3f25bda59188e73aa64cd3462afca0539f757c5da
data/README.md CHANGED
@@ -183,11 +183,15 @@ Finally, `yake` does not depend on any other gems, using the Ruby stdlib only. T
183
183
 
184
184
  As of `v0.5`, `yake` comes with a support module for common transformations.
185
185
 
186
- `Hash` transformations:
186
+ Enable the helpers by requiring the `support` submodule:
187
187
 
188
188
  ```ruby
189
189
  require 'yake/support'
190
+ ```
190
191
 
192
+ `Hash` transformations:
193
+
194
+ ```ruby
191
195
  { fizz: 'buzz' }.encode64
192
196
  # => "eyJmaXp6IjoiYnV6eiJ9\n"
193
197
 
data/lib/yake/support.rb CHANGED
@@ -10,11 +10,18 @@ class Hash
10
10
  end
11
11
 
12
12
  class Integer
13
+ def weeks() days * 7 end
13
14
  def days() hours * 24 end
14
15
  def hours() minutes * 60 end
15
16
  def minutes() seconds * 60 end
16
17
  def seconds() self end
17
18
  def utc() UTC.at(self) end
19
+
20
+ alias :second :seconds
21
+ alias :minute :minutes
22
+ alias :hour :hours
23
+ alias :day :days
24
+ alias :week :weeks
18
25
  end
19
26
 
20
27
  class String
data/lib/yake/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Yake
4
- VERSION = '0.5.0'
4
+ VERSION = '0.5.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Mancevice
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-26 00:00:00.000000000 Z
11
+ date: 2022-02-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: