groove 0.0.5 → 0.0.6
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/README.md +4 -20
- data/Rakefile +2 -0
- data/VERSION +1 -1
- data/bin/groove +71 -0
- data/groove.gemspec +4 -1
- metadata +5 -4
data/README.md
CHANGED
@@ -6,24 +6,9 @@ A web application stack composed of Sinatra, MongoDB, Effigy, and Hoptoad.
|
|
6
6
|
Usage
|
7
7
|
-----
|
8
8
|
|
9
|
-
|
9
|
+
thor groove weekapaug
|
10
10
|
|
11
|
-
|
12
|
-
Groove.config = { :db => ENV['DATABASE'] || 'weekapaug',
|
13
|
-
:db_url => ENV['DATABASE_URL'] || 'localhost',
|
14
|
-
:db_user => ENV['DATABASE_USER'],
|
15
|
-
:db_password => ENV['DATABASE_PASSWORD'],
|
16
|
-
:hoptoad => ENV['HOPTOAD'] }
|
17
|
-
require 'app'
|
18
|
-
run Sinatra::Application
|
19
|
-
|
20
|
-
vim app.rb
|
21
|
-
|
22
|
-
get '/' do
|
23
|
-
effigy :weekapaug
|
24
|
-
end
|
25
|
-
|
26
|
-
vim templates/weekapaug.html
|
11
|
+
vim templates/index.html
|
27
12
|
|
28
13
|
<!DOCTYPE html>
|
29
14
|
<html>
|
@@ -35,9 +20,9 @@ vim templates/weekapaug.html
|
|
35
20
|
</body>
|
36
21
|
</html>
|
37
22
|
|
38
|
-
vim views/
|
23
|
+
vim views/index.rb
|
39
24
|
|
40
|
-
class
|
25
|
+
class IndexView < Effigy::View
|
41
26
|
def transform
|
42
27
|
text('h1', DB['grooves'].find(:name => 'weekapaug'))
|
43
28
|
end
|
@@ -53,5 +38,4 @@ heroku config
|
|
53
38
|
DATABASE_USER => user
|
54
39
|
DATABASE_PASSWORD => password
|
55
40
|
HOPTOAD => apikey123
|
56
|
-
RACK_ENV => production
|
57
41
|
|
data/Rakefile
CHANGED
@@ -7,6 +7,8 @@ Jeweler::Tasks.new do |gem|
|
|
7
7
|
gem.email = "dcroak@thoughtbot.com"
|
8
8
|
gem.homepage = "http://github.com/dancroak/groove"
|
9
9
|
gem.authors = ["Dan Croak"]
|
10
|
+
gem.bindir = "bin"
|
11
|
+
gem.executables = ["groove"]
|
10
12
|
|
11
13
|
gem.add_dependency('x')
|
12
14
|
gem.add_dependency('sinatra')
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.6
|
data/bin/groove
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- mode: ruby -*-
|
3
|
+
|
4
|
+
require 'thor'
|
5
|
+
|
6
|
+
class Groove < Thor::Group
|
7
|
+
include Thor::Actions
|
8
|
+
|
9
|
+
argument :name
|
10
|
+
|
11
|
+
def create_directory
|
12
|
+
directory(name)
|
13
|
+
end
|
14
|
+
|
15
|
+
def create_rackup
|
16
|
+
create_file("#{name}/config.ru") do
|
17
|
+
<<-RUBY
|
18
|
+
Groove.config = { :db => ENV['DATABASE'] || '#{name}',
|
19
|
+
:db_url => ENV['DATABASE_URL'] || 'localhost',
|
20
|
+
:db_user => ENV['DATABASE_USER'],
|
21
|
+
:db_password => ENV['DATABASE_PASSWORD'],
|
22
|
+
:hoptoad => ENV['HOPTOAD'] }
|
23
|
+
RUBY
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def create_app
|
28
|
+
create_file("#{name}/app.rb") do
|
29
|
+
<<-RUBY
|
30
|
+
get '/' do
|
31
|
+
effigy :index
|
32
|
+
end
|
33
|
+
RUBY
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def create_templates_directory
|
38
|
+
directory("#{name}/templates")
|
39
|
+
end
|
40
|
+
|
41
|
+
def create_index_template
|
42
|
+
create_file("#{name}/templates/index.html") do
|
43
|
+
<<-HTML
|
44
|
+
<!DOCTYPE html>
|
45
|
+
<html>
|
46
|
+
<head>
|
47
|
+
<title>#{name}</title>
|
48
|
+
</head>
|
49
|
+
<body>
|
50
|
+
<h1>#{name}</h1>
|
51
|
+
</body>
|
52
|
+
</html>
|
53
|
+
HTML
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def create_views_directory
|
58
|
+
directory("#{name}/views")
|
59
|
+
end
|
60
|
+
|
61
|
+
def create_index_template
|
62
|
+
create_file("#{name}/views/index.rb") do
|
63
|
+
<<-RUBY
|
64
|
+
class IndexView < Effigy::View
|
65
|
+
def transform
|
66
|
+
end
|
67
|
+
end
|
68
|
+
RUBY
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
data/groove.gemspec
CHANGED
@@ -5,13 +5,15 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{groove}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Dan Croak"]
|
12
12
|
s.date = %q{2009-12-31}
|
13
|
+
s.default_executable = %q{groove}
|
13
14
|
s.description = %q{A web application stack composed of Sinatra, MongoDB, Effigy, and Hoptoad.}
|
14
15
|
s.email = %q{dcroak@thoughtbot.com}
|
16
|
+
s.executables = ["groove"]
|
15
17
|
s.extra_rdoc_files = [
|
16
18
|
"README.md"
|
17
19
|
]
|
@@ -20,6 +22,7 @@ Gem::Specification.new do |s|
|
|
20
22
|
"README.md",
|
21
23
|
"Rakefile",
|
22
24
|
"VERSION",
|
25
|
+
"bin/groove",
|
23
26
|
"groove.gemspec",
|
24
27
|
"lib/groove.rb",
|
25
28
|
"lib/groove/effigy.rb",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: groove
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Croak
|
@@ -10,7 +10,7 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
|
12
12
|
date: 2009-12-31 00:00:00 -05:00
|
13
|
-
default_executable:
|
13
|
+
default_executable: groove
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: x
|
@@ -64,8 +64,8 @@ dependencies:
|
|
64
64
|
version:
|
65
65
|
description: A web application stack composed of Sinatra, MongoDB, Effigy, and Hoptoad.
|
66
66
|
email: dcroak@thoughtbot.com
|
67
|
-
executables:
|
68
|
-
|
67
|
+
executables:
|
68
|
+
- groove
|
69
69
|
extensions: []
|
70
70
|
|
71
71
|
extra_rdoc_files:
|
@@ -75,6 +75,7 @@ files:
|
|
75
75
|
- README.md
|
76
76
|
- Rakefile
|
77
77
|
- VERSION
|
78
|
+
- bin/groove
|
78
79
|
- groove.gemspec
|
79
80
|
- lib/groove.rb
|
80
81
|
- lib/groove/effigy.rb
|