remain_timer 0.2.3 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +1 -4
- data/Steepfile +14 -0
- data/lib/duration_format.rb +2 -0
- data/lib/remain_timer/version.rb +1 -1
- data/sig/duration_format.rbs +11 -0
- data/sig/remain_timer.rbs +43 -0
- metadata +10 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '01956406220df4d55f456803988aad7d1dd98f2b1d32d75e463ee4216254d49f'
|
4
|
+
data.tar.gz: 04f06c6ce94fa2a055f7bf1360e3b78eca82fb80fea9c3ea547bdda684bcf9ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20fdc7cadf8fc18b4220f9aa82447e5db960154050afdc148a4fbeac9c59f2a89927114d55ee08137edb9aa9d96e57cd64b98de3533fcd80eaf9fba8292aeead
|
7
|
+
data.tar.gz: 01eef9da5d9f2c2b84825165e3b3f18db19713388560a422b35ef6156336ef4f4a474428ddb619dceab95f6b9c0ac5b5556cc0780bc7182dbc243568932781ee
|
data/.github/workflows/ruby.yml
CHANGED
@@ -21,10 +21,7 @@ jobs:
|
|
21
21
|
steps:
|
22
22
|
- uses: actions/checkout@v2
|
23
23
|
- name: Set up Ruby
|
24
|
-
|
25
|
-
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
26
|
-
# uses: ruby/setup-ruby@v1
|
27
|
-
uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
|
24
|
+
uses: ruby/setup-ruby@v1
|
28
25
|
with:
|
29
26
|
ruby-version: 2.6
|
30
27
|
- name: Install dependencies
|
data/Steepfile
ADDED
data/lib/duration_format.rb
CHANGED
data/lib/remain_timer/version.rb
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
# Classes
|
2
|
+
class DurationFormat
|
3
|
+
SECONDS_PER_DAY: Integer
|
4
|
+
SECONDS_PER_HOUR: Integer
|
5
|
+
SECONDS_PER_MINUTE: Integer
|
6
|
+
PARTS: [:day, :hour, :min, :sec]
|
7
|
+
PARTS_IN_SECONDS: {sec: Integer, min: Integer, hour: Integer, day: Integer}
|
8
|
+
|
9
|
+
def self.build_parts: (Integer | Float value) -> {day: Integer, hour: Integer, min: Integer, sec: Float}
|
10
|
+
def self.format: (Integer | Float value) -> String
|
11
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# Classes
|
2
|
+
class RemainTimer
|
3
|
+
@laptimes: Array[LapTime]
|
4
|
+
@use_current: bool
|
5
|
+
|
6
|
+
attr_accessor all_count: Integer?
|
7
|
+
attr_accessor estimate_laptime_size: Integer
|
8
|
+
def initialize: (?estimate_laptime_size: Integer) -> Integer
|
9
|
+
def start: (?Integer count, ?Time time) -> Array[LapTime]
|
10
|
+
def progress: (Integer count, ?Time time) -> Array[LapTime]
|
11
|
+
def remain_time: -> RemainTime
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def now: -> Time
|
16
|
+
|
17
|
+
class LapTime < Struct[Integer | Time]
|
18
|
+
def initialize: (Integer past_count, Time time) -> untyped
|
19
|
+
attr_accessor past_count(): Integer
|
20
|
+
attr_accessor time(): Time
|
21
|
+
end
|
22
|
+
|
23
|
+
class RemainTime < Struct[Integer | Float | nil]
|
24
|
+
def initialize: (
|
25
|
+
all_duration: Integer | Float?,
|
26
|
+
past_duration: Integer | Float,
|
27
|
+
remain_duration: Integer | Float?,
|
28
|
+
all_count: Integer?,
|
29
|
+
past_count: Integer,
|
30
|
+
remain_count: Integer?,
|
31
|
+
) -> untyped
|
32
|
+
attr_accessor all_duration(): Integer | Float?
|
33
|
+
attr_accessor past_duration(): Integer | Float
|
34
|
+
attr_accessor remain_duration(): Integer | Float?
|
35
|
+
attr_accessor all_count(): Integer?
|
36
|
+
attr_accessor past_count(): Integer
|
37
|
+
attr_accessor remain_count(): Integer?
|
38
|
+
def to_s: -> String
|
39
|
+
def puts: (?prefix: String?, ?postfix: String?) -> nil
|
40
|
+
def print: (?prefix: String?, ?postfix: String?) -> untyped
|
41
|
+
def dfmt: (Integer | Float duration) -> String
|
42
|
+
end
|
43
|
+
end
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: remain_timer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Narazaka
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
13
|
+
description:
|
14
14
|
email:
|
15
15
|
- info@narazaka.net
|
16
16
|
executables: []
|
@@ -27,19 +27,22 @@ files:
|
|
27
27
|
- LICENSE
|
28
28
|
- README.md
|
29
29
|
- Rakefile
|
30
|
+
- Steepfile
|
30
31
|
- bin/console
|
31
32
|
- bin/setup
|
32
33
|
- lib/duration_format.rb
|
33
34
|
- lib/remain_timer.rb
|
34
35
|
- lib/remain_timer/version.rb
|
35
36
|
- remain_timer.gemspec
|
37
|
+
- sig/duration_format.rbs
|
38
|
+
- sig/remain_timer.rbs
|
36
39
|
homepage: https://github.com/Narazaka/remain_timer
|
37
40
|
licenses:
|
38
41
|
- Zlib
|
39
42
|
metadata:
|
40
43
|
homepage_uri: https://github.com/Narazaka/remain_timer
|
41
44
|
source_code_uri: https://github.com/Narazaka/remain_timer
|
42
|
-
post_install_message:
|
45
|
+
post_install_message:
|
43
46
|
rdoc_options: []
|
44
47
|
require_paths:
|
45
48
|
- lib
|
@@ -54,8 +57,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
54
57
|
- !ruby/object:Gem::Version
|
55
58
|
version: '0'
|
56
59
|
requirements: []
|
57
|
-
rubygems_version: 3.
|
58
|
-
signing_key:
|
60
|
+
rubygems_version: 3.2.3
|
61
|
+
signing_key:
|
59
62
|
specification_version: 4
|
60
63
|
summary: A small tool for estimating and displaying the remaining time of batch jobs/tasks
|
61
64
|
test_files: []
|