read_time 1.0.5 → 1.0.6

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: 909226666ae44846ae012533efb86f41f45a45de
4
- data.tar.gz: 0c36872dbae3e78978beca8fbcb1a4babc934d2b
3
+ metadata.gz: 18a1ba5b9d00415893677b50180ae7a2d1b3aee3
4
+ data.tar.gz: 9fcbc1a2d2365b62a172ed7420822711b3778abe
5
5
  SHA512:
6
- metadata.gz: 8ac6cb0ba3b8ba040e7405a95dcddb7213cd52dbf5c2e40eaf2057687845ad68e9fc228c2345b3aade3c3da1f34d010b2931199ab1f62f9702bad6f93036b215
7
- data.tar.gz: 6a10a1bdf33d5b8b4cd10715796adcfe006b28db142904a85e0db7812b3ce758f35654dcc31fe5c5b14fdaa8f1b9825feeb8fe55fb2f3b42cb64cb6e175044ce
6
+ metadata.gz: d8c1c97040059b01b2ce123a3171f797dd6e82775475fa9173f84d87e67e35e5bc172a966d0cefcff3a756dd0bdac62487521a2245ab604602cfd1cc99bdea96
7
+ data.tar.gz: b2488ff38d12bf496c35be45d236a4eb95f6c53ffbc1c8cb919a4fe209457c468b04eea108bd00714b94f5d8732ea3517725b1c9f8db4824ffdf72b3f047923f
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in read_time.gemspec
4
4
  gemspec
data/Rakefile CHANGED
@@ -1,2 +1,2 @@
1
1
  require "bundler/gem_tasks"
2
- task :default => :spec
2
+ task default: :spec
data/lib/read_time.rb CHANGED
@@ -2,33 +2,33 @@ require "read_time/version"
2
2
 
3
3
  module ReadTime
4
4
  module String
5
- @@output = ""
5
+ @output = ""
6
6
 
7
7
  def seconds_to_read
8
- (self.split(" ").count/3.3333333333).to_i
8
+ (self.split(" ").count / 3.3333333333).to_i
9
9
  end
10
10
 
11
11
  def minutes_to_read(secs)
12
12
  if secs / 60 > 1
13
- @@output << "#{secs / 60} minutes "
13
+ @output << "#{secs / 60} minutes "
14
14
  else
15
- @@output << "1 minute "
15
+ @output << "1 minute "
16
16
  end
17
17
 
18
18
  if secs % 60 > 0
19
19
  if secs % 60 > 1
20
- @@output << "#{secs % 60} seconds"
20
+ @output << "#{secs % 60} seconds"
21
21
  else
22
- @@output << "1 second"
22
+ @output << "1 second"
23
23
  end
24
24
  end
25
25
  end
26
26
 
27
27
  def hours_to_read(secs)
28
28
  if secs / 3600 > 1
29
- @@output << "#{secs / 3600} hours "
29
+ @output << "#{secs / 3600} hours "
30
30
  else
31
- @@output << "1 hour "
31
+ @output << "1 hour "
32
32
  end
33
33
 
34
34
  if secs % 3600 > 0
@@ -47,7 +47,7 @@ module ReadTime
47
47
  else
48
48
  minutes_to_read(seconds_to_read)
49
49
  end
50
- puts @@output
50
+ puts @output
51
51
  end
52
52
  end
53
53
  end
@@ -1,3 +1,3 @@
1
1
  module ReadTime
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6".freeze
3
3
  end
data/read_time.gemspec CHANGED
@@ -1,7 +1,8 @@
1
1
  # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
2
+
3
+ lib = File.expand_path("../lib", __FILE__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'read_time/version'
5
+ require "read_time/version"
5
6
 
6
7
  Gem::Specification.new do |spec|
7
8
  spec.name = "read_time"
@@ -9,18 +10,18 @@ Gem::Specification.new do |spec|
9
10
  spec.authors = ["Kaan Kölköy"]
10
11
  spec.email = ["kaanklky@gmail.com"]
11
12
 
12
- spec.summary = %q{Find out read time of your content in hh:mm:ss format.}
13
+ spec.summary = "Find out read time of your content in hh:mm:ss format."
13
14
  spec.homepage = "https://github.com/kaanklky/read_time"
14
15
  spec.license = "MIT"
15
16
 
16
17
  if spec.respond_to?(:metadata)
17
- spec.metadata['allowed_push_host'] = "https://rubygems.org/"
18
+ spec.metadata["allowed_push_host"] = "https://rubygems.org/"
18
19
  else
19
20
  raise "RubyGems 2.0 or newer is required to protect against " \
20
21
  "public gem pushes."
21
22
  end
22
23
 
23
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
24
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
24
25
  f.match(%r{^(test|spec|features)/})
25
26
  end
26
27
  spec.bindir = "exe"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: read_time
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaan Kölköy