fortschritt 1.0.1 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fortschritt/enumerable.rb +2 -4
- data/lib/fortschritt/printer.rb +0 -3
- data/lib/fortschritt/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8cd437eabad2c3ec89fbbc3cc5298b1b35e706c7145a0088ee3b7f3e803e8b6
|
4
|
+
data.tar.gz: 3ae6d6d0dc61f851e587365bcad41a9b5ba52c804f638cf9944fdf5b5c9195d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 113c7028518cda915b1e6c443acec25f4fcb4b816e5e23086bc51b7b216721763baee83d21285c9a7443734c8e4ea36266311fe84ddfa20c49438ba8b1e5571d
|
7
|
+
data.tar.gz: 500c0dbe716bfb73b5803a9558bd46ed4890c78c1b60a9e30cc497e982ae50677981960f2434d47dd0d46e8ccf2d3274975ada4b436e1c77febec1fd6a69b53e
|
@@ -14,15 +14,13 @@ end
|
|
14
14
|
|
15
15
|
if defined?(Rails)
|
16
16
|
module Fortschritt::ActiveRecordExtension
|
17
|
-
|
18
|
-
extend ActiveSupport::Concern
|
19
|
-
|
20
17
|
def with_fortschritt(**opts)
|
21
18
|
Fortschritt.init(size, **opts)
|
22
19
|
self
|
23
20
|
end
|
24
21
|
end
|
25
22
|
|
26
|
-
ActiveRecord::Relation.
|
23
|
+
ActiveRecord::Relation.include Fortschritt::ActiveRecordExtension
|
24
|
+
ActiveRecord::Base.singleton_class.delegate :with_fortschritt, to: :all
|
27
25
|
end
|
28
26
|
|
data/lib/fortschritt/printer.rb
CHANGED
@@ -38,12 +38,9 @@ module Fortschritt
|
|
38
38
|
|
39
39
|
private
|
40
40
|
|
41
|
-
# "%d days, %d hours, %d minutes and %d seconds" % [dd, hh, mm, ss]
|
42
|
-
#=> 3 days, 3 hours, 15 minutes and 21 seconds
|
43
41
|
def format_seconds(seconds)
|
44
42
|
mm, ss = seconds.divmod(60)
|
45
43
|
hh, mm = mm.divmod(60)
|
46
|
-
dd, hh = hh.divmod(24)
|
47
44
|
"%02d:%02d:%02d" % [hh, mm, ss]
|
48
45
|
end
|
49
46
|
end
|
data/lib/fortschritt/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fortschritt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johannes Opper
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
|
-
rubygems_version: 3.
|
97
|
+
rubygems_version: 3.5.16
|
98
98
|
signing_key:
|
99
99
|
specification_version: 4
|
100
100
|
summary: non-fancy progress
|