ecraft-extensions 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +5 -4
- data/README.md +17 -0
- data/lib/ecraft/extensions/time.rb +4 -1
- data/lib/ecraft/extensions/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af3834c6d1357bfa8ffe8806ebca6545b721b971
|
4
|
+
data.tar.gz: dd5b2a7a8163474d089fc226d2ab9ccd989f7f90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 218f060f591e94b9c75c808050dc4910f414a752101b8cd8f8e9ed0a5f0165566b088a8177c8081d23d3c0bdbe04c8d2d9978e89058ea42e3cff64273fadd86e
|
7
|
+
data.tar.gz: 73a4dc85bce0cc233ec878d086b9e87870346e1685b6a0ba4bc172f51d00136914e0216821c1836e53bf0113e9402070a3d0779542b5703b2ff8023512e301d4
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -2,6 +2,9 @@ AllCops:
|
|
2
2
|
TargetRubyVersion: 2.3
|
3
3
|
DisplayCopNames: true
|
4
4
|
|
5
|
+
Layout/MultilineOperationIndentation:
|
6
|
+
EnforcedStyle: indented
|
7
|
+
|
5
8
|
Lint/EndAlignment:
|
6
9
|
EnforcedStyleAlignWith: variable
|
7
10
|
|
@@ -21,14 +24,12 @@ Style/BlockDelimiters:
|
|
21
24
|
Style/ClassAndModuleChildren:
|
22
25
|
Enabled: false
|
23
26
|
|
27
|
+
Style/DateTime:
|
28
|
+
Enabled: false
|
24
29
|
Style/Documentation:
|
25
30
|
Enabled: false
|
26
31
|
Style/Encoding:
|
27
32
|
Enabled: false
|
28
|
-
Style/FileName:
|
29
|
-
Enabled: false
|
30
|
-
Style/MultilineOperationIndentation:
|
31
|
-
EnforcedStyle: indented
|
32
33
|
Style/NumericPredicate:
|
33
34
|
Enabled: false
|
34
35
|
Style/FrozenStringLiteralComment:
|
data/README.md
CHANGED
@@ -59,6 +59,23 @@ bundle exec yard server -r
|
|
59
59
|
|
60
60
|
Check the locally served documentation at http://localhost:8808/
|
61
61
|
|
62
|
+
### Releasing a new version
|
63
|
+
|
64
|
+
- Bump the version in `version.rb`
|
65
|
+
- Create the tag:
|
66
|
+
|
67
|
+
```
|
68
|
+
$ git release v1.0.x`
|
69
|
+
```
|
70
|
+
|
71
|
+
- Build the gemfile and push it to Rubygems.org:
|
72
|
+
|
73
|
+
```shell
|
74
|
+
$ bundle exec rake build release
|
75
|
+
```
|
76
|
+
|
77
|
+
- Generate the changelog (`cargo install changelog-rs && changelog-rs .`) and copy the relevant lines to [the releases page](https://github.com/ecraft/ecraft-extensions/releases).
|
78
|
+
|
62
79
|
### License
|
63
80
|
|
64
81
|
MIT
|
@@ -7,6 +7,9 @@ class ::Time
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def to_json(*_a)
|
10
|
-
|
10
|
+
# Use the precision provided in our receiver, but only up to milliseconds at max. Objects lacking the fraction part
|
11
|
+
# altogether will be serialized without fraction part using this algorithm.
|
12
|
+
fraction_digits = [nsec.to_s.sub(/0+$/, '').length, 3].min
|
13
|
+
iso8601(fraction_digits).to_json
|
11
14
|
end
|
12
15
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecraft-extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tre Kronor
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|