ingress_info 1.0.0

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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/ingress_info.rb +21 -0
  3. metadata +44 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ee94560b3c9b94bede087914d94c98a5ab23b6ce
4
+ data.tar.gz: 6588ff93331a00329c916c4bf8f9fb6df218528c
5
+ SHA512:
6
+ metadata.gz: cefbedcfdbbe01d334109e88ec68e1b9a081bc01be6d1e686fe9eb88b4eecb6d9b800748c4ed1f1cb16fee74656003d9865bfe46c485bf7932056dc99545be67
7
+ data.tar.gz: 0609788215c993037e452c4dfa010caa30de5c0d7613de2d434a0bb983dbff694a11c6aa2a33fc282436f250e3e141ef44db7b37c36eb0eeff6b3b1d3fc2f2d0
@@ -0,0 +1,21 @@
1
+ class IngressCycles
2
+ def self.checkpointsForDate(start_time, ref_date)
3
+ hours_since_start = (Time.new(ref_date.year, ref_date.month, ref_date.day, 0, 0) - start_time)/3600
4
+ checkpointTime = Time.new(ref_date.year, ref_date.month, ref_date.day, 5 - (hours_since_start % 5), 0)
5
+
6
+ checkPoints = [checkpointTime.strftime("%H:%M")]
7
+
8
+ while checkpointTime.hour < 19 do
9
+ checkpointTime += 5*60*60
10
+ checkPoints += [checkpointTime.strftime("%H:%M")]
11
+ end
12
+
13
+ checkPoints += ["24:00"] if checkpointTime.hour == 19
14
+
15
+ checkPoints
16
+ end
17
+
18
+ def self.cycleEndTime(start_time)
19
+ start_time + 35*5*60*60
20
+ end
21
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ingress_info
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Todd Trimble
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-11-30 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Information about Ingress cycles and checkpoints
14
+ email: todd.trimble@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/ingress_info.rb
20
+ homepage:
21
+ licenses:
22
+ - MIT
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.1.10
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Niantic Labs Ingress Information
44
+ test_files: []