Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Hi! I cleaned up your code for you! #29

Closed
wants to merge 224 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
224 commits
Select commit Hold shift + click to select a range
4a71ed8
Added index page
pusewicz Mar 19, 2010
b4e9875
Added httparty gem
pusewicz Mar 19, 2010
0ad2fac
Added rspec and cucumber
pusewicz Mar 19, 2010
2c78642
Merge branch 'master' of git://github.com/pusewicz/sonia
Mar 20, 2010
9930cae
attempt to use octopi for github api
Mar 21, 2010
f13ce83
Lock gems
pusewicz Mar 21, 2010
584e466
Add client side javascript
pusewicz Mar 21, 2010
8762845
Add twitter widget
pusewicz Mar 21, 2010
99ee209
Add example server
pusewicz Mar 21, 2010
764ac61
Update docs
pusewicz Mar 21, 2010
7032752
Add ability to provide password
pusewicz Mar 22, 2010
5d5772e
Update docs
pusewicz Mar 22, 2010
6519056
Added config to Widget base class
Mar 24, 2010
13838fd
Initialize Twitter widget from config options
Mar 24, 2010
b27b092
Initialize widgets based on configuration options
Mar 24, 2010
5599eb2
Initial js frontend dispatcher
pusewicz Mar 24, 2010
c188b4b
Merge branch 'master' of git://github.com/pusewicz/sonia
Mar 24, 2010
8c4e274
Merged changes
pusewicz Mar 24, 2010
b20b71a
Initial CSS
Mar 24, 2010
0981a70
Update JS to render in the correct format
Mar 24, 2010
327822a
Merge branch 'master' of git://github.com/pusewicz/sonia
Mar 25, 2010
04c65c2
Added ability to create many widgets
pusewicz Mar 26, 2010
95898f0
Merge branch 'master' of git://github.com/pusewicz/sonia
Mar 26, 2010
31a3dbf
Added user image to tweets.
Mar 26, 2010
10a92c3
Support for several widgets + ugly csss
Mar 27, 2010
58f94dd
Merged Piotr's
Mar 27, 2010
8e193e0
Change way you boot the app
pusewicz Mar 27, 2010
ca4e133
Added user image to tweets.
Mar 26, 2010
a682526
Support for several widgets + ugly csss
Mar 27, 2010
ef4248a
Merge branch 'vicmargar/master'
pusewicz Mar 27, 2010
a260efa
Removed merge files
pusewicz Mar 27, 2010
90e193b
Update readme
pusewicz Mar 27, 2010
e091e78
Include prototype and blueprit
pusewicz Mar 27, 2010
96a3a85
Add reset and grid css files
pusewicz Mar 27, 2010
123d177
Simple tweaks
pusewicz Mar 27, 2010
78d540c
minor ui tweaks and bundled gems
marcusleemitchell Apr 15, 2010
38a2a9c
Fix syntax errors
pusewicz Apr 15, 2010
7c7d681
Add new gems
pusewicz Apr 15, 2010
a31fb33
Add ability to specify a config file
pusewicz Apr 15, 2010
81cdd29
logo and twitter imgs added and styled
marcusleemitchell Apr 15, 2010
7e1132d
Merge branch 'marcusleemitchell/master'
pusewicz Apr 16, 2010
e2f2333
Added initial push of tweets on client connect.
pusewicz Apr 16, 2010
2587104
Update README
pusewicz Apr 16, 2010
bc1935b
tfl widget
marcusleemitchell Apr 16, 2010
fc0f0d5
Merge branch 'pusewicz/master'
marcusleemitchell Apr 16, 2010
ce94bfc
tfl widgetness
marcusleemitchell Apr 16, 2010
4b4cef0
Freeze in gems
pusewicz Apr 19, 2010
c808b92
Remove debug line
pusewicz Apr 19, 2010
1b2f78c
Fix TFL widget
pusewicz Apr 19, 2010
9058f22
Moved Javascript classes to separate files
pusewicz Apr 19, 2010
5ba11b2
Merge branch 'master' of git://github.com/pusewicz/sonia
Apr 19, 2010
2550b1a
icinga widget added
marcusleemitchell Apr 21, 2010
da869f5
Add em-http-request gem
pusewicz Apr 21, 2010
33c0f65
Make Tfl widget use async HTTP
pusewicz Apr 21, 2010
6c9a609
Awesome Twitter async access
pusewicz Apr 21, 2010
813da75
Render new messages correctly
pusewicz Apr 21, 2010
e695180
Fix friendship creation
pusewicz Apr 21, 2010
c9feb43
Don't need Twitter gems anymore
pusewicz Apr 21, 2010
bf1077d
tfl
marcusleemitchell Apr 22, 2010
12710d4
Merge branch 'master' of git://github.com/pusewicz/sonia
Apr 22, 2010
2661e5f
nokogiri added, icinga getting async
marcusleemitchell Apr 22, 2010
12fcbb9
Added Campfire widget
Apr 23, 2010
354990f
removed obsolete github related stuff
Apr 23, 2010
31cbce3
Add async http requests
pusewicz Apr 23, 2010
79411d5
new icons
marcusleemitchell Apr 23, 2010
b4e2f7b
campfiore logo added and mig beer central details added
marcusleemitchell Apr 23, 2010
c9daf0c
drag and drop widgets
marcusleemitchell Apr 23, 2010
3ac9e19
Use 1.8.7 for now with no gemset
pusewicz Apr 23, 2010
8f25b5a
Automatically open Sonia page when server runs
pusewicz Apr 23, 2010
bc3bf3c
Drop duplicate line
pusewicz Apr 23, 2010
92311f0
Cleanup gems
pusewicz Apr 23, 2010
5b8cfc4
Prepopulate the basecamp chat
pusewicz Apr 23, 2010
e206305
Don't create a link for the user
pusewicz Apr 23, 2010
8374f3e
Fix config
pusewicz Apr 23, 2010
0fd8111
Rename config file
pusewicz Apr 23, 2010
7e6a688
Ignore example file
pusewicz Apr 24, 2010
121d0a2
Upgrade gems
pusewicz Apr 24, 2010
e999323
Remove puts
pusewicz Apr 24, 2010
d6b1261
Move widget javascript to separate directory
pusewicz Apr 24, 2010
9364ecd
Remove unnecessary js files
pusewicz Apr 24, 2010
d472429
Add logger
pusewicz Apr 24, 2010
3add607
Set timer to 60 seconds
pusewicz Apr 24, 2010
4de997e
Refactor code
pusewicz Apr 24, 2010
da5854c
Make config defaults different
pusewicz Apr 24, 2010
d8f8a1f
Add nicer color for TFL statuses
pusewicz Apr 24, 2010
0787dbf
Add log helper methods
pusewicz Apr 24, 2010
78f9e02
Improve logging
pusewicz Apr 24, 2010
50c3524
Add log_info
pusewicz Apr 24, 2010
c4c6a6a
Reorder loading of libs
pusewicz Apr 24, 2010
2586298
Add thin and sinatra
pusewicz Apr 24, 2010
407530f
Add webserver
pusewicz Apr 24, 2010
fe95baa
Add support for WebSocket via Flash
pusewicz Apr 24, 2010
c0684b0
Add rounded corners in Firefox
pusewicz Apr 24, 2010
419042a
Make author bold
pusewicz Apr 24, 2010
c5ea8d9
Remove .braids
pusewicz Apr 24, 2010
7493ac6
Update README
pusewicz Apr 24, 2010
8bbd267
Add Github widget
pusewicz Apr 25, 2010
aa55d7f
Make it inline code
pusewicz Apr 25, 2010
d511e7a
Add favicon
pusewicz Apr 25, 2010
0c51073
Add file extension to github avatar
pusewicz Apr 25, 2010
6917779
Update Gemfile and vendored gems
lucaspiller Apr 27, 2010
c311cba
Update readme
lucaspiller Apr 27, 2010
ce0469c
Switch to Ruby 1.9.1
pusewicz Apr 27, 2010
bc9d98e
Only push nitems for Campfire widget
pusewicz Apr 27, 2010
013c68b
Add gemset
pusewicz May 1, 2010
f91e479
Change host to localhost
pusewicz May 1, 2010
5fad59e
Fix following of new people
pusewicz May 1, 2010
56bb632
Update README
pusewicz May 1, 2010
4971554
Add Config class
pusewicz May 1, 2010
a1b50f0
Freeze new gems
pusewicz May 1, 2010
ead7d0a
Remove old gems
pusewicz May 1, 2010
c547844
Use new Config class
pusewicz May 1, 2010
9d8e7d2
Remove optiflag gem
pusewicz May 1, 2010
a7d13c8
Add thor and Sonia::CLI
pusewicz May 1, 2010
472ef4c
Add Sonia::Helpers for Sinatra
pusewicz May 1, 2010
effea5b
Add console task
pusewicz May 1, 2010
e8d6bd4
Track included widgets
pusewicz May 1, 2010
8004545
Add active_support gem
pusewicz May 1, 2010
013e289
Add more helpful javascript
pusewicz May 1, 2010
0b33c42
Cache gems
pusewicz May 1, 2010
9fde4dd
Add Yahoo widget
pusewicz May 1, 2010
304acfd
Save position of widgets on refresh
pusewicz May 1, 2010
69640a4
Change title
pusewicz May 1, 2010
d8497c3
Refactor making widgets draggable
pusewicz May 1, 2010
8790c7e
Fix errors with sorting numbers
pusewicz May 1, 2010
4f3b0dc
Add localStorage support
pusewicz May 1, 2010
3fbda28
Update prototype
pusewicz May 1, 2010
d13a2dc
Change the drag handle to the h2 header
pusewicz May 1, 2010
90617c4
Moved YahooWeather to widgets
pusewicz May 1, 2010
a898885
Refactor Icinga widget
pusewicz May 1, 2010
8db174c
Move YahooWeather css to seperate file
pusewicz May 2, 2010
06179e4
Remove css
pusewicz May 2, 2010
e7f864f
Log what storage we use
pusewicz May 2, 2010
c6c5a75
Log error message
pusewicz May 2, 2010
83a0d6a
Shorten container creation code
pusewicz May 2, 2010
b30dc5d
Fix negative top and left css attributes
pusewicz May 2, 2010
9f34886
Add icinga css
pusewicz May 2, 2010
f874e81
Move Github widget
pusewicz May 2, 2010
b1d1b7c
Extract and move rest of the widgets to /widgets
pusewicz May 2, 2010
861656a
Fixed clone URL
barrym May 2, 2010
4f66828
Added Foursquare widget
barrym May 2, 2010
afeb70d
Monkey patch fix of EventMachine::WedbSocket::Connection#send
barrym May 2, 2010
e233f87
Added Foursquare to example config
barrym May 2, 2010
3f98487
Moved foursquare icon to widget
barrym May 2, 2010
bdff441
Moved Campfire widget images to widgets/campfire
barrym May 2, 2010
ba8e7ab
Moved Github widget images to widgets/github
barrym May 2, 2010
049b69d
Moved Icinga widget images to widgets/icinga
barrym May 2, 2010
beb18c8
Moved TFL widget images to widgets/tfl
barrym May 2, 2010
78a6c7a
Moved Twitter widget images to widgets/twitter
barrym May 2, 2010
42a54ac
Add initial documentation
pusewicz May 3, 2010
b282696
Initial RSS widget, example of config:
May 3, 2010
59aa4a7
Separate javascripts
pusewicz May 3, 2010
7be1742
New plus icon
pusewicz May 3, 2010
8eac4f1
WIP pages
pusewicz May 3, 2010
618509d
Add ability to add widgets to a page
pusewicz May 4, 2010
4b35cb0
Added Sonia screenshot
pusewicz May 4, 2010
b6272bb
Update README
pusewicz May 4, 2010
a7b5b70
Merge branch 'master' into pages
pusewicz May 4, 2010
846a042
Change image url
pusewicz May 4, 2010
fc78022
Change image url
pusewicz May 4, 2010
b9deeae
Added link to YARD
pusewicz May 4, 2010
79a16ea
Add Scripty2
pusewicz May 5, 2010
bc27103
Added page switching with animation
pusewicz May 5, 2010
9b4b98b
Merge branch 'pages' of github.com:pusewicz/sonia into pages
pusewicz May 5, 2010
8000d77
Add Twitter link
pusewicz May 5, 2010
814d8f2
Add new favicon and iTouch icon
pusewicz May 5, 2010
6fa722c
Unify makeDraggable
pusewicz May 5, 2010
a4adb69
Small fixes to timing and syntax
pusewicz May 5, 2010
103392c
Remove scriptaculous
pusewicz May 5, 2010
f6f9361
Make JS and CSS inline
pusewicz May 5, 2010
d911490
Merged conflicts
pusewicz May 5, 2010
5cb2feb
Add Javascript JSON class for browsers without
pusewicz May 7, 2010
32e688b
Resolved conflicts
pusewicz May 7, 2010
0231ef6
Yup, don't forget that ;]
pusewicz May 7, 2010
40b5edc
Update js location
pusewicz May 8, 2010
ed14fb4
Typo in failed response.
edavis10 May 9, 2010
31433db
Remove sonia_spec
pusewicz May 9, 2010
58ad626
Add rspec gem
pusewicz May 9, 2010
06ac206
Make specs nested
pusewicz May 9, 2010
1746890
Add config specs
pusewicz May 9, 2010
6df1e1b
Freeze gems
pusewicz May 9, 2010
7c57bfb
Resolve conflicts
pusewicz May 9, 2010
5002d30
Remove pager for now
pusewicz May 9, 2010
0574704
Merge branch 'master' of github.com:pusewicz/sonia
pusewicz May 9, 2010
37a0bb2
By default, follow soniaappcom
pusewicz May 11, 2010
3890870
Merge branch 'master' of github.com:pusewicz/sonia
pusewicz May 11, 2010
c6995f0
Add some stats to README
pusewicz May 11, 2010
b741fb8
Remove init
pusewicz May 11, 2010
d20be41
Add console mock
pusewicz May 11, 2010
e3539e9
Make websocket host and port configurable. Also
pusewicz May 11, 2010
9c64aee
Slightly fix the CSS
pusewicz May 11, 2010
580045a
Add version file
pusewicz May 11, 2010
89964fc
Require version
pusewicz May 11, 2010
0cca720
Add sonia --version command
pusewicz May 11, 2010
1492441
[#23] Add information about rvm gemsets
pusewicz May 14, 2010
5a17441
[#21] Add comments for example configuration file
pusewicz May 14, 2010
9527e50
Change screenshot url
pusewicz May 14, 2010
2864794
Update prototype to 1.7 RC2
pusewicz May 14, 2010
94067cc
Make the javascripts and stylesheets linked
pusewicz May 20, 2010
b13798d
Make rvmrc simple
pusewicz May 20, 2010
3e93dee
Whitespace
pusewicz May 20, 2010
e75b0a4
Add link to screencast.
pusewicz May 23, 2010
8414755
Update gems and Ruby requirements
pusewicz Oct 9, 2010
6962b6d
Update to newest Flash WebSocket implementation
pusewicz Oct 9, 2010
e178b92
Add crossdomain.xml file
pusewicz Oct 9, 2010
6a91a93
Update gem versions
pusewicz Oct 9, 2010
b3e8473
Add example upstart file for Ubuntu
pusewicz Oct 9, 2010
e7546c1
Update upstart script
pusewicz Oct 9, 2010
8d4463d
Update Ruby version number
pusewicz Oct 10, 2010
3c40553
Remove stats
pusewicz Oct 10, 2010
c705635
Update rakefiles
pusewicz Oct 10, 2010
efc457b
lowering weather number so that it is readable
Jun 7, 2010
410edda
Add still maintained badge
pusewicz Jan 14, 2011
9104605
Update gems
pusewicz Jan 16, 2011
b8f5468
Merge branch 'master' of github.com:pusewicz/sonia
pusewicz Jan 16, 2011
f73792b
Add flattr
pusewicz Jan 17, 2011
8d0e134
Productyion
pusewicz Feb 7, 2011
a45e767
Add Hoptoad Widget, list app names with the error count
Feb 15, 2011
5cd7f25
Better view for error count using a table
Feb 15, 2011
36fe467
update to launchy 2.0
copiousfreetime Jul 18, 2011
acd16d6
Merge pull request #28 from copiousfreetime/launchy-2.0
pusewicz Jul 18, 2011
36d8453
Update README.markdown
pusewicz Dec 8, 2011
01d7ed6
Update README.markdown
pusewicz Dec 8, 2011
c92376c
Remove whitespace [Gun.io WhitespaceBot]
Dec 18, 2011
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 0 additions & 8 deletions .braids

This file was deleted.

5 changes: 5 additions & 0 deletions .gitignore
Expand Up @@ -2,3 +2,8 @@
db/*.sqlite3
log/*.log
tmp/**/*
.DS_Store
*~
example/config.yml
.yardoc/
doc/
1 change: 1 addition & 0 deletions .rvmrc
@@ -0,0 +1 @@
rvm 1.9.2@sonia
34 changes: 31 additions & 3 deletions Gemfile
@@ -1,4 +1,32 @@
# A sample Gemfile
source :gemcutter
#
# gem "rails"

group :production do
gem "activesupport", "3.0.3"
gem "twitter-stream", "0.1.10"
gem "eventmachine", "0.12.10"
gem "em-websocket", "0.2.0"
gem "em-http-request", "0.3.0"
gem "yajl-ruby", "0.7.9"
gem "rake", "0.8.7"
gem "thor", "0.14.6"
gem "nokogiri", "1.4.4"
gem "launchy", "2.0.3"
gem "thin", "1.2.7"
gem "sinatra", "1.1.2"
gem "haml", "3.0.25"
gem "i18n"
gem "roxml"
end

group :test do
gem "rspec"
#gem "cucumber"
end

group :development do
gem "yard"
#gem "ruby_core_source"
gem "jeweler"
gem "gemcutter"
#gem "ruby-debug19"
end
76 changes: 76 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,76 @@
GEM
remote: http://rubygems.org/
specs:
activesupport (3.0.3)
addressable (2.2.2)
configuration (1.1.0)
daemons (1.1.0)
em-http-request (0.3.0)
addressable (>= 2.0.0)
escape_utils
eventmachine (>= 0.12.9)
em-websocket (0.2.0)
addressable (>= 2.1.1)
eventmachine (>= 0.12.9)
escape_utils (0.1.9)
eventmachine (0.12.10)
gemcutter (0.6.1)
git (1.2.5)
haml (3.0.25)
i18n (0.5.0)
jeweler (1.4.0)
gemcutter (>= 0.1.0)
git (>= 1.2.5)
rubyforge (>= 2.0.0)
json_pure (1.4.6)
launchy (0.3.7)
configuration (>= 0.0.5)
rake (>= 0.8.1)
nokogiri (1.4.4)
rack (1.2.1)
rake (0.8.7)
roauth (0.0.3)
roxml (3.1.6)
activesupport (>= 2.3.0)
nokogiri (>= 1.3.3)
rspec (1.3.0)
rubyforge (2.0.4)
json_pure (>= 1.1.7)
sinatra (1.1.2)
rack (~> 1.1)
tilt (~> 1.2)
thin (1.2.7)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.14.6)
tilt (1.2.1)
twitter-stream (0.1.10)
eventmachine (>= 0.12.8)
roauth (>= 0.0.2)
yajl-ruby (0.7.9)
yard (0.6.1)

PLATFORMS
ruby

DEPENDENCIES
activesupport (= 3.0.3)
em-http-request (= 0.3.0)
em-websocket (= 0.2.0)
eventmachine (= 0.12.10)
gemcutter
haml (= 3.0.25)
i18n
jeweler
launchy (= 0.3.7)
nokogiri (= 1.4.4)
rake (= 0.8.7)
roxml
rspec
sinatra (= 1.1.2)
thin (= 1.2.7)
thor (= 0.14.6)
twitter-stream (= 0.1.10)
yajl-ruby (= 0.7.9)
yard
64 changes: 64 additions & 0 deletions README.markdown
@@ -0,0 +1,64 @@
# Sonia ![Still Maintained](http://stillmaintained.com/pusewicz/sonia.png) ![Dependencies](https://gemnasium.com/pusewicz/sonia.png?travis)

Sonia is an Awesome Office Dashboard.

## What is Sonia?

![Sonia](http://soniaapp.com/images/screenshot.png)

<script type="text/javascript" src="http://www.ohloh.net/p/482920/widgets/project_users_logo.js"></script>

<a href="http://flattr.com/thing/118361/Awesome-Office-Dashboard" target="_blank">
<img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>

Sonia allows you to set up a dashboard with information that is important to you. Think [Panic's Status Board](http://www.panic.com/blog/2010/03/the-panic-status-board/).

At the moment, Sonia comes with [Campfire](http://campfirenow.com/), [Foursquare](http://foursquare.com/), [Github](http://github.com/), [Icinga](http://www.icinga.org/), RSS, [TfL](http://www.tfl.gov.uk/), [Twitter](http://www.twitter.com/) and [Yahoo! Weather](http://weather.yahoo.com/) widgets.

Go ahead and have a look at [the demo](http://demo.soniaapp.com:8080/).

Thanks to Aaalex, you can watch a nice screencast introduction to Sonia at [RubyPulse](http://www.rubypulse.com/episode-0.38_sonia.html).

# BYOW

Bring Your Own Widgets! It's so easy to create your own widgets! Have a look at [example](http://github.com/pusewicz/sonia/tree/master/widgets/) ones.

## Requirements

* Ruby 1.9.2
* Bundler gem `gem install bundler`

## Quick Start

$ git clone http://github.com/pusewicz/sonia.git

# If you are using RVM (Ruby Version Manager)
$ rvm 1.9.2
$ rvm gemset create sonia

# Run Sonia
$ cd sonia
$ bundle install
$ ./bin/sonia start --config example/config.yml

## More Information

Have a look in the [Wiki](http://wiki.github.com/pusewicz/sonia/).

Initial documentation is available on [YardDoc](http://yardoc.org/docs/pusewicz-sonia).

Follow Sonia on [Twitter](http://www.twitter.com/soniaappcom).

## Note on Patches/Pull Requests

* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a
future version unintentionally.
* Commit, do not mess with rakefile, version, or history.
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.

## Copyright

Copyright (c) 2010 Piotr Usewicz. See LICENSE for details.
17 changes: 0 additions & 17 deletions README.rdoc

This file was deleted.

56 changes: 38 additions & 18 deletions Rakefile
@@ -1,38 +1,60 @@
require 'rubygems'
require 'rake'
require 'bundler'

begin
Bundler.setup
rescue Bundler::BundlerError => e
$stderr.puts e.message
$stderr.puts "Run `bundle install` to install missing gems"
exit e.status_code
end

$LOAD_PATH.unshift('lib')

require 'sonia'

begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "sonia"
gem.summary = %Q{TODO: one-line summary of your gem}
gem.description = %Q{TODO: longer description of your gem}
gem.summary = %Q{Superawesome Dashboard}
gem.description = %Q{Superawesome Dashboard}
gem.email = "piotr@layer22.com"
gem.homepage = "http://github.com/pusewicz/sonia"
gem.authors = ["Piotr Usewicz"]
gem.add_development_dependency "rspec", ">= 1.2.9"
gem.add_development_dependency "yard", ">= 0"
gem.add_development_dependency "cucumber", ">= 0"
gem.executables = ['sonia']
gem.version = Sonia::VERSION
# gem.add_development_dependency "rspec", ">= 1.2.9"
# gem.add_development_dependency "yard", ">= 0"
# gem.add_development_dependency "cucumber", ">= 0"
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end

require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:spec) do |spec|
spec.libs << 'lib' << 'spec'
spec.spec_files = FileList['spec/**/*_spec.rb']
end
begin
require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:spec) do |spec|
spec.libs << 'lib' << 'spec'
spec.spec_files = FileList['spec/**/*_spec.rb']
end

Spec::Rake::SpecTask.new(:rcov) do |spec|
spec.libs << 'lib' << 'spec'
spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true
end
Spec::Rake::SpecTask.new(:rcov) do |spec|
spec.libs << 'lib' << 'spec'
spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true
end

task :spec => :check_dependencies
task :spec => :check_dependencies
task :default => :spec
rescue LoadError
task :spec do
abort "RSpec is not available. In order to run rspec, you must: sudo gem install rspec"
end
end

begin
require 'cucumber/rake/task'
Expand All @@ -45,8 +67,6 @@ rescue LoadError
end
end

task :default => :spec

begin
require 'yard'
YARD::Rake::YardocTask.new
Expand Down
17 changes: 17 additions & 0 deletions bin/sonia
@@ -0,0 +1,17 @@
#!/usr/bin/env ruby

begin
# Try to require the preresolved locked set of gems.
require File.expand_path('../.bundle/environment', __FILE__)
rescue LoadError
# Fall back on doing an unlocked resolve at runtime.
require "rubygems"
require "bundler"
Bundler.setup(:runtime)
end

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')

require "sonia/cli"

Sonia::CLI.start
73 changes: 73 additions & 0 deletions example/config.yml.example
@@ -0,0 +1,73 @@
# Example configuration file for all Sonia Widgets

# Cofiguration for webserver host and port
webserver:
host: localhost
port: 8080

# Configuration for websocket host and port
websocket:
host: localhost
port: 9090

# Configuration for Widgets
widgets:
Twitter:
title: Our Tweets # Title for Twitter widget
name: twitter
nitems: 5 # Number of tweets to show
username: username # Username for Twitter account
password: password # Password for Twitter account
follow: soniaappcom # What users to follow, and effectively what user's tweets to show

Tfl:
title: TfL Status # Title for TFL widget
name: tfl

Foursquare:
title: Where we are # Title for Foursquare widget
name: foursquare
username: username_email_or_mobile_number # Username for Foursquare account
password: password # Password for Foursquare account

Campfire:
title: Campfire # Title for Campfire widget
name: campfire
room_id: 1 # Campfire room id to watch for new messages
url: "https://sample.campfirenow.com" # Your Campfire URL
token: your_api_key # API Token from My Info tab
nitems: 5 # Number of messages to show

Icinga:
title: Icinga Status # Title for Icinga widget
name: icinga
username: icingaadmin # Username for Icinga
password: icingaadmin # Password for Icinga
url: "http://localhost/icinga/cgi-bin/tac.cgi" # URL to tac.cgi

Github:
title: Github Commits # Title for Github widget
name: github
username: your_username # Username for Github account
token: your_token # Token for Github account
nitems: 5 # Number of commits to show

YahooWeather:
title: Weather for Paris # Title for YahooWeather widget
name: yahoo_weather
woeid: 615702 # Where on Earth IDentifier (http://developer.yahoo.com/geo/geoplanet/guide/concepts.html)
units: celsius # Units, either celcius or fahrenheit

RSS:
title: Feeds # Title for RSS widget
name: RSS
poll_time: 20 # Poll time frequency
url: "http://www.engadget.com/rss.xml" # URL to RSS feed
xpath: "//item//title" # XPath to content to show
nitems: 5 # Number of RSS items to show

Hoptoad:
title: Apps errors
name: hoptoad
account: foo
auth_key: foobarbaz