noaa-weather 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/README.txt CHANGED
@@ -1,48 +1,30 @@
1
- = dixweather
1
+ h1. Noaa-weather
2
2
 
3
- * FIX (url)
4
-
5
- == DESCRIPTION:
6
-
7
- FIX (describe your package)
3
+ This gem provides a very simple interface to the NOAA soap service. It uses
4
+ geocoding to make things a little easier.
8
5
 
9
6
  == FEATURES/PROBLEMS:
10
7
 
11
- * FIX (list of features or problems)
12
-
13
- == SYNOPSIS:
14
-
15
- FIX (code sample of usage)
8
+ * Just does current conditions right now, but the xml supports more than that.
16
9
 
17
10
  == REQUIREMENTS:
18
11
 
19
- * FIX (list of requirements)
12
+ * geokit
13
+ * libxml
20
14
 
21
15
  == INSTALL:
22
16
 
23
- * FIX (sudo gem install, anything else)
17
+ * gem install noaa-weather
24
18
 
25
19
  == LICENSE:
26
20
 
27
- (The MIT License)
28
-
29
- Copyright (c) 2009 FIX
30
-
31
- Permission is hereby granted, free of charge, to any person obtaining
32
- a copy of this software and associated documentation files (the
33
- 'Software'), to deal in the Software without restriction, including
34
- without limitation the rights to use, copy, modify, merge, publish,
35
- distribute, sublicense, and/or sell copies of the Software, and to
36
- permit persons to whom the Software is furnished to do so, subject to
37
- the following conditions:
38
-
39
- The above copyright notice and this permission notice shall be
40
- included in all copies or substantial portions of the Software.
41
-
42
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
43
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
44
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
45
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
46
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
47
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
48
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+ This program is free software: you can redistribute it and/or modify
22
+ it under the terms of the GNU General Public License as published by
23
+ the Free Software Foundation, either version 3 of the License, or
24
+ (at your option) any later version.
25
+ This program is distributed in the hope that it will be useful,
26
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
27
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28
+ GNU General Public License for more details.
29
+ You should have received a copy of the GNU General Public License
30
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
data/Rakefile CHANGED
@@ -9,6 +9,8 @@ Hoe.new('noaa-weather', Noaaweather::VERSION) do |p|
9
9
  p.rubyforge_name = 'noaa-weather' # if different than lowercase project name
10
10
  p.developer('kognate', 'kognate@gmail.com')
11
11
  p.extra_deps << ['libxml-ruby']
12
+ p.extra_deps << 'andre-geokit'
13
+ p.extra_deps << 'geocoder'
12
14
  end
13
15
 
14
16
  Spec::Rake::SpecTask.new(:spec) do |t|
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems'
3
+ require 'noaa-weather'
4
+ require 'optparse'
5
+
6
+ options = {}
7
+ OptionParser.new do |opts|
8
+ opts.banner = "Usage: noaa-weather [options]"
9
+
10
+ opts.on(:REQUIRED,"-s", "--site", "provide a site, which is an address") do |s|
11
+ options[:site] = s
12
+ end
13
+
14
+ opts.on(:REQUIRED,"-lat","--lattitude","find weather by lat/lng (requires -lng)") do |lt|
15
+ options[:lat]=lt
16
+ end
17
+
18
+ opts.on(:REQUIRED,"-lng","--longititude","find wather by lat/lng (requires -lat)") do |lg|
19
+ options[:lng]=lg
20
+ end
21
+
22
+ end.parse!
23
+
24
+ w = if options[:site]
25
+ Noaaweather.new(options[:site],true)
26
+ else
27
+ _w = Noaaweather.new("Need To Have Site Name")
28
+ _w.lattitude = options[:lat]
29
+ _w.longitude = options[:lng]
30
+ _w
31
+ end
32
+ printf("Current Weather for %s is %s at %i\n",w.location,w.current_conditions,w.current_temp)
@@ -1,3 +1,16 @@
1
+ # NOAA-weather interface to NOAA's soap service.
2
+ # Copyright (C) 2009 Joshua B. Smith
3
+ #
4
+ # This program is free software: you can redistribute it and/or modify
5
+ # it under the terms of the GNU General Public License as published by
6
+ # the Free Software Foundation, either version 3 of the License, or
7
+ # (at your option) any later version.
8
+ # This program is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU General Public License for more details.
12
+ # You should have received a copy of the GNU General Public License
13
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
1
14
  require 'soap/wsdlDriver'
2
15
  require 'logger'
3
16
  require 'libxml'
@@ -42,7 +55,7 @@ class CachedGeocode
42
55
  end
43
56
 
44
57
  class Noaaweather < CachedGeocode
45
- VERSION = '0.1.1'
58
+ VERSION = '0.1.3'
46
59
  attr_accessor :lattitude,:longitude, :start_time
47
60
 
48
61
  def initialize(site,as_address=false)
@@ -118,11 +131,5 @@ class Noaaweather < CachedGeocode
118
131
  f.write(dat.to_s)
119
132
  f.close()
120
133
  end
121
-
122
- def cache_geo_to_file(site,dat)
123
- end
124
-
125
- def load_geo_from_file(site)
126
- end
127
134
 
128
135
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noaa-weather
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - kognate
@@ -30,7 +30,7 @@ cert_chain:
30
30
  M36Zgg==
31
31
  -----END CERTIFICATE-----
32
32
 
33
- date: 2009-03-21 00:00:00 -04:00
33
+ date: 2009-03-22 00:00:00 -04:00
34
34
  default_executable:
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
@@ -43,6 +43,26 @@ dependencies:
43
43
  - !ruby/object:Gem::Version
44
44
  version: "0"
45
45
  version:
46
+ - !ruby/object:Gem::Dependency
47
+ name: andre-geokit
48
+ type: :runtime
49
+ version_requirement:
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: "0"
55
+ version:
56
+ - !ruby/object:Gem::Dependency
57
+ name: geocoder
58
+ type: :runtime
59
+ version_requirement:
60
+ version_requirements: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: "0"
65
+ version:
46
66
  - !ruby/object:Gem::Dependency
47
67
  name: hoe
48
68
  type: :development
@@ -53,7 +73,7 @@ dependencies:
53
73
  - !ruby/object:Gem::Version
54
74
  version: 1.8.3
55
75
  version:
56
- description: FIX (describe your package)
76
+ description: ""
57
77
  email:
58
78
  - kognate@gmail.com
59
79
  executables:
@@ -74,7 +94,7 @@ files:
74
94
  - test/test_noaaweather.rb
75
95
  - spec/noaa-weather.spec
76
96
  has_rdoc: true
77
- homepage: FIX (url)
97
+ homepage: Just does current conditions right now, but the xml supports more than that.
78
98
  post_install_message:
79
99
  rdoc_options:
80
100
  - --main
@@ -99,6 +119,6 @@ rubyforge_project: noaa-weather
99
119
  rubygems_version: 1.3.1
100
120
  signing_key:
101
121
  specification_version: 2
102
- summary: FIX (describe your package)
122
+ summary: ""
103
123
  test_files:
104
124
  - test/test_noaaweather.rb
metadata.gz.sig CHANGED
Binary file