esb 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +5 -5
  2. data/esb.gemspec +1 -0
  3. data/lib/esb/version.rb +1 -1
  4. data/lib/esb.rb +9 -5
  5. metadata +21 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 135756311907b8dc307e9d972964a63526017a77
4
- data.tar.gz: 78f5d4667d9f85949f40368ded403757b44d9077
2
+ SHA256:
3
+ metadata.gz: 9d374253073d10f3390a0bc813e786285484a8bd18db1913149c6e39907190d7
4
+ data.tar.gz: 57a9a76f7bb62864102caff0dc5c21d4e76351da9bf27c3fd35905f224b348e2
5
5
  SHA512:
6
- metadata.gz: 8f0ed144a0a72065537c4f1fe3d75761efd562ab8303a252ac1789cc8b9d76e6197ccbc4ab069e2db550e7315a9b38b6a2ea1aa8097a4e0818272de1038b23e2
7
- data.tar.gz: 4451e1c55fa9b2daa3599f9d3f0d8e8eaedac52065081cde318e4ca59c94764ce44bc56322a37a041998828cd6dd150d4ad0b84bbb8c5f91bb9f4158897edd3e
6
+ metadata.gz: 2c8957122d012396553b57a087efc952e1f690ad319679a4ad2f313ec2bc14c30639ba34f4ee44d247f25d7f1f9be3e447a18294270079a99724cdc08f9586e8
7
+ data.tar.gz: a8e61e7ef2a2ead0b9caf67ef7538855722bb9b146f7625c0e3b43c0293e8f517d80d43d0500de226396db52e88ef46975b95778e0db24dd78c22a2380142214
data/esb.gemspec CHANGED
@@ -16,6 +16,7 @@ Gem::Specification.new do |gem|
16
16
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
17
17
  gem.require_paths = ["lib"]
18
18
 
19
+ gem.add_dependency('http')
19
20
  gem.add_dependency('nokogiri')
20
21
  gem.add_development_dependency('pry')
21
22
  end
data/lib/esb/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Esb
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
data/lib/esb.rb CHANGED
@@ -1,11 +1,15 @@
1
1
  require 'nokogiri'
2
- require 'open-uri'
2
+ require 'http'
3
3
 
4
4
  class Esb
5
5
  def self.get_color
6
- doc = Nokogiri::HTML(open("https://www.esbnyc.com/explore/tower-lights"))
7
- puts " "
8
- puts doc.css(".view-tower-lighting #page-title").text.strip
9
- puts " "
6
+ doc = Nokogiri::HTML(HTTP.get("https://www.esbnyc.com/about/tower-lights").to_s)
7
+ date = doc.css('.is-today h2').text.strip
8
+ colors_and_reason = doc.css('.is-today h3').text.strip
9
+ additional_description = doc.css('.is-today .field_description').text.strip
10
+ puts date.strip
11
+ puts ""
12
+ puts colors_and_reason.strip
13
+ puts additional_description.strip unless additional_description.empty?
10
14
  end
11
15
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - nodanaonlyzuul
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-26 00:00:00.000000000 Z
11
+ date: 2023-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: http
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: nokogiri
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,7 +52,7 @@ dependencies:
38
52
  - - ">="
39
53
  - !ruby/object:Gem::Version
40
54
  version: '0'
41
- description:
55
+ description:
42
56
  email:
43
57
  - beholdthepanda@gmail.com
44
58
  executables:
@@ -58,7 +72,7 @@ files:
58
72
  homepage: https://github.com/nodanaonlyzuul/esb
59
73
  licenses: []
60
74
  metadata: {}
61
- post_install_message:
75
+ post_install_message:
62
76
  rdoc_options: []
63
77
  require_paths:
64
78
  - lib
@@ -73,9 +87,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
87
  - !ruby/object:Gem::Version
74
88
  version: '0'
75
89
  requirements: []
76
- rubyforge_project:
77
- rubygems_version: 2.5.1
78
- signing_key:
90
+ rubygems_version: 3.2.3
91
+ signing_key:
79
92
  specification_version: 4
80
93
  summary: A command line tool to tell you what color the empire state building is,
81
94
  and why.