esb 0.0.2 → 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 -13
  2. data/esb.gemspec +1 -0
  3. data/lib/esb/version.rb +1 -1
  4. data/lib/esb.rb +9 -5
  5. metadata +28 -15
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- OTc4OTI3OWNjZDI3NGU3YzcyZDE1NGRiMTdjOTRlMDhjNTA2ZDczNQ==
5
- data.tar.gz: !binary |-
6
- NjEyYjdiY2UwNmUxZWM4NzgzMjZiMDQzMTcyNWE4NjNmNzY3YzRhYw==
2
+ SHA256:
3
+ metadata.gz: 9d374253073d10f3390a0bc813e786285484a8bd18db1913149c6e39907190d7
4
+ data.tar.gz: 57a9a76f7bb62864102caff0dc5c21d4e76351da9bf27c3fd35905f224b348e2
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- ZjE1OGNkNjhlMjM0MDU4YWJkNTRhYjJjYzhjY2I3YzI1N2FjZjVhMTJkZDhi
10
- ZDQ0MzYzYzUwYzc4YTAxNjMyZjViOWZlOTFkMmY4NGU0ODQ1NjgyNTM5ODcy
11
- NDFiNzg0OGVkYzY1M2IzNmY5ZmRlZWM0ODI1NjgwMmI0NzFjYTk=
12
- data.tar.gz: !binary |-
13
- M2EzNzA3ZDIwNDZiYTI2NWZhYjM5NjI2ZDk5YWI4ZDE4ODU0ODEwOTdkOWRm
14
- M2Y4MzlmNDM2ZWI2OTI5NDMyZmE2MmYzOTkxZGQ1M2ExMzJhMzgwMzdjMzhk
15
- NjQyNWIzYjI1NjgxMDI3Y2EzMzJkNDg5N2M0M2Y2NWVmMzU5ZjE=
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.2"
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("http://www.esbnyc.com/current_events_tower_lights.asp"))
7
- puts " "
8
- puts doc.css("#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,44 +1,58 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
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: 2014-06-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
16
30
  requirements:
17
- - - ! '>='
31
+ - - ">="
18
32
  - !ruby/object:Gem::Version
19
33
  version: '0'
20
34
  type: :runtime
21
35
  prerelease: false
22
36
  version_requirements: !ruby/object:Gem::Requirement
23
37
  requirements:
24
- - - ! '>='
38
+ - - ">="
25
39
  - !ruby/object:Gem::Version
26
40
  version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: pry
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
- - - ! '>='
45
+ - - ">="
32
46
  - !ruby/object:Gem::Version
33
47
  version: '0'
34
48
  type: :development
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
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:
@@ -46,7 +60,7 @@ executables:
46
60
  extensions: []
47
61
  extra_rdoc_files: []
48
62
  files:
49
- - .gitignore
63
+ - ".gitignore"
50
64
  - Gemfile
51
65
  - LICENSE.txt
52
66
  - README.md
@@ -58,24 +72,23 @@ 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
65
79
  required_ruby_version: !ruby/object:Gem::Requirement
66
80
  requirements:
67
- - - ! '>='
81
+ - - ">="
68
82
  - !ruby/object:Gem::Version
69
83
  version: '0'
70
84
  required_rubygems_version: !ruby/object:Gem::Requirement
71
85
  requirements:
72
- - - ! '>='
86
+ - - ">="
73
87
  - !ruby/object:Gem::Version
74
88
  version: '0'
75
89
  requirements: []
76
- rubyforge_project:
77
- rubygems_version: 2.2.2
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.