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 +4 -4
- data/README.md +5 -1
- data/lib/yake/support.rb +7 -0
- data/lib/yake/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3bcd08008b6aaa58e9015fd1b06cf8bf18f5c1bc1ecc7a272b375e0c8e5eea98
|
|
4
|
+
data.tar.gz: 632228bc6b6f69ba3a059e4df951571f3d0dbe1d0ee655982c94594010eff480
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
`
|
|
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
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.
|
|
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-
|
|
11
|
+
date: 2022-02-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description:
|
|
14
14
|
email:
|