tanuki 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. data/README.rdoc +5 -4
  2. data/app/tanuki/controller/{link.thtml → controller.link.thtml} +0 -0
  3. data/app/tanuki/controller/controller.page.thtml +14 -0
  4. data/app/tanuki/controller/controller.rb +1 -2
  5. data/app/tanuki/controller/controller.title.ttxt +1 -0
  6. data/app/tanuki/controller/controller.view.thtml +3 -0
  7. data/app/tanuki/fetcher/sequel/sequel.rb +34 -0
  8. data/app/tanuki/manager/controller/controller.rb +1 -1
  9. data/app/tanuki/manager/page/page.rb +1 -1
  10. data/app/tanuki/meta_model/{manager.ttxt → meta_model.manager.ttxt} +0 -0
  11. data/app/tanuki/meta_model/{manager_base.ttxt → meta_model.manager_base.ttxt} +0 -0
  12. data/app/tanuki/meta_model/{model.ttxt → meta_model.model.ttxt} +0 -0
  13. data/app/tanuki/meta_model/{model_base.ttxt → meta_model.model_base.ttxt} +0 -0
  14. data/app/tanuki/meta_model/meta_model.rb +1 -2
  15. data/app/tanuki/model/controller/controller.rb +1 -1
  16. data/app/tanuki/model/page/page.rb +1 -1
  17. data/app/tanuki/page/missing/{default.thtml → missing.page.thtml} +1 -1
  18. data/app/tanuki/page/missing/missing.rb +3 -2
  19. data/app/user/page/home/home.rb +2 -0
  20. data/app/user/page/home/home.title.thtml +1 -0
  21. data/app/user/page/home/home.view.css +88 -0
  22. data/app/user/page/home/home.view.thtml +22 -0
  23. data/bin/tanuki +2 -1
  24. data/config/common.rb +1 -0
  25. data/config/common_application.rb +3 -6
  26. data/config/development_application.rb +0 -3
  27. data/lib/tanuki.rb +8 -7
  28. data/lib/tanuki/application.rb +108 -81
  29. data/lib/tanuki/argument.rb +10 -5
  30. data/lib/tanuki/argument/integer_range.rb +4 -2
  31. data/lib/tanuki/{behavior/object_behavior.rb → base_behavior.rb} +21 -4
  32. data/lib/tanuki/configurator.rb +20 -8
  33. data/lib/tanuki/const.rb +32 -0
  34. data/lib/tanuki/context.rb +18 -7
  35. data/lib/tanuki/controller.rb +517 -0
  36. data/lib/tanuki/css_compressor.rb +50 -0
  37. data/lib/tanuki/extensions/module.rb +21 -5
  38. data/lib/tanuki/extensions/rack/frozen_route.rb +35 -0
  39. data/lib/tanuki/extensions/rack/static_dir.rb +1 -1
  40. data/lib/tanuki/extensions/sequel/model.rb +7 -0
  41. data/lib/tanuki/i18n.rb +8 -6
  42. data/lib/tanuki/loader.rb +166 -33
  43. data/lib/tanuki/meta_model.rb +176 -0
  44. data/lib/tanuki/{behavior/model_behavior.rb → model_behavior.rb} +7 -3
  45. data/lib/tanuki/model_generator.rb +49 -29
  46. data/lib/tanuki/template_compiler.rb +72 -41
  47. data/lib/tanuki/utility.rb +11 -4
  48. data/lib/tanuki/utility/create.rb +52 -11
  49. data/lib/tanuki/utility/generate.rb +16 -10
  50. data/lib/tanuki/utility/version.rb +1 -1
  51. data/lib/tanuki/version.rb +7 -2
  52. metadata +50 -66
  53. data/app/tanuki/controller/default.thtml +0 -5
  54. data/app/tanuki/controller/index.thtml +0 -1
  55. data/app/user/page/index/default.thtml +0 -121
  56. data/app/user/page/index/index.rb +0 -2
  57. data/config/test_application.rb +0 -2
  58. data/lib/tanuki/behavior/controller_behavior.rb +0 -366
  59. data/lib/tanuki/behavior/meta_model_behavior.rb +0 -160
  60. data/lib/tanuki/extensions/rack/builder.rb +0 -26
  61. data/lib/tanuki/extensions/rack/server.rb +0 -18
  62. data/lib/tanuki/launcher.rb +0 -21
  63. data/lib/tanuki/utility/server.rb +0 -23
@@ -8,7 +8,8 @@ module Tanuki
8
8
  class << self
9
9
 
10
10
  # Executes given +args+.
11
- # The first item in +args+ is the name of a command, and the rest are arguments for the command.
11
+ # The first item in +args+ is the name of a command,
12
+ # and the rest are arguments for the command.
12
13
  def execute(args)
13
14
  case args[0]
14
15
  when 'exit' then @in_repl ? (puts 'Bye bye!'; return false) : help
@@ -33,7 +34,7 @@ module Tanuki
33
34
  @in_repl = false
34
35
  @commands = []
35
36
  @help = {}
36
- Dir.glob(File.expand_path(File.join('..', 'utility', '*.rb'), __FILE__)) do |file|
37
+ Dir.glob(File.expand_path('../utility/*.rb', __FILE__)) do |file|
37
38
  if match = file.match(/\/([^\/]+).rb/)
38
39
  require file
39
40
  command = match[1].to_sym
@@ -44,15 +45,21 @@ module Tanuki
44
45
  execute ARGV
45
46
  end
46
47
 
48
+ # Splits a given string +s+ to an argument list.
49
+ def split_args(s)
50
+ s.chomp.scan(/(?<=")[^"]*(?=")|[^\s]+/)
51
+ end
52
+
47
53
  # Starts a REPL (framework console).
48
- # In this console +command [args]+ call is equivalent to +tanuki command [args]+ in the terminal.
54
+ # In this console +command [args]+ call is equivalent to
55
+ # +tanuki command [args]+ in the terminal.
49
56
  def start_repl
50
57
  @in_repl = true
51
58
  @help[:exit] = 'exit this utility'
52
59
  version
53
60
  print 'tanuki>'
54
61
  begin
55
- print "\ntanuki>" while gets && execute($_.chomp.scan(/(?<=")[^"]*(?=")|[^\s]+/))
62
+ print "\ntanuki>" while gets && execute(split_args($_))
56
63
  rescue Interrupt
57
64
  puts "\nBye bye!"
58
65
  end
@@ -17,19 +17,60 @@ module Tanuki
17
17
  return
18
18
  end
19
19
  version unless @in_repl
20
- puts "\n creating #{name = name.downcase}"
20
+ puts "Creating `#{name}'\n"
21
21
  FileUtils.mkdir project_dir
22
- file_source = File.expand_path(File.join('..', '..', '..', '..'), __FILE__)
23
- puts " creating #{File.join(name, 'app')}"
24
- FileUtils.mkdir_p File.join(project_dir, 'app', 'user')
25
- FileUtils.cp_r File.join(file_source, 'app', 'user'), File.join(project_dir, 'app')
26
- puts " creating #{File.join(name, 'gen')}"
27
- FileUtils.mkdir(gen_dir = File.join(project_dir, 'gen'))
22
+ file_source = File.expand_path('../../../..', __FILE__)
23
+ name_pos = ((file_source.length + 1)..-1)
24
+
25
+ # ./app/
26
+ puts ' app/'
27
+ FileUtils.mkdir "#{project_dir}/app"
28
+ puts ' app/user/'
29
+ FileUtils.mkdir "#{project_dir}/app/user"
30
+ Dir.glob("#{file_source}/app/user/**/*") do |file|
31
+ is_dir = File.directory? file
32
+ puts " #{file[name_pos]}#{'/' if is_dir}"
33
+ if is_dir
34
+ FileUtils.mkdir("#{project_dir}/#{file[name_pos]}")
35
+ else
36
+ FileUtils.cp(file, "#{project_dir}/#{file[name_pos]}")
37
+ end
38
+ end
39
+
40
+ # ./gen/
41
+ puts ' gen/'
42
+ FileUtils.mkdir(gen_dir = "#{project_dir}/gen")
28
43
  FileUtils.chmod(0777, gen_dir)
29
- puts " creating #{File.join(name, 'public')}"
30
- FileUtils.mkdir(File.join(project_dir, 'public'))
31
- puts " creating #{File.join(name, 'schema')}"
32
- FileUtils.mkdir(File.join(project_dir, 'schema'))
44
+
45
+ # ./public/
46
+ puts ' public/'
47
+ FileUtils.mkdir("#{project_dir}/public")
48
+
49
+ # ./schema/
50
+ puts ' schema/'
51
+ FileUtils.mkdir("#{project_dir}/schema")
52
+
53
+ # ./config.ru
54
+ puts ' config.ru'
55
+ File.open("#{project_dir}/config.ru", 'w') do |f|
56
+ f << "require 'bundler'\nBundler.require\n" <<
57
+ "run Tanuki::Application.build(self)\n"
58
+ end
59
+
60
+ # ./Gemfile
61
+ puts ' Gemfile'
62
+ File.open("#{project_dir}/Gemfile", 'w') do |f|
63
+ f << "source :rubygems\ngem 'tanuki', '~> #{Tanuki.version}'\n"
64
+ end
65
+
66
+ # ./README.rdoc
67
+ puts ' README.rdoc'
68
+ File.open("#{project_dir}/README.rdoc", 'w') do |f|
69
+ f << "= #{title = name.titleize}\n\n" <<
70
+ "#{title} is a " <<
71
+ "{Tanuki}[https://assistunion.com/sharing] application.\n"
72
+ end
73
+
33
74
  Dir.chdir(project_dir) if @in_repl
34
75
  end
35
76
 
@@ -4,26 +4,28 @@ module Tanuki
4
4
 
5
5
  @help[:generate] = 'generate models for application schema'
6
6
 
7
- # Generates models for application schema in the current directory or +cwd+.
7
+ # Generates models for application schema
8
+ # in the current directory or +cwd+.
8
9
  def self.generate(cwd=nil)
9
10
  version unless @in_repl
10
11
  cwd = cwd ? File.expand_path(cwd) : Dir.pwd
11
- puts "Working directory is: #{cwd}\nTo specify another: `generate <path>'"
12
+ puts "Working directory is: #{cwd}",
13
+ "To specify another: `generate <path>'"
12
14
  require 'active_support/inflector'
13
15
  require 'yaml'
14
16
  require 'fileutils'
15
- require 'tanuki/extensions/object'
16
- require 'tanuki/behavior/meta_model_behavior'
17
- require 'tanuki/behavior/model_behavior'
18
- require 'tanuki/behavior/object_behavior'
17
+ require 'tanuki/base_behavior'
19
18
  require 'tanuki/configurator'
20
19
  require 'tanuki/context'
21
20
  require 'tanuki/loader'
22
21
  require 'tanuki/template_compiler'
22
+ require 'tanuki/meta_model'
23
+ require 'tanuki/model_behavior'
23
24
  require 'tanuki/model_generator'
24
25
 
25
26
  ctx = Loader.context = Context
26
- default_root = File.expand_path(File.join('..', '..', '..', '..'), __FILE__)
27
+ ctx.resources = {}
28
+ default_root = File.expand_path('../../../..', __FILE__)
27
29
  cfg = Configurator.new(ctx, cwd)
28
30
 
29
31
  # Load defaults
@@ -37,13 +39,17 @@ module Tanuki
37
39
  end
38
40
 
39
41
  puts "\n looking for models"
40
- local_schema_root = File.expand_path(File.join('..', '..', '..', '..', 'schema'), __FILE__)
42
+ local_schema_root = File.expand_path('../../../../schema', __FILE__)
41
43
  mg = ModelGenerator.new(ctx)
42
44
  mg.generate ctx.schema_root
43
- mg.generate local_schema_root unless ctx.schema_root == local_schema_root
45
+ unless ctx.schema_root == local_schema_root
46
+ mg.generate local_schema_root
47
+ end
44
48
  mg.tried.each_pair do |name, arys|
45
49
  puts "\n found: #{name}"
46
- arys.each_pair {|ary_name, ary| puts %{ #{ary_name}:\n - #{ary.join "\n - "}} unless ary.empty? }
50
+ arys.each_pair do |ary_name, ary|
51
+ puts %{ #{ary_name}:\n - #{ary.join "\n - "}} unless ary.empty?
52
+ end
47
53
  end
48
54
  end
49
55
 
@@ -7,7 +7,7 @@ module Tanuki
7
7
  # Prints the running framework version.
8
8
  def self.version
9
9
  require 'tanuki/version'
10
- puts "Tanuki version #{VERSION}"
10
+ puts "Tanuki version #{Tanuki.version}"
11
11
  end
12
12
 
13
13
  end # Utility
@@ -1,6 +1,11 @@
1
1
  module Tanuki
2
2
 
3
- # Tanuki framework version.
4
- VERSION = '0.3.1'
3
+ # Tanuki framework version as an Array.
4
+ VERSION = [0, 4, 0].freeze
5
+
6
+ # Returns Tanuki framework version as a dotted string.
7
+ def self.version
8
+ VERSION.join '.'
9
+ end
5
10
 
6
11
  end # Tanuki
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tanuki
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 3
8
- - 1
9
- version: 0.3.1
4
+ prerelease:
5
+ version: 0.4.0
10
6
  platform: ruby
11
7
  authors:
12
8
  - Anatoly Ressin
@@ -15,93 +11,86 @@ autorequire:
15
11
  bindir: bin
16
12
  cert_chain: []
17
13
 
18
- date: 2011-02-05 00:00:00 +02:00
14
+ date: 2011-03-16 00:00:00 +01:00
19
15
  default_executable:
20
16
  dependencies:
21
17
  - !ruby/object:Gem::Dependency
22
- name: rack
18
+ name: bundler
23
19
  prerelease: false
24
20
  requirement: &id001 !ruby/object:Gem::Requirement
25
21
  none: false
26
22
  requirements:
27
23
  - - ~>
28
24
  - !ruby/object:Gem::Version
29
- segments:
30
- - 1
31
- - 0
32
- version: "1.0"
25
+ version: 1.0.10
33
26
  type: :runtime
34
27
  version_requirements: *id001
35
28
  - !ruby/object:Gem::Dependency
36
- name: sequel
29
+ name: rack
37
30
  prerelease: false
38
31
  requirement: &id002 !ruby/object:Gem::Requirement
39
32
  none: false
40
33
  requirements:
41
34
  - - ~>
42
35
  - !ruby/object:Gem::Version
43
- segments:
44
- - 3
45
- - 14
46
- version: "3.14"
36
+ version: "1.0"
47
37
  type: :runtime
48
38
  version_requirements: *id002
49
39
  - !ruby/object:Gem::Dependency
50
- name: escape_utils
40
+ name: sequel
51
41
  prerelease: false
52
42
  requirement: &id003 !ruby/object:Gem::Requirement
53
43
  none: false
54
44
  requirements:
55
45
  - - ~>
56
46
  - !ruby/object:Gem::Version
57
- segments:
58
- - 0
59
- - 1
60
- version: "0.1"
47
+ version: "3.14"
61
48
  type: :runtime
62
49
  version_requirements: *id003
63
50
  - !ruby/object:Gem::Dependency
64
- name: activesupport
51
+ name: escape_utils
65
52
  prerelease: false
66
53
  requirement: &id004 !ruby/object:Gem::Requirement
67
54
  none: false
68
55
  requirements:
69
56
  - - ~>
70
57
  - !ruby/object:Gem::Version
71
- segments:
72
- - 3
73
- - 0
74
- version: "3.0"
58
+ version: "0.1"
75
59
  type: :runtime
76
60
  version_requirements: *id004
77
61
  - !ruby/object:Gem::Dependency
78
- name: i18n
62
+ name: activesupport
79
63
  prerelease: false
80
64
  requirement: &id005 !ruby/object:Gem::Requirement
81
65
  none: false
82
66
  requirements:
83
67
  - - ~>
84
68
  - !ruby/object:Gem::Version
85
- segments:
86
- - 0
87
- - 4
88
- version: "0.4"
69
+ version: "3.0"
89
70
  type: :runtime
90
71
  version_requirements: *id005
91
72
  - !ruby/object:Gem::Dependency
92
- name: rspec
73
+ name: i18n
93
74
  prerelease: false
94
75
  requirement: &id006 !ruby/object:Gem::Requirement
95
76
  none: false
96
77
  requirements:
97
78
  - - ~>
98
79
  - !ruby/object:Gem::Version
99
- segments:
100
- - 1
101
- - 3
102
- version: "1.3"
103
- type: :development
80
+ version: "0.4"
81
+ type: :runtime
104
82
  version_requirements: *id006
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ prerelease: false
86
+ requirement: &id007 !ruby/object:Gem::Requirement
87
+ none: false
88
+ requirements:
89
+ - - ~>
90
+ - !ruby/object:Gem::Version
91
+ version: "2.5"
92
+ type: :development
93
+ version_requirements: *id007
105
94
  description: Tanuki is an MVVM-inspired web framework that fancies idiomatic Ruby, DRY and extensibility by its design.
106
95
  email: tanuki@withballs.org
107
96
  executables:
@@ -113,55 +102,58 @@ extra_rdoc_files: []
113
102
  files:
114
103
  - app/tanuki/attribute/attribute.rb
115
104
  - app/tanuki/base/base.rb
105
+ - app/tanuki/controller/controller.link.thtml
106
+ - app/tanuki/controller/controller.page.thtml
116
107
  - app/tanuki/controller/controller.rb
117
- - app/tanuki/controller/default.thtml
118
- - app/tanuki/controller/index.thtml
119
- - app/tanuki/controller/link.thtml
108
+ - app/tanuki/controller/controller.title.ttxt
109
+ - app/tanuki/controller/controller.view.thtml
110
+ - app/tanuki/fetcher/sequel/sequel.rb
120
111
  - app/tanuki/manager/controller/controller.rb
121
112
  - app/tanuki/manager/page/page.rb
122
- - app/tanuki/meta_model/manager.ttxt
123
- - app/tanuki/meta_model/manager_base.ttxt
113
+ - app/tanuki/meta_model/meta_model.manager.ttxt
114
+ - app/tanuki/meta_model/meta_model.manager_base.ttxt
115
+ - app/tanuki/meta_model/meta_model.model.ttxt
116
+ - app/tanuki/meta_model/meta_model.model_base.ttxt
124
117
  - app/tanuki/meta_model/meta_model.rb
125
- - app/tanuki/meta_model/model.ttxt
126
- - app/tanuki/meta_model/model_base.ttxt
127
118
  - app/tanuki/model/controller/controller.rb
128
119
  - app/tanuki/model/model.rb
129
120
  - app/tanuki/model/page/page.rb
130
- - app/tanuki/page/missing/default.thtml
121
+ - app/tanuki/page/missing/missing.page.thtml
131
122
  - app/tanuki/page/missing/missing.rb
132
- - app/user/page/index/default.thtml
133
- - app/user/page/index/index.rb
123
+ - app/user/page/home/home.rb
124
+ - app/user/page/home/home.title.thtml
125
+ - app/user/page/home/home.view.css
126
+ - app/user/page/home/home.view.thtml
134
127
  - bin/tanuki
135
128
  - config/common.rb
136
129
  - config/common_application.rb
137
130
  - config/development_application.rb
138
131
  - config/production_application.rb
139
- - config/test_application.rb
140
132
  - lib/tanuki/application.rb
141
133
  - lib/tanuki/argument/base.rb
142
134
  - lib/tanuki/argument/integer.rb
143
135
  - lib/tanuki/argument/integer_range.rb
144
136
  - lib/tanuki/argument/string.rb
145
137
  - lib/tanuki/argument.rb
146
- - lib/tanuki/behavior/controller_behavior.rb
147
- - lib/tanuki/behavior/meta_model_behavior.rb
148
- - lib/tanuki/behavior/model_behavior.rb
149
- - lib/tanuki/behavior/object_behavior.rb
138
+ - lib/tanuki/base_behavior.rb
150
139
  - lib/tanuki/configurator.rb
140
+ - lib/tanuki/const.rb
151
141
  - lib/tanuki/context.rb
142
+ - lib/tanuki/controller.rb
143
+ - lib/tanuki/css_compressor.rb
152
144
  - lib/tanuki/extensions/module.rb
153
- - lib/tanuki/extensions/rack/builder.rb
154
- - lib/tanuki/extensions/rack/server.rb
145
+ - lib/tanuki/extensions/rack/frozen_route.rb
155
146
  - lib/tanuki/extensions/rack/static_dir.rb
147
+ - lib/tanuki/extensions/sequel/model.rb
156
148
  - lib/tanuki/i18n.rb
157
- - lib/tanuki/launcher.rb
158
149
  - lib/tanuki/loader.rb
150
+ - lib/tanuki/meta_model.rb
151
+ - lib/tanuki/model_behavior.rb
159
152
  - lib/tanuki/model_generator.rb
160
153
  - lib/tanuki/template_compiler.rb
161
154
  - lib/tanuki/utility/create.rb
162
155
  - lib/tanuki/utility/generate.rb
163
156
  - lib/tanuki/utility/help.rb
164
- - lib/tanuki/utility/server.rb
165
157
  - lib/tanuki/utility/version.rb
166
158
  - lib/tanuki/utility.rb
167
159
  - lib/tanuki/version.rb
@@ -188,25 +180,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
188
180
  requirements:
189
181
  - - ~>
190
182
  - !ruby/object:Gem::Version
191
- segments:
192
- - 1
193
- - 9
194
- - 2
195
183
  version: 1.9.2
196
184
  required_rubygems_version: !ruby/object:Gem::Requirement
197
185
  none: false
198
186
  requirements:
199
187
  - - ">="
200
188
  - !ruby/object:Gem::Version
201
- segments:
202
- - 1
203
- - 3
204
- - 6
205
189
  version: 1.3.6
206
190
  requirements: []
207
191
 
208
192
  rubyforge_project:
209
- rubygems_version: 1.3.7
193
+ rubygems_version: 1.5.2
210
194
  signing_key:
211
195
  specification_version: 3
212
196
  summary: Web framework with balls!
@@ -1,5 +0,0 @@
1
- % if visual_child
2
- <%! visual_child.default_view -%>
3
- % else
4
- <%! index_view -%>
5
- % end
@@ -1 +0,0 @@
1
- <%= self.class %> is under construction
@@ -1,121 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <title>Welcome to Tanuki</title>
6
- <style type="text/css" media="screen">
7
- body {
8
- margin: 0;
9
- padding: 0;
10
- font-family: 'Trebuchet MS', Helvetica, sans-serif;
11
- font-size: 11pt;
12
- background-color: #f5f4ef;
13
- color: #000305;
14
- }
15
-
16
- #header {
17
- margin: 0 auto;
18
- width: 540px;
19
- }
20
-
21
- div.top {
22
- background-color: #fff;
23
- margin: 0 auto 20px auto;
24
- padding: 15px 20px 0 20px;
25
- width: 540px;
26
- border-radius: 10px;
27
- -moz-border-radius: 10px;
28
- -webkit-border-radius: 10px;
29
- }
30
-
31
- h1 {
32
- margin: 20px 0;
33
- padding: 0;
34
- font-size: 22pt;
35
- }
36
-
37
- h1 em {
38
- display: block;
39
- font-style: normal;
40
- font-size: 12pt;
41
- color: #777a7c;
42
- }
43
-
44
- h2 {
45
- margin: 0 0 15px 0;
46
- padding: 0;
47
- font-size: 16pt;
48
- }
49
-
50
- #next ol {
51
- margin: 0;
52
- padding-bottom: 25px;
53
- }
54
-
55
- #next li {
56
- margin: 0;
57
- padding: 0;
58
- font-size: 16pt;
59
- font-weight: bold;
60
- color: #c74451;
61
- }
62
-
63
- #next li span {
64
- font-size: 11pt;
65
- font-weight: normal;
66
- color: #000305;
67
- }
68
-
69
- code {
70
- font-family: 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Menlo, Monaco, Consolas, 'Courier New', monospace;
71
- font-size: 10pt;
72
- background-color: #fffccc;
73
- padding: 1px 3px;
74
- }
75
-
76
- #env div {
77
- padding-bottom: 25px;
78
- }
79
-
80
- #env table {
81
- margin: 0;
82
- padding: 0;
83
- border-collapse: collapse;
84
- color: #444;
85
- }
86
-
87
- #env table th {
88
- text-align: left;
89
- }
90
-
91
- #env table td {
92
- padding-left: 20px;
93
- font-size: 10pt;
94
- }
95
- </style>
96
- </head>
97
- <body>
98
- <div id="header">
99
- <h1>It Works! <em>You have been granted one Tanuki.</em></h1>
100
- </div>
101
- <div class="top" id="next">
102
- <h2>What to do next</h2>
103
- <div>
104
- <p>Here's a few suggestions to get things going:</p>
105
- <ol>
106
- <li><span>To use a database, describe its contents in <code>schema/user</code>.</span></li>
107
- <li><span>To generate models from your schema, run <code>tanuki generate</code>.</span></li>
108
- <li><span>To add or edit controllers, navigate to <code>app/user</code>.</span></li>
109
- </ol>
110
- </div>
111
- </div>
112
- <div class="top" id="env">
113
- <h2>Your setup</h2>
114
- <div><table>
115
- <tr><th>Ruby</th><td><%= RUBY_VERSION %> (<%= RUBY_RELEASE_DATE %>) [<%= RUBY_PLATFORM %>]</td></tr>
116
- <tr><th>Rack</th><td><%= Rack.version %> (on <%= ctx.env['SERVER_SOFTWARE'] %>)</td></tr>
117
- <tr><th>Tanuki</th><td><%= Tanuki::VERSION %></td></tr>
118
- </table></div>
119
- </div>
120
- </body>
121
- </html>