sunrise-core 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/README.rdoc +1 -1
- data/lib/generators/sunrise/templates/models/defaults/position_type.rb +2 -0
- data/lib/generators/sunrise/templates/models/defaults/role_type.rb +2 -0
- data/lib/generators/sunrise/templates/models/defaults/structure_type.rb +2 -0
- data/lib/sunrise/version.rb +1 -1
- data/spec/dummy/log/test.log +5332 -39751
- data/spec/dummy/script/rails +0 -0
- metadata +862 -1288
- data/spec/dummy/public/uploads/avatar/4/rails.png +0 -0
- data/spec/dummy/public/uploads/avatar/4/thumb_rails.png +0 -0
- data/spec/dummy/public/uploads/avatar/5/rails.png +0 -0
- data/spec/dummy/public/uploads/avatar/5/thumb_rails.png +0 -0
- data/spec/dummy/public/uploads/avatar/6/rails.png +0 -0
- data/spec/dummy/public/uploads/avatar/6/thumb_rails.png +0 -0
- data/spec/dummy/public/uploads/avatar/7/rails.png +0 -0
- data/spec/dummy/public/uploads/avatar/7/thumb_rails.png +0 -0
- data/spec/dummy/public/uploads/avatar/8/rails.png +0 -0
- data/spec/dummy/public/uploads/avatar/8/thumb_rails.png +0 -0
- data/spec/dummy/public/uploads/tmp/20110819-1743-19227-1016/silicon_valley.jpg +0 -0
- data/spec/dummy/public/uploads/tmp/20110819-1743-19227-1016/thumb_silicon_valley.jpg +0 -0
- data/spec/dummy/public/uploads/tmp/20110819-1744-19584-0221/silicon_valley.jpg +0 -0
- data/spec/dummy/public/uploads/tmp/20110819-1744-19584-0221/thumb_silicon_valley.jpg +0 -0
- data/spec/tmp/app/helpers/manage/assets_helper.rb +0 -2
- data/spec/tmp/app/helpers/manage/base_helper.rb +0 -83
- data/spec/tmp/app/helpers/manage/pages_helper.rb +0 -2
- data/spec/tmp/app/helpers/manage/settings_helper.rb +0 -2
- data/spec/tmp/app/helpers/manage/structures_helper.rb +0 -12
- data/spec/tmp/app/helpers/manage/users_helper.rb +0 -6
- data/spec/tmp/app/models/defaults/ability.rb +0 -39
- data/spec/tmp/app/models/defaults/asset.rb +0 -9
- data/spec/tmp/app/models/defaults/attachment_file.rb +0 -31
- data/spec/tmp/app/models/defaults/avatar.rb +0 -34
- data/spec/tmp/app/models/defaults/header.rb +0 -5
- data/spec/tmp/app/models/defaults/page.rb +0 -5
- data/spec/tmp/app/models/defaults/picture.rb +0 -31
- data/spec/tmp/app/models/defaults/position_type.rb +0 -7
- data/spec/tmp/app/models/defaults/role.rb +0 -20
- data/spec/tmp/app/models/defaults/role_type.rb +0 -8
- data/spec/tmp/app/models/defaults/structure.rb +0 -9
- data/spec/tmp/app/models/defaults/structure_type.rb +0 -9
- data/spec/tmp/app/models/defaults/user.rb +0 -47
- data/spec/tmp/app/uploaders/attachment_file_uploader.rb +0 -5
- data/spec/tmp/app/uploaders/avatar_uploader.rb +0 -13
- data/spec/tmp/app/uploaders/picture_uploader.rb +0 -17
- data/spec/tmp/app/views/layouts/application.html.erb +0 -35
- data/spec/tmp/app/views/pages/show.html.erb +0 -2
- data/spec/tmp/app/views/shared/_notice.html.erb +0 -17
- data/spec/tmp/config/application.rb +0 -47
- data/spec/tmp/config/application.yml.sample +0 -4
- data/spec/tmp/config/database.yml.sample +0 -34
- data/spec/tmp/config/initializers/sunrise.rb +0 -7
- data/spec/tmp/config/logrotate-config.sample +0 -9
- data/spec/tmp/config/nginx-config-passenger.sample +0 -60
- data/spec/tmp/config/routes.rb +0 -7
- data/spec/tmp/db/migrate/20110819144550_sunrise_create_users.rb +0 -29
- data/spec/tmp/db/migrate/20110819144650_sunrise_create_roles.rb +0 -16
- data/spec/tmp/db/migrate/20110819144750_sunrise_create_structures.rb +0 -27
- data/spec/tmp/db/migrate/20110819144850_sunrise_create_pages.rb +0 -17
- data/spec/tmp/db/migrate/20110819144950_sunrise_create_assets.rb +0 -28
- data/spec/tmp/db/migrate/20110819145050_sunrise_create_headers.rb +0 -20
- data/spec/tmp/db/seeds.rb +0 -25
- data/spec/tmp/public/images/alert.png +0 -0
- data/spec/tmp/public/images/cross_ico.png +0 -0
- data/spec/tmp/public/images/manage/add_post_bot.gif +0 -0
- data/spec/tmp/public/images/manage/add_post_top.gif +0 -0
- data/spec/tmp/public/images/manage/add_white_bot.gif +0 -0
- data/spec/tmp/public/images/manage/add_white_top.gif +0 -0
- data/spec/tmp/public/images/manage/arrow.png +0 -0
- data/spec/tmp/public/images/manage/back_but_lc.gif +0 -0
- data/spec/tmp/public/images/manage/back_but_rc.gif +0 -0
- data/spec/tmp/public/images/manage/bot_corn.gif +0 -0
- data/spec/tmp/public/images/manage/bot_duo_corn.gif +0 -0
- data/spec/tmp/public/images/manage/but_bg.png +0 -0
- data/spec/tmp/public/images/manage/but_block_lc.gif +0 -0
- data/spec/tmp/public/images/manage/but_block_rc.gif +0 -0
- data/spec/tmp/public/images/manage/but_freze_lc.gif +0 -0
- data/spec/tmp/public/images/manage/but_freze_rc.gif +0 -0
- data/spec/tmp/public/images/manage/but_gr.gif +0 -0
- data/spec/tmp/public/images/manage/but_gr_l.gif +0 -0
- data/spec/tmp/public/images/manage/but_gr_r.gif +0 -0
- data/spec/tmp/public/images/manage/but_search.gif +0 -0
- data/spec/tmp/public/images/manage/but_unfreze_lc.gif +0 -0
- data/spec/tmp/public/images/manage/but_unfreze_rc.gif +0 -0
- data/spec/tmp/public/images/manage/button_add_foto.gif +0 -0
- data/spec/tmp/public/images/manage/button_add_foto_ru.gif +0 -0
- data/spec/tmp/public/images/manage/button_add_foto_ua.gif +0 -0
- data/spec/tmp/public/images/manage/button_add_foto_uk.gif +0 -0
- data/spec/tmp/public/images/manage/cancelbutton.gif +0 -0
- data/spec/tmp/public/images/manage/dark_arr.gif +0 -0
- data/spec/tmp/public/images/manage/dark_arr_left.gif +0 -0
- data/spec/tmp/public/images/manage/dark_cross_ico.gif +0 -0
- data/spec/tmp/public/images/manage/dot.gif +0 -0
- data/spec/tmp/public/images/manage/duo_bg.gif +0 -0
- data/spec/tmp/public/images/manage/duo_bg_small.gif +0 -0
- data/spec/tmp/public/images/manage/duo_bg_small_blocked.gif +0 -0
- data/spec/tmp/public/images/manage/duo_bg_small_frozed.gif +0 -0
- data/spec/tmp/public/images/manage/duo_bg_small_notact.gif +0 -0
- data/spec/tmp/public/images/manage/duo_bot_small.gif +0 -0
- data/spec/tmp/public/images/manage/duo_bot_small_blocked.gif +0 -0
- data/spec/tmp/public/images/manage/duo_bot_small_frozed.gif +0 -0
- data/spec/tmp/public/images/manage/duo_bot_small_notact.gif +0 -0
- data/spec/tmp/public/images/manage/duo_top_small.gif +0 -0
- data/spec/tmp/public/images/manage/duo_top_small_blocked.gif +0 -0
- data/spec/tmp/public/images/manage/duo_top_small_frozed.gif +0 -0
- data/spec/tmp/public/images/manage/duo_top_small_notact.gif +0 -0
- data/spec/tmp/public/images/manage/edit_white_top.gif +0 -0
- data/spec/tmp/public/images/manage/empty.gif +0 -0
- data/spec/tmp/public/images/manage/filter_bot_bg.gif +0 -0
- data/spec/tmp/public/images/manage/filter_top_bg.gif +0 -0
- data/spec/tmp/public/images/manage/flag_en.gif +0 -0
- data/spec/tmp/public/images/manage/flag_en_nonact.gif +0 -0
- data/spec/tmp/public/images/manage/flag_ru.gif +0 -0
- data/spec/tmp/public/images/manage/flag_ru_nonact.gif +0 -0
- data/spec/tmp/public/images/manage/flag_ua.gif +0 -0
- data/spec/tmp/public/images/manage/flag_ua_nonact.gif +0 -0
- data/spec/tmp/public/images/manage/foto.jpg +0 -0
- data/spec/tmp/public/images/manage/ico_add.gif +0 -0
- data/spec/tmp/public/images/manage/ico_delete.gif +0 -0
- data/spec/tmp/public/images/manage/ico_down.gif +0 -0
- data/spec/tmp/public/images/manage/ico_edit.gif +0 -0
- data/spec/tmp/public/images/manage/ico_settings.gif +0 -0
- data/spec/tmp/public/images/manage/ico_up.gif +0 -0
- data/spec/tmp/public/images/manage/input_bg.gif +0 -0
- data/spec/tmp/public/images/manage/l_but_corn.gif +0 -0
- data/spec/tmp/public/images/manage/minimise_but.gif +0 -0
- data/spec/tmp/public/images/manage/mp3.png +0 -0
- data/spec/tmp/public/images/manage/page_arr_hover.png +0 -0
- data/spec/tmp/public/images/manage/page_next_arr.gif +0 -0
- data/spec/tmp/public/images/manage/page_num_hover.gif +0 -0
- data/spec/tmp/public/images/manage/page_prev_arr.gif +0 -0
- data/spec/tmp/public/images/manage/panel/l_but_corn.gif +0 -0
- data/spec/tmp/public/images/manage/panel/maximise_but.gif +0 -0
- data/spec/tmp/public/images/manage/panel/r_but_corn.gif +0 -0
- data/spec/tmp/public/images/manage/panel/top_menu_arr.gif +0 -0
- data/spec/tmp/public/images/manage/panel/user_pic.gif +0 -0
- data/spec/tmp/public/images/manage/preloader.gif +0 -0
- data/spec/tmp/public/images/manage/r_but_corn.gif +0 -0
- data/spec/tmp/public/images/manage/select_bg.gif +0 -0
- data/spec/tmp/public/images/manage/select_corn.gif +0 -0
- data/spec/tmp/public/images/manage/struct_corn_lg.gif +0 -0
- data/spec/tmp/public/images/manage/struct_corn_llg.gif +0 -0
- data/spec/tmp/public/images/manage/struct_corn_lw.gif +0 -0
- data/spec/tmp/public/images/manage/struct_corn_rg.gif +0 -0
- data/spec/tmp/public/images/manage/struct_corn_rlg.gif +0 -0
- data/spec/tmp/public/images/manage/struct_corn_rw.gif +0 -0
- data/spec/tmp/public/images/manage/tab_gl.gif +0 -0
- data/spec/tmp/public/images/manage/tab_gr.gif +0 -0
- data/spec/tmp/public/images/manage/tab_wl.gif +0 -0
- data/spec/tmp/public/images/manage/tab_wr.gif +0 -0
- data/spec/tmp/public/images/manage/top_corn.gif +0 -0
- data/spec/tmp/public/images/manage/top_duo_corn.gif +0 -0
- data/spec/tmp/public/images/manage/top_menu_arr.gif +0 -0
- data/spec/tmp/public/images/manage/transp_cross.png +0 -0
- data/spec/tmp/public/images/manage/upload_progress.gif +0 -0
- data/spec/tmp/public/images/manage/user_act_lc.gif +0 -0
- data/spec/tmp/public/images/manage/user_act_rc.gif +0 -0
- data/spec/tmp/public/images/manage/user_ico.gif +0 -0
- data/spec/tmp/public/images/manage/user_pic.gif +0 -0
- data/spec/tmp/public/images/manage/user_pic_small.gif +0 -0
- data/spec/tmp/public/images/manage/user_pic_thumb.gif +0 -0
- data/spec/tmp/public/javascripts/datepicker/jquery-ui-i18n.js +0 -1176
- data/spec/tmp/public/javascripts/datepicker/jquery.ui.datepicker-ru.js +0 -37
- data/spec/tmp/public/javascripts/datepicker/jquery.ui.datepicker-uk.js +0 -37
- data/spec/tmp/public/javascripts/jquery-ui-timepicker-addon.js +0 -911
- data/spec/tmp/public/javascripts/jquery.cookie.js +0 -97
- data/spec/tmp/public/javascripts/jquery.fancybox-1.3.4.pack.js +0 -46
- data/spec/tmp/public/javascripts/jquery.tmpl.min.js +0 -10
- data/spec/tmp/public/javascripts/manage-fileuploader.js +0 -182
- data/spec/tmp/public/javascripts/manage.js +0 -294
- data/spec/tmp/public/javascripts/preloader.js +0 -47
- data/spec/tmp/public/javascripts/rails.js +0 -331
- data/spec/tmp/public/stylesheets/alert.css +0 -26
- data/spec/tmp/public/stylesheets/application.css +0 -1
- data/spec/tmp/public/stylesheets/fancybox/images/blank.gif +0 -0
- data/spec/tmp/public/stylesheets/fancybox/images/fancy_close.png +0 -0
- data/spec/tmp/public/stylesheets/fancybox/images/fancy_loading.png +0 -0
- data/spec/tmp/public/stylesheets/fancybox/images/fancy_nav_left.png +0 -0
- data/spec/tmp/public/stylesheets/fancybox/images/fancy_nav_right.png +0 -0
- data/spec/tmp/public/stylesheets/fancybox/images/fancy_shadow_e.png +0 -0
- data/spec/tmp/public/stylesheets/fancybox/images/fancy_shadow_n.png +0 -0
- data/spec/tmp/public/stylesheets/fancybox/images/fancy_shadow_ne.png +0 -0
- data/spec/tmp/public/stylesheets/fancybox/images/fancy_shadow_nw.png +0 -0
- data/spec/tmp/public/stylesheets/fancybox/images/fancy_shadow_s.png +0 -0
- data/spec/tmp/public/stylesheets/fancybox/images/fancy_shadow_se.png +0 -0
- data/spec/tmp/public/stylesheets/fancybox/images/fancy_shadow_sw.png +0 -0
- data/spec/tmp/public/stylesheets/fancybox/images/fancy_shadow_w.png +0 -0
- data/spec/tmp/public/stylesheets/fancybox/images/fancy_title_left.png +0 -0
- data/spec/tmp/public/stylesheets/fancybox/images/fancy_title_main.png +0 -0
- data/spec/tmp/public/stylesheets/fancybox/images/fancy_title_over.png +0 -0
- data/spec/tmp/public/stylesheets/fancybox/images/fancy_title_right.png +0 -0
- data/spec/tmp/public/stylesheets/fancybox/images/fancybox-x.png +0 -0
- data/spec/tmp/public/stylesheets/fancybox/images/fancybox-y.png +0 -0
- data/spec/tmp/public/stylesheets/fancybox/images/fancybox.png +0 -0
- data/spec/tmp/public/stylesheets/fancybox/jquery.fancybox-1.3.4.css +0 -359
- data/spec/tmp/public/stylesheets/manage/buttons.css +0 -42
- data/spec/tmp/public/stylesheets/manage/ie.css +0 -16
- data/spec/tmp/public/stylesheets/manage/main.css +0 -1108
- data/spec/tmp/public/stylesheets/manage/panel.css +0 -126
- data/spec/tmp/public/stylesheets/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/spec/tmp/public/stylesheets/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/spec/tmp/public/stylesheets/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/spec/tmp/public/stylesheets/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/spec/tmp/public/stylesheets/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/spec/tmp/public/stylesheets/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/spec/tmp/public/stylesheets/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/spec/tmp/public/stylesheets/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/spec/tmp/public/stylesheets/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/spec/tmp/public/stylesheets/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/spec/tmp/public/stylesheets/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/spec/tmp/public/stylesheets/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/spec/tmp/public/stylesheets/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/spec/tmp/public/stylesheets/smoothness/jquery-ui-1.8.13.custom.css +0 -578
- data/spec/tmp/spec/controllers/pages_controller_spec.rb +0 -22
- data/spec/tmp/spec/controllers/welcome_controller_spec.rb +0 -18
- data/spec/tmp/spec/factories/structure_factory.rb +0 -22
- data/spec/tmp/spec/factories/user_factory.rb +0 -60
- data/spec/tmp/spec/spec_helper.rb +0 -37
- data/spec/tmp/spec/support/helpers/controller_macros.rb +0 -51
@@ -1,35 +0,0 @@
|
|
1
|
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
2
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
-
<head>
|
4
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
5
|
-
<%= tag(:meta, :content => render_keywords, :name=>"keywords") %>
|
6
|
-
<%= tag(:meta, :content => render_description, :name=>"description") %>
|
7
|
-
<%= csrf_meta_tag %>
|
8
|
-
<title><%= render_title %></title>
|
9
|
-
<%= stylesheet_link_tag "application", "alert" %>
|
10
|
-
<%= stylesheet_link_tag 'manage/panel.css', :media=> 'screen' if content_manager? %>
|
11
|
-
<!--[if lte IE 7]><link href="/stylesheets/ie7.css" rel="stylesheet" type="text/css" /><![endif]-->
|
12
|
-
|
13
|
-
<script src="https://www.google.com/jsapi?key=" type="text/javascript"></script>
|
14
|
-
<script language="Javascript" type="text/javascript">
|
15
|
-
//<![CDATA[
|
16
|
-
google.load("jquery", "1.6.2");
|
17
|
-
//]]>
|
18
|
-
</script>
|
19
|
-
|
20
|
-
<%= javascript_include_tag "preloader", "rails" %>
|
21
|
-
<%= yield(:head) %>
|
22
|
-
</head>
|
23
|
-
<body>
|
24
|
-
<%= render :partial => "manage/shared/panel" if content_manager? %>
|
25
|
-
<%= render :partial => 'shared/notice' if flash %>
|
26
|
-
|
27
|
-
<div class='content'>
|
28
|
-
<%= yield %>
|
29
|
-
</div>
|
30
|
-
|
31
|
-
<%= yield(:footer) %>
|
32
|
-
|
33
|
-
<div id="preloader" style="display:none;z-index:5000;" class="load-wait"><div><strong>Загрузка</strong></div></div>
|
34
|
-
</body>
|
35
|
-
</html>
|
@@ -1,17 +0,0 @@
|
|
1
|
-
<% unless flash.keys.empty? %>
|
2
|
-
<div class="message" style="display:none;z-index:5000;">
|
3
|
-
<div class="alert-container">
|
4
|
-
<div class="alert">
|
5
|
-
<% flash.each do |key, text| %>
|
6
|
-
<%= content_tag(:div, text, :class => "flash_#{key}") %>
|
7
|
-
<% end %>
|
8
|
-
<%= link_to_function(image_tag("cross_ico.png", :title=>t('label.close')), "$(this).parents('div.message').slideUp()", :class=>"close") %>
|
9
|
-
</div>
|
10
|
-
</div>
|
11
|
-
<script type='text/javascript' charset='UTF-8'>
|
12
|
-
$(document).ready(function(){
|
13
|
-
$('div.message').slideDown('slow');
|
14
|
-
})
|
15
|
-
</script>
|
16
|
-
</div>
|
17
|
-
<% end %>
|
@@ -1,47 +0,0 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
require "active_model/railtie"
|
4
|
-
require "active_record/railtie"
|
5
|
-
require "action_controller/railtie"
|
6
|
-
require "action_view/railtie"
|
7
|
-
require "action_mailer/railtie"
|
8
|
-
|
9
|
-
Bundler.require
|
10
|
-
require 'sunrise/core'
|
11
|
-
|
12
|
-
module Dummy
|
13
|
-
class Application < Rails::Application
|
14
|
-
# Custom directories with classes and modules you want to be autoloadable.
|
15
|
-
# config.autoload_paths += %W(#{config.root}/extras) config.autoload_paths += %W(#{config.root}/app/models/defaults)
|
16
|
-
|
17
|
-
config.autoload_paths += %W(#{config.root}/../../lib/generators/sunrise/templates/models/defaults #{config.root}/../../lib/generators/sunrise/templates/uploaders)
|
18
|
-
|
19
|
-
# Only load the plugins named here, in the order given (default is alphabetical).
|
20
|
-
# :all can be used as a placeholder for all plugins not explicitly named.
|
21
|
-
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
22
|
-
|
23
|
-
# Activate observers that should always be running.
|
24
|
-
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
25
|
-
|
26
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
27
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
28
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
29
|
-
|
30
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
31
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
32
|
-
# config.i18n.default_locale = :de
|
33
|
-
|
34
|
-
# JavaScript files you want as :defaults (application.js is always included).
|
35
|
-
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
36
|
-
|
37
|
-
# Configure the default encoding used in templates for Ruby 1.9.
|
38
|
-
config.encoding = "utf-8"
|
39
|
-
|
40
|
-
# Configure sensitive parameters which will be filtered from the log file.
|
41
|
-
config.filter_parameters += [:password]
|
42
|
-
|
43
|
-
config.generators do |g|
|
44
|
-
g.test_framework :rspec
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
@@ -1,34 +0,0 @@
|
|
1
|
-
# And be sure to use new-style password hashing:
|
2
|
-
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
|
3
|
-
development:
|
4
|
-
adapter: mysql2
|
5
|
-
encoding: utf8
|
6
|
-
reconnect: false
|
7
|
-
database: dummy
|
8
|
-
pool: 5
|
9
|
-
username: root
|
10
|
-
password:
|
11
|
-
socket: /var/run/mysqld/mysqld.sock
|
12
|
-
|
13
|
-
# Warning: The database defined as "test" will be erased and
|
14
|
-
# re-generated from your development database when you run "rake".
|
15
|
-
# Do not set this db to the same as development or production.
|
16
|
-
test:
|
17
|
-
adapter: mysql2
|
18
|
-
encoding: utf8
|
19
|
-
reconnect: false
|
20
|
-
database: dummy_test
|
21
|
-
pool: 5
|
22
|
-
username: root
|
23
|
-
password:
|
24
|
-
socket: /var/run/mysqld/mysqld.sock
|
25
|
-
|
26
|
-
production:
|
27
|
-
adapter: mysql2
|
28
|
-
encoding: utf8
|
29
|
-
reconnect: true
|
30
|
-
database: dummy
|
31
|
-
pool: 5
|
32
|
-
username: root
|
33
|
-
password:
|
34
|
-
socket: /var/run/mysqld/mysqld.sock
|
@@ -1,60 +0,0 @@
|
|
1
|
-
# dummy
|
2
|
-
server {
|
3
|
-
listen 80;
|
4
|
-
server_name .dummy.aimbulance.com;
|
5
|
-
|
6
|
-
server_tokens off;
|
7
|
-
|
8
|
-
gzip on;
|
9
|
-
gzip_proxied any;
|
10
|
-
gzip_min_length 1100;
|
11
|
-
gzip_buffers 12 4k;
|
12
|
-
gzip_types text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
13
|
-
|
14
|
-
client_max_body_size 200M;
|
15
|
-
client_body_buffer_size 128k;
|
16
|
-
client_header_timeout 60;
|
17
|
-
client_body_timeout 260;
|
18
|
-
send_timeout 260;
|
19
|
-
keepalive_timeout 60;
|
20
|
-
|
21
|
-
large_client_header_buffers 4 4k;
|
22
|
-
client_header_buffer_size 1k;
|
23
|
-
|
24
|
-
connection_pool_size 256;
|
25
|
-
ignore_invalid_headers on;
|
26
|
-
postpone_output 1460;
|
27
|
-
output_buffers 4 32k;
|
28
|
-
request_pool_size 4k;
|
29
|
-
|
30
|
-
passenger_enabled on;
|
31
|
-
rails_env production;
|
32
|
-
|
33
|
-
root /var/www/gems/sunrise-core/spec/dummy/public;
|
34
|
-
|
35
|
-
location ~ /\.[^\/]+ {
|
36
|
-
return 404;
|
37
|
-
}
|
38
|
-
|
39
|
-
location ~* ^.+\.(jpg|jpeg|gif|png|css|js|swf|ico|mov|flv|fla|pdf|zip|rar|doc|xls)$
|
40
|
-
{
|
41
|
-
expires 12h;
|
42
|
-
add_header Cache-Control private;
|
43
|
-
access_log off;
|
44
|
-
}
|
45
|
-
|
46
|
-
# This rewrites all the requests to the maintenance.html page if it exists in the doc root.
|
47
|
-
if (-f $document_root/system/maintenance.html) {
|
48
|
-
return 503;
|
49
|
-
}
|
50
|
-
|
51
|
-
error_page 503 @503;
|
52
|
-
location @503 {
|
53
|
-
# Serve static assets if found.
|
54
|
-
if (-f $request_filename) {
|
55
|
-
break;
|
56
|
-
}
|
57
|
-
|
58
|
-
rewrite ^(.*)$ /system/maintenance.html break;
|
59
|
-
}
|
60
|
-
}
|
data/spec/tmp/config/routes.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
class SunriseCreateUsers < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table(:users) do |t|
|
4
|
-
t.string :name, :limit => 150
|
5
|
-
# t.string :login, :limit => 20, :null => false
|
6
|
-
|
7
|
-
t.database_authenticatable :null => false
|
8
|
-
t.recoverable
|
9
|
-
t.rememberable
|
10
|
-
t.trackable
|
11
|
-
t.confirmable
|
12
|
-
t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :time
|
13
|
-
t.encryptable
|
14
|
-
# t.token_authenticatable
|
15
|
-
|
16
|
-
t.timestamps
|
17
|
-
end
|
18
|
-
|
19
|
-
add_index :users, :email, :unique => true
|
20
|
-
add_index :users, :reset_password_token, :unique => true
|
21
|
-
add_index :users, :confirmation_token, :unique => true
|
22
|
-
# add_index :users, :login, :unique => true
|
23
|
-
# add_index :users, :unlock_token, :unique => true
|
24
|
-
end
|
25
|
-
|
26
|
-
def self.down
|
27
|
-
drop_table :users
|
28
|
-
end
|
29
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
class SunriseCreateRoles < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :roles do |t|
|
4
|
-
t.integer :role_type, :limit => 1, :default => 0
|
5
|
-
t.integer :user_id, :null => false
|
6
|
-
|
7
|
-
t.timestamps
|
8
|
-
end
|
9
|
-
|
10
|
-
add_index :roles, :user_id, :name => "fk_user"
|
11
|
-
end
|
12
|
-
|
13
|
-
def self.down
|
14
|
-
drop_table :roles
|
15
|
-
end
|
16
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
class SunriseCreateStructures < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :structures do |t|
|
4
|
-
t.string :title, :null => false
|
5
|
-
t.string :slug, :null => false, :limit => 25
|
6
|
-
t.integer :kind, :limit => 1, :default => 0
|
7
|
-
t.integer :position, :limit => 2, :default => 0
|
8
|
-
t.boolean :is_visible, :default => true
|
9
|
-
t.string :redirect_url
|
10
|
-
|
11
|
-
t.integer "parent_id"
|
12
|
-
t.integer "lft", :default => 0
|
13
|
-
t.integer "rgt", :default => 0
|
14
|
-
t.integer "depth", :default => 0
|
15
|
-
|
16
|
-
t.timestamps
|
17
|
-
end
|
18
|
-
|
19
|
-
add_index :structures, [:kind, :slug], :uniq => true
|
20
|
-
add_index :structures, :parent_id
|
21
|
-
add_index :structures, [:lft, :rgt]
|
22
|
-
end
|
23
|
-
|
24
|
-
def self.down
|
25
|
-
drop_table :structures
|
26
|
-
end
|
27
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
class SunriseCreatePages < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :pages do |t|
|
4
|
-
t.string :title, :null => false
|
5
|
-
t.text :content
|
6
|
-
t.integer :structure_id, :null => false
|
7
|
-
|
8
|
-
t.timestamps
|
9
|
-
end
|
10
|
-
|
11
|
-
add_index :pages, :structure_id, :name => "fk_pages"
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.down
|
15
|
-
drop_table :pages
|
16
|
-
end
|
17
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
class SunriseCreateAssets < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :assets do |t|
|
4
|
-
t.string :data_file_name, :null => false
|
5
|
-
t.string :data_content_type
|
6
|
-
t.integer :data_file_size
|
7
|
-
|
8
|
-
t.integer :assetable_id, :null => false
|
9
|
-
t.string :assetable_type, :limit => 25, :null => false
|
10
|
-
t.string :type, :limit => 25
|
11
|
-
t.string :guid, :limit => 10
|
12
|
-
|
13
|
-
t.integer :locale, :limit => 1, :default => 0
|
14
|
-
t.integer :user_id
|
15
|
-
t.integer :sort_order, :default => 0
|
16
|
-
|
17
|
-
t.timestamps
|
18
|
-
end
|
19
|
-
|
20
|
-
add_index "assets", ["assetable_type", "type", "assetable_id"]
|
21
|
-
add_index "assets", ["assetable_type", "assetable_id"]
|
22
|
-
add_index "assets", ["user_id"]
|
23
|
-
end
|
24
|
-
|
25
|
-
def self.down
|
26
|
-
drop_table :assets
|
27
|
-
end
|
28
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
class SunriseCreateHeaders < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
create_table :headers do |t|
|
4
|
-
t.string :title
|
5
|
-
t.string :keywords
|
6
|
-
t.text :description
|
7
|
-
|
8
|
-
t.string :headerable_type, :limit => 30, :null => false
|
9
|
-
t.integer :headerable_id, :null => false
|
10
|
-
|
11
|
-
t.timestamps
|
12
|
-
end
|
13
|
-
|
14
|
-
add_index :headers, [:headerable_type, :headerable_id], :uniq => true, :name => "fk_headerable"
|
15
|
-
end
|
16
|
-
|
17
|
-
def self.down
|
18
|
-
drop_table :headers
|
19
|
-
end
|
20
|
-
end
|
data/spec/tmp/db/seeds.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
def insert_user
|
2
|
-
User.truncate_table
|
3
|
-
Role.truncate_table
|
4
|
-
password = Rails.env.production? ? Devise.friendly_token : (1..9).to_a.join
|
5
|
-
|
6
|
-
admin = User.new(:name=>'Administrator', :email=>'dev@aimbulance.com',
|
7
|
-
:password=>password, :password_confirmation=>password)
|
8
|
-
admin.login = 'admin' if admin.respond_to?(:login)
|
9
|
-
admin.roles.build(:role_type => RoleType.admin)
|
10
|
-
admin.skip_confirmation!
|
11
|
-
admin.save!
|
12
|
-
|
13
|
-
puts "Admin: #{admin.email}, #{admin.password}"
|
14
|
-
end
|
15
|
-
|
16
|
-
def insert_structures
|
17
|
-
Structure.truncate_table
|
18
|
-
|
19
|
-
main_page = Structure.create!(:title => "Главная страница", :slug => "main-page", :structure_type => StructureType.main, :parent => nil)
|
20
|
-
#Structure.create!(:title => "Трансляции", :slug => "broadcasts", :structure_type => StructureType.broadcasts, :parent => main_page)
|
21
|
-
#Structure.create!(:title => "Прямые репортажи", :slug => "posts", :structure_type => StructureType.posts, :parent => main_page)
|
22
|
-
end
|
23
|
-
|
24
|
-
insert_user
|
25
|
-
insert_structures
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|