This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > ds = DataSources::XML.new(:url => 'http://www.yr.no/place/Norway/S%C3%B8r-Tr%C3%B8ndelag/Trondheim/Trondheim/varsel.xml') | |
| > ds.mappings.build(:name => 'copyright', :input => 'weatherdata/credit/link/@text') | |
| > ds.mappings.build(:name => 'location', :input => 'weatherdata/forecast/text/location/@name') | |
| > ds.mappings.build(:name => 'forecast_period', :input => 'weatherdata/forecast/text/location/time/title/text') | |
| > ds.mappings.build(:name => 'forecast', :input => 'weatherdata/forecast/text/location/time/body/text') | |
| > ds.mappings.build(:name => 'weather_symbol_id', :input => 'weatherdata/forecast/tabular/time/symbol/@number') | |
| > ds.mappings.build(:name => 'weather_symbol_name', :input => 'weatherdata/forecast/tabular/time/symbol/@name') | |
| > ds.mappings.build(:name => 'wind_speed_mps', :input => 'weatherdata/forecast/tabular/time/windSpeed/@mps') | |
| > ds.mappings.build(:name => 'wind_speed_name', :input => 'weatherdata/forecast/tabular/time/windSpeed/@name') | |
| > ds.mappings.build(:name => 'wind_direction_code', :input = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > ds.schema.pretty_print | |
| weatherdata | |
| location | |
| name | |
| text | |
| type | |
| text | |
| country | |
| text | |
| timezone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "Stedsnavn": "Trondheim", | |
| "Copyright": "Værvarsel fra yr.no, levert av Meteorologisk institutt og NRK", | |
| "Sist Oppdatert": "2012-01-19T07:08:00", | |
| "Soloppgang": "2012-01-19T09:29:52", | |
| "Vind": "Lett bris" | |
| } | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Jan 13 10:25:28 INFO Attempting to reconnect to the content distribution server 127.0.0.1:31337 | |
| Jan 13 10:25:28 DEBUG Connection against content delivery server established, attempting to authenticate | |
| Jan 13 10:25:39 INFO Successfully authenticated againt the content distribution server | |
| Jan 13 10:25:39 INFO First connection since node agent startup established, asking for re-distribution of channel content. | |
| Jan 13 10:25:52 INFO Received message from content distributor: SUCCESS Redistribution requested, data will be coming shortly. | |
| Jan 13 10:26:23 INFO Starting new content delivery transaction | |
| Jan 13 10:26:23 INFO Committing transaction containing 11277 bytes of data | |
| Jan 13 10:26:23 INFO Written 86 bytes to /Users/trond/code/global-illumination/node-agent/data/stage.json | |
| Jan 13 10:26:23 INFO Written 343 bytes to /Users/trond/code/global-illumination/node-agent/data/channel.json | |
| Jan 13 10:26:23 INFO Written 223 bytes to /Users/trond/code/global-illumination/node-agent/data/templates/6cb7b9f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source 'http://rubygems.org' | |
| gem 'rails', '3.1.3' | |
| # Bundle edge Rails instead: | |
| # gem 'rails', :git => 'git://github.com/rails/rails.git' | |
| gem 'sqlite3' | |
| gem 'json' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Thu, 03 Nov 2011 01:19:02 +0100] DEBUG: Sending HTTP Request via GET to www.skype.com:80/go/getskype-macosx.dmg | |
| [Thu, 03 Nov 2011 01:19:03 +0100] DEBUG: Streaming download from http://www.skype.com/go/getskype-macosx.dmg to tempfile /var/folders/zz/zyxvpxvq | |
| 6csfxvn_n0000000000000/T/chef-rest20111103-30418-1p92hzb-0 | |
| [Thu, 03 Nov 2011 01:19:03 +0100] DEBUG: Following redirect 1/10 | |
| [Thu, 03 Nov 2011 01:19:03 +0100] DEBUG: Sending HTTP Request via GET to www.skype.com:80/go/getskype-macosx | |
| [Thu, 03 Nov 2011 01:19:03 +0100] DEBUG: Streaming download from http://www.skype.com/go/getskype-macosx to tempfile /var/folders/zz/zyxvpxvq6csf | |
| xvn_n0000000000000/T/chef-rest20111103-30418-1f87yiu-0 | |
| [Thu, 03 Nov 2011 01:19:03 +0100] DEBUG: Following redirect 2/10 | |
| [Thu, 03 Nov 2011 01:19:03 +0100] DEBUG: Sending HTTP Request via GET to www.skype.com:80/go/getskype-samplingb | |
| [Thu, 03 Nov 2011 01:19:03 +0100] DEBUG: Streaming download from http://www.skype.com/go/getskype-samplingb to tempfile /var/folders/zz/zyxvpxvq6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Wed, 26 Oct 2011 16:11:20 +0000] ERROR: Running exception handlers | |
| [Wed, 26 Oct 2011 16:11:20 +0000] ERROR: Report handler Chef::Handler::ErrorReport raised #<Encoding::InvalidByteSequenceError: "\xC3" on US-ASCII> | |
| [Wed, 26 Oct 2011 16:11:20 +0000] ERROR: /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.4/lib/chef/node.rb:501:in `encode' | |
| [Wed, 26 Oct 2011 16:11:20 +0000] ERROR: /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.4/lib/chef/node.rb:501:in `to_json' | |
| [Wed, 26 Oct 2011 16:11:20 +0000] ERROR: /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.4/lib/chef/node.rb:501:in `to_json' | |
| [Wed, 26 Oct 2011 16:11:20 +0000] ERROR: /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.4/lib/chef/node.rb:501:in `to_json' | |
| [Wed, 26 Oct 2011 16:11:20 +0000] ERROR: /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.4/lib/chef/node.rb:501:in `to_json' | |
| [Wed, 26 Oct 2011 16:11:20 +0000] ERROR: /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.4/lib/chef/node.rb:501:in `to_json' | |
| [Wed, 26 Oct 2011 16:11:20 +0000] ERROR: /usr/lib/ruby/gems/1.9.1/gems/chef-0.10.4/lib/chef/node.rb:501:in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /Users/Trond/Code/Clients/BinaryMarbles/Sherlock/node_modules/mongoose/lib/schema.js:203 | |
| return new Types[type.name](path, obj); | |
| ^ | |
| TypeError: undefined is not a function | |
| at CALL_NON_FUNCTION_AS_CONSTRUCTOR (native) | |
| at Function.interpretAsType (/Users/Trond/Code/Clients/BinaryMarbles/Sherlock/node_modules/mongoose/lib/schema.js:203:10) | |
| at Schema.path (/Users/Trond/Code/Clients/BinaryMarbles/Sherlock/node_modules/mongoose/lib/schema.js:162:29) | |
| at Schema.add (/Users/Trond/Code/Clients/BinaryMarbles/Sherlock/node_modules/mongoose/lib/schema.js:110:12) | |
| at new Schema (/Users/Trond/Code/Clients/BinaryMarbles/Sherlock/node_modules/mongoose/lib/schema.js:38:10) | |
| at MetricCollector.<anonymous> (/Users/Trond/Code/Clients/BinaryMarbles/Sherlock/lib/metric_collector.coffee:69:29) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {{ 'nyhetsarkiv' | node | assign_to: 'news_archive' }} | |
| <div id='news'> | |
| {% for post in news_archive.recent_posts limit:2 %} | |
| <article> | |
| <section class='article-image'> | |
| <img src="{{ post.data.ingressbilde | resource | attribute: 'url' }}" alt="{{ post.name }}" /> | |
| </section> | |
| <section class='article-content'> | |
| <h2>{{ post.name }}</h2> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % bundle exec rake sunspot:reindex | |
| bundle exec rake sunspot:reindex 19.08s user 1.64s system 92% cpu 22.367 total | |
| % rails c | |
| >> DesignResource.count | |
| => 603 | |
| >> q = Sunspot.search DesignResource | |
| >> q.total | |
| => 336 |