tanuki 0.3.0 → 0.3.1
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/LICENSE +1 -1
- data/README.rdoc +10 -2
- data/app/tanuki/attribute/attribute.rb +2 -2
- data/app/tanuki/base/base.rb +2 -2
- data/app/tanuki/controller/controller.rb +2 -2
- data/app/tanuki/controller/default.thtml +1 -1
- data/app/tanuki/controller/index.thtml +1 -1
- data/app/tanuki/controller/link.thtml +1 -1
- data/app/tanuki/manager/controller/controller.rb +2 -0
- data/app/tanuki/manager/page/page.rb +2 -0
- data/app/tanuki/meta_model/manager.ttxt +1 -1
- data/app/tanuki/meta_model/manager_base.ttxt +2 -2
- data/app/tanuki/meta_model/meta_model.rb +2 -2
- data/app/tanuki/meta_model/model.ttxt +1 -1
- data/app/tanuki/meta_model/model_base.ttxt +2 -2
- data/app/tanuki/model/controller/controller.rb +2 -0
- data/app/tanuki/model/model.rb +2 -2
- data/app/tanuki/model/page/page.rb +2 -0
- data/app/tanuki/page/missing/default.thtml +1 -1
- data/app/tanuki/page/missing/missing.rb +2 -2
- data/app/user/page/index/default.thtml +1 -1
- data/app/user/page/index/index.rb +2 -2
- data/bin/tanuki +3 -201
- data/config/common.rb +1 -1
- data/config/common_application.rb +3 -3
- data/config/development_application.rb +1 -1
- data/config/production_application.rb +1 -1
- data/config/test_application.rb +2 -0
- data/lib/tanuki/application.rb +27 -7
- data/lib/tanuki/argument/base.rb +3 -3
- data/lib/tanuki/argument/integer.rb +3 -3
- data/lib/tanuki/argument/integer_range.rb +3 -3
- data/lib/tanuki/argument/string.rb +3 -3
- data/lib/tanuki/argument.rb +3 -3
- data/lib/tanuki/behavior/controller_behavior.rb +40 -8
- data/lib/tanuki/behavior/meta_model_behavior.rb +62 -20
- data/lib/tanuki/behavior/model_behavior.rb +4 -4
- data/lib/tanuki/behavior/object_behavior.rb +2 -2
- data/lib/tanuki/configurator.rb +2 -2
- data/lib/tanuki/context.rb +8 -3
- data/lib/tanuki/extensions/module.rb +16 -1
- data/lib/tanuki/extensions/rack/builder.rb +2 -2
- data/lib/tanuki/extensions/rack/server.rb +2 -2
- data/lib/tanuki/extensions/rack/static_dir.rb +2 -2
- data/lib/tanuki/i18n.rb +2 -2
- data/lib/tanuki/launcher.rb +2 -2
- data/lib/tanuki/loader.rb +24 -4
- data/lib/tanuki/model_generator.rb +114 -0
- data/lib/tanuki/template_compiler.rb +89 -13
- data/lib/tanuki/utility/create.rb +38 -0
- data/lib/tanuki/utility/generate.rb +52 -0
- data/lib/tanuki/utility/help.rb +16 -0
- data/lib/tanuki/utility/server.rb +23 -0
- data/lib/tanuki/utility/version.rb +15 -0
- data/lib/tanuki/utility.rb +65 -0
- data/lib/tanuki/version.rb +2 -2
- data/lib/tanuki.rb +1 -2
- data/schema/tanuki/l10n/en/controller.yml +1 -1
- data/schema/tanuki/l10n/en/page.yml +1 -1
- data/schema/tanuki/l10n/ru/controller.yml +1 -1
- data/schema/tanuki/l10n/ru/page.yml +1 -1
- data/schema/tanuki/models/controller.yml +1 -1
- data/schema/tanuki/models/page.yml +1 -1
- metadata +16 -5
- data/lib/tanuki/extensions/object.rb +0 -12
@@ -1,27 +1,81 @@
|
|
1
1
|
module Tanuki
|
2
2
|
|
3
3
|
# Tanuki::TemplateCompiler is used for, well, compiling templates.
|
4
|
+
#
|
5
|
+
# Tanuki templates are text (or HTML) files with an extended tag syntax.
|
6
|
+
# ERB syntax is forward compatible with Tanuki template syntax.
|
7
|
+
#
|
8
|
+
# The following tags are recognized:
|
9
|
+
#
|
10
|
+
# <% Ruby code -- output to stdout %>
|
11
|
+
# <%= Ruby expression -- replace with result %>
|
12
|
+
# <%# comment -- ignored -- useful in testing %>
|
13
|
+
# % a line of Ruby code -- treated as <% line %>
|
14
|
+
# %% replaced with % if first thing on a line
|
15
|
+
# <%% or %%> -- replace with <% or %> respectively
|
16
|
+
# <%! Ruby expression -- must return a template %> -- renders a template
|
17
|
+
# <%_visitor Ruby code %> -- see Tanuki::Application::visitor for details
|
18
|
+
# <l10n><en>English text</en> ... -- other localizations </l10n>
|
4
19
|
class TemplateCompiler
|
5
20
|
|
6
21
|
class << self
|
7
22
|
|
8
23
|
# Compiles a template from a given +src+ string to +ios+ for method +sym+ in class +klass+.
|
9
24
|
def compile_template(ios, src, klass, sym)
|
10
|
-
ios << "# encoding: #{src.encoding}\nclass #{klass}\
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
25
|
+
ios << "# encoding: #{src.encoding}\nclass #{klass}\n" << TEMPLATE_HEADER % sym
|
26
|
+
compile(ios, src, true)
|
27
|
+
ios << TEMPLATE_FOOTER % sym << "\nend"
|
28
|
+
end
|
29
|
+
|
30
|
+
# Compiles a wikified template from a given +src+ string to method +sym+ for a given object +obj+.
|
31
|
+
def compile_wiki(src, obj, sym)
|
32
|
+
code = StringIO.new
|
33
|
+
code << TEMPLATE_HEADER % sym
|
34
|
+
parse_wiki src
|
35
|
+
compile(code, src, true)
|
36
|
+
code << TEMPLATE_FOOTER % sym
|
37
|
+
obj.instance_eval code
|
38
|
+
end
|
39
|
+
|
40
|
+
# Replaces all wiki inserts like +[[controller?attribute:link#template]]+ with corresponding code in template tags +<%! %>+.
|
41
|
+
def parse_wiki(s)
|
42
|
+
s.gsub WIKI_SYNTAX do
|
43
|
+
code = '<%! self'
|
44
|
+
|
45
|
+
# Controller
|
46
|
+
code << $~[:controller].split('/').map {|route|
|
47
|
+
case route
|
48
|
+
when '' then '.root'
|
49
|
+
when '.' then ''
|
50
|
+
when '..' then '.logical_parent'
|
51
|
+
else "[:#{route}]"
|
52
|
+
end
|
53
|
+
}.join
|
54
|
+
|
55
|
+
code << ".model#{$~[:model].split('.').map {|attr| "[:#{attr}]"}.join}" if $~[:model]
|
56
|
+
code << ".link_to(:#{$~[:link]})" if $~[:link]
|
57
|
+
|
58
|
+
# Template
|
59
|
+
code << case $~[:template]
|
60
|
+
when '' then '.default_view'
|
61
|
+
when nil then '.link_view'
|
62
|
+
else ".#{$~[:template]}_view"
|
63
|
+
end
|
64
|
+
|
65
|
+
code << ' %>'
|
66
|
+
end
|
15
67
|
end
|
16
68
|
|
17
69
|
# Compiles code from a given +src+ string to +ios+.
|
18
|
-
def compile(ios, src)
|
70
|
+
def compile(ios, src, ensure_output=false)
|
19
71
|
state = :outer
|
20
72
|
last_state = nil
|
21
73
|
index = 0
|
22
74
|
trim_newline = false
|
23
75
|
code_buf = ''
|
24
76
|
begin
|
77
|
+
|
78
|
+
# Find out state for expected pattern
|
25
79
|
if new_index = src[index..-1].index(pattern = expect_pattern(state))
|
26
80
|
new_index += index
|
27
81
|
match = src[index..-1].match(pattern)[0]
|
@@ -29,6 +83,8 @@ module Tanuki
|
|
29
83
|
else
|
30
84
|
new_state = nil
|
31
85
|
end
|
86
|
+
|
87
|
+
# Process outer state (e.g. HTML or plain text)
|
32
88
|
if state == :outer
|
33
89
|
s = new_index ? src[index, new_index - index] : src[index..-1]
|
34
90
|
if trim_newline && !s.empty?
|
@@ -40,10 +96,12 @@ module Tanuki
|
|
40
96
|
index = new_index + match.length
|
41
97
|
next
|
42
98
|
elsif not s.empty?
|
43
|
-
ios << "\n_.
|
99
|
+
ios << "\n_.(#{(code_buf << s).inspect},ctx)"
|
44
100
|
code_buf = ''
|
45
101
|
end
|
46
102
|
end
|
103
|
+
|
104
|
+
# Process current state, if there should be a state change
|
47
105
|
if new_index
|
48
106
|
unless state != :outer && new_state == :code_skip
|
49
107
|
if new_state == :outer
|
@@ -59,7 +117,9 @@ module Tanuki
|
|
59
117
|
index = new_index + match.length
|
60
118
|
end
|
61
119
|
end
|
120
|
+
|
62
121
|
end until new_index.nil?
|
122
|
+
ios << "\n_.('',ctx)" if ensure_output && !(PRINT_STATES.include? last_state)
|
63
123
|
last_state
|
64
124
|
end
|
65
125
|
|
@@ -68,6 +128,22 @@ module Tanuki
|
|
68
128
|
# Scanner states that output the evaluated result.
|
69
129
|
PRINT_STATES = [:outer, :code_print]
|
70
130
|
|
131
|
+
# Template header code. Sent to output before compilation.
|
132
|
+
TEMPLATE_HEADER = "def %1$s_view(*args,&block)\nproc do|_,ctx|\nif _has_tpl ctx,self.class,:%1$s\nctx=_ctx(ctx)"
|
133
|
+
|
134
|
+
# Template footer code. Sent to output after compilation.
|
135
|
+
TEMPLATE_FOOTER = "\nelse\n(_run_tpl ctx,self,:%s,*args,&block).(_,ctx)\nend\nend\nend"
|
136
|
+
|
137
|
+
# Wiki insert syntax
|
138
|
+
WIKI_SYNTAX = %r{
|
139
|
+
\[\[
|
140
|
+
(?<controller>(?:\.{1,2}(?:/\.\.)*|[a-z%0-9_]+|)(?:/[a-z%0-9_]+)*)
|
141
|
+
(?:\?(?<model>[a-z_\.]*))?
|
142
|
+
(?::(?<link>[a-z_]+))?
|
143
|
+
(?:\#(?<template>[a-z_]*))?
|
144
|
+
\]\]
|
145
|
+
}x
|
146
|
+
|
71
147
|
# Generates code for Ruby template bits from a given +src+ to +ios+ for a given +state+.
|
72
148
|
def process_code_state(ios, src, state)
|
73
149
|
src.strip!
|
@@ -76,12 +152,12 @@ module Tanuki
|
|
76
152
|
when :code_line, :code_span then
|
77
153
|
ios << "\n#{src}"
|
78
154
|
when :code_print then
|
79
|
-
ios << "\n_.
|
155
|
+
ios << "\n_.((#{src}),ctx)"
|
80
156
|
when :code_template then
|
81
|
-
ios << "\n(#{src}).
|
157
|
+
ios << "\n(#{src}).(_,ctx)"
|
82
158
|
when :code_visitor
|
83
159
|
inner_m = src.match(/^([^ \(]+)?(\([^\)]*\))?\s*(.*)$/)
|
84
|
-
ios << "\n#{inner_m[1]}_result=(#{inner_m[3]}).
|
160
|
+
ios << "\n#{inner_m[1]}_result=(#{inner_m[3]}).(#{inner_m[1]}_visitor#{inner_m[2]},ctx)"
|
85
161
|
when :l10n then
|
86
162
|
localize(ios, src)
|
87
163
|
end
|
@@ -139,8 +215,8 @@ module Tanuki
|
|
139
215
|
ios << "#{lngs.inspect.gsub(/ /, '')}#{code.string}\nend"
|
140
216
|
end
|
141
217
|
|
142
|
-
end #
|
218
|
+
end # class << self
|
143
219
|
|
144
|
-
end #
|
220
|
+
end # TemplateCompiler
|
145
221
|
|
146
|
-
end #
|
222
|
+
end # Tanuki
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module Tanuki
|
2
|
+
|
3
|
+
module Utility
|
4
|
+
|
5
|
+
@help[:create] = 'create a new app with the given name'
|
6
|
+
|
7
|
+
# Creates a new application with a given +name+.
|
8
|
+
def self.create(name=nil)
|
9
|
+
unless name
|
10
|
+
puts "To use this command: `create <name>'"
|
11
|
+
return
|
12
|
+
end
|
13
|
+
require 'fileutils'
|
14
|
+
project_dir = File.expand_path(name)
|
15
|
+
if File.exists? project_dir
|
16
|
+
puts "File or directory `#{name}' already exists!"
|
17
|
+
return
|
18
|
+
end
|
19
|
+
version unless @in_repl
|
20
|
+
puts "\n creating #{name = name.downcase}"
|
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'))
|
28
|
+
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'))
|
33
|
+
Dir.chdir(project_dir) if @in_repl
|
34
|
+
end
|
35
|
+
|
36
|
+
end # Utility
|
37
|
+
|
38
|
+
end # Tanuki
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module Tanuki
|
2
|
+
|
3
|
+
module Utility
|
4
|
+
|
5
|
+
@help[:generate] = 'generate models for application schema'
|
6
|
+
|
7
|
+
# Generates models for application schema in the current directory or +cwd+.
|
8
|
+
def self.generate(cwd=nil)
|
9
|
+
version unless @in_repl
|
10
|
+
cwd = cwd ? File.expand_path(cwd) : Dir.pwd
|
11
|
+
puts "Working directory is: #{cwd}\nTo specify another: `generate <path>'"
|
12
|
+
require 'active_support/inflector'
|
13
|
+
require 'yaml'
|
14
|
+
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'
|
19
|
+
require 'tanuki/configurator'
|
20
|
+
require 'tanuki/context'
|
21
|
+
require 'tanuki/loader'
|
22
|
+
require 'tanuki/template_compiler'
|
23
|
+
require 'tanuki/model_generator'
|
24
|
+
|
25
|
+
ctx = Loader.context = Context
|
26
|
+
default_root = File.expand_path(File.join('..', '..', '..', '..'), __FILE__)
|
27
|
+
cfg = Configurator.new(ctx, cwd)
|
28
|
+
|
29
|
+
# Load defaults
|
30
|
+
cfg.config_root = File.join(default_root, 'config')
|
31
|
+
cfg.load_config :common
|
32
|
+
|
33
|
+
# Override with user settings if needed
|
34
|
+
if cwd != default_root
|
35
|
+
cfg.config_root = File.join(cwd, 'config')
|
36
|
+
cfg.load_config :common, true
|
37
|
+
end
|
38
|
+
|
39
|
+
puts "\n looking for models"
|
40
|
+
local_schema_root = File.expand_path(File.join('..', '..', '..', '..', 'schema'), __FILE__)
|
41
|
+
mg = ModelGenerator.new(ctx)
|
42
|
+
mg.generate ctx.schema_root
|
43
|
+
mg.generate local_schema_root unless ctx.schema_root == local_schema_root
|
44
|
+
mg.tried.each_pair do |name, arys|
|
45
|
+
puts "\n found: #{name}"
|
46
|
+
arys.each_pair {|ary_name, ary| puts %{ #{ary_name}:\n - #{ary.join "\n - "}} unless ary.empty? }
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
end # Utility
|
51
|
+
|
52
|
+
end # Tanuki
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Tanuki
|
2
|
+
|
3
|
+
module Utility
|
4
|
+
|
5
|
+
@help[:help] = 'show help (this text)'
|
6
|
+
|
7
|
+
# Shows help for all available commands.
|
8
|
+
def self.help
|
9
|
+
version unless @in_repl
|
10
|
+
puts "\nbasic commands:\n"
|
11
|
+
@help.each_pair {|k, v| puts ' %-8s %s' % [k, v] }
|
12
|
+
end
|
13
|
+
|
14
|
+
end # Utility
|
15
|
+
|
16
|
+
end # Tanuki
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Tanuki
|
2
|
+
|
3
|
+
module Utility
|
4
|
+
|
5
|
+
@help[:server] = 'run application'
|
6
|
+
|
7
|
+
# Runs the application in the current directory and environment +env+.
|
8
|
+
def self.server(env=nil)
|
9
|
+
env = env ? env.to_sym : :development
|
10
|
+
puts %{Calling for a Tanuki in "#{Dir.pwd}"}
|
11
|
+
version unless @in_repl
|
12
|
+
require 'tanuki'
|
13
|
+
begin
|
14
|
+
Application.run
|
15
|
+
puts 'Tanuki ran away!'
|
16
|
+
rescue SystemCallError
|
17
|
+
puts 'Tanuki ran away! Someone else is playing here.'
|
18
|
+
end if Application.configure(env)
|
19
|
+
end
|
20
|
+
|
21
|
+
end # Utility
|
22
|
+
|
23
|
+
end # Tanuki
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Tanuki
|
2
|
+
|
3
|
+
module Utility
|
4
|
+
|
5
|
+
@help[:version] = 'show framework version'
|
6
|
+
|
7
|
+
# Prints the running framework version.
|
8
|
+
def self.version
|
9
|
+
require 'tanuki/version'
|
10
|
+
puts "Tanuki version #{VERSION}"
|
11
|
+
end
|
12
|
+
|
13
|
+
end # Utility
|
14
|
+
|
15
|
+
end # Tanuki
|
@@ -0,0 +1,65 @@
|
|
1
|
+
module Tanuki
|
2
|
+
|
3
|
+
# Tanuki::Utility is a collection of methods for the framework console.
|
4
|
+
# The actual script is located in +bin/tanuki+ in gem or source location.
|
5
|
+
# An executable +tanuki+ is installed with the gem.
|
6
|
+
module Utility
|
7
|
+
|
8
|
+
class << self
|
9
|
+
|
10
|
+
# Executes given +args+.
|
11
|
+
# The first item in +args+ is the name of a command, and the rest are arguments for the command.
|
12
|
+
def execute(args)
|
13
|
+
case args[0]
|
14
|
+
when 'exit' then @in_repl ? (puts 'Bye bye!'; return false) : help
|
15
|
+
when nil then start_repl unless @in_repl
|
16
|
+
else
|
17
|
+
if @commands.include? args[0].to_sym
|
18
|
+
begin
|
19
|
+
method(args[0].to_sym).call(*args[1..-1])
|
20
|
+
rescue ArgumentError => e
|
21
|
+
puts e.message.capitalize
|
22
|
+
end
|
23
|
+
else
|
24
|
+
help
|
25
|
+
end
|
26
|
+
end
|
27
|
+
true
|
28
|
+
end
|
29
|
+
|
30
|
+
# Initializes the utility state and loads command methods.
|
31
|
+
# Executes the utility with +ARGV+.
|
32
|
+
def init
|
33
|
+
@in_repl = false
|
34
|
+
@commands = []
|
35
|
+
@help = {}
|
36
|
+
Dir.glob(File.expand_path(File.join('..', 'utility', '*.rb'), __FILE__)) do |file|
|
37
|
+
if match = file.match(/\/([^\/]+).rb/)
|
38
|
+
require file
|
39
|
+
command = match[1].to_sym
|
40
|
+
@commands << command
|
41
|
+
@help[command] = nil unless @help.include? command
|
42
|
+
end
|
43
|
+
end
|
44
|
+
execute ARGV
|
45
|
+
end
|
46
|
+
|
47
|
+
# Starts a REPL (framework console).
|
48
|
+
# In this console +command [args]+ call is equivalent to +tanuki command [args]+ in the terminal.
|
49
|
+
def start_repl
|
50
|
+
@in_repl = true
|
51
|
+
@help[:exit] = 'exit this utility'
|
52
|
+
version
|
53
|
+
print 'tanuki>'
|
54
|
+
begin
|
55
|
+
print "\ntanuki>" while gets && execute($_.chomp.scan(/(?<=")[^"]*(?=")|[^\s]+/))
|
56
|
+
rescue Interrupt
|
57
|
+
puts "\nBye bye!"
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
end # class << self
|
62
|
+
|
63
|
+
end # Utility
|
64
|
+
|
65
|
+
end # Tanuki
|
data/lib/tanuki/version.rb
CHANGED
data/lib/tanuki.rb
CHANGED
@@ -10,7 +10,6 @@ require 'escape_utils'
|
|
10
10
|
require 'escape_utils/url/rack'
|
11
11
|
require 'tanuki/version'
|
12
12
|
require 'tanuki/extensions/module'
|
13
|
-
require 'tanuki/extensions/object'
|
14
13
|
require 'tanuki/extensions/rack/builder'
|
15
14
|
require 'tanuki/extensions/rack/server'
|
16
15
|
require 'tanuki/extensions/rack/static_dir'
|
@@ -28,4 +27,4 @@ require 'tanuki/template_compiler'
|
|
28
27
|
require 'tanuki/application'
|
29
28
|
|
30
29
|
module Tanuki
|
31
|
-
end
|
30
|
+
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 1
|
9
|
+
version: 0.3.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Anatoly Ressin
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2011-02-05 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -117,12 +117,16 @@ files:
|
|
117
117
|
- app/tanuki/controller/default.thtml
|
118
118
|
- app/tanuki/controller/index.thtml
|
119
119
|
- app/tanuki/controller/link.thtml
|
120
|
+
- app/tanuki/manager/controller/controller.rb
|
121
|
+
- app/tanuki/manager/page/page.rb
|
120
122
|
- app/tanuki/meta_model/manager.ttxt
|
121
123
|
- app/tanuki/meta_model/manager_base.ttxt
|
122
124
|
- app/tanuki/meta_model/meta_model.rb
|
123
125
|
- app/tanuki/meta_model/model.ttxt
|
124
126
|
- app/tanuki/meta_model/model_base.ttxt
|
127
|
+
- app/tanuki/model/controller/controller.rb
|
125
128
|
- app/tanuki/model/model.rb
|
129
|
+
- app/tanuki/model/page/page.rb
|
126
130
|
- app/tanuki/page/missing/default.thtml
|
127
131
|
- app/tanuki/page/missing/missing.rb
|
128
132
|
- app/user/page/index/default.thtml
|
@@ -132,6 +136,7 @@ files:
|
|
132
136
|
- config/common_application.rb
|
133
137
|
- config/development_application.rb
|
134
138
|
- config/production_application.rb
|
139
|
+
- config/test_application.rb
|
135
140
|
- lib/tanuki/application.rb
|
136
141
|
- lib/tanuki/argument/base.rb
|
137
142
|
- lib/tanuki/argument/integer.rb
|
@@ -145,14 +150,20 @@ files:
|
|
145
150
|
- lib/tanuki/configurator.rb
|
146
151
|
- lib/tanuki/context.rb
|
147
152
|
- lib/tanuki/extensions/module.rb
|
148
|
-
- lib/tanuki/extensions/object.rb
|
149
153
|
- lib/tanuki/extensions/rack/builder.rb
|
150
154
|
- lib/tanuki/extensions/rack/server.rb
|
151
155
|
- lib/tanuki/extensions/rack/static_dir.rb
|
152
156
|
- lib/tanuki/i18n.rb
|
153
157
|
- lib/tanuki/launcher.rb
|
154
158
|
- lib/tanuki/loader.rb
|
159
|
+
- lib/tanuki/model_generator.rb
|
155
160
|
- lib/tanuki/template_compiler.rb
|
161
|
+
- lib/tanuki/utility/create.rb
|
162
|
+
- lib/tanuki/utility/generate.rb
|
163
|
+
- lib/tanuki/utility/help.rb
|
164
|
+
- lib/tanuki/utility/server.rb
|
165
|
+
- lib/tanuki/utility/version.rb
|
166
|
+
- lib/tanuki/utility.rb
|
156
167
|
- lib/tanuki/version.rb
|
157
168
|
- lib/tanuki.rb
|
158
169
|
- schema/tanuki/l10n/en/controller.yml
|
@@ -164,7 +175,7 @@ files:
|
|
164
175
|
- LICENSE
|
165
176
|
- README.rdoc
|
166
177
|
has_rdoc: true
|
167
|
-
homepage: http://
|
178
|
+
homepage: http://assistunion.com/sharing
|
168
179
|
licenses: []
|
169
180
|
|
170
181
|
post_install_message:
|
@@ -1,12 +0,0 @@
|
|
1
|
-
class Object
|
2
|
-
|
3
|
-
# Runs Tanuki::Loader for every missing constant in main namespace.
|
4
|
-
def self.const_missing(sym)
|
5
|
-
unless (paths = Dir.glob(Tanuki::Loader.combined_class_path(sym))).empty?
|
6
|
-
paths.reverse_each {|path| require path }
|
7
|
-
return const_get(sym)
|
8
|
-
end
|
9
|
-
super
|
10
|
-
end
|
11
|
-
|
12
|
-
end # end Object
|