sandy 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,6 +1,40 @@
1
1
  # Sandy
2
2
 
3
- TODO: Write a gem description
3
+ ## Usage
4
+
5
+ ### ConEd
6
+ report = Sandy::Provider::ConEd::Report.new
7
+
8
+ #### Regions
9
+ regions = report.regions
10
+ regions.each do |region|
11
+ puts "#{region.name}, #{region.customers_affected}"
12
+ end
13
+
14
+ Outputs:
15
+ Bronx, 28644
16
+ Brooklyn, 37016
17
+ Manhattan, 226225
18
+ Queens, 85057
19
+ Staten Island, 58043
20
+ Westchester, 123571
21
+
22
+ Also available are `region.latitude`, `region.longitude`, and `region.total_customers` (see neighborhoods section)
23
+
24
+ #### Neighborhoods
25
+
26
+ neighborhoods = report.neighborhoods
27
+ neighborhoods.each do |neighborhood|
28
+ puts "#{neighborhood.name} (#{neighborhood.latitude}, #{neighborhood.longitude}) #{neighborhood.customers_affected} out of #{neighborhood.total_customers}"
29
+ end
30
+
31
+ Outputs:
32
+ Central Bronx (40.82, -73.86) 26 out of 44452
33
+ Fordham (40.86, -73.9) 164 out of 114772
34
+ Northeast Bronx (40.87, -73.82) 13139 out of 79942
35
+ Riverdale (40.89, -73.9) 3801 out of 34772
36
+ Southeast Bronx (40.83, -73.82) 5919 out of 89736
37
+ ...
4
38
 
5
39
  ## Installation
6
40
 
data/lib/sandy/area.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Sandy
2
2
  class Area
3
- attr_reader :name, :region, :customers_affected, :latitude, :longitude
3
+ attr_reader :name, :region, :customers_affected, :latitude, :longitude, :total_customers
4
4
 
5
5
  def initialize(customers_affected, location, options = {})
6
6
  @name = location
data/lib/sandy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sandy
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/sandy.gemspec CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |gem|
8
8
  gem.version = Sandy::VERSION
9
9
  gem.authors = ["Cameron Cundiff"]
10
10
  gem.email = ["ckundo@gmail.com"]
11
- gem.description = %q{Present a simple API to consume power outage data for the Greater New York area.}
11
+ gem.description = %q{Presents a simple API to consume power outage data for the Greater New York area.}
12
12
  gem.summary = %q{Power outage data for ConEd in NYC}
13
13
  gem.homepage = "http://www.github.com/ckundo/sandy"
14
14
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sandy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -91,7 +91,7 @@ dependencies:
91
91
  - - ~>
92
92
  - !ruby/object:Gem::Version
93
93
  version: 2.3.0
94
- description: Present a simple API to consume power outage data for the Greater New
94
+ description: Presents a simple API to consume power outage data for the Greater New
95
95
  York area.
96
96
  email:
97
97
  - ckundo@gmail.com