brighter_planet_layout 0.2.34 → 0.2.35

Sign up to get free protection for your applications and to get access to all the features.
data/.document CHANGED
@@ -1,5 +1,5 @@
1
- README.rdoc
2
- lib/**/*.rb
3
- bin/*
4
- features/**/*.feature
5
- LICENSE
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
data/.gitignore CHANGED
@@ -1,21 +1,21 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
-
21
- ## PROJECT::SPECIFIC
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## PROJECT::GENERAL
17
+ coverage
18
+ rdoc
19
+ pkg
20
+
21
+ ## PROJECT::SPECIFIC
data/LICENSE CHANGED
@@ -1,20 +1,20 @@
1
- Copyright (c) 2009 Andy Rossmeissl
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright (c) 2009 Andy Rossmeissl
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.34
1
+ 0.2.35
@@ -1,108 +1,108 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in rakefile, and run the gemspec command
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{brighter_planet_layout}
8
- s.version = "0.2.34"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Andy Rossmeissl", "Seamus Abshere"]
12
- s.date = %q{2010-08-15}
13
- s.description = %q{Layouts, partials, stylesheets, and images}
14
- s.email = %q{andy@rossmeissl.net}
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.rdoc"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".gitattributes",
22
- ".gitignore",
23
- "LICENSE",
24
- "README.rdoc",
25
- "Rakefile",
26
- "VERSION",
27
- "app/helpers/brighter_planet_helper.rb",
28
- "app/views/layouts/_elsewhere.html.erb",
29
- "app/views/layouts/_footer.html.erb",
30
- "app/views/layouts/_google_analytics.html.erb",
31
- "app/views/layouts/_header.html.erb",
32
- "app/views/layouts/brighter_planet.html.erb",
33
- "brighter_planet_layout.gemspec",
34
- "lib/brighter_planet_layout.rb",
35
- "lib/brighter_planet_layout/rails.rb",
36
- "lib/brighter_planet_layout/railtie.rb",
37
- "lib/brighter_planet_layout/rake_tasks.rb",
38
- "public/401.html",
39
- "public/403.html",
40
- "public/403.xml",
41
- "public/404.html",
42
- "public/404.json",
43
- "public/404.xml",
44
- "public/409.html",
45
- "public/422.html",
46
- "public/500.html",
47
- "public/favicon.ico",
48
- "public/javascripts/controls.js",
49
- "public/javascripts/dragdrop.js",
50
- "public/javascripts/effects.js",
51
- "public/javascripts/prototype.js",
52
- "public/javascripts/rails.js",
53
- "public/stylesheets/brighter_planet.css",
54
- "public/stylesheets/fonts/DejaVuSansMono-Oblique.eot",
55
- "public/stylesheets/fonts/DejaVuSansMono-Oblique.ttf",
56
- "public/stylesheets/fonts/DejaVuSansMono.eot",
57
- "public/stylesheets/fonts/DejaVuSansMono.ttf",
58
- "public/stylesheets/fonts/KievitOT-Bold.otf",
59
- "public/stylesheets/fonts/KievitOT-BoldItalic.otf",
60
- "public/stylesheets/fonts/KievitOT-Italic.otf",
61
- "public/stylesheets/fonts/KievitOT-Regular.otf",
62
- "public/stylesheets/fonts/KievitWebPro-Bold.eot",
63
- "public/stylesheets/fonts/KievitWebPro-Bold.woff",
64
- "public/stylesheets/fonts/KievitWebPro-BoldIta.eot",
65
- "public/stylesheets/fonts/KievitWebPro-BoldIta.woff",
66
- "public/stylesheets/fonts/KievitWebPro-Ita.eot",
67
- "public/stylesheets/fonts/KievitWebPro-Ita.woff",
68
- "public/stylesheets/fonts/KievitWebPro.eot",
69
- "public/stylesheets/fonts/KievitWebPro.woff",
70
- "public/stylesheets/idle.css",
71
- "public/stylesheets/images/bg.png",
72
- "public/stylesheets/images/cards.png",
73
- "public/stylesheets/images/gears.png",
74
- "public/stylesheets/images/logo.png",
75
- "public/stylesheets/images/meter.png",
76
- "public/stylesheets/images/prism.png",
77
- "public/stylesheets/images/radiant_earth-small.png",
78
- "rails/init.rb",
79
- "test/helper.rb",
80
- "test/test_brighter_planet_layout.rb"
81
- ]
82
- s.homepage = %q{http://github.com/brighterplanet/brighter_planet_layout}
83
- s.rdoc_options = ["--charset=UTF-8"]
84
- s.require_paths = ["lib"]
85
- s.rubygems_version = %q{1.3.6}
86
- s.summary = %q{Layout assets for Brighter Planet sites}
87
- s.test_files = [
88
- "test/helper.rb",
89
- "test/test_brighter_planet_layout.rb"
90
- ]
91
-
92
- if s.respond_to? :specification_version then
93
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
94
- s.specification_version = 3
95
-
96
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
97
- s.add_runtime_dependency(%q<ultraviolet>, [">= 0.10.2"])
98
- s.add_runtime_dependency(%q<simple-rss>, [">= 1.2.3"])
99
- else
100
- s.add_dependency(%q<ultraviolet>, [">= 0.10.2"])
101
- s.add_dependency(%q<simple-rss>, [">= 1.2.3"])
102
- end
103
- else
104
- s.add_dependency(%q<ultraviolet>, [">= 0.10.2"])
105
- s.add_dependency(%q<simple-rss>, [">= 1.2.3"])
106
- end
107
- end
108
-
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{brighter_planet_layout}
8
+ s.version = "0.2.35"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Andy Rossmeissl", "Seamus Abshere"]
12
+ s.date = %q{2010-08-26}
13
+ s.description = %q{Layouts, partials, stylesheets, and images}
14
+ s.email = %q{andy@rossmeissl.net}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitattributes",
22
+ ".gitignore",
23
+ "LICENSE",
24
+ "README.rdoc",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "app/helpers/brighter_planet_helper.rb",
28
+ "app/views/layouts/_elsewhere.html.erb",
29
+ "app/views/layouts/_footer.html.erb",
30
+ "app/views/layouts/_google_analytics.html.erb",
31
+ "app/views/layouts/_header.html.erb",
32
+ "app/views/layouts/brighter_planet.html.erb",
33
+ "brighter_planet_layout.gemspec",
34
+ "lib/brighter_planet_layout.rb",
35
+ "lib/brighter_planet_layout/rails.rb",
36
+ "lib/brighter_planet_layout/railtie.rb",
37
+ "lib/brighter_planet_layout/rake_tasks.rb",
38
+ "public/401.html",
39
+ "public/403.html",
40
+ "public/403.xml",
41
+ "public/404.html",
42
+ "public/404.json",
43
+ "public/404.xml",
44
+ "public/409.html",
45
+ "public/422.html",
46
+ "public/500.html",
47
+ "public/favicon.ico",
48
+ "public/javascripts/controls.js",
49
+ "public/javascripts/dragdrop.js",
50
+ "public/javascripts/effects.js",
51
+ "public/javascripts/prototype.js",
52
+ "public/javascripts/rails.js",
53
+ "public/stylesheets/brighter_planet.css",
54
+ "public/stylesheets/fonts/DejaVuSansMono-Oblique.eot",
55
+ "public/stylesheets/fonts/DejaVuSansMono-Oblique.ttf",
56
+ "public/stylesheets/fonts/DejaVuSansMono.eot",
57
+ "public/stylesheets/fonts/DejaVuSansMono.ttf",
58
+ "public/stylesheets/fonts/KievitOT-Bold.otf",
59
+ "public/stylesheets/fonts/KievitOT-BoldItalic.otf",
60
+ "public/stylesheets/fonts/KievitOT-Italic.otf",
61
+ "public/stylesheets/fonts/KievitOT-Regular.otf",
62
+ "public/stylesheets/fonts/KievitWebPro-Bold.eot",
63
+ "public/stylesheets/fonts/KievitWebPro-Bold.woff",
64
+ "public/stylesheets/fonts/KievitWebPro-BoldIta.eot",
65
+ "public/stylesheets/fonts/KievitWebPro-BoldIta.woff",
66
+ "public/stylesheets/fonts/KievitWebPro-Ita.eot",
67
+ "public/stylesheets/fonts/KievitWebPro-Ita.woff",
68
+ "public/stylesheets/fonts/KievitWebPro.eot",
69
+ "public/stylesheets/fonts/KievitWebPro.woff",
70
+ "public/stylesheets/idle.css",
71
+ "public/stylesheets/images/bg.png",
72
+ "public/stylesheets/images/cards.png",
73
+ "public/stylesheets/images/gears.png",
74
+ "public/stylesheets/images/logo.png",
75
+ "public/stylesheets/images/meter.png",
76
+ "public/stylesheets/images/prism.png",
77
+ "public/stylesheets/images/radiant_earth-small.png",
78
+ "rails/init.rb",
79
+ "test/helper.rb",
80
+ "test/test_brighter_planet_layout.rb"
81
+ ]
82
+ s.homepage = %q{http://github.com/brighterplanet/brighter_planet_layout}
83
+ s.rdoc_options = ["--charset=UTF-8"]
84
+ s.require_paths = ["lib"]
85
+ s.rubygems_version = %q{1.3.7}
86
+ s.summary = %q{Layout assets for Brighter Planet sites}
87
+ s.test_files = [
88
+ "test/helper.rb",
89
+ "test/test_brighter_planet_layout.rb"
90
+ ]
91
+
92
+ if s.respond_to? :specification_version then
93
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
94
+ s.specification_version = 3
95
+
96
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
97
+ s.add_runtime_dependency(%q<ultraviolet>, [">= 0.10.2"])
98
+ s.add_runtime_dependency(%q<simple-rss>, [">= 1.2.3"])
99
+ else
100
+ s.add_dependency(%q<ultraviolet>, [">= 0.10.2"])
101
+ s.add_dependency(%q<simple-rss>, [">= 1.2.3"])
102
+ end
103
+ else
104
+ s.add_dependency(%q<ultraviolet>, [">= 0.10.2"])
105
+ s.add_dependency(%q<simple-rss>, [">= 1.2.3"])
106
+ end
107
+ end
108
+
@@ -3,11 +3,21 @@ require 'yaml'
3
3
  require 'simple-rss'
4
4
  require 'open-uri'
5
5
 
6
+ # http://ph7spot.com/musings/system-timer
7
+ begin
8
+ require 'system_timer'
9
+ BrighterPlanetLayoutTimer = ::SystemTimer
10
+ rescue ::LoadError
11
+ require 'timeout'
12
+ BrighterPlanetLayoutTimer = ::Timeout
13
+ end
14
+
6
15
  module BrighterPlanetLayout
7
16
  GEM_ROOT = ::File.expand_path ::File.join(::File.dirname(__FILE__), '..')
8
17
  VERSION = ::YAML.load ::File.read(::File.join(GEM_ROOT, 'VERSION'))
9
18
  TWITTER_RSS = 'http://twitter.com/statuses/user_timeline/15042574.rss'
10
19
  BLOG_ATOM = 'http://numbers.brighterplanet.com/atom.xml'
20
+ FEED_TIMEOUT = 5.seconds
11
21
 
12
22
  def self.view_path
13
23
  ::File.join GEM_ROOT, 'app', 'views'
@@ -70,7 +80,9 @@ module BrighterPlanetLayout
70
80
  end
71
81
 
72
82
  def self.latest_tweet
73
- ::SimpleRSS.parse(open(TWITTER_RSS)).entries.first
83
+ ::BrighterPlanetLayoutTimer.timeout(FEED_TIMEOUT) do
84
+ ::SimpleRSS.parse(open(TWITTER_RSS)).entries.first
85
+ end
74
86
  rescue ::OpenURI::HTTPError
75
87
  # nil
76
88
  rescue ::SocketError, ::Timeout::Error, ::Errno::ETIMEDOUT, ::Errno::ENETUNREACH, ::Errno::ECONNRESET, ::Errno::ECONNREFUSED
@@ -80,7 +92,9 @@ module BrighterPlanetLayout
80
92
  end
81
93
 
82
94
  def self.latest_blog_post
83
- ::SimpleRSS.parse(open(BLOG_ATOM)).entries.first
95
+ ::BrighterPlanetLayoutTimer.timeout(FEED_TIMEOUT) do
96
+ ::SimpleRSS.parse(open(BLOG_ATOM)).entries.first
97
+ end
84
98
  rescue ::OpenURI::HTTPError
85
99
  # nil
86
100
  rescue ::SocketError, ::Timeout::Error, ::Errno::ETIMEDOUT, ::Errno::ENETUNREACH, ::Errno::ECONNRESET, ::Errno::ECONNREFUSED
data/test/helper.rb CHANGED
@@ -1,10 +1,10 @@
1
- require 'rubygems'
2
- require 'test/unit'
3
- require 'shoulda'
4
-
5
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
- $LOAD_PATH.unshift(File.dirname(__FILE__))
7
- require 'brighter_planet_layout'
8
-
9
- class Test::Unit::TestCase
10
- end
1
+ require 'rubygems'
2
+ require 'test/unit'
3
+ require 'shoulda'
4
+
5
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
7
+ require 'brighter_planet_layout'
8
+
9
+ class Test::Unit::TestCase
10
+ end
@@ -1,7 +1,7 @@
1
- require 'helper'
2
-
3
- class TestBrighterPlanetLayout < Test::Unit::TestCase
4
- should "probably rename this file and start testing for real" do
5
- flunk "hey buddy, you should probably rename this file and start testing for real"
6
- end
7
- end
1
+ require 'helper'
2
+
3
+ class TestBrighterPlanetLayout < Test::Unit::TestCase
4
+ should "probably rename this file and start testing for real" do
5
+ flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ end
7
+ end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brighter_planet_layout
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 81
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 2
8
- - 34
9
- version: 0.2.34
9
+ - 35
10
+ version: 0.2.35
10
11
  platform: ruby
11
12
  authors:
12
13
  - Andy Rossmeissl
@@ -15,16 +16,18 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2010-08-15 00:00:00 -05:00
19
+ date: 2010-08-26 00:00:00 -05:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
22
23
  name: ultraviolet
23
24
  prerelease: false
24
25
  requirement: &id001 !ruby/object:Gem::Requirement
26
+ none: false
25
27
  requirements:
26
28
  - - ">="
27
29
  - !ruby/object:Gem::Version
30
+ hash: 51
28
31
  segments:
29
32
  - 0
30
33
  - 10
@@ -36,9 +39,11 @@ dependencies:
36
39
  name: simple-rss
37
40
  prerelease: false
38
41
  requirement: &id002 !ruby/object:Gem::Requirement
42
+ none: false
39
43
  requirements:
40
44
  - - ">="
41
45
  - !ruby/object:Gem::Version
46
+ hash: 25
42
47
  segments:
43
48
  - 1
44
49
  - 2
@@ -127,23 +132,27 @@ rdoc_options:
127
132
  require_paths:
128
133
  - lib
129
134
  required_ruby_version: !ruby/object:Gem::Requirement
135
+ none: false
130
136
  requirements:
131
137
  - - ">="
132
138
  - !ruby/object:Gem::Version
139
+ hash: 3
133
140
  segments:
134
141
  - 0
135
142
  version: "0"
136
143
  required_rubygems_version: !ruby/object:Gem::Requirement
144
+ none: false
137
145
  requirements:
138
146
  - - ">="
139
147
  - !ruby/object:Gem::Version
148
+ hash: 3
140
149
  segments:
141
150
  - 0
142
151
  version: "0"
143
152
  requirements: []
144
153
 
145
154
  rubyforge_project:
146
- rubygems_version: 1.3.6
155
+ rubygems_version: 1.3.7
147
156
  signing_key:
148
157
  specification_version: 3
149
158
  summary: Layout assets for Brighter Planet sites