From 769afb3f825341e49fcda7acc7c3c1447cface29 Mon Sep 17 00:00:00 2001 From: Stephen Schor Date: Tue, 26 Nov 2013 17:20:30 -0500 Subject: [PATCH] Initial commit --- .gitignore | 20 ++++++++++++++++++++ Gemfile | 5 +++++ LICENSE.txt | 22 ++++++++++++++++++++++ README.md | 19 +++++++++++++++++++ Rakefile | 1 + bin/esb | 5 +++++ esb.gemspec | 21 +++++++++++++++++++++ lib/esb.rb | 9 +++++++++ lib/esb/version.rb | 3 +++ 9 files changed, 105 insertions(+) create mode 100644 .gitignore create mode 100644 Gemfile create mode 100644 LICENSE.txt create mode 100644 README.md create mode 100644 Rakefile create mode 100755 bin/esb create mode 100644 esb.gemspec create mode 100644 lib/esb.rb create mode 100644 lib/esb/version.rb diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4ab6768 --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +*.gem +*.rbc +.bundle +.config +.redcar +.rvmrc +.yardoc +Gemfile.lock +InstalledFiles +_yardoc +coverage +doc/ +lib/bundler/man +pkg +rdoc +spec/reports +test/tmp +test/version_tmp +tmp +.DS_Store \ No newline at end of file diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..3a0e955 --- /dev/null +++ b/Gemfile @@ -0,0 +1,5 @@ +source 'https://rubygems.org' + +# List gem dependencies in gemspec +gemspec + diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..e0f7dcf --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright (c) 2013 Stephen Schor + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..492fce5 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# Esb + +Look up the Empire State Building's current color - from your command line. + +## Installation + + $ gem install esb + +## Usage + + $ esb + +## Contributing + +1. Fork it +2. Create your feature branch (`git checkout -b my-new-feature`) +3. Commit your changes (`git commit -am 'Add some feature'`) +4. Push to the branch (`git push origin my-new-feature`) +5. Create new Pull Request diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..2995527 --- /dev/null +++ b/Rakefile @@ -0,0 +1 @@ +require "bundler/gem_tasks" diff --git a/bin/esb b/bin/esb new file mode 100755 index 0000000..902111b --- /dev/null +++ b/bin/esb @@ -0,0 +1,5 @@ +#!/usr/bin/env ruby + +require 'esb' + +Esb.get_color \ No newline at end of file diff --git a/esb.gemspec b/esb.gemspec new file mode 100644 index 0000000..4ab1184 --- /dev/null +++ b/esb.gemspec @@ -0,0 +1,21 @@ +# -*- encoding: utf-8 -*- +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +require 'asciiart/version' + +Gem::Specification.new do |gem| + gem.name = "esb" + gem.version = AsciiArt::VERSION + gem.authors = ["nodanaonlyzuul"] + gem.email = ["beholdthepanda@gmail.com"] + gem.summary = %q{A command line tool to tell you what color the empire state building is, and why.} + gem.homepage = "https://github.com/nodanaonlyzuul/esb" + + gem.files = `git ls-files`.split($/) + gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } + gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) + gem.require_paths = ["lib"] + + gem.add_dependency('nokogiri') + gem.add_development_dependency('pry') +end diff --git a/lib/esb.rb b/lib/esb.rb new file mode 100644 index 0000000..63f0961 --- /dev/null +++ b/lib/esb.rb @@ -0,0 +1,9 @@ +require 'nokogiri' +require 'open-uri' + +class Esb + def self.get_color + doc = Nokogiri::HTML(open("www.esbnyc.com/current_events_tower_lights.asp")) + require 'pry';binding.pry; + end +end diff --git a/lib/esb/version.rb b/lib/esb/version.rb new file mode 100644 index 0000000..8508f1a --- /dev/null +++ b/lib/esb/version.rb @@ -0,0 +1,3 @@ +class Esb + VERSION = "0.0.1" +end