gain 0.1 → 0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a58995916e8b75c8388d19dffc6040676ad4e289
4
- data.tar.gz: dd4231364de24fead2c9ff253145f6bc9de9e5e8
3
+ metadata.gz: 14dd93081f35705f66df6dd84f07a2cdce51a7fb
4
+ data.tar.gz: 3389bd3efd402366948619f48dc3170e74d589c2
5
5
  SHA512:
6
- metadata.gz: d46263b8375de9f1bc99258f0f0c546f60583306a68480202b7bdb879eeb47df9f52e23659e69d6e2484a0d67b4725620980486039982cadfb03858b7a5b3864
7
- data.tar.gz: bd97b5c2c50cdc27903eac7fd2ce7cabb058b1fcb384dd36691d649995fd9b8eb9d3f1ebbd034f3647852d0fb84510d4fe96fdab14a6e5e16a3d4078dd2f0a6c
6
+ metadata.gz: 36ff947f05fdb179e0b74683854e8725d64f95ca9b5db761f21b60d478a6b4afe1ecabaf1756fad7d050967b4fa4f9006a99dbb83a217fdf4d860e82388a692a
7
+ data.tar.gz: a0626f4180ae463a38346f87e2300eec46190e1ccdeec2012351eaa053b90e4030a75f188229b98e585d2279afcf2e1b38581011764d6851fd654bf21f43a057
data/README.md CHANGED
@@ -42,7 +42,7 @@ end
42
42
  ...
43
43
  ...
44
44
  > 100%
45
- > Complete processed
45
+ > Complete progress
46
46
  ```
47
47
 
48
48
  ## Contributing
data/lib/gain/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Gain
2
- VERSION = "0.1"
2
+ VERSION = "0.2"
3
3
  end
data/lib/gain.rb CHANGED
@@ -13,7 +13,7 @@ class Gain
13
13
 
14
14
  @@progress_count = 0
15
15
  @progress_print = 1 if @progress_print == nil
16
- @@progress_mod = @total * @progress_print.to_f / 100.0
16
+ @@progress_mod = (@total * @progress_print.to_f / 100.0).to_i
17
17
  @progress_print.to_s.include?(".") ? @@round = @progress_print.to_s.split(".")[1].length : @@round = 0
18
18
 
19
19
  puts @title if @title != nil
@@ -27,6 +27,6 @@ class Gain
27
27
  end
28
28
 
29
29
  def finish_progress
30
- puts "Complete processed"
30
+ puts "Complete progress"
31
31
  end
32
32
  end
data/spec/gain_spec.rb CHANGED
@@ -16,4 +16,12 @@ describe Gain do
16
16
  gain.progress
17
17
  end
18
18
  end
19
+
20
+ it "test with 13,192 total progress" do
21
+ gain = Gain.new :title => "Start 13,192 Progress", :total => 13192, :progress_print => 0.1
22
+
23
+ for i in 1..13192 do
24
+ gain.progress
25
+ end
26
+ end
19
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gain
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: '0.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sukit Sunama