refinerycms-core 0.9.9.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/app/controllers/admin/base_controller.rb +10 -0
- data/app/controllers/admin/dialogs_controller.rb +26 -0
- data/app/controllers/admin/refinery_core_controller.rb +12 -0
- data/app/controllers/application_controller.rb +6 -0
- data/app/controllers/refinery/fast_controller.rb +9 -0
- data/app/controllers/sitemap_controller.rb +14 -0
- data/app/helpers/application_helper.rb +5 -0
- data/app/views/admin/_head.html.erb +43 -0
- data/app/views/admin/_javascripts.html.erb +32 -0
- data/app/views/admin/_menu.html.erb +17 -0
- data/app/views/admin/dialogs/show.html.erb +19 -0
- data/app/views/layouts/admin.html.erb +24 -0
- data/app/views/layouts/admin_dialog.html.erb +14 -0
- data/app/views/layouts/application.html.erb +21 -0
- data/app/views/shared/_content_page.html.erb +63 -0
- data/app/views/shared/_draft_page_message.html.erb +3 -0
- data/app/views/shared/_footer.html.erb +4 -0
- data/app/views/shared/_google_analytics.html.erb +8 -0
- data/app/views/shared/_head.html.erb +42 -0
- data/app/views/shared/_header.html.erb +8 -0
- data/app/views/shared/_html_tag.html.erb +6 -0
- data/app/views/shared/_ie6check.html.erb +63 -0
- data/app/views/shared/_javascripts.html.erb +10 -0
- data/app/views/shared/_menu.html.erb +30 -0
- data/app/views/shared/_menu_branch.html.erb +26 -0
- data/app/views/shared/_message.html.erb +10 -0
- data/app/views/shared/_no_script.html.erb +9 -0
- data/app/views/shared/_site_bar.html.erb +25 -0
- data/app/views/shared/admin/_continue_editing.html.erb +3 -0
- data/app/views/shared/admin/_error_messages.html.erb +16 -0
- data/app/views/shared/admin/_form_actions.html.erb +75 -0
- data/app/views/shared/admin/_image_picker.html.erb +60 -0
- data/app/views/shared/admin/_make_sortable.html.erb +13 -0
- data/app/views/shared/admin/_resource_picker.html.erb +66 -0
- data/app/views/shared/admin/_search.html.erb +6 -0
- data/app/views/shared/admin/_sortable_list.html.erb +7 -0
- data/app/views/shared/admin/_tabbed_fields.html.erb +42 -0
- data/app/views/welcome.html.erb +17 -0
- data/app/views/wymiframe.html.erb +15 -0
- data/config/locales/cs.yml +77 -0
- data/config/locales/da.yml +75 -0
- data/config/locales/de.yml +75 -0
- data/config/locales/el.yml +75 -0
- data/config/locales/en.yml +75 -0
- data/config/locales/es.yml +68 -0
- data/config/locales/fr.yml +72 -0
- data/config/locales/it.yml +96 -0
- data/config/locales/lolcat.yml +68 -0
- data/config/locales/lt.yml +75 -0
- data/config/locales/lv.yml +72 -0
- data/config/locales/nb.yml +75 -0
- data/config/locales/nl.yml +75 -0
- data/config/locales/pl.yml +75 -0
- data/config/locales/pt-BR.yml +72 -0
- data/config/locales/rs.yml +76 -0
- data/config/locales/ru.yml +71 -0
- data/config/locales/sl.yml +72 -0
- data/config/locales/sv.yml +75 -0
- data/config/locales/vi.yml +75 -0
- data/config/locales/zh-CN.yml +75 -0
- data/config/locales/zh-TW.yml +75 -0
- data/config/routes.rb +19 -0
- data/crud.md +197 -0
- data/doc/included-jquery-ui-packages.jpg +0 -0
- data/engines.md +179 -0
- data/features/search.feature +55 -0
- data/features/site_bar.feature +24 -0
- data/features/step_definitions/core_steps.rb +61 -0
- data/features/support/paths.rb +14 -0
- data/features/uploads/beach.jpeg +0 -0
- data/features/uploads/refinery_is_awesome.txt +1 -0
- data/lib/gemspec.rb +43 -0
- data/lib/generators/refinerycms_generator.rb +110 -0
- data/lib/generators/templates/.gitignore +83 -0
- data/lib/generators/templates/app/views/sitemap/index.xml.builder +22 -0
- data/lib/generators/templates/autotest/autotest.rb +17 -0
- data/lib/generators/templates/autotest/discover.rb +2 -0
- data/lib/generators/templates/config/database.yml.mysql +20 -0
- data/lib/generators/templates/config/database.yml.postgresql +57 -0
- data/lib/generators/templates/config/database.yml.sqlite3 +26 -0
- data/lib/generators/templates/config/i18n-js.yml +6 -0
- data/lib/generators/templates/config/initializers/devise.rb +142 -0
- data/lib/generators/templates/config/settings.rb +2 -0
- data/lib/generators/templates/db/seeds.rb +5 -0
- data/lib/refinery/activity.rb +45 -0
- data/lib/refinery/admin/base_controller.rb +111 -0
- data/lib/refinery/admin_base_controller.rb +5 -0
- data/lib/refinery/application.rb +48 -0
- data/lib/refinery/application_controller.rb +120 -0
- data/lib/refinery/application_helper.rb +19 -0
- data/lib/refinery/base_presenter.rb +27 -0
- data/lib/refinery/catch_all_routes.rb +11 -0
- data/lib/refinery/crud.rb +295 -0
- data/lib/refinery/helpers/form_helper.rb +66 -0
- data/lib/refinery/helpers/head_helper.rb +17 -0
- data/lib/refinery/helpers/html_truncation_helper.rb +25 -0
- data/lib/refinery/helpers/image_helper.rb +49 -0
- data/lib/refinery/helpers/menu_helper.rb +68 -0
- data/lib/refinery/helpers/meta_helper.rb +67 -0
- data/lib/refinery/helpers/pagination_helper.rb +16 -0
- data/lib/refinery/helpers/script_helper.rb +36 -0
- data/lib/refinery/helpers/site_bar_helper.rb +24 -0
- data/lib/refinery/helpers/tag_helper.rb +21 -0
- data/lib/refinery/helpers/translation_helper.rb +17 -0
- data/lib/refinery/link_renderer.rb +55 -0
- data/lib/refinery/plugin.rb +106 -0
- data/lib/refinery/plugins.rb +75 -0
- data/lib/refinerycms-core.rb +156 -0
- data/lib/tasks/doc.rake +29 -0
- data/lib/tasks/refinery.rake +231 -0
- data/lib/tasks/yard.rake +30 -0
- data/license.md +21 -0
- data/public/404.html +26 -0
- data/public/422.html +26 -0
- data/public/500.html +26 -0
- data/public/favicon.ico +0 -0
- data/public/images/refinery/add.png +0 -0
- data/public/images/refinery/admin_bg.png +0 -0
- data/public/images/refinery/ajax-loader.gif +0 -0
- data/public/images/refinery/branch-end.gif +0 -0
- data/public/images/refinery/branch-start.gif +0 -0
- data/public/images/refinery/branch.gif +0 -0
- data/public/images/refinery/carousel-left.png +0 -0
- data/public/images/refinery/carousel-right.png +0 -0
- data/public/images/refinery/cross.png +0 -0
- data/public/images/refinery/dialogLoadingAnimation.gif +0 -0
- data/public/images/refinery/header_background.png +0 -0
- data/public/images/refinery/hover-gradient.jpg +0 -0
- data/public/images/refinery/icons/accept.png +0 -0
- data/public/images/refinery/icons/add.png +0 -0
- data/public/images/refinery/icons/ajax-loader.gif +0 -0
- data/public/images/refinery/icons/application_edit.png +0 -0
- data/public/images/refinery/icons/application_go.png +0 -0
- data/public/images/refinery/icons/arrow_left.png +0 -0
- data/public/images/refinery/icons/arrow_switch.png +0 -0
- data/public/images/refinery/icons/arrow_up.png +0 -0
- data/public/images/refinery/icons/bin.png +0 -0
- data/public/images/refinery/icons/bin_closed.png +0 -0
- data/public/images/refinery/icons/cancel.png +0 -0
- data/public/images/refinery/icons/cog_add.png +0 -0
- data/public/images/refinery/icons/cog_edit.png +0 -0
- data/public/images/refinery/icons/cross.png +0 -0
- data/public/images/refinery/icons/delete.png +0 -0
- data/public/images/refinery/icons/doc.png +0 -0
- data/public/images/refinery/icons/down.gif +0 -0
- data/public/images/refinery/icons/edit.png +0 -0
- data/public/images/refinery/icons/email.png +0 -0
- data/public/images/refinery/icons/email_edit.png +0 -0
- data/public/images/refinery/icons/email_go.png +0 -0
- data/public/images/refinery/icons/email_open.png +0 -0
- data/public/images/refinery/icons/eye.png +0 -0
- data/public/images/refinery/icons/folder_page_white.png +0 -0
- data/public/images/refinery/icons/image_add.png +0 -0
- data/public/images/refinery/icons/image_edit.png +0 -0
- data/public/images/refinery/icons/img.png +0 -0
- data/public/images/refinery/icons/information.png +0 -0
- data/public/images/refinery/icons/layout_add.png +0 -0
- data/public/images/refinery/icons/layout_edit.png +0 -0
- data/public/images/refinery/icons/music.png +0 -0
- data/public/images/refinery/icons/page_add.png +0 -0
- data/public/images/refinery/icons/page_edit.png +0 -0
- data/public/images/refinery/icons/page_white_edit.png +0 -0
- data/public/images/refinery/icons/page_white_gear.png +0 -0
- data/public/images/refinery/icons/page_white_put.png +0 -0
- data/public/images/refinery/icons/pdf.png +0 -0
- data/public/images/refinery/icons/ppt.png +0 -0
- data/public/images/refinery/icons/star.png +0 -0
- data/public/images/refinery/icons/tick.png +0 -0
- data/public/images/refinery/icons/up.gif +0 -0
- data/public/images/refinery/icons/user_add.png +0 -0
- data/public/images/refinery/icons/user_comment.png +0 -0
- data/public/images/refinery/icons/user_edit.png +0 -0
- data/public/images/refinery/icons/xls.png +0 -0
- data/public/images/refinery/icons/zip.png +0 -0
- data/public/images/refinery/icons/zoom.png +0 -0
- data/public/images/refinery/logo-large.png +0 -0
- data/public/images/refinery/logo-medium.png +0 -0
- data/public/images/refinery/logo-site-bar.png +0 -0
- data/public/images/refinery/logo-small-medium.png +0 -0
- data/public/images/refinery/logo-small.png +0 -0
- data/public/images/refinery/logo-tiny.png +0 -0
- data/public/images/refinery/logo.png +0 -0
- data/public/images/refinery/nav-3-background.gif +0 -0
- data/public/images/refinery/nav_inactive_background.png +0 -0
- data/public/images/refinery/orange_button.png +0 -0
- data/public/images/refinery/page_bg.png +0 -0
- data/public/images/refinery/resolve_digital_footer_logo.png +0 -0
- data/public/images/refinery/text_field_background.png +0 -0
- data/public/images/refinery/tooltip-nib.gif +0 -0
- data/public/images/refinery/tooltip-nib.png +0 -0
- data/public/images/wymeditor/skins/refinery/arrow_redo.png +0 -0
- data/public/images/wymeditor/skins/refinery/arrow_undo.png +0 -0
- data/public/images/wymeditor/skins/refinery/eye.png +0 -0
- data/public/images/wymeditor/skins/refinery/iframe/lbl-blockquote.png +0 -0
- data/public/images/wymeditor/skins/refinery/iframe/lbl-h1.png +0 -0
- data/public/images/wymeditor/skins/refinery/iframe/lbl-h2.png +0 -0
- data/public/images/wymeditor/skins/refinery/iframe/lbl-h3.png +0 -0
- data/public/images/wymeditor/skins/refinery/iframe/lbl-h4.png +0 -0
- data/public/images/wymeditor/skins/refinery/iframe/lbl-h5.png +0 -0
- data/public/images/wymeditor/skins/refinery/iframe/lbl-h6.png +0 -0
- data/public/images/wymeditor/skins/refinery/iframe/lbl-p.png +0 -0
- data/public/images/wymeditor/skins/refinery/iframe/lbl-pre.png +0 -0
- data/public/images/wymeditor/skins/refinery/link_add.png +0 -0
- data/public/images/wymeditor/skins/refinery/link_break.png +0 -0
- data/public/images/wymeditor/skins/refinery/page_code.png +0 -0
- data/public/images/wymeditor/skins/refinery/page_paste.png +0 -0
- data/public/images/wymeditor/skins/refinery/photo_add.png +0 -0
- data/public/images/wymeditor/skins/refinery/right.png +0 -0
- data/public/images/wymeditor/skins/refinery/style.png +0 -0
- data/public/images/wymeditor/skins/refinery/table_add.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_align_center.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_align_justify.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_align_left.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_align_right.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_bold.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_heading_1.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_heading_2.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_heading_3.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_heading_4.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_heading_5.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_heading_6.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_indent.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_indent_remove.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_italic.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_list_bullets.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_list_numbers.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_paragraph.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_strikethrough.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_subscript.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_superscript.png +0 -0
- data/public/images/wymeditor/skins/refinery/text_underline.png +0 -0
- data/public/images/wymeditor/skins/wymeditor_icon.png +0 -0
- data/public/javascripts/admin.js +7 -0
- data/public/javascripts/application.js +1 -0
- data/public/javascripts/dd_belatedpng.js +13 -0
- data/public/javascripts/i18n-messages.js +2 -0
- data/public/javascripts/jquery-min.js +16 -0
- data/public/javascripts/jquery-ui-custom-min.js +251 -0
- data/public/javascripts/jquery.js +8176 -0
- data/public/javascripts/jquery/GPL-LICENSE.txt +278 -0
- data/public/javascripts/jquery/MIT-LICENSE.txt +20 -0
- data/public/javascripts/jquery/jquery.corner.js +345 -0
- data/public/javascripts/jquery/jquery.html5-placeholder-shim.js +88 -0
- data/public/javascripts/jquery/jquery.jcarousel.js +900 -0
- data/public/javascripts/jquery/jquery.textTruncate.js +174 -0
- data/public/javascripts/jquery/jquery.timers.js +138 -0
- data/public/javascripts/modernizr-min.js +30 -0
- data/public/javascripts/rails.js +175 -0
- data/public/javascripts/refinery/admin.js +1114 -0
- data/public/javascripts/refinery/boot_wym.js +285 -0
- data/public/javascripts/refinery/core.js +18 -0
- data/public/javascripts/refinery/i18n.js +340 -0
- data/public/javascripts/refinery/nestedsortables.js +164 -0
- data/public/javascripts/refinery/serializelist.js +66 -0
- data/public/javascripts/refinery/site_bar.js +16 -0
- data/public/javascripts/refinery/submenu.js +49 -0
- data/public/javascripts/wymeditor/jquery.refinery.wymeditor.js +5156 -0
- data/public/javascripts/wymeditor/lang/ca.js +45 -0
- data/public/javascripts/wymeditor/lang/cs.js +45 -0
- data/public/javascripts/wymeditor/lang/da.js +48 -0
- data/public/javascripts/wymeditor/lang/de.js +45 -0
- data/public/javascripts/wymeditor/lang/en.js +47 -0
- data/public/javascripts/wymeditor/lang/es.js +48 -0
- data/public/javascripts/wymeditor/lang/fa.js +46 -0
- data/public/javascripts/wymeditor/lang/fr.js +45 -0
- data/public/javascripts/wymeditor/lang/he.js +45 -0
- data/public/javascripts/wymeditor/lang/hu.js +45 -0
- data/public/javascripts/wymeditor/lang/it.js +48 -0
- data/public/javascripts/wymeditor/lang/lv.js +47 -0
- data/public/javascripts/wymeditor/lang/nb.js +48 -0
- data/public/javascripts/wymeditor/lang/nl.js +47 -0
- data/public/javascripts/wymeditor/lang/nn.js +45 -0
- data/public/javascripts/wymeditor/lang/pl.js +45 -0
- data/public/javascripts/wymeditor/lang/pt-BR.js +47 -0
- data/public/javascripts/wymeditor/lang/pt.js +45 -0
- data/public/javascripts/wymeditor/lang/rs.js +47 -0
- data/public/javascripts/wymeditor/lang/ru.js +45 -0
- data/public/javascripts/wymeditor/lang/sl.js +47 -0
- data/public/javascripts/wymeditor/lang/sv.js +45 -0
- data/public/javascripts/wymeditor/lang/tr.js +45 -0
- data/public/javascripts/wymeditor/lang/vi.js +47 -0
- data/public/javascripts/wymeditor/lang/zh_cn.js +47 -0
- data/public/javascripts/wymeditor/skins/refinery/skin.js +48 -0
- data/public/robots.txt +3 -0
- data/public/stylesheets/application.css +4 -0
- data/public/stylesheets/formatting.css +4 -0
- data/public/stylesheets/home.css +4 -0
- data/public/stylesheets/refinery/application.css +72 -0
- data/public/stylesheets/refinery/formatting.css +57 -0
- data/public/stylesheets/refinery/home.css +0 -0
- data/public/stylesheets/refinery/refinery.css +1579 -0
- data/public/stylesheets/refinery/site_bar.css +87 -0
- data/public/stylesheets/refinery/submenu.css +22 -0
- data/public/stylesheets/refinery/theme.css +36 -0
- data/public/stylesheets/refinery/tooltips.css +34 -0
- data/public/stylesheets/refinery/ui.css +107 -0
- data/public/stylesheets/theme.css +4 -0
- data/public/stylesheets/wymeditor/skins/refinery/skin.css +528 -0
- data/public/stylesheets/wymeditor/skins/refinery/wymiframe.css +96 -0
- data/public/wymeditor/GPL-license.txt +278 -0
- data/public/wymeditor/MIT-license.txt +20 -0
- data/public/wymeditor/README +35 -0
- data/refinerycms-core.gemspec +391 -0
- data/spec/lib/refinery/plugins_spec.rb +90 -0
- metadata +482 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Rails
|
|
2
|
+
.bundle
|
|
3
|
+
db/*.sqlite3
|
|
4
|
+
db/*.sqlite3-journal
|
|
5
|
+
*.log
|
|
6
|
+
tmp/**/*
|
|
7
|
+
|
|
8
|
+
# Documentation
|
|
9
|
+
doc/api
|
|
10
|
+
doc/app
|
|
11
|
+
doc/*
|
|
12
|
+
.yardoc
|
|
13
|
+
.yardopts
|
|
14
|
+
|
|
15
|
+
# Public Uploads
|
|
16
|
+
public/system/*
|
|
17
|
+
public/themes/*
|
|
18
|
+
|
|
19
|
+
# Public Cache
|
|
20
|
+
public/javascripts/cache
|
|
21
|
+
public/stylesheets/cache
|
|
22
|
+
|
|
23
|
+
# Vendor Cache
|
|
24
|
+
vendor/cache
|
|
25
|
+
|
|
26
|
+
# Acts as Indexed
|
|
27
|
+
index/**/*
|
|
28
|
+
|
|
29
|
+
# Refinery Specific
|
|
30
|
+
*.tmproj
|
|
31
|
+
*.autobackupbyrefinery.*
|
|
32
|
+
/refinerycms-*.gem
|
|
33
|
+
.autotest
|
|
34
|
+
|
|
35
|
+
# Mac
|
|
36
|
+
.DS_Store
|
|
37
|
+
|
|
38
|
+
# Windows
|
|
39
|
+
Thumbs.db
|
|
40
|
+
|
|
41
|
+
# NetBeans
|
|
42
|
+
nbproject
|
|
43
|
+
|
|
44
|
+
# Eclipse
|
|
45
|
+
.project
|
|
46
|
+
|
|
47
|
+
# Redcar
|
|
48
|
+
.redcar
|
|
49
|
+
|
|
50
|
+
# Rubinius
|
|
51
|
+
*.rbc
|
|
52
|
+
|
|
53
|
+
# Vim
|
|
54
|
+
*.swp
|
|
55
|
+
*.swo
|
|
56
|
+
|
|
57
|
+
# RubyMine
|
|
58
|
+
.idea
|
|
59
|
+
|
|
60
|
+
# Backup
|
|
61
|
+
*~
|
|
62
|
+
|
|
63
|
+
# Capybara Bug
|
|
64
|
+
capybara-*html
|
|
65
|
+
|
|
66
|
+
# sass
|
|
67
|
+
.sass-cache
|
|
68
|
+
.sass-cache/*
|
|
69
|
+
|
|
70
|
+
#rvm
|
|
71
|
+
.rvmrc
|
|
72
|
+
.rvmrc.*
|
|
73
|
+
|
|
74
|
+
# REFINERY CMS DEVELOPMENT ====================================================
|
|
75
|
+
# Always keep this section at the bottom.
|
|
76
|
+
|
|
77
|
+
config/database.yml
|
|
78
|
+
config/amazon_s3.yml
|
|
79
|
+
config/rackspace_cloudfiles.yml
|
|
80
|
+
your_*.*
|
|
81
|
+
db/schema.rb
|
|
82
|
+
|
|
83
|
+
# END REFINERY CMS DEVELOPMENT =================================================
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
xml.instruct!
|
|
2
|
+
|
|
3
|
+
xml.urlset "xmlns" => "http://www.sitemaps.org/schemas/sitemap/0.9" do
|
|
4
|
+
|
|
5
|
+
@pages.each do |page|
|
|
6
|
+
# exclude sites that are external to our own domain.
|
|
7
|
+
page_url = if page.url.is_a?(Hash)
|
|
8
|
+
# This is how most pages work without being overriden by link_url
|
|
9
|
+
page.url.merge({:only_path => false})
|
|
10
|
+
elsif page.url.to_s !~ /^http/
|
|
11
|
+
# handle relative link_url addresses.
|
|
12
|
+
"#{request.protocol}#{request.host_with_port}#{page.url}"
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Add XML entry only if there is a valid page_url found above.
|
|
16
|
+
xml.url do
|
|
17
|
+
xml.loc url_for(page_url)
|
|
18
|
+
xml.lastmod page.updated_at.to_date
|
|
19
|
+
end if page_url.present?
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
### uncomment any of the following requires applicable for your system
|
|
2
|
+
### and then copy this to .autotest if you are using the ZenTest autotest.
|
|
3
|
+
# require "autotest/restart"
|
|
4
|
+
# require "test_notifier/runner/autotest"
|
|
5
|
+
# require "redgreen/autotest"
|
|
6
|
+
# require "autotest/timestamp"
|
|
7
|
+
|
|
8
|
+
# adds exceptions from .gitignore file, please modify exceptions there!
|
|
9
|
+
imported_exceptions = IO.readlines('.gitignore').inject([]) do |acc, line|
|
|
10
|
+
acc << line.strip if line.to_s[0] != '#' && line.strip != ''; acc
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
Autotest.add_hook :initialize do |autotest|
|
|
14
|
+
imported_exceptions.each do |exception|
|
|
15
|
+
autotest.add_exception(exception)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
login: &login
|
|
2
|
+
adapter: mysql
|
|
3
|
+
host: localhost
|
|
4
|
+
username: root
|
|
5
|
+
password:
|
|
6
|
+
|
|
7
|
+
development: &development
|
|
8
|
+
database: your_local_database
|
|
9
|
+
<<: *login
|
|
10
|
+
|
|
11
|
+
test: &test
|
|
12
|
+
database: your_test_database
|
|
13
|
+
<<: *login
|
|
14
|
+
|
|
15
|
+
production: &production
|
|
16
|
+
adapter: mysql
|
|
17
|
+
host: localhost
|
|
18
|
+
database: your_production_database
|
|
19
|
+
username: your_production_database_login
|
|
20
|
+
password: your_production_database_password
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# PostgreSQL. Versions 7.4 and 8.x are supported.
|
|
2
|
+
#
|
|
3
|
+
# Install the ruby-postgres driver:
|
|
4
|
+
# gem install ruby-postgres
|
|
5
|
+
# On Mac OS X:
|
|
6
|
+
# gem install ruby-postgres -- --include=/usr/local/pgsql
|
|
7
|
+
# On Windows:
|
|
8
|
+
# gem install ruby-postgres
|
|
9
|
+
# Choose the win32 build.
|
|
10
|
+
# Install PostgreSQL and put its /bin directory on your path.
|
|
11
|
+
login: &login
|
|
12
|
+
adapter: postgresql
|
|
13
|
+
encoding: unicode
|
|
14
|
+
username: postgres
|
|
15
|
+
password: postgres
|
|
16
|
+
pool: 5
|
|
17
|
+
|
|
18
|
+
development: &development
|
|
19
|
+
database: your_local_database
|
|
20
|
+
<<: *login
|
|
21
|
+
|
|
22
|
+
# Connect on a TCP socket. Omitted by default since the client uses a
|
|
23
|
+
# domain socket that doesn't need configuration. Windows does not have
|
|
24
|
+
# domain sockets, so uncomment these lines.
|
|
25
|
+
#host: localhost
|
|
26
|
+
#port: 5432
|
|
27
|
+
|
|
28
|
+
# Schema search path. The server defaults to $user,public
|
|
29
|
+
#schema_search_path: myapp,sharedapp,public
|
|
30
|
+
|
|
31
|
+
# Minimum log levels, in increasing order:
|
|
32
|
+
# debug5, debug4, debug3, debug2, debug1,
|
|
33
|
+
# log, notice, warning, error, fatal, and panic
|
|
34
|
+
# The server defaults to notice.
|
|
35
|
+
#min_messages: warning
|
|
36
|
+
|
|
37
|
+
# Warning: The database defined as "test" will be erased and
|
|
38
|
+
# re-generated from your development database when you run "rake".
|
|
39
|
+
# Do not set this db to the same as development or production.
|
|
40
|
+
test: &test
|
|
41
|
+
database: your_test_database
|
|
42
|
+
<<: *login
|
|
43
|
+
|
|
44
|
+
# Warning: The database defined as "cucumber" will be erased and
|
|
45
|
+
# re-generated from your development database when you run "rake".
|
|
46
|
+
# Do not set this db to the same as development or production.
|
|
47
|
+
cucumber: &cucumber
|
|
48
|
+
database: your_cucumber_database
|
|
49
|
+
<<: *login
|
|
50
|
+
|
|
51
|
+
production: &production
|
|
52
|
+
adapter: postgresql
|
|
53
|
+
encoding: unicode
|
|
54
|
+
pool: 5
|
|
55
|
+
database: your_production_database
|
|
56
|
+
username: your_production_database_login
|
|
57
|
+
password: your_production_database_password
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# SQLite version 3.x
|
|
2
|
+
development:
|
|
3
|
+
adapter: <%= "jdbc" if defined?(JRUBY_PLATFORM) %>sqlite3
|
|
4
|
+
database: db/development.sqlite3
|
|
5
|
+
timeout: 5000
|
|
6
|
+
|
|
7
|
+
# Warning: The database defined as 'test' will be erased and
|
|
8
|
+
# re-generated from your development database when you run 'rake'.
|
|
9
|
+
# Do not set this db to the same as development or production.
|
|
10
|
+
test:
|
|
11
|
+
adapter: <%= "jdbc" if defined?(JRUBY_PLATFORM) %>sqlite3
|
|
12
|
+
database: db/test.sqlite3
|
|
13
|
+
timeout: 5000
|
|
14
|
+
|
|
15
|
+
# Warning: The database defined as 'cucumber' will be erased and
|
|
16
|
+
# re-generated from your development database when you run 'rake'.
|
|
17
|
+
# Do not set this db to the same as development or production.
|
|
18
|
+
cucumber:
|
|
19
|
+
adapter: <%= "jdbc" if defined?(JRUBY_PLATFORM) %>sqlite3
|
|
20
|
+
database: db/cucumber.sqlite3
|
|
21
|
+
timeout: 5000
|
|
22
|
+
|
|
23
|
+
production:
|
|
24
|
+
adapter: <%= "jdbc" if defined?(JRUBY_PLATFORM) %>sqlite3
|
|
25
|
+
database: db/production.sqlite3
|
|
26
|
+
timeout: 5000
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Use this hook to configure devise mailer, warden hooks and so forth. The first
|
|
2
|
+
# four configuration values can also be set straight in your models.
|
|
3
|
+
::Devise.setup do |config|
|
|
4
|
+
# ==> Mailer Configuration
|
|
5
|
+
# Configure the e-mail address which will be shown in DeviseMailer.
|
|
6
|
+
config.mailer_sender = "please-change-me@config-initializers-devise.com"
|
|
7
|
+
|
|
8
|
+
# Configure the class responsible to send e-mails.
|
|
9
|
+
# config.mailer = "::Devise::Mailer"
|
|
10
|
+
|
|
11
|
+
# ==> ORM configuration
|
|
12
|
+
# Load and configure the ORM. Supports :active_record (default) and
|
|
13
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
|
14
|
+
# available as additional gems.
|
|
15
|
+
require 'devise/orm/active_record'
|
|
16
|
+
|
|
17
|
+
# ==> Configuration for any authentication mechanism
|
|
18
|
+
# Configure which keys are used when authenticating an user. By default is
|
|
19
|
+
# just :email. You can configure it to use [:username, :subdomain], so for
|
|
20
|
+
# authenticating an user, both parameters are required. Remember that those
|
|
21
|
+
# parameters are used only when authenticating and not when retrieving from
|
|
22
|
+
# session. If you need permissions, you should implement that in a before filter.
|
|
23
|
+
config.authentication_keys = [ :login ] # Required to login using username or email
|
|
24
|
+
|
|
25
|
+
# Tell if authentication through request.params is enabled. True by default.
|
|
26
|
+
# config.params_authenticatable = true
|
|
27
|
+
|
|
28
|
+
# Tell if authentication through HTTP Basic Auth is enabled. False by default.
|
|
29
|
+
# config.http_authenticatable = false
|
|
30
|
+
|
|
31
|
+
# Set this to true to use Basic Auth for AJAX requests. True by default.
|
|
32
|
+
# config.http_authenticatable_on_xhr = true
|
|
33
|
+
|
|
34
|
+
# The realm used in Http Basic Authentication
|
|
35
|
+
# config.http_authentication_realm = "Application"
|
|
36
|
+
|
|
37
|
+
# ==> Configuration for :database_authenticatable
|
|
38
|
+
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
|
39
|
+
# using other encryptors, it sets how many times you want the password re-encrypted.
|
|
40
|
+
# config.stretches = 20
|
|
41
|
+
|
|
42
|
+
# Define which will be the encryption algorithm. Devise also supports encryptors
|
|
43
|
+
# from others authentication tools as :clearance_sha1, :authlogic_sha512 (then
|
|
44
|
+
# you should set stretches above to 20 for default behavior) and :restful_authentication_sha1
|
|
45
|
+
# (then you should set stretches to 10, and copy REST_AUTH_SITE_KEY to pepper)
|
|
46
|
+
config.encryptor = :bcrypt
|
|
47
|
+
|
|
48
|
+
# Setup a pepper to generate the encrypted password.
|
|
49
|
+
config.pepper = "2e20a8abdd34d729ba6d05f679e513cfea9fbb1e83c81f84b29e9e4fdbd4ee59b56a32200064082a15a72b05a4d4a6a2c3784a09c0554b3a47a67cc8333ccbc7"
|
|
50
|
+
|
|
51
|
+
# ==> Configuration for :confirmable
|
|
52
|
+
# The time you want to give your user to confirm his account. During this time
|
|
53
|
+
# he will be able to access your application without confirming. Default is nil.
|
|
54
|
+
# When confirm_within is zero, the user won't be able to sign in without confirming.
|
|
55
|
+
# You can use this to let your user access some features of your application
|
|
56
|
+
# without confirming the account, but blocking it after a certain period
|
|
57
|
+
# (ie 2 days).
|
|
58
|
+
# config.confirm_within = 2.days
|
|
59
|
+
|
|
60
|
+
# ==> Configuration for :rememberable
|
|
61
|
+
# The time the user will be remembered without asking for credentials again.
|
|
62
|
+
# config.remember_for = 2.weeks
|
|
63
|
+
|
|
64
|
+
# If true, a valid remember token can be re-used between multiple browsers.
|
|
65
|
+
# config.remember_across_browsers = true
|
|
66
|
+
|
|
67
|
+
# If true, extends the user's remember period when remembered via cookie.
|
|
68
|
+
# config.extend_remember_period = false
|
|
69
|
+
|
|
70
|
+
# ==> Configuration for :validatable
|
|
71
|
+
# Range for password length
|
|
72
|
+
config.password_length = 4..20
|
|
73
|
+
|
|
74
|
+
# Regex to use to validate the email address
|
|
75
|
+
# config.email_regexp = /^([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})$/i
|
|
76
|
+
|
|
77
|
+
# ==> Configuration for :timeoutable
|
|
78
|
+
# The time you want to timeout the user session without activity. After this
|
|
79
|
+
# time the user will be asked for credentials again.
|
|
80
|
+
# config.timeout_in = 10.minutes
|
|
81
|
+
|
|
82
|
+
# ==> Configuration for :lockable
|
|
83
|
+
# Defines which strategy will be used to lock an account.
|
|
84
|
+
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
|
85
|
+
# :none = No lock strategy. You should handle locking by yourself.
|
|
86
|
+
# config.lock_strategy = :failed_attempts
|
|
87
|
+
|
|
88
|
+
# Defines which strategy will be used to unlock an account.
|
|
89
|
+
# :email = Sends an unlock link to the user email
|
|
90
|
+
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
|
91
|
+
# :both = Enables both strategies
|
|
92
|
+
# :none = No unlock strategy. You should handle unlocking by yourself.
|
|
93
|
+
# config.unlock_strategy = :both
|
|
94
|
+
|
|
95
|
+
# Number of authentication tries before locking an account if lock_strategy
|
|
96
|
+
# is failed attempts.
|
|
97
|
+
# config.maximum_attempts = 20
|
|
98
|
+
|
|
99
|
+
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
|
100
|
+
# config.unlock_in = 1.hour
|
|
101
|
+
|
|
102
|
+
# ==> Configuration for :token_authenticatable
|
|
103
|
+
# Defines name of the authentication token params key
|
|
104
|
+
# config.token_authentication_key = :auth_token
|
|
105
|
+
|
|
106
|
+
# ==> Scopes configuration
|
|
107
|
+
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
|
108
|
+
# "users/sessions/new". It's turned off by default because it's slower if you
|
|
109
|
+
# are using only default views.
|
|
110
|
+
# config.scoped_views = true
|
|
111
|
+
|
|
112
|
+
# Configure the default scope given to Warden. By default it's the first
|
|
113
|
+
# devise role declared in your routes.
|
|
114
|
+
# config.default_scope = :user
|
|
115
|
+
|
|
116
|
+
# Configure sign_out behavior.
|
|
117
|
+
# By default sign_out is scoped (i.e. /users/sign_out affects only :user scope).
|
|
118
|
+
# In case of sign_out_all_scopes set to true any logout action will sign out all active scopes.
|
|
119
|
+
# config.sign_out_all_scopes = false
|
|
120
|
+
|
|
121
|
+
# ==> Navigation configuration
|
|
122
|
+
# Lists the formats that should be treated as navigational. Formats like
|
|
123
|
+
# :html, should redirect to the sign in page when the user does not have
|
|
124
|
+
# access, but formats like :xml or :json, should return 401.
|
|
125
|
+
# If you have any extra navigational formats, like :iphone or :mobile, you
|
|
126
|
+
# should add them to the navigational formats lists. Default is [:html]
|
|
127
|
+
# config.navigational_formats = [:html, :iphone]
|
|
128
|
+
|
|
129
|
+
# ==> Warden configuration
|
|
130
|
+
# If you want to use other strategies, that are not (yet) supported by Devise,
|
|
131
|
+
# you can configure them inside the config.warden block. The example below
|
|
132
|
+
# allows you to setup OAuth, using http://github.com/roman/warden_oauth
|
|
133
|
+
#
|
|
134
|
+
# config.warden do |manager|
|
|
135
|
+
# manager.oauth(:twitter) do |twitter|
|
|
136
|
+
# twitter.consumer_secret = <YOUR CONSUMER SECRET>
|
|
137
|
+
# twitter.consumer_key = <YOUR CONSUMER KEY>
|
|
138
|
+
# twitter.options :site => 'http://twitter.com'
|
|
139
|
+
# end
|
|
140
|
+
# manager.default_strategies(:scope => :user).unshift :twitter_oauth
|
|
141
|
+
# end
|
|
142
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
module Refinery
|
|
2
|
+
class Activity
|
|
3
|
+
|
|
4
|
+
attr_accessor :class, :conditions, :created_image, :limit, :nested_with, :order, :title, :updated_image, :url, :url_prefix
|
|
5
|
+
|
|
6
|
+
# for nested_with, pass in the reverse order of ancestry e.g. [parent.parent_of_parent, parent]
|
|
7
|
+
def initialize(options={})
|
|
8
|
+
{
|
|
9
|
+
:class => nil,
|
|
10
|
+
:conditions => nil,
|
|
11
|
+
:created_image => "add.png",
|
|
12
|
+
:limit => 7,
|
|
13
|
+
:nested_with => [],
|
|
14
|
+
:order => "updated_at DESC",
|
|
15
|
+
:title => "title",
|
|
16
|
+
:updated_image => "edit.png",
|
|
17
|
+
:url => nil,
|
|
18
|
+
:url_prefix => "edit"
|
|
19
|
+
}.merge(options).each { |key,value| self.instance_variable_set(:"@#{key}", value) }
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# to use in a URL like edit_admin_group_individuals_url(record.group, record)
|
|
23
|
+
# which will help you if you're using nested routed.
|
|
24
|
+
def nesting(record_string="record")
|
|
25
|
+
self.nested_with.inject("") { |nest_chain, nesting| nest_chain << "#{record_string}.#{nesting}," }
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def url_prefix
|
|
29
|
+
"#{"#{@url_prefix}_".gsub("__", "_") if @url_prefix.present?}"
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def url
|
|
33
|
+
"#{self.url_prefix}#{@url ||= "admin_#{self.class.name.underscore.downcase}_url"}"
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def class
|
|
37
|
+
if @class.kind_of?(Class)
|
|
38
|
+
@class
|
|
39
|
+
else
|
|
40
|
+
Object.const_get(@class.to_sym)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
end
|
|
45
|
+
end
|