equationoftime 4.1.1 → 4.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/.autotest +39 -0
  3. data/.gemtest +0 -0
  4. data/.minitest.rb +2 -0
  5. data/.ruby-version +1 -0
  6. data/.settings/org.eclipse.ltk.core.refactoring.prefs +2 -0
  7. data/CHANGELOG.rdoc +6 -0
  8. data/Gemfile +12 -0
  9. data/Gemfile.lock +44 -3
  10. data/Guardfile +29 -0
  11. data/{LICENSE.md → LICENSE.rdoc} +0 -0
  12. data/Manifest.txt +82 -0
  13. data/README.rdoc +66 -0
  14. data/Rakefile +60 -45
  15. data/equationoftime.gemspec +17 -9
  16. data/examples/Equation_of_Time.jpg +0 -0
  17. data/examples/analemma_data_generator.rb +58 -0
  18. data/examples/check_date_type.rb +60 -0
  19. data/examples/compare_geoc_long_ra.rb +44 -0
  20. data/examples/data_table_for_astro_dog.rb +45 -0
  21. data/examples/earth_rotation.rb +42 -0
  22. data/examples/eot_methods_list.rb +48 -0
  23. data/examples/eot_plot.r +57 -0
  24. data/examples/eot_suntimes.rb +149 -0
  25. data/examples/equation_of_time.py +186 -0
  26. data/examples/figure_1.jpg +0 -0
  27. data/examples/file_converter.rb +31 -0
  28. data/examples/from_readme.rb +14 -0
  29. data/examples/from_wiki.rb +46 -0
  30. data/examples/geo_locator.rb +16 -0
  31. data/examples/getjd.rb +45 -0
  32. data/examples/gmst_gast_non_sofa.rb +406 -0
  33. data/examples/input_suntimes.rb +24 -0
  34. data/examples/julian_day_formula.rb +29 -0
  35. data/examples/julian_day_formula.txt +12 -0
  36. data/examples/my_time_conversion.rb +21 -0
  37. data/examples/nutation_series.txt +678 -0
  38. data/examples/nutation_table5_3a.txt +682 -0
  39. data/examples/ptime.rb +162 -0
  40. data/examples/suntimes.rb +30 -0
  41. data/examples/suntimes_test.rb +50 -0
  42. data/examples/t_sofa.rb +8228 -0
  43. data/examples/test_celes.rb +51 -0
  44. data/examples/test_ceot.rb +55 -0
  45. data/examples/test_poly_eval.rb +32 -0
  46. data/examples/time_scales.rb +29 -0
  47. data/examples/times_year.rb +53 -0
  48. data/examples/usage_example.rb +26 -0
  49. data/examples/use_angles.rb +222 -0
  50. data/ext/{ceot/eot.c → eot/ceot.c} +1 -1
  51. data/ext/{ceot/eot.h → eot/ceot.h} +0 -0
  52. data/ext/{ceot/ceot.c → eot/eot.c} +2 -2
  53. data/ext/{ceot → eot}/extconf.rb +1 -1
  54. data/lib/eot.rb +2 -1
  55. data/lib/eot/angles.rb +28 -28
  56. data/lib/eot/constants.rb +2 -0
  57. data/lib/eot/displays.rb +17 -17
  58. data/lib/eot/eot.so +0 -0
  59. data/lib/eot/geo_lat_lng_smt.rb +44 -31
  60. data/lib/eot/init.rb +20 -19
  61. data/lib/eot/nutation.rb +1 -1
  62. data/lib/eot/times.rb +22 -22
  63. data/lib/eot/utilities.rb +5 -5
  64. data/lib/eot/version.rb +2 -6
  65. data/test/aliased_angles_spec.rb +239 -0
  66. data/test/aliased_displays_spec.rb +105 -0
  67. data/test/aliased_utilities_spec.rb +36 -0
  68. data/test/angles_spec.rb +264 -0
  69. data/test/constants_spec.rb +20 -0
  70. data/test/displays_spec.rb +110 -0
  71. data/test/geo_spec.rb +38 -0
  72. data/test/init_spec.rb +44 -0
  73. data/test/nutation_spec.rb +37 -0
  74. data/test/spec_config.rb +8 -0
  75. data/test/times_spec.rb +133 -0
  76. data/test/utilities_spec.rb +35 -0
  77. metadata +109 -115
  78. data/.gitignore +0 -24
  79. data/.rvmrc +0 -1
  80. data/README.md +0 -83
  81. data/README2.txt +0 -70
  82. data/wiki.md +0 -43
  83. data/wiki2.md +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9bbe68b6f756ff39bd440ad62c0f6209c87399db
4
- data.tar.gz: b5927f2e937a02fa15c48a09eb04d4abbe54c358
3
+ metadata.gz: f1fec35e92070ea6fe2a39a87b1ad8b498f898dc
4
+ data.tar.gz: 1676c53200f191087b197e2a2927b6abae949278
5
5
  SHA512:
6
- metadata.gz: b64380f519afa2d4d1caaabd7a7991dd222430475ca4f1c40fce4e8f76f2be889bec4d16d01dc3e06db1f454f92d32d1b4780fbd1f51b822b9217970ccdb00bb
7
- data.tar.gz: f4c5c5b927e7a0dd1aa66d40746d339563ed8bca8462fcea8d183b628a22b8edce2a55709c4e02febc8e4ce142b90e81280449b4bfca800801e15a17657df284
6
+ metadata.gz: f09664f713936642fea1305c49f4733a56ecbfb815b577612d39f954162fd487d94d8e388bbbb82dff76c5b88cae7729eabeb13fbcf69e7fafec0c562d53346b
7
+ data.tar.gz: b992cdb24182e804b29a99f16b9d62d9ac2a9d36d672690f21dfdbf5ad72a5c58ee5bbe05565a03cfb0b9d09538563fba974191bae8c3f57d6b64dbd98b51190
data/.autotest ADDED
@@ -0,0 +1,39 @@
1
+ # -*- ruby -*-
2
+
3
+ #require 'autotest/fsevent'
4
+ require "autotest/restart"
5
+ #require "autotest/spec"
6
+ #require "autotest/suffix"
7
+
8
+ #require "redgreen/autotest"
9
+
10
+ #require "test_notifier/autotest"
11
+
12
+ Autotest.add_hook :initialize do |at|
13
+ at.testlib = "minitest/autorun"
14
+ #at.testlib = ".minitest"
15
+ # at.extra_files << "../some/external/dependency.rb"
16
+
17
+ # at.libs << ":../some/external"
18
+
19
+ # at.add_exception "vendor"
20
+
21
+ at.add_mapping(/.*\.c/) do |f, _|
22
+ at.files_matching(/.*_spec.rb$/)
23
+ end
24
+
25
+ # %w(TestA TestB).each do |klass|
26
+ # at.extra_class_map[klass] = "test/test_misc.rb"
27
+ # end
28
+ end
29
+
30
+ #Autotest.add_hook :all_good do |at|
31
+ #system "rake rcov_info"
32
+ #end if ENV['RCOV']
33
+
34
+ #Autotest.add_hook :run_command do |at|
35
+ # system "rake build"
36
+ #end
37
+ Autotest.add_hook :run_command do |at|
38
+ system "rake clean compile"
39
+ end
data/.gemtest ADDED
File without changes
data/.minitest.rb ADDED
@@ -0,0 +1,2 @@
1
+ gem "minitest"
2
+ require "minitest/autorun"
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-2.1.2
@@ -0,0 +1,2 @@
1
+ eclipse.preferences.version=1
2
+ org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
data/CHANGELOG.rdoc ADDED
@@ -0,0 +1,6 @@
1
+ === 4.1.2 / 2014-09-12
2
+
3
+ * 1 major enhancement building with hoe the weed eater.
4
+
5
+ * Birthday!
6
+
data/Gemfile CHANGED
@@ -2,3 +2,15 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in equationoftime.gemspec
4
4
  gemspec
5
+ group :development do
6
+ gem 'hoe'
7
+ gem 'rake'
8
+ gem 'rake-compiler', '~> 0.9.3'
9
+ gem 'guard'
10
+ gem 'minitest'
11
+ gem 'guard-minitest'
12
+ gem 'ZenTest'
13
+ gem 'rspec'
14
+ gem 'yard'
15
+ gem 'rdoc'
16
+ end
data/Gemfile.lock CHANGED
@@ -3,21 +3,53 @@ PATH
3
3
  specs:
4
4
  equationoftime (4.1.1)
5
5
  celes
6
- multi_xml
7
6
  rest-client
8
7
 
9
8
  GEM
10
9
  remote: https://rubygems.org/
11
10
  specs:
11
+ ZenTest (4.10.1)
12
12
  celes (0.0.1)
13
+ celluloid (0.16.0)
14
+ timers (~> 4.0.0)
15
+ coderay (1.1.0)
13
16
  diff-lcs (1.2.5)
17
+ ffi (1.9.3)
18
+ formatador (0.2.5)
19
+ guard (2.6.1)
20
+ formatador (>= 0.2.4)
21
+ listen (~> 2.7)
22
+ lumberjack (~> 1.0)
23
+ pry (>= 0.9.12)
24
+ thor (>= 0.18.1)
25
+ guard-minitest (2.3.2)
26
+ guard (~> 2.0)
27
+ minitest (>= 3.0)
28
+ hitimes (1.2.2)
29
+ hoe (3.12.0)
30
+ rake (>= 0.8, < 11.0)
31
+ json (1.8.1)
32
+ listen (2.7.9)
33
+ celluloid (>= 0.15.2)
34
+ rb-fsevent (>= 0.9.3)
35
+ rb-inotify (>= 0.9)
36
+ lumberjack (1.0.9)
37
+ method_source (0.8.2)
14
38
  mime-types (2.3)
15
39
  minitest (5.4.1)
16
- multi_xml (0.5.5)
17
40
  netrc (0.7.7)
41
+ pry (0.10.1)
42
+ coderay (~> 1.1.0)
43
+ method_source (~> 0.8.1)
44
+ slop (~> 3.4)
18
45
  rake (10.3.2)
19
46
  rake-compiler (0.9.3)
20
47
  rake
48
+ rb-fsevent (0.9.4)
49
+ rb-inotify (0.9.5)
50
+ ffi (>= 0.5.0)
51
+ rdoc (4.1.2)
52
+ json (~> 1.4)
21
53
  rest-client (1.7.2)
22
54
  mime-types (>= 1.16, < 3.0)
23
55
  netrc (~> 0.7)
@@ -33,16 +65,25 @@ GEM
33
65
  rspec-mocks (3.0.4)
34
66
  rspec-support (~> 3.0.0)
35
67
  rspec-support (3.0.4)
68
+ slop (3.6.0)
69
+ thor (0.19.1)
70
+ timers (4.0.1)
71
+ hitimes
36
72
  yard (0.8.7.4)
37
73
 
38
74
  PLATFORMS
39
75
  ruby
40
76
 
41
77
  DEPENDENCIES
78
+ ZenTest
42
79
  bundler (~> 1.5)
43
80
  equationoftime!
81
+ guard
82
+ guard-minitest
83
+ hoe
44
84
  minitest
45
85
  rake
46
- rake-compiler
86
+ rake-compiler (~> 0.9.3)
87
+ rdoc
47
88
  rspec
48
89
  yard
data/Guardfile ADDED
@@ -0,0 +1,29 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+
5
+ guard :minitest do
6
+ # with Minitest::Unit
7
+ watch(%r{^test/(.*)\/?test_(.*)\.rb$})
8
+ watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
9
+ watch(%r{^test/test_helper\.rb$}) { 'test' }
10
+
11
+ # with Minitest::Spec
12
+ watch(%r{^spec/(.*)_spec\.rb$})
13
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
14
+ watch(%r{^spec/spec_helper\.rb$}) { 'spec' }
15
+
16
+ # Rails 4
17
+ # watch(%r{^app/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
18
+ # watch(%r{^app/controllers/application_controller\.rb$}) { 'test/controllers' }
19
+ # watch(%r{^app/controllers/(.+)_controller\.rb$}) { |m| "test/integration/#{m[1]}_test.rb" }
20
+ # watch(%r{^app/views/(.+)_mailer/.+}) { |m| "test/mailers/#{m[1]}_mailer_test.rb" }
21
+ # watch(%r{^lib/(.+)\.rb$}) { |m| "test/lib/#{m[1]}_test.rb" }
22
+ # watch(%r{^test/.+_test\.rb$})
23
+ # watch(%r{^test/test_helper\.rb$}) { 'test' }
24
+
25
+ # Rails < 4
26
+ # watch(%r{^app/controllers/(.*)\.rb$}) { |m| "test/functional/#{m[1]}_test.rb" }
27
+ # watch(%r{^app/helpers/(.*)\.rb$}) { |m| "test/helpers/#{m[1]}_test.rb" }
28
+ # watch(%r{^app/models/(.*)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" }
29
+ end
File without changes
data/Manifest.txt ADDED
@@ -0,0 +1,82 @@
1
+ .autotest
2
+ .buildpath
3
+ .minitest.rb
4
+ .project
5
+ .rspec
6
+ .ruby-version
7
+ .settings/org.eclipse.ltk.core.refactoring.prefs
8
+ CHANGELOG.rdoc
9
+ Gemfile
10
+ Gemfile.lock
11
+ Guardfile
12
+ LICENSE.txt
13
+ LICENSE.rdoc
14
+ Manifest.txt
15
+ README.rdoc
16
+ Rakefile
17
+ equationoftime.gemspec
18
+ examples/Equation_of_Time.jpg
19
+ examples/analemma_data_generator.rb
20
+ examples/check_date_type.rb
21
+ examples/compare_geoc_long_ra.rb
22
+ examples/data_table_for_astro_dog.rb
23
+ examples/earth_rotation.rb
24
+ examples/eot_methods_list.rb
25
+ examples/eot_plot.r
26
+ examples/eot_suntimes.rb
27
+ examples/equation_of_time.py
28
+ examples/figure_1.jpg
29
+ examples/file_converter.rb
30
+ examples/from_readme.rb
31
+ examples/from_wiki.rb
32
+ examples/geo_locator.rb
33
+ examples/getjd.rb
34
+ examples/gmst_gast_non_sofa.rb
35
+ examples/input_suntimes.rb
36
+ examples/julian_day_formula.rb
37
+ examples/julian_day_formula.txt
38
+ examples/my_time_conversion.rb
39
+ examples/nutation_series.txt
40
+ examples/nutation_table5_3a.txt
41
+ examples/ptime.rb
42
+ examples/suntimes.rb
43
+ examples/suntimes_test.rb
44
+ examples/t_sofa.rb
45
+ examples/test_celes.rb
46
+ examples/test_ceot.rb
47
+ examples/test_poly_eval.rb
48
+ examples/time_scales.rb
49
+ examples/times_year.rb
50
+ examples/usage_example.rb
51
+ examples/use_angles.rb
52
+ ext/eot
53
+ ext/eot/ceot.c
54
+ ext/eot/ceot.h
55
+ ext/eot/eot.c
56
+ ext/eot/extconf.rb
57
+ lib/eot.rb
58
+ lib/eot/angles.rb
59
+ lib/eot/constants.rb
60
+ lib/eot/displays.rb
61
+ lib/eot/eot.so
62
+ lib/eot/geo_lat_lng_smt.rb
63
+ lib/eot/init.rb
64
+ lib/eot/nutation.rb
65
+ lib/eot/times.rb
66
+ lib/eot/utilities.rb
67
+ lib/eot/version.rb
68
+ run_tests_eclipse.rb
69
+ test/aliased_angles_spec.rb
70
+ test/aliased_displays_spec.rb
71
+ test/aliased_utilities_spec.rb
72
+ test/angles_spec.rb
73
+ test/constants_spec.rb
74
+ test/displays_spec.rb
75
+ test/geo_spec.rb
76
+ test/init_spec.rb
77
+ test/nutation_spec.rb
78
+ test/spec_config.rb
79
+ test/times_spec.rb
80
+ test/utilities_spec.rb
81
+ Rakefile
82
+
data/README.rdoc ADDED
@@ -0,0 +1,66 @@
1
+ = equationoftime
2
+
3
+ home :: http://equationoftime.herokuapp.com/
4
+ code :: https://github.com/DouglasAllen/equationoftime
5
+ rdoc :: http://rubydoc.info/gems/equationoftime/4.1.2/frames
6
+ bugs :: https://github.com/DouglasAllen/equationoftime/issues
7
+
8
+
9
+ == DESCRIPTION:
10
+
11
+ Calculate Sunrise and Sunset. Now uses native C wrapper.
12
+ Lots of examples to play with for learning about Eot.
13
+
14
+ == FEATURES/PROBLEMS:
15
+
16
+ * Use GeoLatLng class to set coordinates or set them manually.
17
+
18
+ == SYNOPSIS:
19
+
20
+ $ irb --simple-prompt
21
+
22
+ require 'eot'
23
+ eot = EqoT.new()
24
+ eot.string_eot()
25
+
26
+ == REQUIREMENTS:
27
+
28
+ * bundle install
29
+
30
+ == INSTALL:
31
+
32
+ * rake install
33
+
34
+ == DEVELOPERS:
35
+
36
+ After checking out the source, run:
37
+
38
+ $ rake newb
39
+
40
+ This task will install any missing dependencies, run the tests/specs,
41
+ and generate the RDoc.
42
+
43
+ == LICENSE:
44
+
45
+ (The MIT License)
46
+
47
+ Copyright (c) 2014
48
+
49
+ Permission is hereby granted, free of charge, to any person obtaining
50
+ a copy of this software and associated documentation files (the
51
+ 'Software'), to deal in the Software without restriction, including
52
+ without limitation the rights to use, copy, modify, merge, publish,
53
+ distribute, sublicense, and/or sell copies of the Software, and to
54
+ permit persons to whom the Software is furnished to do so, subject to
55
+ the following conditions:
56
+
57
+ The above copyright notice and this permission notice shall be
58
+ included in all copies or substantial portions of the Software.
59
+
60
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
61
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
62
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
63
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
64
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
65
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
66
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile CHANGED
@@ -1,4 +1,60 @@
1
1
  require "bundler/gem_tasks"
2
+ # require "bundler/install_tasks"
3
+ require 'hoe'
4
+ require 'rake/extensiontask'
5
+ require 'rake/testtask'
6
+ #require "rake/win32"
7
+ require 'rdoc/task'
8
+ require 'rspec/core/rake_task'
9
+ require 'yard'
10
+ # rake release VERSION=4.1.2
11
+ Hoe.spec 'equationoftime' do
12
+ developer('Douglas Allen', 'kb9agt@gmail.com')
13
+ license('MIT')
14
+ self.version = '4.1.2'
15
+ self.readme_file = 'README.rdoc'
16
+ self.history_file = 'CHANGELOG.rdoc'
17
+ self.extra_rdoc_files = FileList['*.rdoc']
18
+ self.extra_dev_deps << ['rake-compiler', '~> 0.9', '>= 0.9.3']
19
+ self.spec_extras = { :extensions => ["ext/eot/extconf.rb"] }
20
+
21
+ Rake::ExtensionTask.new('eot', spec) do |ext|
22
+ ext.lib_dir = File.join('lib', 'eot')
23
+ end
24
+ end
25
+
26
+ Rake::Task[:test].prerequisites << :compile
27
+
28
+ task :default => [ :test ]
29
+
30
+ Rake::TestTask.new(:test) do |t|
31
+ t.libs << "test"
32
+ t.test_files = FileList['test/*_spec.rb']
33
+ t.verbose = true
34
+ t.options
35
+ end
36
+
37
+ RSpec::Core::RakeTask.new(:spec) do | t |
38
+ t.pattern = "./test/*_spec.rb"
39
+ t.rspec_opts = []
40
+ end
41
+
42
+ YARD::Rake::YardocTask.new(:yardoc) do |t|
43
+ t.files = ['lib/**/*.rb']
44
+ # puts t.methods
45
+ end
46
+
47
+ desc 'generate API documentation to rdocs/index.html'
48
+ Rake::RDocTask.new(:rdox) do |rd|
49
+
50
+ rd.rdoc_dir = 'rdocs'
51
+
52
+ rd.rdoc_files.include 'lib/**/*.rb', 'README.md', 'wiki.md'
53
+
54
+ rd.options << '--line-numbers'
55
+
56
+ end
57
+
2
58
  =begin
3
59
  require 'thor'
4
60
  require 'bundler'
@@ -36,35 +92,14 @@ module Bundler
36
92
  end
37
93
  end
38
94
  =end
39
- # require "bundler/install_tasks"
40
-
41
- require 'rspec/core/rake_task'
42
-
43
-
44
- task :default => [ :test ]
45
95
 
46
- RSpec::Core::RakeTask.new(:spec) do | t |
47
- t.pattern = "./tests/minitest/*_spec.rb"
48
- t.rspec_opts = []
49
- end
50
96
 
51
- require 'rake/extensiontask'
52
- spec = Gem::Specification.load('equationoftime.gemspec')
53
- Rake::ExtensionTask.new('ceot', spec)
97
+ #require 'rake/extensiontask'
98
+ #spec = Gem::Specification.load('equationoftime.gemspec')
99
+ #Rake::ExtensionTask.new('ceot', spec)
54
100
  #Rake::ExtensionTask.new "ceot" do |ext|
55
101
  #ext.lib_dir = "lib"
56
- #end
57
-
58
- require 'rake/testtask'
59
-
60
- Rake::TestTask.new(:test) do |t|
61
- t.libs << "test"
62
- t.test_files = FileList['tests/minitest/*_spec.rb']
63
- t.verbose = true
64
- t.options
65
- end
66
-
67
- require "rake/win32"
102
+ #end
68
103
 
69
104
  # Rake::TestTask.new(:mine) do |t|
70
105
 
@@ -102,23 +137,3 @@ require "rake/win32"
102
137
  # Rake::Win32.rake_system("rspec ./tests/spec/vars_spec.rb")
103
138
 
104
139
  # end
105
-
106
- require 'yard'
107
-
108
- YARD::Rake::YardocTask.new(:yardoc) do |t|
109
- t.files = ['lib/**/*.rb']
110
- # puts t.methods
111
- end
112
-
113
- require 'rdoc/task'
114
-
115
- desc 'generate API documentation to rdocs/index.html'
116
- Rake::RDocTask.new(:rdox) do |rd|
117
-
118
- rd.rdoc_dir = 'rdocs'
119
-
120
- rd.rdoc_files.include 'lib/**/*.rb', 'README.md', 'wiki.md'
121
-
122
- rd.options << '--line-numbers'
123
-
124
- end