ontomde-inspector 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/Manifest.txt +74 -0
- data/README.txt +42 -0
- data/Rakefile +19 -0
- data/bin/ontomde-inspector +6 -0
- data/lib/ontomde-inspector/loader.rb +69 -0
- data/lib/ontomde-inspector/rails/README +203 -0
- data/lib/ontomde-inspector/rails/Rakefile +10 -0
- data/lib/ontomde-inspector/rails/app/controllers/application.rb +10 -0
- data/lib/ontomde-inspector/rails/app/controllers/mtk_controller.rb +343 -0
- data/lib/ontomde-inspector/rails/app/helpers/application_helper.rb +3 -0
- data/lib/ontomde-inspector/rails/app/helpers/mtk_helper.rb +20 -0
- data/lib/ontomde-inspector/rails/app/views/layouts/mtk.rhtml +160 -0
- data/lib/ontomde-inspector/rails/app/views/mtk/clear.rhtml +5 -0
- data/lib/ontomde-inspector/rails/app/views/mtk/index.rhtml +1 -0
- data/lib/ontomde-inspector/rails/app/views/mtk/last_generated.rhtml +7 -0
- data/lib/ontomde-inspector/rails/app/views/mtk/not_found.rhtml +2 -0
- data/lib/ontomde-inspector/rails/app/views/mtk/search_form.rhtml +30 -0
- data/lib/ontomde-inspector/rails/app/views/mtk/search_result.rhtml +8 -0
- data/lib/ontomde-inspector/rails/app/views/mtk/setup_form.rhtml +42 -0
- data/lib/ontomde-inspector/rails/app/views/mtk/show.rhtml +172 -0
- data/lib/ontomde-inspector/rails/app/views/mtk/show_many.rhtml +25 -0
- data/lib/ontomde-inspector/rails/config/boot.rb +109 -0
- data/lib/ontomde-inspector/rails/config/database.yml +42 -0
- data/lib/ontomde-inspector/rails/config/environment.rb +60 -0
- data/lib/ontomde-inspector/rails/config/environments/development.rb +18 -0
- data/lib/ontomde-inspector/rails/config/environments/production.rb +19 -0
- data/lib/ontomde-inspector/rails/config/environments/test.rb +22 -0
- data/lib/ontomde-inspector/rails/config/initializers/inflections.rb +10 -0
- data/lib/ontomde-inspector/rails/config/initializers/mime_types.rb +5 -0
- data/lib/ontomde-inspector/rails/config/routes.rb +35 -0
- data/lib/ontomde-inspector/rails/doc/README_FOR_APP +2 -0
- data/lib/ontomde-inspector/rails/log/development.log +32687 -0
- data/lib/ontomde-inspector/rails/log/production.log +0 -0
- data/lib/ontomde-inspector/rails/log/server.log +0 -0
- data/lib/ontomde-inspector/rails/log/test.log +0 -0
- data/lib/ontomde-inspector/rails/nbproject/private/rake-t.txt +61 -0
- data/lib/ontomde-inspector/rails/nbproject/project.properties +2 -0
- data/lib/ontomde-inspector/rails/nbproject/project.xml +9 -0
- data/lib/ontomde-inspector/rails/public/.htaccess +40 -0
- data/lib/ontomde-inspector/rails/public/404.html +30 -0
- data/lib/ontomde-inspector/rails/public/422.html +30 -0
- data/lib/ontomde-inspector/rails/public/500.html +30 -0
- data/lib/ontomde-inspector/rails/public/dispatch.cgi +10 -0
- data/lib/ontomde-inspector/rails/public/dispatch.fcgi +24 -0
- data/lib/ontomde-inspector/rails/public/dispatch.rb +10 -0
- data/lib/ontomde-inspector/rails/public/favicon.ico +0 -0
- data/lib/ontomde-inspector/rails/public/images/logoMDE.gif +0 -0
- data/lib/ontomde-inspector/rails/public/images/rails.png +0 -0
- data/lib/ontomde-inspector/rails/public/index.html +277 -0
- data/lib/ontomde-inspector/rails/public/javascripts/application.js +2 -0
- data/lib/ontomde-inspector/rails/public/javascripts/controls.js +963 -0
- data/lib/ontomde-inspector/rails/public/javascripts/dragdrop.js +972 -0
- data/lib/ontomde-inspector/rails/public/javascripts/effects.js +1120 -0
- data/lib/ontomde-inspector/rails/public/javascripts/prototype.js +4225 -0
- data/lib/ontomde-inspector/rails/public/robots.txt +5 -0
- data/lib/ontomde-inspector/rails/script/about +3 -0
- data/lib/ontomde-inspector/rails/script/console +3 -0
- data/lib/ontomde-inspector/rails/script/destroy +3 -0
- data/lib/ontomde-inspector/rails/script/generate +3 -0
- data/lib/ontomde-inspector/rails/script/performance/benchmarker +3 -0
- data/lib/ontomde-inspector/rails/script/performance/profiler +3 -0
- data/lib/ontomde-inspector/rails/script/performance/request +3 -0
- data/lib/ontomde-inspector/rails/script/plugin +3 -0
- data/lib/ontomde-inspector/rails/script/process/inspector +3 -0
- data/lib/ontomde-inspector/rails/script/process/reaper +3 -0
- data/lib/ontomde-inspector/rails/script/process/spawner +3 -0
- data/lib/ontomde-inspector/rails/script/runner +3 -0
- data/lib/ontomde-inspector/rails/script/server +3 -0
- data/lib/ontomde-inspector/rails/test/test_helper.rb +38 -0
- data/lib/ontomde-inspector/version.rb +5 -0
- data/lib/ontomde-inspector.rb +21 -0
- data/test/test_ontomde-inspector.rb +0 -0
- metadata +157 -0
@@ -0,0 +1,172 @@
|
|
1
|
+
<% @page_title = "Contenu de la ressource \"#{@obj.rdf_uri}\"" %>
|
2
|
+
|
3
|
+
<style type="text/css">
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
.menu {clear:both; margin-bottom:4em;}
|
8
|
+
|
9
|
+
.menu dt {display:none;}
|
10
|
+
|
11
|
+
.menu dd {margin:0; padding:0;}
|
12
|
+
|
13
|
+
.menu .aa {width:5px; float:left; border-bottom:1px solid #000; background:#bcd;}
|
14
|
+
|
15
|
+
.menu .bb {float:left; padding:2px 0 2px 0; border-bottom:1px solid #000; border-top:1px solid #000; background:#bcd; text-align:center;}
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
.menu .sela {width:5px; float:left; background:#fff; font-size:1em;}
|
20
|
+
|
21
|
+
.menu .selb {float:left; padding:2px 0 2px 0; border-top:1px solid #000; background:#fff; color:#f00; font-size:1em; text-align:center;}
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
.menu .va {width:1px; float:left; border-top:5px solid #fff; background:#000; overflow:hidden;}
|
26
|
+
|
27
|
+
.menu .vb {width:1px; float:left; height:1px; background:#ccc; border-top:2px solid #fff; border-bottom:2px solid #000; overflow:hidden;}
|
28
|
+
|
29
|
+
.menu .vc {width:1px; float:left; height:1px; background:#ccc; border-top:1px solid #fff; border-bottom:1px solid #000; overflow:hidden;}
|
30
|
+
|
31
|
+
.menu .vd {width:2px; float:left; height:1px; background:#000; border-top:1px solid #ccc; overflow:hidden;}
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
* html .menu .vb {height:5px; height:1px;}
|
36
|
+
|
37
|
+
* html .menu .vc {height:3px; height:1px;}
|
38
|
+
|
39
|
+
* html .menu .vd {height:2px; height:1px;}
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
.menu a, .menu a:visited {color:#444; text-decoration:none; font-size:1em; cursor:pointer; background:#bcd;}
|
48
|
+
|
49
|
+
.menu a:hover {color:#c00; background:#def;}
|
50
|
+
|
51
|
+
.menu a:hover .aa, .menu a:hover .bb {background:#def;}
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
.pad {float:left; color:#fff;}
|
56
|
+
|
57
|
+
.padtop {float:left; display:block; padding:0 5px;}
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
</style>
|
64
|
+
|
65
|
+
<div class="menu">
|
66
|
+
|
67
|
+
<dl>
|
68
|
+
|
69
|
+
<dt>Artist menu</dt>
|
70
|
+
|
71
|
+
<% @onglets.sort{|a,b| a<=>b}.each { |onglet| %>
|
72
|
+
<% label_onglet=onglet=="" ? "*tout*":onglet ; if onglet!=@onglet_actif %>
|
73
|
+
<dd><a href="<%=url_for :action => "show", :onglet=>onglet.to_s, :uri => @obj.rdf_uri.to_s %>"><span class="aa"><span class="va"> </span><span class="vb"></span><span class="vc"></span><span class="vd"></span></span><span class="bb">
|
74
|
+
<%= label_onglet %> </span><span class="aa"><span class="vd"></span><span class="vc"></span><span class="vb"></span><span class="va"> </span></span></a></dd>
|
75
|
+
|
76
|
+
<%else%>
|
77
|
+
<dd><span class="sela"><span class="va"> </span><span class="vb"></span><span class="vc"></span><span class="vd"></span></span><span class="selb"><%=label_onglet%></span><span class="sela"><span class="vd"></span><span class="vc"></span><span class="vb"></span><span class="va"> </span></span></dd>
|
78
|
+
|
79
|
+
<%end%>
|
80
|
+
<% } %>
|
81
|
+
</dl>
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
<table width="100%" border="1" cellspacing="0" cellpadding="0" >
|
89
|
+
<tr bgcolor="#CCCCCC">
|
90
|
+
<td width="5%" > </td>
|
91
|
+
<td width="5%">Champ</td>
|
92
|
+
<td width="5%"> </td>
|
93
|
+
<td width="85%">Valeur</td>
|
94
|
+
</tr>
|
95
|
+
|
96
|
+
<% prefix=""; @methods.sort{|a,b| a<=>b}.each{ |m,r| %>
|
97
|
+
<%
|
98
|
+
h=m.split(/_/,3)
|
99
|
+
lprefix=prefix
|
100
|
+
prefix=h[0]
|
101
|
+
if h[2]
|
102
|
+
mclass=h[1]
|
103
|
+
name=h[2]
|
104
|
+
else
|
105
|
+
mclass=""
|
106
|
+
name=h[1]
|
107
|
+
end
|
108
|
+
#puts "prefix=#{prefix} onglet_actif=#{@onglet_actif}"
|
109
|
+
next unless (prefix==@onglet_actif) || (@onglet_actif=="")
|
110
|
+
%>
|
111
|
+
<tr bgcolor="<%= cycle("#AAAAAA", "white",:name=>"row") %>">
|
112
|
+
<td><b> <%=prefix==lprefix ? "" : prefix %> </b></td>
|
113
|
+
<td><b> <%=mclass%> </b></td>
|
114
|
+
<td><b> <%=name%> </b>
|
115
|
+
</td>
|
116
|
+
<td>
|
117
|
+
<%if m=~/_dotFile$/ %>
|
118
|
+
<%=link_to "voir image",{ :action=>"dot", :method=>m,:uri=>@obj.rdf_uri},:popup=>true %><br/>
|
119
|
+
<% end %>
|
120
|
+
<% trigger=3; useMoreTrigger=trigger %>
|
121
|
+
<% sep="" ; r.each{|item|
|
122
|
+
%>
|
123
|
+
<%=sep %>
|
124
|
+
<%
|
125
|
+
if(item.respond_to?(:rdf_uri)) %>
|
126
|
+
<font color="<%= cycle("green", "black",:name=>"uri") %>">
|
127
|
+
<%=link_to " "+item.to_s, { :uri => item.rdf_uri }%>
|
128
|
+
</font>
|
129
|
+
<%sep=" / "
|
130
|
+
else %>
|
131
|
+
<%= useMoreTrigger=useMoreTrigger-1 ; more_begin_if("#{r.length-trigger-1} more",useMoreTrigger==0) %>
|
132
|
+
"<font color="magenta"><%=item.to_s%></font>"
|
133
|
+
<%
|
134
|
+
sep="<br> "
|
135
|
+
end
|
136
|
+
} %>
|
137
|
+
<%= more_end_if(useMoreTrigger<=0) %>
|
138
|
+
</td>
|
139
|
+
</tr>
|
140
|
+
|
141
|
+
<% reset_cycle("uri"); } %>
|
142
|
+
</table>
|
143
|
+
<h3>Champs calculés sur demande</h3>
|
144
|
+
<div>
|
145
|
+
<%@on_demand.sort{|a,b| a<=>b}.each {|c|
|
146
|
+
a=c.split(/_/,2)
|
147
|
+
%>
|
148
|
+
<%= link_to "<font color=\"brown\">#{a[0]}</font>_#{a[1]}" ,{ :uri => @obj.rdf_uri , :on_demand => c } %>
|
149
|
+
<%}%>
|
150
|
+
</div>
|
151
|
+
<h3>Champs vides</h3>
|
152
|
+
<a class="hid" href="#more" onclick="this.hideFocus=true" onblur="this.hideFocus=false"><span>more »</span><em>
|
153
|
+
<div>
|
154
|
+
<%@vides.sort{|a,b| a<=>b}.each {|c|
|
155
|
+
a=c.split(/_/,2)
|
156
|
+
%>
|
157
|
+
<font color="brown"><%=a[0]%></font>_<%=a[1]%>,
|
158
|
+
<%}%>
|
159
|
+
</div></em></a>
|
160
|
+
<h3>Champs non calculables</h3>
|
161
|
+
<a class="hid" href="#more" onclick="this.hideFocus=true" onblur="this.hideFocus=false"><span>more »</span><em>
|
162
|
+
<div>
|
163
|
+
<%@erreurs.sort{|a,b| a<=>b}.each {|c|
|
164
|
+
a=c.split(/_/,2)
|
165
|
+
%>
|
166
|
+
<font color="brown"><%=a[0]%></font>_<%=a[1]%>,
|
167
|
+
<%}%>
|
168
|
+
</div></em></a>
|
169
|
+
|
170
|
+
|
171
|
+
<hr>
|
172
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<%= form_tag url_for(:action => 'search') %>
|
2
|
+
<%= text_field_with_auto_complete :filter,:x %>
|
3
|
+
<%= submit_tag label="Search" %>
|
4
|
+
<div>
|
5
|
+
ON:
|
6
|
+
<% @model.find_all { |uri,b| !(uri=~/rdf/) }.each { |a,b| %>
|
7
|
+
!<%= b.to_s %>
|
8
|
+
<% } %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div>
|
12
|
+
OFF:
|
13
|
+
<% @model.find_all { |uri,b| (uri=~/rdf/) }.each { |a,b| %>
|
14
|
+
!<%= b.to_s %>
|
15
|
+
<% } %>
|
16
|
+
</div>
|
17
|
+
</form>
|
18
|
+
|
19
|
+
<hr>
|
20
|
+
<ul>
|
21
|
+
<% @model.each_value { |res| %>
|
22
|
+
<li><%= link_to res.to_s, { :action => "show",:uri => res.rdf_uri }, :popup => false %></li>
|
23
|
+
|
24
|
+
<%}%>
|
25
|
+
<ul>
|
@@ -0,0 +1,109 @@
|
|
1
|
+
# Don't change this file!
|
2
|
+
# Configure your app in config/environment.rb and config/environments/*.rb
|
3
|
+
|
4
|
+
RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
|
5
|
+
|
6
|
+
module Rails
|
7
|
+
class << self
|
8
|
+
def boot!
|
9
|
+
unless booted?
|
10
|
+
preinitialize
|
11
|
+
pick_boot.run
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def booted?
|
16
|
+
defined? Rails::Initializer
|
17
|
+
end
|
18
|
+
|
19
|
+
def pick_boot
|
20
|
+
(vendor_rails? ? VendorBoot : GemBoot).new
|
21
|
+
end
|
22
|
+
|
23
|
+
def vendor_rails?
|
24
|
+
File.exist?("#{RAILS_ROOT}/vendor/rails")
|
25
|
+
end
|
26
|
+
|
27
|
+
# FIXME : Ruby 1.9
|
28
|
+
def preinitialize
|
29
|
+
load(preinitializer_path) if File.exists?(preinitializer_path)
|
30
|
+
end
|
31
|
+
|
32
|
+
def preinitializer_path
|
33
|
+
"#{RAILS_ROOT}/config/preinitializer.rb"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
class Boot
|
38
|
+
def run
|
39
|
+
load_initializer
|
40
|
+
Rails::Initializer.run(:set_load_path)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
class VendorBoot < Boot
|
45
|
+
def load_initializer
|
46
|
+
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
class GemBoot < Boot
|
51
|
+
def load_initializer
|
52
|
+
self.class.load_rubygems
|
53
|
+
load_rails_gem
|
54
|
+
require 'initializer'
|
55
|
+
end
|
56
|
+
|
57
|
+
def load_rails_gem
|
58
|
+
if version = self.class.gem_version
|
59
|
+
gem 'rails', version
|
60
|
+
else
|
61
|
+
gem 'rails'
|
62
|
+
end
|
63
|
+
rescue Gem::LoadError => load_error
|
64
|
+
$stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
|
65
|
+
exit 1
|
66
|
+
end
|
67
|
+
|
68
|
+
class << self
|
69
|
+
def rubygems_version
|
70
|
+
Gem::RubyGemsVersion if defined? Gem::RubyGemsVersion
|
71
|
+
end
|
72
|
+
|
73
|
+
def gem_version
|
74
|
+
if defined? RAILS_GEM_VERSION
|
75
|
+
RAILS_GEM_VERSION
|
76
|
+
elsif ENV.include?('RAILS_GEM_VERSION')
|
77
|
+
ENV['RAILS_GEM_VERSION']
|
78
|
+
else
|
79
|
+
parse_gem_version(read_environment_rb)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def load_rubygems
|
84
|
+
require 'rubygems'
|
85
|
+
|
86
|
+
unless rubygems_version >= '0.9.4'
|
87
|
+
$stderr.puts %(Rails requires RubyGems >= 0.9.4 (you have #{rubygems_version}). Please `gem update --system` and try again.)
|
88
|
+
exit 1
|
89
|
+
end
|
90
|
+
|
91
|
+
rescue LoadError
|
92
|
+
$stderr.puts %(Rails requires RubyGems >= 0.9.4. Please install RubyGems and try again: http://rubygems.rubyforge.org)
|
93
|
+
exit 1
|
94
|
+
end
|
95
|
+
|
96
|
+
def parse_gem_version(text)
|
97
|
+
$1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
|
98
|
+
end
|
99
|
+
|
100
|
+
private
|
101
|
+
def read_environment_rb
|
102
|
+
File.read("#{RAILS_ROOT}/config/environment.rb")
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
# All that for this:
|
109
|
+
Rails.boot!
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# MySQL. Versions 4.1 and 5.0 are recommended.
|
2
|
+
#
|
3
|
+
# Install the MySQL driver:
|
4
|
+
# gem install mysql
|
5
|
+
# On Mac OS X:
|
6
|
+
# sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
|
7
|
+
# On Mac OS X Leopard:
|
8
|
+
# sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
|
9
|
+
# This sets the ARCHFLAGS environment variable to your native architecture
|
10
|
+
# On Windows:
|
11
|
+
# gem install mysql
|
12
|
+
# Choose the win32 build.
|
13
|
+
# Install MySQL and put its /bin directory on your path.
|
14
|
+
#
|
15
|
+
# And be sure to use new-style password hashing:
|
16
|
+
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
|
17
|
+
development:
|
18
|
+
adapter: mysql
|
19
|
+
encoding: utf8
|
20
|
+
database: rails_development
|
21
|
+
username: root
|
22
|
+
password:
|
23
|
+
host: localhost
|
24
|
+
|
25
|
+
# Warning: The database defined as 'test' will be erased and
|
26
|
+
# re-generated from your development database when you run 'rake'.
|
27
|
+
# Do not set this db to the same as development or production.
|
28
|
+
test:
|
29
|
+
adapter: mysql
|
30
|
+
encoding: utf8
|
31
|
+
database: rails_test
|
32
|
+
username: root
|
33
|
+
password:
|
34
|
+
host: localhost
|
35
|
+
|
36
|
+
production:
|
37
|
+
adapter: mysql
|
38
|
+
encoding: utf8
|
39
|
+
database: rails_production
|
40
|
+
username: root
|
41
|
+
password:
|
42
|
+
host: localhost
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file
|
2
|
+
|
3
|
+
# Uncomment below to force Rails into production mode when
|
4
|
+
# you don't control web/app server and can't set it the proper way
|
5
|
+
# ENV['RAILS_ENV'] ||= 'production'
|
6
|
+
|
7
|
+
# Specifies gem version of Rails to use when vendor/rails is not present
|
8
|
+
RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION
|
9
|
+
|
10
|
+
# Bootstrap the Rails environment, frameworks, and default configuration
|
11
|
+
require File.join(File.dirname(__FILE__), 'boot')
|
12
|
+
|
13
|
+
Rails::Initializer.run do |config|
|
14
|
+
# Settings in config/environments/* take precedence over those specified here.
|
15
|
+
# Application configuration should go into files in config/initializers
|
16
|
+
# -- all .rb files in that directory are automatically loaded.
|
17
|
+
# See Rails::Configuration for more options.
|
18
|
+
|
19
|
+
# Skip frameworks you're not going to use (only works if using vendor/rails).
|
20
|
+
# To use Rails without a database, you must remove the Active Record framework
|
21
|
+
# config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
|
22
|
+
config.frameworks -= [ :active_record ]
|
23
|
+
|
24
|
+
# Only load the plugins named here, in the order given. By default, all plugins
|
25
|
+
# in vendor/plugins are loaded in alphabetical order.
|
26
|
+
# :all can be used as a placeholder for all plugins not explicitly named
|
27
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
28
|
+
|
29
|
+
# Add additional load paths for your own custom dirs
|
30
|
+
# config.load_paths += %W( #{RAILS_ROOT}/extras )
|
31
|
+
|
32
|
+
# Force all environments to use the same logger level
|
33
|
+
# (by default production uses :info, the others :debug)
|
34
|
+
# config.log_level = :debug
|
35
|
+
|
36
|
+
# Your secret key for verifying cookie session data integrity.
|
37
|
+
# If you change this key, all old sessions will become invalid!
|
38
|
+
# Make sure the secret is at least 30 characters and all random,
|
39
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
40
|
+
config.action_controller.session = {
|
41
|
+
:session_key => '_rails_session',
|
42
|
+
:secret => 'e43a2087f4f8c4bac32c48115f880a99fd2e2d692c270e11e56635f7a484e98919bc5911721fc9b9c7388d67f8b68b823093203173181009975f5214acc47d18'
|
43
|
+
}
|
44
|
+
|
45
|
+
# Use the database for sessions instead of the cookie-based default,
|
46
|
+
# which shouldn't be used to store highly confidential information
|
47
|
+
# (create the session table with 'rake db:sessions:create')
|
48
|
+
# config.action_controller.session_store = :active_record_store
|
49
|
+
|
50
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
51
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
52
|
+
# like if you have constraints or database-specific column types
|
53
|
+
# config.active_record.schema_format = :sql
|
54
|
+
|
55
|
+
# Activate observers that should always be running
|
56
|
+
# config.active_record.observers = :cacher, :garbage_collector
|
57
|
+
|
58
|
+
# Make Active Record use UTC-base instead of local time
|
59
|
+
# config.active_record.default_timezone = :utc
|
60
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
2
|
+
|
3
|
+
# In the development environment your application's code is reloaded on
|
4
|
+
# every request. This slows down response time but is perfect for development
|
5
|
+
# since you don't have to restart the webserver when you make code changes.
|
6
|
+
config.cache_classes = false
|
7
|
+
|
8
|
+
# Log error messages when you accidentally call methods on nil.
|
9
|
+
config.whiny_nils = true
|
10
|
+
|
11
|
+
# Show full error reports and disable caching
|
12
|
+
config.action_controller.consider_all_requests_local = true
|
13
|
+
config.action_view.debug_rjs = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
config.action_view.cache_template_extensions = false
|
16
|
+
|
17
|
+
# Don't care if the mailer can't send
|
18
|
+
config.action_mailer.raise_delivery_errors = false
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
2
|
+
|
3
|
+
# The production environment is meant for finished, "live" apps.
|
4
|
+
# Code is not reloaded between requests
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Use a different logger for distributed setups
|
8
|
+
# config.logger = SyslogLogger.new
|
9
|
+
|
10
|
+
# Full error reports are disabled and caching is turned on
|
11
|
+
config.action_controller.consider_all_requests_local = false
|
12
|
+
config.action_controller.perform_caching = true
|
13
|
+
config.action_view.cache_template_loading = true
|
14
|
+
|
15
|
+
# Enable serving of images, stylesheets, and javascripts from an asset server
|
16
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
17
|
+
|
18
|
+
# Disable delivery errors, bad email addresses will be ignored
|
19
|
+
# config.action_mailer.raise_delivery_errors = false
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
2
|
+
|
3
|
+
# The test environment is used exclusively to run your application's
|
4
|
+
# test suite. You never need to work with it otherwise. Remember that
|
5
|
+
# your test database is "scratch space" for the test suite and is wiped
|
6
|
+
# and recreated between test runs. Don't rely on the data there!
|
7
|
+
config.cache_classes = true
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.action_controller.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Disable request forgery protection in test environment
|
17
|
+
config.action_controller.allow_forgery_protection = false
|
18
|
+
|
19
|
+
# Tell ActionMailer not to deliver emails to the real world.
|
20
|
+
# The :test delivery method accumulates sent emails in the
|
21
|
+
# ActionMailer::Base.deliveries array.
|
22
|
+
config.action_mailer.delivery_method = :test
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
ActionController::Routing::Routes.draw do |map|
|
2
|
+
# The priority is based upon order of creation: first created -> highest priority.
|
3
|
+
|
4
|
+
# Sample of regular route:
|
5
|
+
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
|
6
|
+
# Keep in mind you can assign values other than :controller and :action
|
7
|
+
|
8
|
+
# Sample of named route:
|
9
|
+
# map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
|
10
|
+
# This route can be invoked with purchase_url(:id => product.id)
|
11
|
+
|
12
|
+
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
13
|
+
# map.resources :products
|
14
|
+
|
15
|
+
# Sample resource route with options:
|
16
|
+
# map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
|
17
|
+
|
18
|
+
# Sample resource route with sub-resources:
|
19
|
+
# map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
|
20
|
+
|
21
|
+
# Sample resource route within a namespace:
|
22
|
+
# map.namespace :admin do |admin|
|
23
|
+
# # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
|
24
|
+
# admin.resources :products
|
25
|
+
# end
|
26
|
+
|
27
|
+
# You can have the root of your site routed with map.root -- just remember to delete public/index.html.
|
28
|
+
# map.root :controller => "welcome"
|
29
|
+
|
30
|
+
# See how all your routes lay out with "rake routes"
|
31
|
+
|
32
|
+
# Install the default routes as the lowest priority.
|
33
|
+
map.connect ':controller/:action/:id'
|
34
|
+
map.connect ':controller/:action/:id.:format'
|
35
|
+
end
|