crunchyroll 0.2.1 → 0.2.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: 9bde4f65203faddfe21829eac000a22711673af3
4
- data.tar.gz: 92df5f6773ab94145f98292966999a9b7a4902a3
3
+ metadata.gz: f700d1c730d7c332bc57bb51f7120a2a87f6d415
4
+ data.tar.gz: 42f421a5717b64e67898fb001bcc8eed7cb9bdd0
5
5
  SHA512:
6
- metadata.gz: 68be4214837679ed8033eea8274557c7fa479379bb95a24a5a3cd08b46d4cade149b66a8dce37c90e8e22191989f564d19f02947c8179665f5c5a9e9e780b43a
7
- data.tar.gz: 9de561df400f13da259ec0e6d54498df58be18d8e5fa180a226aff70eed443f1894b244ec26143fdd24b3eb0e44d3548302821b06a5651db30f9ee657b9fd648
6
+ metadata.gz: 804ae13b6bced2629681a4f8529bb23ef14b20715bd520579b574731d1600992e062c288a1612752a0575052dde49515603d58a999f32d802dd0368842183351
7
+ data.tar.gz: 9fffded86ddfc725db406a36decc4fd85986ae002dc22a71684aff6c6fee10391938a27624983d238d37f40bf7a3737d8effb8d26929c3a39cf23cdaf94b21a7
@@ -16,7 +16,7 @@ module Crunchyroll
16
16
 
17
17
  air = Nokogiri::HTML(open(url)).xpath('//ul[@id="sidebar_elements"]/li')[1].xpath('.//p')[0].text
18
18
  day_literal = air.split('Simulcast on ')[1].split(' ')[0]
19
- date = Time.parse(air.split('Simulcast on ')[1]).date_of_next
19
+ date = Time.parse(air.split('Simulcast on ')[1]).date_of_next
20
20
 
21
21
  return {
22
22
  :title => title,
@@ -19,14 +19,18 @@ class Time
19
19
  hours = mins / 60
20
20
  days = hours / 24
21
21
 
22
- if days > 0
23
- "#{days} days, #{hours % 24} hours, #{mins % 60} minutes and #{secs % 60} seconds"
22
+ secs %= 60
23
+ mins %= 60
24
+ hours %= 24
25
+
26
+ if days > 0
27
+ "#{days} days, #{hours} hours, #{mins} minutes and #{secs} seconds"
24
28
  elsif hours > 0
25
- "#{hours % 24} hours, #{mins % 60} minutes and #{secs % 60} seconds"
29
+ "#{hours} hours, #{mins} minutes and #{secs} seconds"
26
30
  elsif mins > 0
27
- "#{mins % 60} minutes and #{secs % 60} seconds"
31
+ "#{mins} minutes and #{secs} seconds"
28
32
  elsif secs >= 0
29
- "#{secs % 60} seconds"
33
+ "#{secs} seconds"
30
34
  end
31
35
  end
32
36
 
@@ -14,6 +14,6 @@
14
14
 
15
15
  module Crunchyroll
16
16
  def self.version
17
- '0.2.1'
17
+ '0.2.2'
18
18
  end
19
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crunchyroll
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano