rzman 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +62 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +40 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/mech.log +19 -0
- data/bin/rzman +7 -0
- data/bin/setup +8 -0
- data/lib/rzman.rb +10 -0
- data/lib/rzman/CLI.rb +95 -0
- data/lib/rzman/scraper.rb +45 -0
- data/lib/rzman/version.rb +3 -0
- data/lib/rzman/zmanim.rb +18 -0
- data/rzman.gemspec +31 -0
- metadata +131 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 57ce1fd0349b0f757f33ffb470c28c91a1e87a89
|
4
|
+
data.tar.gz: 2d3e3bd85412f3a30983ed5628235768a8a3a258
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8bcf4e6faf6e7344e76ac80ffe898882a3f125bcb647f0fec7c9713eb993aa4536d01d3ccfaacd0382bd76baaad21a8d2e8d8213667d77a934e73ac95c7f6e7d
|
7
|
+
data.tar.gz: d08ebad34d9daaf019b2e337f86138793c6e83d3cc053e25e7326ab2ffd8bfd38cf9aa95f468132e68f3894a83e76eae9b16ea60a29da0ae878797d6da5b5878
|
data/.gitignore
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
<<<<<<< HEAD
|
2
|
+
/.bundle/
|
3
|
+
/.yardoc
|
4
|
+
/Gemfile.lock
|
5
|
+
/_yardoc/
|
6
|
+
/coverage/
|
7
|
+
/doc/
|
8
|
+
/pkg/
|
9
|
+
/spec/reports/
|
10
|
+
/tmp/
|
11
|
+
=======
|
12
|
+
*.gem
|
13
|
+
*.rbc
|
14
|
+
/.config
|
15
|
+
/coverage/
|
16
|
+
/InstalledFiles
|
17
|
+
/pkg/
|
18
|
+
/spec/reports/
|
19
|
+
/spec/examples.txt
|
20
|
+
/test/tmp/
|
21
|
+
/test/version_tmp/
|
22
|
+
/tmp/
|
23
|
+
|
24
|
+
# Used by dotenv library to load environment variables.
|
25
|
+
# .env
|
26
|
+
|
27
|
+
## Specific to RubyMotion:
|
28
|
+
.dat*
|
29
|
+
.repl_history
|
30
|
+
build/
|
31
|
+
*.bridgesupport
|
32
|
+
build-iPhoneOS/
|
33
|
+
build-iPhoneSimulator/
|
34
|
+
|
35
|
+
## Specific to RubyMotion (use of CocoaPods):
|
36
|
+
#
|
37
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
38
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
39
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
40
|
+
#
|
41
|
+
# vendor/Pods/
|
42
|
+
|
43
|
+
## Documentation cache and generated files:
|
44
|
+
/.yardoc/
|
45
|
+
/_yardoc/
|
46
|
+
/doc/
|
47
|
+
/rdoc/
|
48
|
+
|
49
|
+
## Environment normalization:
|
50
|
+
/.bundle/
|
51
|
+
/vendor/bundle
|
52
|
+
/lib/bundler/man/
|
53
|
+
|
54
|
+
# for a library or gem, you might want to ignore these files since the code is
|
55
|
+
# intended to run in multiple environments; otherwise, check them in:
|
56
|
+
# Gemfile.lock
|
57
|
+
# .ruby-version
|
58
|
+
# .ruby-gemset
|
59
|
+
|
60
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
61
|
+
.rvmrc
|
62
|
+
>>>>>>> cb838a49c89695f3fe6896fa485df07a1841eb5a
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at bengreenberg@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Rabbi Ben Greenberg
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# Rzman: Ruby Zmanim
|
2
|
+
|
3
|
+
RZman is a Ruby CLI Gem that will deliver to you the זמנים(zmanim), daily Jewish prayer times and הדלקת נרות(hadlakat nerot), candle lighting times for Shabbat based on the U.S. zip code you provide.
|
4
|
+
|
5
|
+
The data it provides is scraped from MyJewishLearning.com for candle lighting times and MyZmanim.com for daily zmanim.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'rzman'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install rzman
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
RZman is a very easy Gem to use. Once you run it you will be prompted to choose from two options and then for a valid U.S. zipcode. The program will provide you with the times you requested and prompt you to either return to the main menu or exit.
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/benhayehudi/rzman. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
|
+
|
37
|
+
|
38
|
+
## License
|
39
|
+
|
40
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "rzman"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/mech.log
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# Logfile created on 2017-06-13 21:36:59 -0400 by logger.rb/1.2.8
|
2
|
+
I, [2017-06-13T21:36:59.203266 #88995] INFO -- : Net::HTTP::Get: /htdocs/main.en.html
|
3
|
+
D, [2017-06-13T21:36:59.203483 #88995] DEBUG -- : request-header: accept-encoding => gzip,deflate,identity
|
4
|
+
D, [2017-06-13T21:36:59.203558 #88995] DEBUG -- : request-header: accept => */*
|
5
|
+
D, [2017-06-13T21:36:59.203632 #88995] DEBUG -- : request-header: user-agent => Mechanize/2.7.5 Ruby/2.3.0p0 (http://github.com/sparklemotion/mechanize/)
|
6
|
+
D, [2017-06-13T21:36:59.203666 #88995] DEBUG -- : request-header: accept-charset => ISO-8859-1,utf-8;q=0.7,*;q=0.7
|
7
|
+
D, [2017-06-13T21:36:59.203696 #88995] DEBUG -- : request-header: accept-language => en-us,en;q=0.5
|
8
|
+
D, [2017-06-13T21:36:59.203728 #88995] DEBUG -- : request-header: host => www.hebrewcalendar.net
|
9
|
+
I, [2017-06-13T21:36:59.320897 #88995] INFO -- : status: Net::HTTPOK 1.1 200 OK
|
10
|
+
D, [2017-06-13T21:36:59.320975 #88995] DEBUG -- : response-header: date => Wed, 14 Jun 2017 01:36:59 GMT
|
11
|
+
D, [2017-06-13T21:36:59.321002 #88995] DEBUG -- : response-header: server => Apache
|
12
|
+
D, [2017-06-13T21:36:59.321021 #88995] DEBUG -- : response-header: last-modified => Tue, 18 Nov 2008 04:50:12 GMT
|
13
|
+
D, [2017-06-13T21:36:59.321051 #88995] DEBUG -- : response-header: etag => "5b3005e-342-45bef6e426900"
|
14
|
+
D, [2017-06-13T21:36:59.321069 #88995] DEBUG -- : response-header: accept-ranges => bytes
|
15
|
+
D, [2017-06-13T21:36:59.321084 #88995] DEBUG -- : response-header: content-length => 834
|
16
|
+
D, [2017-06-13T21:36:59.321099 #88995] DEBUG -- : response-header: keep-alive => timeout=5, max=100
|
17
|
+
D, [2017-06-13T21:36:59.321114 #88995] DEBUG -- : response-header: connection => Keep-Alive
|
18
|
+
D, [2017-06-13T21:36:59.321129 #88995] DEBUG -- : response-header: content-type => text/html
|
19
|
+
D, [2017-06-13T21:36:59.321250 #88995] DEBUG -- : Read 834 bytes (834 total)
|
data/bin/rzman
ADDED
data/bin/setup
ADDED
data/lib/rzman.rb
ADDED
data/lib/rzman/CLI.rb
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
# CLI Controller
|
2
|
+
require 'date'
|
3
|
+
|
4
|
+
class Rzman::CLI
|
5
|
+
|
6
|
+
def call
|
7
|
+
puts "Welcome to RZman!".colorize(:light_blue)
|
8
|
+
menu
|
9
|
+
end
|
10
|
+
|
11
|
+
def menu
|
12
|
+
puts "Please choose from the following:".colorize(:light_blue)
|
13
|
+
puts ""
|
14
|
+
@first_choice = nil
|
15
|
+
puts "1. Get my zmanim for the day"
|
16
|
+
puts "2. Get my candle lighting for this Shabbat"
|
17
|
+
puts ""
|
18
|
+
puts "Please enter '1' or '2' or 'exit'".colorize(:light_cyan)
|
19
|
+
@first_choice = gets.strip
|
20
|
+
if @first_choice == "1"
|
21
|
+
puts "Please enter a valid U.S. zipcode:".colorize(:light_cyan)
|
22
|
+
@@zip_input = gets.strip
|
23
|
+
if zip_valid? == nil
|
24
|
+
puts "Only valid U.S. zipcodes will work (5 digits long).".colorize(:red)
|
25
|
+
puts "Do you want to start again? (y/n)".colorize(:light_cyan)
|
26
|
+
do_over_choice = gets.strip
|
27
|
+
if do_over_choice == "y"
|
28
|
+
menu
|
29
|
+
else
|
30
|
+
goodbye
|
31
|
+
end
|
32
|
+
else
|
33
|
+
get_zmanim
|
34
|
+
end
|
35
|
+
elsif @first_choice == "2"
|
36
|
+
puts "Please enter a valid U.S zipcode:".colorize(:light_cyan)
|
37
|
+
@@zip_input = gets.strip
|
38
|
+
if zip_valid? == nil
|
39
|
+
puts "Only valid U.S. zipcodes will work (5 digits long).".colorize(:red)
|
40
|
+
puts "Do you want to start again? (y/n)".colorize(:light_cyan)
|
41
|
+
do_over_choice = gets.strip
|
42
|
+
if do_over_choice == "y"
|
43
|
+
menu
|
44
|
+
else
|
45
|
+
goodbye
|
46
|
+
end
|
47
|
+
else
|
48
|
+
get_shabbat_zmanim
|
49
|
+
end
|
50
|
+
elsif @first_choice == "exit"
|
51
|
+
goodbye
|
52
|
+
else
|
53
|
+
return_to_menu
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def return_to_menu
|
58
|
+
@first_choice != "1" || @first_choice != "2" || @first_choice != "exit"
|
59
|
+
puts "Please enter a valid option.".colorize(:red)
|
60
|
+
menu
|
61
|
+
end
|
62
|
+
|
63
|
+
def zip_valid?
|
64
|
+
@@zip_input.to_s
|
65
|
+
@@zip_input.match(/^\d{5}$/)
|
66
|
+
end
|
67
|
+
|
68
|
+
def get_zmanim
|
69
|
+
Rzman::Zmanim.zmanim_today
|
70
|
+
puts "Do you want to go back to the main menu? (y/n):".colorize(:light_cyan)
|
71
|
+
choice = gets.strip
|
72
|
+
if choice == "y"
|
73
|
+
menu
|
74
|
+
else
|
75
|
+
goodbye
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def get_shabbat_zmanim
|
80
|
+
Rzman::Zmanim.shabbat_time
|
81
|
+
puts "Do you want to go back to the main menu? (y/n):".colorize(:light_cyan)
|
82
|
+
choice = gets.strip
|
83
|
+
if choice == "y"
|
84
|
+
menu
|
85
|
+
else
|
86
|
+
goodbye
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
def goodbye
|
91
|
+
puts "Happy davening!".colorize(:light_blue)
|
92
|
+
puts "RZman brought to you by Rabbi Ben Greenberg.".colorize(:light_blue)
|
93
|
+
exit
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
|
2
|
+
class Rzman::Scraper < Rzman::CLI
|
3
|
+
|
4
|
+
def self.scrape_zmanim_today
|
5
|
+
doc = Nokogiri::HTML(open("https://www.myzmanim.com/day.aspx?askdefault=1&vars=US#{@@zip_input}"))
|
6
|
+
@zmanim_parsed = []
|
7
|
+
|
8
|
+
doc.css("center").each do |z|
|
9
|
+
@zmanim_parsed << {
|
10
|
+
:sunrise_name => z.css("tr:nth-of-type(7) td:nth-of-type(1) strong").text,
|
11
|
+
:sunrise => z.css("tr:nth-of-type(8) td:nth-of-type(2) span:nth-of-type(1)").text,
|
12
|
+
:midday_name => z.css("tr:nth-of-type(17) td:nth-of-type(1) strong").text,
|
13
|
+
:midday => z.css("tr:nth-of-type(17) td:nth-of-type(2) span:nth-of-type(1)").text,
|
14
|
+
:minha_gedolah_name => z.css("tr:nth-of-type(19) td:nth-of-type(1) strong").text,
|
15
|
+
:minha_gedolah => z.css("tr:nth-of-type(20) td:nth-of-type(2) span:nth-of-type(1)").text,
|
16
|
+
:plag_haminha_name => z.css("tr:nth-of-type(22) td:nth-of-type(1) strong").text,
|
17
|
+
:plag_haminha => z.css("tr:nth-of-type(23) td:nth-of-type(2) span:nth-of-type(1)").text,
|
18
|
+
:nightfall_name => z.css("tr:nth-of-type(28) td:nth-of-type(1) strong").text,
|
19
|
+
:nightfall => z.css("tr:nth-of-type(29) td:nth-of-type(2) span:nth-of-type(1)").text
|
20
|
+
}
|
21
|
+
end
|
22
|
+
puts " "
|
23
|
+
puts "Your Zmanim:".colorize(:light_red)
|
24
|
+
puts "Sunrise: #{@zmanim_parsed[0][:sunrise]}".colorize(:cyan)
|
25
|
+
puts "Midday: #{@zmanim_parsed[0][:midday]}".colorize(:cyan)
|
26
|
+
puts "#{@zmanim_parsed[0][:minha_gedolah_name]}: #{@zmanim_parsed[0][:minha_gedolah]}".colorize(:cyan)
|
27
|
+
puts "#{@zmanim_parsed[0][:plag_haminha_name]}: #{@zmanim_parsed[0][:plag_haminha]}".colorize(:cyan)
|
28
|
+
puts "#{@zmanim_parsed[0][:nightfall_name]}: #{@zmanim_parsed[0][:nightfall]}".colorize(:cyan)
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.scrape_shabbat_times
|
32
|
+
doc = Nokogiri::HTML(open("http://www.myjewishlearning.com/article/shabbat-candle-lighting-times/?zip=#{@@zip_input}"))
|
33
|
+
@times_parsed = []
|
34
|
+
|
35
|
+
doc.css(".m-message").each do |c|
|
36
|
+
@times_parsed << {
|
37
|
+
:location => c.css("p").first.text,
|
38
|
+
:time => c.css("p").css("strong").first.text
|
39
|
+
}
|
40
|
+
end
|
41
|
+
puts " "
|
42
|
+
puts "Shabbat in #{@times_parsed[0][:location]}:".colorize(:light_red)
|
43
|
+
puts "#{@times_parsed[0][:time]}".colorize(:cyan)
|
44
|
+
end
|
45
|
+
end
|
data/lib/rzman/zmanim.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
class Rzman::Zmanim < Rzman::CLI
|
2
|
+
|
3
|
+
attr_accessor :sunrise_name, :sunrise, :midday_name, :midday, :minha_gedolah_name, :minha_gedolah, :plag_haminha_name, :plag_haminha, :sunrise_name, :sunset, :nightfall_name, :nightfall
|
4
|
+
|
5
|
+
def self.zmanim_today
|
6
|
+
Rzman::Scraper.scrape_zmanim_today
|
7
|
+
puts " "
|
8
|
+
puts "Zmanim courtesy of MyZmanim.com".colorize(:yellow)
|
9
|
+
puts "Happy davening!".colorize(:yellow)
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.shabbat_time
|
13
|
+
Rzman::Scraper.scrape_shabbat_times
|
14
|
+
puts " "
|
15
|
+
puts "Shabbat times courtesy of MyJewishLearning.com.".colorize(:yellow)
|
16
|
+
puts "Shabbat Shalom!".colorize(:yellow)
|
17
|
+
end
|
18
|
+
end
|
data/rzman.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'rzman/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "rzman"
|
8
|
+
spec.version = Rzman::VERSION
|
9
|
+
spec.authors = ["Ben Greenberg"]
|
10
|
+
spec.email = ["bengreenberg@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{A Ruby CLI gem to get halakhic zmanim.}
|
13
|
+
spec.description = %q{This CLI gem will get the halakhic zmanium for either today or for a date the user specifies and for any zipcode the user enters.}
|
14
|
+
spec.homepage = "http://www.github.com/benhayehudi/"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = "exe"
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.14"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
|
27
|
+
spec.add_dependency "nokogiri"
|
28
|
+
spec.add_dependency "mechanize"
|
29
|
+
spec.add_dependency "colorize"
|
30
|
+
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rzman
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ben Greenberg
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-06-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.14'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.14'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: nokogiri
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: mechanize
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: colorize
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: This CLI gem will get the halakhic zmanium for either today or for a
|
84
|
+
date the user specifies and for any zipcode the user enters.
|
85
|
+
email:
|
86
|
+
- bengreenberg@gmail.com
|
87
|
+
executables: []
|
88
|
+
extensions: []
|
89
|
+
extra_rdoc_files: []
|
90
|
+
files:
|
91
|
+
- ".gitignore"
|
92
|
+
- CODE_OF_CONDUCT.md
|
93
|
+
- Gemfile
|
94
|
+
- LICENSE.txt
|
95
|
+
- README.md
|
96
|
+
- Rakefile
|
97
|
+
- bin/console
|
98
|
+
- bin/mech.log
|
99
|
+
- bin/rzman
|
100
|
+
- bin/setup
|
101
|
+
- lib/rzman.rb
|
102
|
+
- lib/rzman/CLI.rb
|
103
|
+
- lib/rzman/scraper.rb
|
104
|
+
- lib/rzman/version.rb
|
105
|
+
- lib/rzman/zmanim.rb
|
106
|
+
- rzman.gemspec
|
107
|
+
homepage: http://www.github.com/benhayehudi/
|
108
|
+
licenses:
|
109
|
+
- MIT
|
110
|
+
metadata: {}
|
111
|
+
post_install_message:
|
112
|
+
rdoc_options: []
|
113
|
+
require_paths:
|
114
|
+
- lib
|
115
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
requirements: []
|
126
|
+
rubyforge_project:
|
127
|
+
rubygems_version: 2.6.12
|
128
|
+
signing_key:
|
129
|
+
specification_version: 4
|
130
|
+
summary: A Ruby CLI gem to get halakhic zmanim.
|
131
|
+
test_files: []
|