groove 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ *.swp
data/README.md ADDED
@@ -0,0 +1,51 @@
1
+ Groove
2
+ ======
3
+
4
+ A web application stack composed of Sinatra, MongoDB, Effigy, and Hoptoad.
5
+
6
+ Usage
7
+ -----
8
+
9
+ vim config.ru
10
+
11
+ require 'groove'
12
+ require 'app'
13
+ run Sinatra::Application
14
+
15
+ vim app.rb
16
+
17
+ get '/' do
18
+ effigy :weekapaug
19
+ end
20
+
21
+ vim templates/weekapaug.html
22
+
23
+ <!DOCTYPE html>
24
+ <html>
25
+ <head>
26
+ <title>weekapaug groove</title>
27
+ </head>
28
+ <body>
29
+ <h1>sharing in the weekapaug groove</h1>
30
+ </body>
31
+ </html>
32
+
33
+ vim views/weekapaug.rb
34
+
35
+ class IndexView < Effigy::View
36
+ def transform
37
+ end
38
+ end
39
+
40
+ Designed for Heroku and MongoHQ
41
+ -------------------------------
42
+
43
+ heroku config
44
+
45
+ DATABASE => mongodatabasename
46
+ DATABASE_URL => amazon.mongohq.com
47
+ DATABASE_USER => user
48
+ DATABASE_PASSWORD => password
49
+ HOPTOAD => apikey123
50
+ RACK_ENV => production
51
+
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.0
data/lib/groove.rb ADDED
@@ -0,0 +1,6 @@
1
+ require 'rubygems'
2
+ require 'x'
3
+ require 'groove/sinatra'
4
+ require 'groove/mongo'
5
+ require 'groove/effigy'
6
+ require 'groove/hoptoad'
@@ -0,0 +1,13 @@
1
+ require 'effigy'
2
+
3
+ module Sinatra
4
+ module Templates
5
+ def effigy(name)
6
+ root = File.join File.dirname(__FILE__)
7
+ require File.join(root, "views", "#{name}.rb")
8
+ template = File.read File.join(root, "templates", "#{name}.html")
9
+ view = Object.const_get("#{name}_view".camel_case).new
10
+ view.render(template)
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,3 @@
1
+ require 'rack_hoptoad'
2
+
3
+ use Rack::HoptoadNotifier, ENV['HOPTOAD'] || "1234"
@@ -0,0 +1,8 @@
1
+ require 'mongo'
2
+
3
+ include Mongo
4
+
5
+ DB = Connection.new(ENV['DATABASE_URL'] || 'localhost').db(ENV['DATABASE'])
6
+ if ENV['DATABASE_USER'] && ENV['DATABASE_PASSWORD']
7
+ DB.authenticate(ENV['DATABASE_USER'], ENV['DATABASE_PASSWORD'])
8
+ end
@@ -0,0 +1,5 @@
1
+ require 'sinatra'
2
+
3
+ configure :production do
4
+ enable :raise_errors
5
+ end
metadata ADDED
@@ -0,0 +1,62 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: groove
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Dan Croak
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-12-31 00:00:00 -05:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: A web application stack composed of Sinatra, MongoDB, Effigy, and Hoptoad.
17
+ email: dcroak@thoughtbot.com
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - README.md
24
+ files:
25
+ - .gitignore
26
+ - README.md
27
+ - VERSION
28
+ - lib/groove.rb
29
+ - lib/groove/effigy.rb
30
+ - lib/groove/hoptoad.rb
31
+ - lib/groove/mongo.rb
32
+ - lib/groove/sinatra.rb
33
+ has_rdoc: true
34
+ homepage: http://github.com/dancroak/groove
35
+ licenses: []
36
+
37
+ post_install_message:
38
+ rdoc_options:
39
+ - --charset=UTF-8
40
+ require_paths:
41
+ - lib
42
+ required_ruby_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: "0"
47
+ version:
48
+ required_rubygems_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: "0"
53
+ version:
54
+ requirements: []
55
+
56
+ rubyforge_project:
57
+ rubygems_version: 1.3.5
58
+ signing_key:
59
+ specification_version: 3
60
+ summary: A web application stack composed of Sinatra, MongoDB, Effigy, and Hoptoad.
61
+ test_files: []
62
+