welements 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +4 -0
- data/.rvmrc +60 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +27 -0
- data/LICENSE.txt +22 -0
- data/Manifest +16 -0
- data/README.md +4 -27
- data/Rakefile +7 -0
- data/lib/welements/version.rb +1 -1
- data/test/test_integration.rb +3 -3
- data/welements.gemspec +29 -0
- metadata +94 -45
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8d5669f327ad6047fb00dc82e972312fade6b708
|
4
|
+
data.tar.gz: 8ec8ac7c5f550e53bf36be9279ab3085a194f75c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3c4e3dc5b80fd5bf9cb16bf3df2d9acf7e0d0740d80936112004248f99b5bf4522735ebf7dbee553c7551c282d6ca20261530ec611b00f12b5c4ddf97d5a6bb9
|
7
|
+
data.tar.gz: 58013fc8e816d661637b3c17a2066dab18b2bfede1c6512d47215914d12ca9df3635836c3678875a9684d214ee0f3dfd2ef55f95fba3902ed5f05fbe371f93b0
|
data/.gitignore
ADDED
data/.rvmrc
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
# This is an RVM Project .rvmrc file, used to automatically load the ruby
|
4
|
+
# development environment upon cd'ing into the directory
|
5
|
+
|
6
|
+
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
|
7
|
+
# Only full ruby name is supported here, for short names use:
|
8
|
+
# echo "rvm use 2.0.0" > .rvmrc
|
9
|
+
environment_id="ruby-2.0.0-p195@welements"
|
10
|
+
|
11
|
+
# Uncomment the following lines if you want to verify rvm version per project
|
12
|
+
# rvmrc_rvm_version="1.20.12 (stable)" # 1.10.1 seams as a safe start
|
13
|
+
# eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
|
14
|
+
# echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
|
15
|
+
# return 1
|
16
|
+
# }
|
17
|
+
|
18
|
+
# First we attempt to load the desired environment directly from the environment
|
19
|
+
# file. This is very fast and efficient compared to running through the entire
|
20
|
+
# CLI and selector. If you want feedback on which environment was used then
|
21
|
+
# insert the word 'use' after --create as this triggers verbose mode.
|
22
|
+
if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
|
23
|
+
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
|
24
|
+
then
|
25
|
+
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
|
26
|
+
for __hook in "${rvm_path:-$HOME/.rvm}/hooks/after_use"*
|
27
|
+
do
|
28
|
+
if [[ -f "${__hook}" && -x "${__hook}" && -s "${__hook}" ]]
|
29
|
+
then \. "${__hook}" || true
|
30
|
+
fi
|
31
|
+
done
|
32
|
+
unset __hook
|
33
|
+
if (( ${rvm_use_flag:=1} >= 2 )) # display only when forced
|
34
|
+
then
|
35
|
+
if [[ $- == *i* ]] # check for interactive shells
|
36
|
+
then printf "%b" "Using: \E[32m$GEM_HOME\E[0m" # show the user the ruby and gemset they are using in green
|
37
|
+
else printf "%b" "Using: $GEM_HOME" # don't use colors in non-interactive shells
|
38
|
+
fi
|
39
|
+
fi
|
40
|
+
else
|
41
|
+
# If the environment file has not yet been created, use the RVM CLI to select.
|
42
|
+
rvm --create "$environment_id" || {
|
43
|
+
echo "Failed to create RVM environment '${environment_id}'."
|
44
|
+
return 1
|
45
|
+
}
|
46
|
+
fi
|
47
|
+
|
48
|
+
# If you use bundler, this might be useful to you:
|
49
|
+
# if [[ -s Gemfile ]] && {
|
50
|
+
# ! builtin command -v bundle >/dev/null ||
|
51
|
+
# builtin command -v bundle | GREP_OPTIONS= \grep $rvm_path/bin/bundle >/dev/null
|
52
|
+
# }
|
53
|
+
# then
|
54
|
+
# printf "%b" "The rubygem 'bundler' is not installed. Installing it now.\n"
|
55
|
+
# gem install bundler
|
56
|
+
# fi
|
57
|
+
# if [[ -s Gemfile ]] && builtin command -v bundle >/dev/null
|
58
|
+
# then
|
59
|
+
# bundle install | GREP_OPTIONS= \grep -vE '^Using|Your bundle is complete'
|
60
|
+
# fi
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
welements (0.1.3)
|
5
|
+
geokit (>= 1.6.5)
|
6
|
+
libxml-ruby (>= 2.2.2)
|
7
|
+
nokogiri (~> 1.5.0)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
geokit (1.6.5)
|
13
|
+
multi_json
|
14
|
+
libxml-ruby (2.7.0)
|
15
|
+
multi_json (1.7.9)
|
16
|
+
nokogiri (1.5.10)
|
17
|
+
rake (10.0.4)
|
18
|
+
test-unit (2.0.0.0)
|
19
|
+
|
20
|
+
PLATFORMS
|
21
|
+
ruby
|
22
|
+
|
23
|
+
DEPENDENCIES
|
24
|
+
bundler (~> 1.3)
|
25
|
+
rake
|
26
|
+
test-unit
|
27
|
+
welements!
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Mat Malone
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Manifest
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
CHANGELOG
|
2
|
+
README.md
|
3
|
+
Rakefile
|
4
|
+
lib/welements.rb
|
5
|
+
lib/welements/http_service.rb
|
6
|
+
lib/welements/version.rb
|
7
|
+
lib/welements/welements.rb
|
8
|
+
test/data/4-day.xml
|
9
|
+
test/data/KVAY.xml
|
10
|
+
test/data/welements.xml
|
11
|
+
test/test_helper.rb
|
12
|
+
test/test_http_service.rb
|
13
|
+
test/test_integration.rb
|
14
|
+
test/test_welements.rb
|
15
|
+
welements.gemspec
|
16
|
+
Manifest
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# welements
|
2
2
|
|
3
|
-
http://github.com/
|
3
|
+
http://github.com/matmalone/welements
|
4
4
|
|
5
5
|
## Description
|
6
6
|
|
@@ -17,10 +17,11 @@ broad array of different forecast elements that can be queried.
|
|
17
17
|
|
18
18
|
- libxml-ruby >= 0.9.7
|
19
19
|
- geokit >= 1.5.0
|
20
|
+
- echoe ~> 4.6
|
20
21
|
|
21
22
|
## Installation
|
22
23
|
|
23
|
-
|
24
|
+
gem install welements
|
24
25
|
|
25
26
|
## Usage
|
26
27
|
|
@@ -33,30 +34,6 @@ broad array of different forecast elements that can be queried.
|
|
33
34
|
Mat Malone (m2@innerlogic.org)
|
34
35
|
|
35
36
|
## Fork
|
37
|
+
|
36
38
|
welements is originally based on Mat Brown's outoftime-noaa project:
|
37
39
|
http://github.com/outoftime/noaa. outoftime-noaa Copyright 2008 Mat Brown.
|
38
|
-
|
39
|
-
## License
|
40
|
-
|
41
|
-
(The MIT License)
|
42
|
-
|
43
|
-
Copyright (c) 2012 Mat Malone
|
44
|
-
|
45
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
46
|
-
a copy of this software and associated documentation files (the
|
47
|
-
'Software'), to deal in the Software without restriction, including
|
48
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
49
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
50
|
-
permit persons to whom the Software is furnished to do so, subject to
|
51
|
-
the following conditions:
|
52
|
-
|
53
|
-
The above copyright notice and this permission notice shall be
|
54
|
-
included in all copies or substantial portions of the Software.
|
55
|
-
|
56
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
57
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
58
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
59
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
60
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
61
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
62
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
data/lib/welements/version.rb
CHANGED
data/test/test_integration.rb
CHANGED
@@ -2,9 +2,9 @@ require File.join(File.dirname(__FILE__), 'test_helper')
|
|
2
2
|
class TestIntegration < Welements::TestCase
|
3
3
|
def test_integration
|
4
4
|
forecast = Welements.welements(34.5, -120)
|
5
|
-
|
5
|
+
assert_operator(forecast.probability_of_precipitation.length, :>, 3, "make
|
6
6
|
sure we get some number of days of results")
|
7
|
-
|
8
|
-
Barbara should be
|
7
|
+
assert_operator(forecast.temperature_hourly[0][:value], :>, 1, "temperature in Santa
|
8
|
+
Barbara should be greater than 1 C")
|
9
9
|
end
|
10
10
|
end
|
data/welements.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'welements/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "welements"
|
8
|
+
spec.version = Welements::VERSION
|
9
|
+
spec.authors = ["Mat Malone"]
|
10
|
+
spec.email = ["m2@innerlogic.org"]
|
11
|
+
spec.description = %q{Ruby API for National Oceanic and Atmospheric Administration weather data}
|
12
|
+
spec.summary = %q{Ruby API for the National Weather Service's National Digital Forecast Database (NDFD)}
|
13
|
+
spec.homepage = "http://github.com/matmalone/welements"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = `git ls-files -- {test,spec,features}/test_*`.split("\n")
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "test-unit"
|
24
|
+
|
25
|
+
spec.add_runtime_dependency('nokogiri', '~> 1.5.0')
|
26
|
+
spec.add_runtime_dependency('geokit', '>= 1.6.5')
|
27
|
+
spec.add_runtime_dependency('libxml-ruby', '>= 2.2.2')
|
28
|
+
|
29
|
+
end
|
metadata
CHANGED
@@ -1,102 +1,151 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: welements
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Mat Malone
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-09-02 00:00:00.000000000 Z
|
13
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.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: test-unit
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
14
55
|
- !ruby/object:Gem::Dependency
|
15
56
|
name: nokogiri
|
16
|
-
requirement:
|
17
|
-
none: false
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
18
58
|
requirements:
|
19
|
-
- -
|
59
|
+
- - ~>
|
20
60
|
- !ruby/object:Gem::Version
|
21
61
|
version: 1.5.0
|
22
62
|
type: :runtime
|
23
63
|
prerelease: false
|
24
|
-
version_requirements:
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.5.0
|
25
69
|
- !ruby/object:Gem::Dependency
|
26
70
|
name: geokit
|
27
|
-
requirement:
|
28
|
-
none: false
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
29
72
|
requirements:
|
30
|
-
- -
|
73
|
+
- - '>='
|
31
74
|
- !ruby/object:Gem::Version
|
32
75
|
version: 1.6.5
|
33
76
|
type: :runtime
|
34
77
|
prerelease: false
|
35
|
-
version_requirements:
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.6.5
|
36
83
|
- !ruby/object:Gem::Dependency
|
37
84
|
name: libxml-ruby
|
38
|
-
requirement:
|
39
|
-
none: false
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
40
86
|
requirements:
|
41
|
-
- -
|
87
|
+
- - '>='
|
42
88
|
- !ruby/object:Gem::Version
|
43
89
|
version: 2.2.2
|
44
90
|
type: :runtime
|
45
91
|
prerelease: false
|
46
|
-
version_requirements:
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 2.2.2
|
47
97
|
description: Ruby API for National Oceanic and Atmospheric Administration weather
|
48
98
|
data
|
49
|
-
email:
|
99
|
+
email:
|
100
|
+
- m2@innerlogic.org
|
50
101
|
executables: []
|
51
102
|
extensions: []
|
52
103
|
extra_rdoc_files: []
|
53
104
|
files:
|
105
|
+
- .gitignore
|
106
|
+
- .rvmrc
|
107
|
+
- CHANGELOG
|
108
|
+
- Gemfile
|
109
|
+
- Gemfile.lock
|
110
|
+
- LICENSE.txt
|
111
|
+
- Manifest
|
112
|
+
- README.md
|
113
|
+
- Rakefile
|
54
114
|
- lib/welements.rb
|
55
115
|
- lib/welements/http_service.rb
|
56
|
-
- lib/welements/welements.rb
|
57
116
|
- lib/welements/version.rb
|
58
|
-
-
|
59
|
-
- test/test_http_service.rb
|
60
|
-
- test/test_helper.rb
|
61
|
-
- test/data/welements.xml
|
62
|
-
- test/data/KVAY.xml
|
117
|
+
- lib/welements/welements.rb
|
63
118
|
- test/data/4-day.xml
|
119
|
+
- test/data/KVAY.xml
|
120
|
+
- test/data/welements.xml
|
121
|
+
- test/test_helper.rb
|
122
|
+
- test/test_http_service.rb
|
64
123
|
- test/test_integration.rb
|
65
|
-
-
|
66
|
-
-
|
124
|
+
- test/test_welements.rb
|
125
|
+
- welements.gemspec
|
67
126
|
homepage: http://github.com/matmalone/welements
|
68
|
-
licenses:
|
127
|
+
licenses:
|
128
|
+
- MIT
|
129
|
+
metadata: {}
|
69
130
|
post_install_message:
|
70
|
-
rdoc_options:
|
71
|
-
- --line-numbers
|
72
|
-
- --inline-source
|
73
|
-
- --title
|
74
|
-
- Welements
|
75
|
-
- --main
|
76
|
-
- README
|
131
|
+
rdoc_options: []
|
77
132
|
require_paths:
|
78
133
|
- lib
|
79
134
|
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
-
none: false
|
81
135
|
requirements:
|
82
|
-
- -
|
136
|
+
- - '>='
|
83
137
|
- !ruby/object:Gem::Version
|
84
138
|
version: '0'
|
85
139
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
-
none: false
|
87
140
|
requirements:
|
88
|
-
- -
|
141
|
+
- - '>='
|
89
142
|
- !ruby/object:Gem::Version
|
90
|
-
version: '
|
143
|
+
version: '0'
|
91
144
|
requirements: []
|
92
|
-
rubyforge_project:
|
93
|
-
rubygems_version:
|
145
|
+
rubyforge_project:
|
146
|
+
rubygems_version: 2.0.3
|
94
147
|
signing_key:
|
95
|
-
specification_version:
|
148
|
+
specification_version: 4
|
96
149
|
summary: Ruby API for the National Weather Service's National Digital Forecast Database
|
97
150
|
(NDFD)
|
98
|
-
test_files:
|
99
|
-
- test/test_helper.rb
|
100
|
-
- test/test_http_service.rb
|
101
|
-
- test/test_welements.rb
|
102
|
-
- test/test_integration.rb
|
151
|
+
test_files: []
|