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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 837b220c0625420073232b029409f31e8ed42e035326350d9fe2bdc8cc6e36c9
4
- data.tar.gz: ae3e2f1dc530d337f8fb7a37a2c3260dbc740e90165f0e02617807b9618e5fe4
3
+ metadata.gz: '01956406220df4d55f456803988aad7d1dd98f2b1d32d75e463ee4216254d49f'
4
+ data.tar.gz: 04f06c6ce94fa2a055f7bf1360e3b78eca82fb80fea9c3ea547bdda684bcf9ae
5
5
  SHA512:
6
- metadata.gz: 2c8b08b826d23c212cc7f56a0b5001a2a6360d4618124c2bd6246bc97b380e1bbcceb34d22be06eb4e5d909bde47b29f67ffd406eb2d9706880ea528bb9d09bc
7
- data.tar.gz: 474c4427d86708c22946e1e5172f16478c2f287d542db759634d27de87d6a6e45df2eebf6329e8a98492a609e8377f9adfc28a9da797eee669a9953f9b0e6800
6
+ metadata.gz: 20fdc7cadf8fc18b4220f9aa82447e5db960154050afdc148a4fbeac9c59f2a89927114d55ee08137edb9aa9d96e57cd64b98de3533fcd80eaf9fba8292aeead
7
+ data.tar.gz: 01eef9da5d9f2c2b84825165e3b3f18db19713388560a422b35ef6156336ef4f4a474428ddb619dceab95f6b9c0ac5b5556cc0780bc7182dbc243568932781ee
@@ -21,10 +21,7 @@ jobs:
21
21
  steps:
22
22
  - uses: actions/checkout@v2
23
23
  - name: Set up Ruby
24
- # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
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
@@ -0,0 +1,14 @@
1
+ target :lib do
2
+ signature "sig"
3
+
4
+ check "lib"
5
+ end
6
+
7
+ target :spec do
8
+ signature "sig"
9
+
10
+ check "spec"
11
+
12
+ # library "pathname", "set" # Standard libraries
13
+ # library "rspec"
14
+ end
@@ -11,7 +11,9 @@ class DurationFormat
11
11
  }.freeze
12
12
 
13
13
  def self.build_parts(value)
14
+ # @type var parts: { day: Integer, hour: Integer, min: Integer, sec: Float }
14
15
  parts = {}
16
+ # @type var remainder: Integer | Float
15
17
  remainder = value.to_f
16
18
 
17
19
  PARTS.each do |part|
@@ -1,3 +1,3 @@
1
1
  class RemainTimer
2
- VERSION = "0.2.3".freeze
2
+ VERSION = "0.3.0".freeze
3
3
  end
@@ -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.2.3
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-10-02 00:00:00.000000000 Z
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.0.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: []