enju_nii 0.0.3
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/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +40 -0
- data/app/assets/javascripts/nii_types.js +2 -0
- data/app/assets/stylesheets/nii_types.css +4 -0
- data/app/assets/stylesheets/scaffold.css +56 -0
- data/app/controllers/nii_types_controller.rb +20 -0
- data/app/helpers/nii_types_helper.rb +2 -0
- data/app/models/nii_type.rb +6 -0
- data/app/views/nii_types/_form.html.erb +18 -0
- data/app/views/nii_types/edit.html.erb +13 -0
- data/app/views/nii_types/index.html.erb +45 -0
- data/app/views/nii_types/new.html.erb +12 -0
- data/app/views/nii_types/show.html.erb +27 -0
- data/config/locales/translation_en.yml +11 -0
- data/config/locales/translation_ja.yml +11 -0
- data/config/routes.rb +4 -0
- data/db/fixtures/nii_types.yml +104 -0
- data/db/migrate/20090913173236_create_nii_types.rb +13 -0
- data/db/migrate/20090913185239_add_nii_type_id_to_manifestation.rb +10 -0
- data/lib/enju_nii/engine.rb +8 -0
- data/lib/enju_nii/version.rb +3 -0
- data/lib/enju_nii.rb +4 -0
- data/lib/tasks/enju_nii_tasks.rake +5 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +9 -0
- data/spec/dummy/app/assets/stylesheets/application.css +7 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config/application.rb +46 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +30 -0
- data/spec/dummy/config/environments/production.rb +60 -0
- data/spec/dummy/config/environments/test.rb +39 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +10 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +58 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/lib/master_model.rb +41 -0
- data/spec/dummy/log/test.log +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +26 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/spec_helper.rb +33 -0
- data/spec/support/controller_macros.rb +48 -0
- data/spec/support/devise.rb +4 -0
- metadata +229 -0
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2012 Kosuke Tanabe
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
begin
|
3
|
+
require 'bundler/setup'
|
4
|
+
rescue LoadError
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
+
end
|
7
|
+
begin
|
8
|
+
require 'rdoc/task'
|
9
|
+
rescue LoadError
|
10
|
+
require 'rdoc/rdoc'
|
11
|
+
require 'rake/rdoctask'
|
12
|
+
RDoc::Task = Rake::RDocTask
|
13
|
+
end
|
14
|
+
|
15
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
16
|
+
rdoc.rdoc_dir = 'rdoc'
|
17
|
+
rdoc.title = 'EnjuNii'
|
18
|
+
rdoc.options << '--line-numbers'
|
19
|
+
rdoc.rdoc_files.include('README.rdoc')
|
20
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
21
|
+
end
|
22
|
+
|
23
|
+
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
|
24
|
+
load 'rails/tasks/engine.rake'
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
Bundler::GemHelper.install_tasks
|
29
|
+
|
30
|
+
require 'rake/testtask'
|
31
|
+
|
32
|
+
Rake::TestTask.new(:test) do |t|
|
33
|
+
t.libs << 'lib'
|
34
|
+
t.libs << 'test'
|
35
|
+
t.pattern = 'test/**/*_test.rb'
|
36
|
+
t.verbose = false
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
task :default => :test
|
@@ -0,0 +1,56 @@
|
|
1
|
+
body { background-color: #fff; color: #333; }
|
2
|
+
|
3
|
+
body, p, ol, ul, td {
|
4
|
+
font-family: verdana, arial, helvetica, sans-serif;
|
5
|
+
font-size: 13px;
|
6
|
+
line-height: 18px;
|
7
|
+
}
|
8
|
+
|
9
|
+
pre {
|
10
|
+
background-color: #eee;
|
11
|
+
padding: 10px;
|
12
|
+
font-size: 11px;
|
13
|
+
}
|
14
|
+
|
15
|
+
a { color: #000; }
|
16
|
+
a:visited { color: #666; }
|
17
|
+
a:hover { color: #fff; background-color:#000; }
|
18
|
+
|
19
|
+
div.field, div.actions {
|
20
|
+
margin-bottom: 10px;
|
21
|
+
}
|
22
|
+
|
23
|
+
#notice {
|
24
|
+
color: green;
|
25
|
+
}
|
26
|
+
|
27
|
+
.field_with_errors {
|
28
|
+
padding: 2px;
|
29
|
+
background-color: red;
|
30
|
+
display: table;
|
31
|
+
}
|
32
|
+
|
33
|
+
#error_explanation {
|
34
|
+
width: 450px;
|
35
|
+
border: 2px solid red;
|
36
|
+
padding: 7px;
|
37
|
+
padding-bottom: 0;
|
38
|
+
margin-bottom: 20px;
|
39
|
+
background-color: #f0f0f0;
|
40
|
+
}
|
41
|
+
|
42
|
+
#error_explanation h2 {
|
43
|
+
text-align: left;
|
44
|
+
font-weight: bold;
|
45
|
+
padding: 5px 5px 5px 15px;
|
46
|
+
font-size: 12px;
|
47
|
+
margin: -7px;
|
48
|
+
margin-bottom: 0px;
|
49
|
+
background-color: #c00;
|
50
|
+
color: #fff;
|
51
|
+
}
|
52
|
+
|
53
|
+
#error_explanation ul li {
|
54
|
+
font-size: 12px;
|
55
|
+
list-style: square;
|
56
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class NiiTypesController < InheritedResources::Base
|
2
|
+
respond_to :html, :json
|
3
|
+
before_filter :check_client_ip_address
|
4
|
+
load_and_authorize_resource
|
5
|
+
|
6
|
+
def update
|
7
|
+
@nii_type = NiiType.find(params[:id])
|
8
|
+
if params[:position]
|
9
|
+
@nii_type.insert_at(params[:position])
|
10
|
+
redirect_to nii_types_url
|
11
|
+
return
|
12
|
+
end
|
13
|
+
update!
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
def interpolation_options
|
18
|
+
{:resource_name => t('activerecord.models.nii_type')}
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<%= form_for(@nii_type) do |f| -%>
|
2
|
+
<%= f.error_messages -%>
|
3
|
+
<p>
|
4
|
+
<%= f.label t('activerecord.attributes.nii_type.name') -%><br />
|
5
|
+
<%= f.text_field :name, :class => 'short_name' -%>
|
6
|
+
</p>
|
7
|
+
<p>
|
8
|
+
<%= f.label t('activerecord.attributes.nii_type.display_name') -%><br />
|
9
|
+
<%= f.text_area :display_name, :class => 'resource_textarea' -%>
|
10
|
+
</p>
|
11
|
+
<p>
|
12
|
+
<%= f.label t('activerecord.attributes.nii_type.note') -%><br />
|
13
|
+
<%= f.text_area :note, :class => 'resource_textarea' -%>
|
14
|
+
</p>
|
15
|
+
<p>
|
16
|
+
<%= f.submit %>
|
17
|
+
</p>
|
18
|
+
<%- end -%>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div id="content_detail" class="ui-corner-all">
|
2
|
+
<h1 class="title"><%= t('page.editing', :model => t('activerecord.models.nii_type')) -%></h1>
|
3
|
+
<div id="content_list">
|
4
|
+
<%= render 'form' %>
|
5
|
+
</div>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<div id="submenu" class="ui-corner-all">
|
9
|
+
<ul>
|
10
|
+
<li><%= link_to t('page.show'), @nii_type -%></li>
|
11
|
+
<li><%= link_to t('page.back'), nii_types_path -%></li>
|
12
|
+
</ul>
|
13
|
+
</div>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<div id="content_detail" class="ui-corner-all">
|
2
|
+
<h1 class="title"><%= t('page.listing', :model => t('activerecord.models.nii_type')) -%></h1>
|
3
|
+
<div id="content_list">
|
4
|
+
|
5
|
+
<table class="index">
|
6
|
+
<tr>
|
7
|
+
<th id="position"></th>
|
8
|
+
<th><%= t('activerecord.attributes.nii_type.name') -%></th>
|
9
|
+
<th><%= t('activerecord.attributes.nii_type.note') -%></th>
|
10
|
+
<th></th>
|
11
|
+
</tr>
|
12
|
+
|
13
|
+
<%- @nii_types.each do |nii_type| -%>
|
14
|
+
<tr class="line<%= cycle("0", "1") -%>">
|
15
|
+
<td>
|
16
|
+
<%- if can? :update, nii_type -%>
|
17
|
+
<%= move_position(nii_type) -%>
|
18
|
+
<%- end -%>
|
19
|
+
</td>
|
20
|
+
<td>
|
21
|
+
<%= link_to h(nii_type.display_name.localize), nii_type -%>
|
22
|
+
<br />
|
23
|
+
(<%= link_to h(nii_type.name), nii_type -%>)
|
24
|
+
</td>
|
25
|
+
<td><%= nii_type.note -%></td>
|
26
|
+
<td>
|
27
|
+
<%- if can? :update, nii_type -%>
|
28
|
+
<%= link_to t('page.edit'), edit_nii_type_path(nii_type) -%>
|
29
|
+
<% end %>
|
30
|
+
<%- if can? :destroy, nii_type -%>
|
31
|
+
<%= link_to t('page.destroy'), nii_type, :confirm => t('page.are_you_sure'), :method => :delete -%>
|
32
|
+
<% end -%>
|
33
|
+
</td>
|
34
|
+
</tr>
|
35
|
+
<%- end -%>
|
36
|
+
</table>
|
37
|
+
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div id="submenu" class="ui-corner-all">
|
42
|
+
<ul>
|
43
|
+
<li><%= link_to t('page.new', :model => t('activerecord.models.nii_type')), new_nii_type_path -%></li>
|
44
|
+
</ul>
|
45
|
+
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<div id="content_detail" class="ui-corner-all">
|
2
|
+
<h1 class="title"><%= t('page.new', :model => t('activerecord.models.nii_type')) -%></h1>
|
3
|
+
<div id="content_list">
|
4
|
+
<%= render 'form' %>
|
5
|
+
</div>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<div id="submenu" class="ui-corner-all">
|
9
|
+
<ul>
|
10
|
+
<li><%= link_to t('page.back'), nii_types_path -%></li>
|
11
|
+
</ul>
|
12
|
+
</div>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<div id="content_detail" class="ui-corner-all">
|
2
|
+
<h1 class="title"><%= t('page.showing', :model => t('activerecord.models.nii_type')) -%></h1>
|
3
|
+
<div id="content_list">
|
4
|
+
<p>
|
5
|
+
<strong><%= t('activerecord.attributes.nii_type.name') -%>:</strong>
|
6
|
+
<%= @nii_type.name -%>
|
7
|
+
</p>
|
8
|
+
|
9
|
+
<p>
|
10
|
+
<strong><%= t('activerecord.attributes.nii_type.display_name') -%>:</strong>
|
11
|
+
<%= @nii_type.display_name.localize -%>
|
12
|
+
</p>
|
13
|
+
|
14
|
+
<p>
|
15
|
+
<strong><%= t('activerecord.attributes.nii_type.note') -%>:</strong>
|
16
|
+
<%= @nii_type.note -%>
|
17
|
+
</p>
|
18
|
+
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div id="submenu" class="ui-corner-all">
|
23
|
+
<ul>
|
24
|
+
<li><%= link_to t('page.edit'), edit_nii_type_path(@nii_type) -%></li>
|
25
|
+
<li><%= back_to_index -%></li>
|
26
|
+
</ul>
|
27
|
+
</div>
|
data/config/routes.rb
ADDED
@@ -0,0 +1,104 @@
|
|
1
|
+
nii_type_00001:
|
2
|
+
id: 1
|
3
|
+
name: Journal Article
|
4
|
+
display_name: Journal Article
|
5
|
+
note:
|
6
|
+
position: 1
|
7
|
+
created_at: <%= Time.zone.now %>
|
8
|
+
updated_at: <%= Time.zone.now %>
|
9
|
+
nii_type_00002:
|
10
|
+
id: 2
|
11
|
+
name: Thesis or Dissertation
|
12
|
+
display_name: Thesis or Dissertation
|
13
|
+
note:
|
14
|
+
position: 2
|
15
|
+
created_at: <%= Time.zone.now %>
|
16
|
+
updated_at: <%= Time.zone.now %>
|
17
|
+
nii_type_00003:
|
18
|
+
id: 3
|
19
|
+
name: Departmental Bulletin Paper
|
20
|
+
display_name: Departmental Bulletin Paper
|
21
|
+
note:
|
22
|
+
position: 3
|
23
|
+
created_at: <%= Time.zone.now %>
|
24
|
+
updated_at: <%= Time.zone.now %>
|
25
|
+
nii_type_00004:
|
26
|
+
id: 4
|
27
|
+
name: Conference Paper
|
28
|
+
display_name: Conference Paper
|
29
|
+
note:
|
30
|
+
position: 4
|
31
|
+
created_at: <%= Time.zone.now %>
|
32
|
+
updated_at: <%= Time.zone.now %>
|
33
|
+
nii_type_00005:
|
34
|
+
id: 5
|
35
|
+
name: Presentation
|
36
|
+
display_name: Presentation
|
37
|
+
note:
|
38
|
+
position: 5
|
39
|
+
created_at: <%= Time.zone.now %>
|
40
|
+
updated_at: <%= Time.zone.now %>
|
41
|
+
nii_type_00006:
|
42
|
+
id: 6
|
43
|
+
name: Book
|
44
|
+
display_name: Book
|
45
|
+
note:
|
46
|
+
position: 6
|
47
|
+
created_at: <%= Time.zone.now %>
|
48
|
+
updated_at: <%= Time.zone.now %>
|
49
|
+
nii_type_00007:
|
50
|
+
id: 7
|
51
|
+
name: Technical Report
|
52
|
+
display_name: Technical Report
|
53
|
+
note:
|
54
|
+
position: 7
|
55
|
+
created_at: <%= Time.zone.now %>
|
56
|
+
updated_at: <%= Time.zone.now %>
|
57
|
+
nii_type_00008:
|
58
|
+
id: 8
|
59
|
+
name: Research Paper
|
60
|
+
display_name: Research Paper
|
61
|
+
note:
|
62
|
+
position: 8
|
63
|
+
created_at: <%= Time.zone.now %>
|
64
|
+
updated_at: <%= Time.zone.now %>
|
65
|
+
nii_type_00009:
|
66
|
+
id: 9
|
67
|
+
name: Article
|
68
|
+
display_name: Article
|
69
|
+
note:
|
70
|
+
position: 9
|
71
|
+
created_at: <%= Time.zone.now %>
|
72
|
+
updated_at: <%= Time.zone.now %>
|
73
|
+
nii_type_00010:
|
74
|
+
id: 10
|
75
|
+
name: Preprint
|
76
|
+
display_name: Preprint
|
77
|
+
note:
|
78
|
+
position: 10
|
79
|
+
created_at: <%= Time.zone.now %>
|
80
|
+
updated_at: <%= Time.zone.now %>
|
81
|
+
nii_type_00011:
|
82
|
+
id: 11
|
83
|
+
name: Learning Material
|
84
|
+
display_name: Learning Material
|
85
|
+
note:
|
86
|
+
position: 11
|
87
|
+
created_at: <%= Time.zone.now %>
|
88
|
+
updated_at: <%= Time.zone.now %>
|
89
|
+
nii_type_00012:
|
90
|
+
id: 12
|
91
|
+
name: Data or Dataset
|
92
|
+
display_name: Data or Dataset
|
93
|
+
note:
|
94
|
+
position: 12
|
95
|
+
created_at: <%= Time.zone.now %>
|
96
|
+
updated_at: <%= Time.zone.now %>
|
97
|
+
nii_type_00013:
|
98
|
+
id: 13
|
99
|
+
name: Others
|
100
|
+
display_name: Others
|
101
|
+
note:
|
102
|
+
position: 13
|
103
|
+
created_at: <%= Time.zone.now %>
|
104
|
+
updated_at: <%= Time.zone.now %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class CreateNiiTypes < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :nii_types do |t|
|
4
|
+
t.string :name, :null => false
|
5
|
+
t.text :display_name
|
6
|
+
t.text :note
|
7
|
+
t.integer :position
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
add_index :nii_types, :name, :unique => true
|
12
|
+
end
|
13
|
+
end
|
data/lib/enju_nii.rb
ADDED
data/spec/dummy/Rakefile
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
3
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
4
|
+
|
5
|
+
require File.expand_path('../config/application', __FILE__)
|
6
|
+
|
7
|
+
Dummy::Application.load_tasks
|
@@ -0,0 +1,9 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into including all the files listed below.
|
2
|
+
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
3
|
+
// be included in the compiled file accessible from http://example.com/assets/application.js
|
4
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
5
|
+
// the compiled file.
|
6
|
+
//
|
7
|
+
//= require jquery
|
8
|
+
//= require jquery_ujs
|
9
|
+
//= require_tree .
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll automatically include all the stylesheets available in this directory
|
3
|
+
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
4
|
+
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
5
|
+
*= require_self
|
6
|
+
*= require_tree .
|
7
|
+
*/
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
Bundler.require
|
6
|
+
require "enju_nii"
|
7
|
+
|
8
|
+
module Dummy
|
9
|
+
class Application < Rails::Application
|
10
|
+
# Settings in config/environments/* take precedence over those specified here.
|
11
|
+
# Application configuration should go into files in config/initializers
|
12
|
+
# -- all .rb files in that directory are automatically loaded.
|
13
|
+
|
14
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
15
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
16
|
+
|
17
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
18
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
19
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
20
|
+
|
21
|
+
# Activate observers that should always be running.
|
22
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
23
|
+
|
24
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
25
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
26
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
27
|
+
|
28
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
29
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
30
|
+
# config.i18n.default_locale = :de
|
31
|
+
|
32
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
33
|
+
config.encoding = "utf-8"
|
34
|
+
|
35
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
36
|
+
config.filter_parameters += [:password]
|
37
|
+
|
38
|
+
# Enable the asset pipeline
|
39
|
+
config.assets.enabled = true
|
40
|
+
|
41
|
+
# Version of your assets, change this if you want to expire all your assets
|
42
|
+
config.assets.version = '1.0'
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
require 'master_model'
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem 'sqlite3'
|
6
|
+
development:
|
7
|
+
adapter: sqlite3
|
8
|
+
database: db/development.sqlite3
|
9
|
+
pool: 5
|
10
|
+
timeout: 5000
|
11
|
+
|
12
|
+
# Warning: The database defined as "test" will be erased and
|
13
|
+
# re-generated from your development database when you run "rake".
|
14
|
+
# Do not set this db to the same as development or production.
|
15
|
+
test:
|
16
|
+
adapter: sqlite3
|
17
|
+
database: db/test.sqlite3
|
18
|
+
pool: 5
|
19
|
+
timeout: 5000
|
20
|
+
|
21
|
+
production:
|
22
|
+
adapter: sqlite3
|
23
|
+
database: db/production.sqlite3
|
24
|
+
pool: 5
|
25
|
+
timeout: 5000
|
@@ -0,0 +1,30 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
|
+
config.cache_classes = false
|
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.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Don't care if the mailer can't send
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
18
|
+
|
19
|
+
# Print deprecation notices to the Rails logger
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Only use best-standards-support built into browsers
|
23
|
+
config.action_dispatch.best_standards_support = :builtin
|
24
|
+
|
25
|
+
# Do not compress assets
|
26
|
+
config.assets.compress = false
|
27
|
+
|
28
|
+
# Expands the lines which load the assets
|
29
|
+
config.assets.debug = true
|
30
|
+
end
|