esb 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/esb.gemspec +1 -0
- data/lib/esb/version.rb +1 -1
- data/lib/esb.rb +9 -5
- metadata +21 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9d374253073d10f3390a0bc813e786285484a8bd18db1913149c6e39907190d7
|
4
|
+
data.tar.gz: 57a9a76f7bb62864102caff0dc5c21d4e76351da9bf27c3fd35905f224b348e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c8957122d012396553b57a087efc952e1f690ad319679a4ad2f313ec2bc14c30639ba34f4ee44d247f25d7f1f9be3e447a18294270079a99724cdc08f9586e8
|
7
|
+
data.tar.gz: a8e61e7ef2a2ead0b9caf67ef7538855722bb9b146f7625c0e3b43c0293e8f517d80d43d0500de226396db52e88ef46975b95778e0db24dd78c22a2380142214
|
data/esb.gemspec
CHANGED
data/lib/esb/version.rb
CHANGED
data/lib/esb.rb
CHANGED
@@ -1,11 +1,15 @@
|
|
1
1
|
require 'nokogiri'
|
2
|
-
require '
|
2
|
+
require 'http'
|
3
3
|
|
4
4
|
class Esb
|
5
5
|
def self.get_color
|
6
|
-
doc = Nokogiri::HTML(
|
7
|
-
|
8
|
-
|
9
|
-
|
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.
|
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:
|
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
|
-
|
77
|
-
|
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.
|