barometer 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,93 +0,0 @@
1
- /*
2
- Inspired By: Blake Mizerany, www.sinatrarb.com
3
- */
4
- body
5
- { color: #000;
6
- background: #fff;
7
- font-size: 85%;
8
- font-family: Helvetica, sans-serif;
9
- line-height: 130%;
10
- margin: 0.5cm; }
11
-
12
- a
13
- { color: #000;
14
- text-decoration: underline; }
15
-
16
- a img
17
- { border: none; }
18
-
19
- /* HEADER */
20
- #head {
21
- text-align: center;
22
- }
23
- #head img {
24
- vertical-align:middle;
25
- margin:-10px 0 0 -82px;
26
- padding:0 15px 0 0;
27
- border:0;
28
- }
29
- #head h1 {
30
- color: #172533;
31
- font-family: Georgia, "Times New Roman", 'bitstream vera serif', serif;
32
- font-size: 500%;
33
- font-weight: normal;
34
- letter-spacing: -0.1em;
35
- line-height: 1;
36
- margin: 0;
37
- padding: 20px 0 16px 0;
38
- }
39
- #head h1 a, #head h1 a:link, #head h1 a:visited, #head h1 a:hover {
40
- color: #172533;
41
- text-decoration: none;
42
- }
43
- #head ul {
44
- font-size:1.1em;
45
- font-family: 'Lucida Grande', 'lucida sans unicade', Verdana, sans-serif;
46
- font-weight: normal;
47
- text-transform: uppercase;
48
- text-align: center;
49
- margin: 0;
50
- padding: 0 40px 10px 40px;
51
- }
52
- #head ul li {
53
- display: inline;
54
- list-style-type: none;
55
- padding: 0 1.5em 0 0;
56
- }
57
- #head ul a, #head ul a:link, #head ul a:visited {
58
- color: #1d2e40;
59
- text-decoration: none;
60
- }
61
- #head ul a:hover {
62
- color: #0e1c29;
63
- text-decoration:underline
64
- }
65
-
66
-
67
-
68
- h2 {
69
- font-size: 1.5em;
70
- letter-spacing: -0.05em;
71
- padding: 1.15em 0 0 0;
72
- margin: 1.25em 0 0.25em 0;
73
- border-top: 1mm solid #999;
74
- }
75
-
76
- h3 {
77
- font-size: 1.1em;
78
- font-weight:bold;
79
- margin: 1.8em 0 0.25em 0;
80
- letter-spacing: -0.05em;
81
- }
82
-
83
- h3 a {
84
- text-decoration:underline;
85
- }
86
-
87
-
88
-
89
- pre {
90
- border: 1pt solid #ccc;
91
- padding: 0.5em;
92
- white-space: pre-wrap; white-space: -moz-pre-wrap !important;
93
- }
@@ -1,63 +0,0 @@
1
- /*
2
- Inspired By: Blake Mizerany, www.sinatrarb.com
3
- */
4
- .highlight { background: #ffffff; }
5
- .highlight .c { color: #999988; font-style: italic } /* Comment */
6
- .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
7
- .highlight .k { font-weight: bold; } /* Keyword */
8
- .highlight .o { font-weight: bold } /* Operator */
9
- .highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
10
- .highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
11
- .highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
12
- .highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
13
- .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
14
- .highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
15
- .highlight .ge { font-style: italic } /* Generic.Emph */
16
- .highlight .gr { color: #aa0000 } /* Generic.Error */
17
- .highlight .gh { color: #999999 } /* Generic.Heading */
18
- .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
19
- .highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
20
- .highlight .go { color: #888888 } /* Generic.Output */
21
- .highlight .gp { color: #555555 } /* Generic.Prompt */
22
- .highlight .gs { font-weight: bold } /* Generic.Strong */
23
- .highlight .gu { color: #aaaaaa } /* Generic.Subheading */
24
- .highlight .gt { color: #aa0000 } /* Generic.Traceback */
25
- .highlight .kc { font-weight: bold } /* Keyword.Constant */
26
- .highlight .kd { font-weight: bold } /* Keyword.Declaration */
27
- .highlight .kp { font-weight: bold } /* Keyword.Pseudo */
28
- .highlight .kr { font-weight: bold } /* Keyword.Reserved */
29
- .highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
30
- .highlight .m { color: #009999 } /* Literal.Number */
31
- .highlight .s { color: #444 } /* Literal.String */
32
- .highlight .na { color: #008080 } /* Name.Attribute */
33
- .highlight .nb { color: #0086B3 } /* Name.Builtin */
34
- .highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
35
- .highlight .no { color: #008080 } /* Name.Constant */
36
- .highlight .ni { color: #800080 } /* Name.Entity */
37
- .highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
38
- .highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
39
- .highlight .nn { color: #555555 } /* Name.Namespace */
40
- .highlight .nt { color: #000080 } /* Name.Tag */
41
- .highlight .nv { color: #008080 } /* Name.Variable */
42
- .highlight .ow { font-weight: bold } /* Operator.Word */
43
- .highlight .w { color: #bbbbbb } /* Text.Whitespace */
44
- .highlight .mf { color: #009999 } /* Literal.Number.Float */
45
- .highlight .mh { color: #009999 } /* Literal.Number.Hex */
46
- .highlight .mi { color: #009999 } /* Literal.Number.Integer */
47
- .highlight .mo { color: #009999 } /* Literal.Number.Oct */
48
- .highlight .sb { color: #444 } /* Literal.String.Backtick */
49
- .highlight .sc { color: #444 } /* Literal.String.Char */
50
- .highlight .sd { color: #444 } /* Literal.String.Doc */
51
- .highlight .s2 { color: #444 } /* Literal.String.Double */
52
- .highlight .se { color: #444 } /* Literal.String.Escape */
53
- .highlight .sh { color: #444 } /* Literal.String.Heredoc */
54
- .highlight .si { color: #444 } /* Literal.String.Interpol */
55
- .highlight .sx { color: #444 } /* Literal.String.Other */
56
- .highlight .sr { color: #009926 } /* Literal.String.Regex */
57
- .highlight .s1 { color: #444 } /* Literal.String.Single */
58
- .highlight .ss { color: #990073 } /* Literal.String.Symbol */
59
- .highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
60
- .highlight .vc { color: #008080 } /* Name.Variable.Class */
61
- .highlight .vg { color: #008080 } /* Name.Variable.Global */
62
- .highlight .vi { color: #008080 } /* Name.Variable.Instance */
63
- .highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
Binary file
@@ -1,10 +0,0 @@
1
- <h1 id='about'>About</h1>
2
-
3
- <p>Barometer was designed and developed by <strong>Mark G</strong> (attack).</p>
4
-
5
- <p>Special thanks to the following individuals:</p>
6
-
7
- <ul>
8
- <li><a href='http://sinatra.github.com/'>Blake Mizerany</a> (bmizerany) for Sinatra and
9
- the inspiration for the layout of the demo app.</li>
10
- </ul>
@@ -1,32 +0,0 @@
1
- <h1 id='contribute'>Contribute</h1>
2
-
3
- <p>Help build Barometer.</p>
4
-
5
- <h2>Find a bug?</h2>
6
-
7
- <p>Add it to GitHub by <a href='http://github.com/attack/barometer/issues'>creating a new issue</a>. Be sure to include all relevant information, like the versions of Barometer and Ruby you&#8217;re using. A <a href='http://gist.github.com/'>gist</a> of the code that caused the issue as well as any error messages are also very helpful.</p>
8
-
9
- <h2>Have a patch?</h2>
10
-
11
- <p>Bugs and feature requests that include patches are much more likely to get attention. Here are some guidelines that will help ensure your patch can be applied as quickly as possible:</p>
12
-
13
- <ol>
14
- <li>
15
- <p><strong>Use <a href='http://git-scm.com'>Git</a> and <a href='http://github.com'>GitHub</a>:</strong> The easiest way to get setup is to fork the <a href='http://github.com/attack/barometer/'>attack/barometer repo</a>.
16
- </p>
17
-
18
- </li>
19
-
20
- <li>
21
- <p><strong>Write spec tests:</strong> If you add or modify functionality, it must include spec tests.</p>
22
- </li>
23
-
24
- <li>
25
- <p><strong>Update the <code>README</code>:</strong> If the patch adds or modifies a major feature, modify the <code>README.rdoc</code> file to reflect that.</p>
26
-
27
- </li>
28
-
29
- <li>
30
- <p><strong>Push it:</strong> Once you&#8217;re ready, push your changes to a topic branch and add a note to the ticket with the URL to your branch. Or, say something like, &#8220;you can find the patch on johndoe/foobranch&#8221;.</p>
31
- </li>
32
- </ol>
@@ -1,35 +0,0 @@
1
- <h4>for: <%= forecast.date %></h4>
2
- <p>
3
- <ul>
4
- <%= data("Date", forecast.date) %>
5
- <%= data("Icon", forecast.icon) %>
6
- <%= data("Condition", forecast.condition) %>
7
- <%= data("High", forecast.high) %>
8
- <%= data("Low", forecast.low) %>
9
- <%= data("POP", forecast.pop) %>
10
- <%= data("Humidity", forecast.humidity) %>
11
- <% if forecast.wind %>
12
- <%= data("Wind Speed", forecast.wind) %>
13
- <%= data("Wind Direction", forecast.wind.direction) %>
14
- <%= data("Wind Degrees", forecast.wind.degrees) %>
15
- <% end %>
16
- <% if forecast.sun %>
17
- <%= data("Sun Rise", forecast.sun.rise) %>
18
- <%= data("Sun Set", forecast.sun.set) %>
19
- <% end %>
20
- </ul>
21
- <% if forecast.night %>
22
- <ul>- Night -
23
- <%= data("Date", forecast.night.date) %>
24
- <%= data("Date", forecast.night.icon) %>
25
- <%= data("Date", forecast.night.condition) %>
26
- <%= data("Date", forecast.night.pop) %>
27
- <%= data("Date", forecast.night.humidity) %>
28
- <% if forecast.night.wind %>
29
- <%= data("Wind Speed", forecast.night.wind) %>
30
- <%= data("Wind Direction", forecast.night.wind.direction) %>
31
- <%= data("Wind Degrees", forecast.night.wind.degrees) %>
32
- <% end %>
33
- </ul>
34
- <% end %>
35
- </p>
@@ -1,88 +0,0 @@
1
- <h2 id='demo'>Measure the weather for:</h2>
2
-
3
- <br/>
4
- <form action="/" class="" id="" method="post">
5
- <div class="text-input">
6
- <input id="query_q" name="query[q]" size="25" type="text" />
7
- </div>
8
- <div class="submit-input">
9
- <input src="/images/go.png" type="image" value="go &rarr;" />
10
- </div>
11
- <br/>
12
- <div class="options-input">
13
- Metric? :
14
- <input id="query_metric" name="query[metric]" type="checkbox" value="1" checked="checked" />
15
- <br/>
16
- Source :
17
- <ul>
18
- <li><input type="checkbox" name="query[source]" value="wunderground" checked="checked" /> Wunderground</li>
19
- <li><input type="checkbox" name="query[source]" value="yahoo" /> Yahoo</li>
20
- <li><input type="checkbox" name="query[source]" value="google" /> Google</li>
21
- <li><input type="checkbox" name="query[source]" value="weather_dot_com" /> Weather.com</li>
22
- <li><input type="checkbox" name="query[source]" value="weather_bug" /> Weather Bug</li>
23
- </ul>
24
- Force Geocode? :
25
- <input id="query_geocode" name="query[geocode]" type="checkbox" value="1" checked="checked" />
26
- </div>
27
- </form>
28
-
29
- <% if params[:query] && !params[:query][:q].empty? %>
30
- <hr/>
31
- <h2>query: "<%= params[:query][:q] %>"</h2>
32
- <% end %>
33
-
34
- <% if @weather %>
35
-
36
- <h2>Averages</h2>
37
- <p>
38
- <ul>
39
- <%= data("Humidity", @weather.humidity.to_i) %>
40
- <%= data("Temperature", @weather.temperature) %>
41
- <%= data("Wind", @weather.wind) %>
42
- <%= data("Pressure", @weather.pressure) %>
43
- <%= data("Dew Point", @weather.dew_point) %>
44
- <%= data("Heat Index", @weather.heat_index) %>
45
- <%= data("Wind Chill", @weather.wind_chill) %>
46
- <%= data("Visibility", @weather.visibility) %>
47
- </ul>
48
- </p>
49
-
50
- <h2>Summary</h2>
51
- <p>
52
- <ul>
53
- <%= data("Day?", @weather.day?) %>
54
- <%= data("Sunny?", @weather.sunny?) %>
55
- <%= data("Windy?", @weather.windy?) %>
56
- <%= data("Wet?", @weather.wet?) %>
57
- </ul>
58
- </p>
59
-
60
- <% if @barometer.query %>
61
- <h3>Query</h3>
62
- <p>
63
- <ul>
64
- <%= data("Query", @barometer.query.q) %>
65
- <%= data("Format", @barometer.query.format) %>
66
- <%= data("Country Code", @barometer.query.country_code) %>
67
- </ul>
68
- <% if @barometer.query.geo %>
69
- <ul> - Geo -
70
- <%= data("Query", @barometer.query.geo.query) %>
71
- <%= data("Address", @barometer.query.geo.address) %>
72
- <%= data("Locality", @barometer.query.geo.locality) %>
73
- <%= data("Region", @barometer.query.geo.region) %>
74
- <%= data("Country", @barometer.query.geo.country) %>
75
- <%= data("Country Code", @barometer.query.geo.country_code) %>
76
- <%= data("Latitude", @barometer.query.geo.latitude) %>
77
- <%= data("Longitude", @barometer.query.geo.longitude) %>
78
- </ul>
79
- <% end %>
80
- </p>
81
- <% end %>
82
-
83
- <% @weather.measurements.each do |measurement| %>
84
- <hr/>
85
- <%= erb(:measurement, :locals => { :measurement => measurement }, :layout => false) %>
86
- <% end %>
87
-
88
- <% end %>
@@ -1,38 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
- <title>Barometer</title>
6
- <link rel='stylesheet' href='/css/master.css' type='text/css' media="screen, projection">
7
- <link rel='stylesheet' href='/css/syntax.css' type='text/css' media="screen, projection">
8
- <link rel='stylesheet' href='/css/print.css' type='text/css' media="print">
9
- <link rel='alternate' href='http://attack.github.com/feed.xml' type='application/atom+xml' title='Barometer Feed'>
10
-
11
- </head>
12
- <body id=''>
13
-
14
- <div id='wrap'>
15
-
16
- <div id='head'>
17
- <h1><a href='/'>Barometer</a></h1>
18
- <ul>
19
- <li><a href='/'>Demo</a></li>
20
- <li><a href='/readme.html'>README</a></li>
21
- <li><a href='/contributing.html'>Contribute</a></li>
22
- <li><a class="out" href='http://github.com/attack/barometer'>Code</a></li>
23
- <li><a href='/about.html'>About</a></li>
24
- </ul>
25
- </div>
26
-
27
- <div id='content'>
28
- <%= yield %>
29
- </div>
30
-
31
- <div id='foot'>
32
- </div>
33
-
34
- </div>
35
-
36
- <a href="http://github.com/attack/barometer"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub" /></a>
37
- </body>
38
- </html>
@@ -1,102 +0,0 @@
1
- <h2><%= measurement.source.to_s.capitalize %></h2>
2
- <p>
3
- <ul>
4
- <%= data("Measured At", measurement.measured_at) %>
5
- <%= data("Source", measurement.source) %>
6
- <%= data("Time Stamp", measurement.utc_time_stamp) %>
7
- <%= data("Metric", measurement.metric?) %>
8
- <%= data("Success", measurement.success?) %>
9
- <%= data("Service Time", "#{(measurement.end_at - measurement.start_at)} s") %>
10
- </ul>
11
- <ul>- Modified Query -
12
- <%= data("Query", measurement.query) %>
13
- <%= data("Format", measurement.format) %>
14
- </ul>
15
- </p>
16
-
17
- <% if measurement.location %>
18
- <h3>Location</h3>
19
- <p>
20
- <ul>
21
- <%= data("id", measurement.location.id) %>
22
- <%= data("Name", measurement.location.name) %>
23
- <%= data("City", measurement.location.city) %>
24
- <%= data("State Name", measurement.location.state_name) %>
25
- <%= data("State Code", measurement.location.state_code) %>
26
- <%= data("Country", measurement.location.country) %>
27
- <%= data("Country Code", measurement.location.country_code) %>
28
- <%= data("Zip Code", measurement.location.zip_code) %>
29
- <%= data("Latitude", measurement.location.latitude) %>
30
- <%= data("Longitude", measurement.location.longitude) %>
31
- </ul>
32
- </p>
33
- <% end %>
34
-
35
- <% if measurement.station %>
36
- <h3>Station</h3>
37
- <p>
38
- <ul>
39
- <%= data("id", measurement.station.id) %>
40
- <%= data("Name", measurement.station.name) %>
41
- <%= data("City", measurement.station.city) %>
42
- <%= data("State Name", measurement.station.state_name) %>
43
- <%= data("State Code", measurement.station.state_code) %>
44
- <%= data("Country", measurement.station.country) %>
45
- <%= data("Country Code", measurement.station.country_code) %>
46
- <%= data("Zip Code", measurement.station.zip_code) %>
47
- <%= data("Latitude", measurement.station.latitude) %>
48
- <%= data("Longitude", measurement.station.longitude) %>
49
- </ul>
50
- </ul>
51
- </p>
52
- <% end %>
53
-
54
- <% if measurement.timezone %>
55
- <h3>Timezone</h3>
56
- <p>
57
- <ul>
58
- <%= data("Long", measurement.timezone.full) %>
59
- <%= data("Code", measurement.timezone.code) %>
60
- <%= data("DST?", measurement.timezone.dst?) %>
61
- <%= data("Now", measurement.timezone.now(true)) %>
62
- <%= data("Today", measurement.timezone.today) %>
63
- </ul>
64
- </p>
65
- <% end %>
66
-
67
- <% if measurement.current %>
68
- <h3>Current</h3>
69
- <p>
70
- <ul>
71
- <%= data("Measured At", measurement.current.current_at) %>
72
- <%= data("Updated At", measurement.current.updated_at) %>
73
- <%= data("Humidity", measurement.current.humidity) %>
74
- <%= data("Icon", measurement.current.icon) %>
75
- <%= data("Condition", measurement.current.condition) %>
76
- <%= data("Temperature", measurement.current.temperature) %>
77
- <%= data("Dew Point", measurement.current.dew_point) %>
78
- <%= data("Heat Index", measurement.current.heat_index) %>
79
- <%= data("Wind Chill", measurement.current.wind_chill) %>
80
- <% if measurement.current.wind %>
81
- <%= data("Wind Speed", measurement.current.wind) %>
82
- <%= data("Wind Direction", measurement.current.wind.direction) %>
83
- <%= data("Wind Degrees", measurement.current.wind.degrees) %>
84
- <% end %>
85
- <%= data("Pressure", measurement.current.pressure) %>
86
- <%= data("Visibility", measurement.current.visibility) %>
87
- <% if measurement.current.sun %>
88
- <%= data("Sun Rise", measurement.current.sun.rise) %>
89
- <%= data("Sun Set", measurement.current.sun.set) %>
90
- <% end %>
91
- </ul>
92
- </p>
93
- <% end %>
94
-
95
- <% if measurement.forecast %>
96
- <h3>Forecast</h3>
97
-
98
- <% measurement.forecast.each do |forecast| %>
99
- <%= erb(:forecast, :locals => { :forecast => forecast }, :layout => false) %>
100
- <% end %>
101
-
102
- <% end %>