README.rdoc in calc_sun-0.1.1 vs README.rdoc in calc_sun-1.2.6
- old
+ new
@@ -1,70 +1,78 @@
-
= calc_sun
+{<img src="https://travis-ci.org/DouglasAllen/calc_sun.svg?branch=master" alt="Build Status" />}[https://travis-ci.org/DouglasAllen/calc_sun]
+
+
Home :: https://rubygems.org/gems/calc_sun
Code :: https://github.com/DouglasAllen/calc_sun
-RDoc :: http://http://www.rubydoc.info/gems/calc_sun/
+RDoc :: http://www.rubydoc.info/gems/calc_sun/0.1.1
Issues :: https://github.com/DouglasAllen/calc_sun/issues
-== DESCRIPTION:
+=== DESCRIPTION:
-Calculate Sunrise and Sunset. Now uses native C extension.
-An example is supplied to show gem usage.
+Calculate Sunrise, Noon, and Sunset using native C extension.
+An example is supplied to show this gem usage.
-== FEATURES/PROBLEMS:
+=== INSTALL: Note: older version
- n/a
+ $> gem install calc_sun
-== SYNOPSIS:
+=== DOWNLOAD:
-=== start irb
+ $> git clone https://github.com/DouglasAllen/calc_sun.git
+ $> cd calc_sun
+ $> bundle install
- $ irb --simple-prompt
+=== Build with DEVKIT
-=== enter Code
+ cd to devkit dir and run devkitvars.bat
+ or make a batchfile to start your envirnment with 'run devkitvars'
+ cd to calc_sun dir
+ $> gem build calc_sun.gemspec
+ $> gem install calc_sun-1.2.6.gem -l
- require 'calc_sun'
- cs = CalcSun.new
- require 'date'
- # not included yet for determining your mean time
- DJ00 = DateTime.parse('2000-01-01T12:00:00').jd
+=== DEVELOPERS:
- lat = 51.4770228
- lon = -0.0001147
- day = Date.parse('2016-12-25')
- jd = day.jd - DJ00 - lon / 360.0
- cs.t_rise(jd, lon, lat)
- cs.t_mid_day(jd, lon, lat)
- cs.t_set(jd, lon, lat)require 'date'
+After checking out the source, run:
+ $ bundle exec rake newb
-== INSTALL:
+This task will install any missing dependencies, run the tests/specs,
+and generate the RDoc.
- $> bundle install
+=== FEATURES/PROBLEMS:
- $> bundle exec rake install
+ Consult issues if you want features or create pull requests.
+=== SYNOPSIS:
-=== Build with DEVKIT
+==== start irb
- cd to devkit dir and run devkitvars.bat
+ $ irb --simple-prompt
- or make a batchfile to start your envirnment with 'run devkitvars'
- cd to calc_sun dir
- Rake -T
+==== enter Code
-== DEVELOPERS:
+ lat = 39.742476
+ lon = -105.1786
-After checking out the source, run:
+ require 'calc_sun'
+ cs = CalcSun.new
- $ bundle exec rake newb
+ # require 'date' included in CalcSun class
+ ajd = DateTime.new(2003, 10, 17, 12, 30, 30).ajd.to_f
+ puts cs.ajd2dt(ajd)
-This task will install any missing dependencies, run the tests/specs,
-and generate the RDoc.
+ # set the date with set_date as date is just an ivar
+ day = cs.set_datetime('2003-10-17 12:30:30')
+ puts day
-== LICENSE:
+ puts "Sun rise: #{cs.rise(day.ajd, lat, lon).httpdate}"
+ puts "Sun noon: #{cs.noon(day.ajd, lat, lon).httpdate}"
+ puts "Sun set: #{cs.set(day.ajd, lat, lon).httpdate}"
+
+=== LICENSE:
(The MIT License)
Copyright (c) 2016