ultimate-helpers 0.1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. data/.gitignore +8 -0
  2. data/.rvmrc +1 -0
  3. data/.rvmrc.example +1 -0
  4. data/Gemfile +10 -0
  5. data/Gemfile.lock +126 -0
  6. data/LICENSE +19 -0
  7. data/README.md +25 -0
  8. data/Rakefile +1 -0
  9. data/app/assets/javascripts/ultimate/base.js.coffee +11 -0
  10. data/app/assets/javascripts/ultimate/helpers/asset_tag.js.coffee +82 -0
  11. data/app/assets/javascripts/ultimate/helpers/base.js.coffee +3 -0
  12. data/app/assets/javascripts/ultimate/helpers/decor.js.coffee +19 -0
  13. data/app/assets/javascripts/ultimate/helpers/form_options.js.coffee +106 -0
  14. data/app/assets/javascripts/ultimate/helpers/form_tag.js.coffee +175 -0
  15. data/app/assets/javascripts/ultimate/helpers/javascript.js.coffee +31 -0
  16. data/app/assets/javascripts/ultimate/helpers/number.js.coffee +600 -0
  17. data/app/assets/javascripts/ultimate/helpers/record_tag.js.coffee +81 -0
  18. data/app/assets/javascripts/ultimate/helpers/tag.js.coffee +91 -0
  19. data/app/assets/javascripts/ultimate/helpers/url.js.coffee +152 -0
  20. data/app/assets/javascripts/ultimate/helpers.js.coffee +122 -0
  21. data/app/assets/javascripts/ultimate/jquery.base.js.coffee +85 -0
  22. data/app/assets/javascripts/ultimate/underscore/underscore.inflection.js +176 -0
  23. data/app/assets/javascripts/ultimate/underscore/underscore.js +1204 -0
  24. data/app/assets/javascripts/ultimate/underscore/underscore.outcasts.js.coffee +158 -0
  25. data/app/assets/javascripts/ultimate/underscore/underscore.string.js +600 -0
  26. data/config/routes.rb +2 -0
  27. data/lib/ultimate/helpers/engine.rb +7 -0
  28. data/lib/ultimate/helpers/version.rb +5 -0
  29. data/lib/ultimate/helpers.rb +8 -0
  30. data/scripts/rails +8 -0
  31. data/test/dummy/Rakefile +7 -0
  32. data/test/dummy/_emfile +18 -0
  33. data/test/dummy/app/assets/images/.gitkeep +0 -0
  34. data/test/dummy/app/assets/javascripts/application.js +3 -0
  35. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  36. data/test/dummy/app/assets/stylesheets/global/forms.css.scss +65 -0
  37. data/test/dummy/app/assets/stylesheets/global/layout/footer.scss +18 -0
  38. data/test/dummy/app/assets/stylesheets/global/layout/header.scss +13 -0
  39. data/test/dummy/app/assets/stylesheets/global/layout/main-menu.scss +68 -0
  40. data/test/dummy/app/assets/stylesheets/global/layout.css.scss +46 -0
  41. data/test/dummy/app/assets/stylesheets/global/reserved.css.scss +79 -0
  42. data/test/dummy/app/assets/stylesheets/global/reset.css.scss +85 -0
  43. data/test/dummy/app/assets/stylesheets/global/structures.css.scss +9 -0
  44. data/test/dummy/app/assets/stylesheets/import/base.scss +36 -0
  45. data/test/dummy/app/assets/stylesheets/plugins/qunit.css.scss +3 -0
  46. data/test/dummy/app/controllers/application_controller.rb +4 -0
  47. data/test/dummy/app/controllers/main_controller.rb +8 -0
  48. data/test/dummy/app/helpers/application_helper.rb +2 -0
  49. data/test/dummy/app/mailers/.gitkeep +0 -0
  50. data/test/dummy/app/models/.gitkeep +0 -0
  51. data/test/dummy/app/views/application/_footer.html.haml +3 -0
  52. data/test/dummy/app/views/application/_header.html.haml +4 -0
  53. data/test/dummy/app/views/application/_main_menu.html.haml +11 -0
  54. data/test/dummy/app/views/layouts/application.html.haml +24 -0
  55. data/test/dummy/app/views/main/index.html.haml +13 -0
  56. data/test/dummy/app/views/main/qunit.html.haml +7 -0
  57. data/test/dummy/config/application.rb +58 -0
  58. data/test/dummy/config/boot.rb +10 -0
  59. data/test/dummy/config/database.yml +25 -0
  60. data/test/dummy/config/environment.rb +5 -0
  61. data/test/dummy/config/environments/development.rb +40 -0
  62. data/test/dummy/config/environments/production.rb +67 -0
  63. data/test/dummy/config/environments/test.rb +37 -0
  64. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  65. data/test/dummy/config/initializers/inflections.rb +15 -0
  66. data/test/dummy/config/initializers/mime_types.rb +5 -0
  67. data/test/dummy/config/initializers/qunit-rails.rb +1 -0
  68. data/test/dummy/config/initializers/secret_token.rb +7 -0
  69. data/test/dummy/config/initializers/session_store.rb +8 -0
  70. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  71. data/test/dummy/config/locales/en.yml +5 -0
  72. data/test/dummy/config/routes.rb +63 -0
  73. data/test/dummy/config.ru +4 -0
  74. data/test/dummy/log/.gitkeep +0 -0
  75. data/test/dummy/public/404.html +26 -0
  76. data/test/dummy/public/422.html +26 -0
  77. data/test/dummy/public/500.html +25 -0
  78. data/test/dummy/public/favicon.ico +0 -0
  79. data/test/dummy/script/rails +6 -0
  80. data/test/javascripts/all_tests.js.coffee +12 -0
  81. data/test/javascripts/test_helper.js.coffee +3 -0
  82. data/test/javascripts/tests/helpers/asset_tag_test.js.coffee +51 -0
  83. data/test/javascripts/tests/helpers/form_options_test.js.coffee +170 -0
  84. data/test/javascripts/tests/helpers/form_tag_test.js.coffee +226 -0
  85. data/test/javascripts/tests/helpers/javascript_test.js.coffee +25 -0
  86. data/test/javascripts/tests/helpers/number_test.js.coffee +250 -0
  87. data/test/javascripts/tests/helpers/record_tag_test.js.coffee +60 -0
  88. data/test/javascripts/tests/helpers/tag_test.js.coffee +58 -0
  89. data/test/javascripts/tests/helpers/url_test.js.coffee +76 -0
  90. data/test/javascripts/tests/underscore/underscore.outcasts.test.js.coffee +47 -0
  91. data/test/javascripts/vendors/backbone.js +1533 -0
  92. data/test/javascripts/vendors/i18n-lite.js.coffee +20 -0
  93. data/test/stylesheets/test_helper.css +4 -0
  94. data/test/stylesheets/vendors/ultimate/mixins/_routines.scss +120 -0
  95. data/test/stylesheets/vendors/ultimate/mixins/_vendors.scss +44 -0
  96. data/test/stylesheets/vendors/ultimate/mixins/css3/_text-shadow.scss +40 -0
  97. data/test/stylesheets/vendors/ultimate/mixins/css3.scss +350 -0
  98. data/test/stylesheets/vendors/ultimate/mixins/fonts.scss +100 -0
  99. data/test/stylesheets/vendors/ultimate/mixins/microstructures.scss +239 -0
  100. data/ultimate-helpers.gemspec +25 -0
  101. metadata +193 -0
@@ -0,0 +1,65 @@
1
+ @import "import/base";
2
+
3
+ label {
4
+ display: block;
5
+ padding: 0 0 5px 0;
6
+ font-size: 16px;
7
+ cursor: pointer;
8
+ &.small {
9
+ @include inline-block;
10
+ margin-left: 5px;
11
+ font-size: 13px;
12
+ color: #ccc;
13
+ &:first-child {
14
+ margin-left: 0;
15
+ }
16
+ }
17
+ }
18
+
19
+ input {
20
+ position: relative;
21
+ border: 0;
22
+ &::-moz-focus-inner {
23
+ border: 0;
24
+ padding: 0;
25
+ }
26
+ &[type="text"] {
27
+ width: 260px;
28
+ height: 21px;
29
+ }
30
+ &[type="submit"] {
31
+ height: 27px;
32
+ padding: 0 5px;
33
+ @include font_custom(16px);
34
+ color: $c-white;
35
+ background: $c-pink;
36
+ cursor: pointer;
37
+ }
38
+ }
39
+
40
+ input, select {
41
+ outline: 0;
42
+ @include font_base(15px, 21px);
43
+ }
44
+
45
+ input[type="text"], select, textarea {
46
+ border: 0;
47
+ padding: 3px 6px;
48
+ background: #4C4C4C;
49
+ color: $c-white;
50
+ }
51
+
52
+ select {
53
+ width: 88px;
54
+ height: 26px;
55
+ }
56
+
57
+ textarea {
58
+ height: 140px;
59
+ max-width: 360px;
60
+ min-height: 140px;
61
+ min-height: 100px;
62
+ min-width: 260px;
63
+ width: 260px;
64
+ }
65
+
@@ -0,0 +1,18 @@
1
+ > .l-page__footer {
2
+ @include user-select;
3
+ height: $l-page__footer_height;
4
+ line-height: $l-page__footer_height - 2px;
5
+ color: #545454;
6
+ font-size: 12px;
7
+ a {
8
+ color: #545454;
9
+ font-weight: bold;
10
+ &:hover {
11
+ text-decoration: underline;
12
+ }
13
+ }
14
+ .l-page__center {
15
+ width: $l-page_width - 20px * 2;
16
+ margin: 0 auto;
17
+ }
18
+ }
@@ -0,0 +1,13 @@
1
+ > .l-page__header {
2
+ @include user-select;
3
+ height: $l-page__header_height;
4
+ line-height: $l-page__header_height - 2px;
5
+ padding: 0 20px;
6
+
7
+ .logo {
8
+ > .caption {
9
+ @include font_custom(27px);
10
+ }
11
+ }
12
+
13
+ }
@@ -0,0 +1,68 @@
1
+ > ul.l-page__main-menu {
2
+ @include user-select;
3
+ @include inline-block-list;
4
+ @include font_custom(22px);
5
+ padding: 18px 0 35px 15px;
6
+ position: relative;
7
+ z-index: 10;
8
+
9
+ > li {
10
+ padding: 8px 20px;
11
+ text-transform: capitalize;
12
+ > a {
13
+ display: block;
14
+ padding: 0 7px;
15
+ border-bottom: 1px solid #00c9eb;
16
+ &:hover {
17
+ border-bottom-color: $c-sub-menu;
18
+ }
19
+ }
20
+
21
+ &.with-sub-menu {
22
+ @include border-radius(10px 10px 0 0);
23
+ @include pie;
24
+ position: relative;
25
+ > a {
26
+ padding: 0 11px;
27
+ }
28
+ > ul.sub-menu {
29
+ display: none;
30
+ position: absolute;
31
+ left: 0;
32
+ top: 35px;
33
+ background: $c-sub-menu;
34
+ font-size: 18px;
35
+ width: 100%;
36
+ border-radius: 0 0 10px 10px;
37
+ text-align: left;
38
+ padding: 5px 0 10px;
39
+
40
+ > li {
41
+ padding: 0 10px;
42
+ line-height: 24px;
43
+ display: block;
44
+
45
+ > a {
46
+ @include inline-block($vertical-align: baseline);
47
+ border-bottom: 1px dotted $c-sub-menu;
48
+ &:hover {
49
+ border-bottom-color: $c-white;
50
+ }
51
+ }
52
+ }
53
+ }
54
+
55
+ &:hover {
56
+ background: $c-sub-menu asset-data-url("layout/main-menu__item_hover.png") 50% -4px no-repeat;
57
+ > a {
58
+ border-bottom-color: $c-sub-menu;
59
+ }
60
+ > ul.sub-menu {
61
+ display: block;
62
+ }
63
+ }
64
+
65
+ }
66
+ }
67
+
68
+ }
@@ -0,0 +1,46 @@
1
+ @import "import/base";
2
+ //@import "ultimate/flash";
3
+
4
+ $images-path: $layout-images-path;
5
+
6
+ //@include font-face($font-name_custom, "appetite");
7
+
8
+ body {
9
+ @include font_base($font-size_base /*, 1.2*/);
10
+ min-width: $l-page_width;
11
+ margin: 0;
12
+ padding: 0;
13
+ cursor: default;
14
+ background: $c-body;
15
+ color: $c-white;
16
+ }
17
+
18
+ .l-page {
19
+ width: $l-page_width;
20
+ margin: 0 auto;
21
+ overflow: hidden;
22
+
23
+ //.l-page__flashes {
24
+ // @include ultimate-flash($background-alpha: 0.7);
25
+ // @include font_custom;
26
+ //}
27
+
28
+ @import "layout/header";
29
+
30
+ //@import "layout/main-menu";
31
+
32
+ > .l-page__content {
33
+ .l-page__title {
34
+ @include font_custom(23px);
35
+ border-bottom: 1px solid #434343;
36
+ padding: 0;
37
+ height: 35px;
38
+ margin-bottom: 12px;
39
+ }
40
+ }
41
+
42
+ @import "layout/footer";
43
+
44
+ }
45
+
46
+ @include sticky-footer($l-page__footer_height);
@@ -0,0 +1,79 @@
1
+ @import "import/base";
2
+
3
+ .bold {
4
+ font-weight: bold;
5
+ }
6
+
7
+ .italic {
8
+ font-style: italic;
9
+ }
10
+
11
+ .uline {
12
+ text-decoration: underline;
13
+ }
14
+
15
+ .strike {
16
+ text-decoration: line-through;
17
+ }
18
+
19
+ .hidden {
20
+ display: none;
21
+ }
22
+
23
+ .hidden-important {
24
+ display: none !important;
25
+ }
26
+
27
+ .block {
28
+ display: block;
29
+ }
30
+
31
+ .inline-block {
32
+ @include inline-block;
33
+ }
34
+
35
+ .nowrap {
36
+ white-space: nowrap;
37
+ }
38
+
39
+ a.image {
40
+ display: block;
41
+ position: relative;
42
+ text-decoration: none;
43
+ }
44
+
45
+ .no-info, .loading {
46
+ font-style: italic;
47
+ }
48
+
49
+ .float-left {
50
+ float: left;
51
+ }
52
+
53
+ .float-right {
54
+ float: right;
55
+ }
56
+
57
+ .clear {
58
+ clear: both;
59
+ }
60
+
61
+ .clear-left {
62
+ clear: left;
63
+ }
64
+
65
+ .clear-right {
66
+ clear: right;
67
+ }
68
+
69
+ .g-justify {
70
+ @include g-justify;
71
+ }
72
+
73
+ img.middle {
74
+ vertical-align: middle;
75
+ }
76
+
77
+ .text-center {
78
+ text-align: center;
79
+ }
@@ -0,0 +1,85 @@
1
+ @import "../import/base";
2
+
3
+ img {
4
+ border: 0;
5
+ outline: 0;
6
+ vertical-align: bottom;
7
+ }
8
+
9
+ div {
10
+ position: relative;
11
+ }
12
+
13
+ header, nav, aside, section, article, footer {
14
+ display: block;
15
+ position: relative;
16
+ }
17
+
18
+ em, i {
19
+ font-style: normal;
20
+ }
21
+
22
+ h1, h2, h3, h4, h5, h6 {
23
+ margin: 0;
24
+ padding: 5px 0;
25
+ font-weight: normal;
26
+ }
27
+
28
+ //@mixin hx($n, $size, $margin: false) {
29
+ // h#{$n} {
30
+ // font-size: $size;
31
+ // @if $margin {
32
+ // margin: $margin;
33
+ // }
34
+ // }
35
+ //}
36
+ //@include hx(1, 38px);
37
+ //@include hx(2, 36px);
38
+ //@include hx(3, 21px);
39
+ //@include hx(4, 18px);
40
+ //@include hx(5, 14px);
41
+ //@include hx(6, 12px);
42
+
43
+ p {
44
+ margin: 0;
45
+ padding: 5px 0;
46
+ cursor: text;
47
+ }
48
+
49
+ span {
50
+ cursor: default;
51
+ }
52
+
53
+ a {
54
+ color: $c-link;
55
+ outline: none;
56
+ text-decoration: none;
57
+ span {
58
+ cursor: pointer;
59
+ }
60
+ &:hover {
61
+ color: $c-link_hover;
62
+ }
63
+ }
64
+
65
+ ul {
66
+ margin: 0;
67
+ }
68
+
69
+ //li {
70
+ // list-style-type: none;
71
+ //}
72
+
73
+ //table {
74
+ // width: 100%;
75
+ // border-collapse: collapse;
76
+ // tr {
77
+ // > th, > td {
78
+ // padding: 0;
79
+ // vertical-align: top;
80
+ // }
81
+ // > th {
82
+ // font-weight: normal;
83
+ // }
84
+ // }
85
+ //}
@@ -0,0 +1,9 @@
1
+ @import "import/base";
2
+
3
+ .g-date {
4
+ display: block;
5
+ font-size: 11px;
6
+ font-style: italic;
7
+ font-weight: normal;
8
+ color: #acacac;
9
+ }
@@ -0,0 +1,36 @@
1
+ @import 'vendors/ultimate/mixins/microstructures';
2
+ @import 'vendors/ultimate/mixins/css3';
3
+ @import 'vendors/ultimate/mixins/fonts';
4
+
5
+ $support-ie: false;
6
+
7
+ $layout-images-path: 'layout';
8
+
9
+ $font-family_base: Tahoma, Helvetica, sans-serif;
10
+ $font-size_base: 14px;
11
+ $font-name_custom: 'Cuprum';
12
+ $font-family_custom: $font-name_custom, 'Trebuchet MS', Tahoma, sans-serif;
13
+
14
+ $l-page__header_height: 50px;
15
+ $l-page__footer_height: 60px;
16
+
17
+ $l-page_width: 980px;
18
+
19
+ $news__picture_width: 246px;
20
+ $news__picture_height: 163px;
21
+
22
+ $model__photo_small_width: 80px;
23
+ $model__photo_small_height: 111px;
24
+ $model__photo_middle_width: 230px;
25
+ $model__photo_middle_height: 306px;
26
+ $model__photo_big_width: 325px;
27
+ $model__photo_big_height: 475px;
28
+
29
+ $c-pitch-black: #000000;
30
+ $c-white: #ffffff;
31
+ $c-body: #1f1f1f;
32
+ $c-page: $c-pitch-black;
33
+ $c-link: $c-white;
34
+ $c-link_hover: #9df;
35
+ $c-pink: #FF0F51;
36
+ $c-sub-menu: $c-pink;
@@ -0,0 +1,3 @@
1
+ #qunit-tests li strong span {
2
+ cursor: pointer;
3
+ }
@@ -0,0 +1,4 @@
1
+ class ApplicationController < ActionController::Base
2
+ # TODO Why don't work?
3
+ #protect_from_forgery
4
+ end
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+ class MainController < ApplicationController
3
+
4
+ def index
5
+
6
+ end
7
+
8
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ %section.l-page__footer
2
+ .l-page__center
3
+ &copy; #{Date.today.year} by #{link_to 'Dmitry Karpunin', 'https://github.com/KODerFunk'} / #{link_to 'Ultimate Helpers Testing Application', root_url}
@@ -0,0 +1,4 @@
1
+ %section.l-page__header
2
+ = link_to root_path, class: 'logo' do
3
+ -#= image_tag 'layout/logo.png'
4
+ %span.caption Ultimate Helpers
@@ -0,0 +1,11 @@
1
+ %ul.l-page__main-menu
2
+ %li= link_to t('views.main_menu.root'), root_path
3
+ %li= link_to t('views.main_menu.news'), news_articles_path
4
+ %li.with-sub-menu
5
+ = link_to t('views.main_menu.catalog'), catalog_index_path
6
+ %ul.sub-menu
7
+ - Model::CATEGORIES.each do |category|
8
+ - if Model.where(category: category).count > 0
9
+ %li= link_to t('views.main_menu.categories.#{category}'), catalog_path(category)
10
+ %li= link_to t('views.main_menu.user_form'), new_model_path
11
+ %li= link_to t('views.main_menu.contacts'), contacts_path
@@ -0,0 +1,24 @@
1
+ !!!
2
+ %html{lang: 'ru-RU'}
3
+ %head
4
+ %meta{charset: 'UTF-8'}
5
+ %title Ultimate Helpers — #{@page_title ? @page_title.gsub("\n", '') : 'Testing App'}
6
+ =# favicon_link_tag '/favicon.png', type: 'image/png'
7
+ - if Rails.env.development?
8
+ :javascript
9
+ var DEBUG_MODE = true;
10
+ /[if lt IE 9]
11
+ = javascript_include_tag 'http://html5shiv.googlecode.com/svn/trunk/html5.js'
12
+ = stylesheet_link_tag 'http://fonts.googleapis.com/css?family=Cuprum:400normal&subset=all', media: 'all'
13
+ = stylesheet_link_tag 'application', media: 'all'
14
+ = javascript_include_tag 'application'
15
+ = csrf_meta_tags
16
+ = yield :head
17
+
18
+ %body{class: "l-#{@css_layout || "#{controller_name}-#{action_name}"}"}
19
+ .l-page
20
+ =# render 'flashes'
21
+ = render 'header'
22
+ %section.l-page__content
23
+ = yield
24
+ = render 'footer'
@@ -0,0 +1,13 @@
1
+ -#%h1.l-page__title= @page_title = 'Testing Application'
2
+ -#
3
+ -#%h2= link_to 'QUnit tests', '/qunit2'
4
+
5
+
6
+
7
+ - @page_title = 'QUnit Test Runner'
8
+ - content_for :head do
9
+ = stylesheet_link_tag 'qunit'
10
+ = javascript_include_tag 'qunit', 'all_tests'
11
+
12
+ #qunit
13
+ #qunit-fixture
@@ -0,0 +1,7 @@
1
+ - @page_title = 'QUnit Test Runner'
2
+ - content_for :head do
3
+ = stylesheet_link_tag 'qunit'
4
+ = javascript_include_tag 'qunit', 'all_tests'
5
+
6
+ #qunit
7
+ #qunit-fixture
@@ -0,0 +1,58 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require
6
+ require 'ultimate/helpers'
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 escaping HTML in JSON.
39
+ config.active_support.escape_html_entities_in_json = true
40
+
41
+ # Use SQL instead of Active Record's schema dumper when creating the database.
42
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
43
+ # like if you have constraints or database-specific column types
44
+ # config.active_record.schema_format = :sql
45
+
46
+ # Enforce whitelist mode for mass assignment.
47
+ # This will create an empty whitelist of attributes available for mass-assignment for all models
48
+ # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
49
+ # parameters by using an attr_accessible or attr_protected declaration.
50
+ config.active_record.whitelist_attributes = true
51
+
52
+ # Enable the asset pipeline
53
+ config.assets.enabled = true
54
+
55
+ # Version of your assets, change this if you want to expire all your assets
56
+ config.assets.version = '1.0'
57
+ end
58
+ end
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ gemfile = File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ if File.exist?(gemfile)
5
+ ENV['BUNDLE_GEMFILE'] = gemfile
6
+ require 'bundler'
7
+ Bundler.setup
8
+ end
9
+
10
+ $:.unshift File.expand_path('../../../../lib', __FILE__)
@@ -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,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Dummy::Application.initialize!
@@ -0,0 +1,40 @@
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
+ # Raise exception on mass assignment protection for Active Record models
26
+ config.active_record.mass_assignment_sanitizer = :strict
27
+
28
+ # Log the query plan for queries taking more than this (works
29
+ # with SQLite, MySQL, and PostgreSQL)
30
+ config.active_record.auto_explain_threshold_in_seconds = 0.5
31
+
32
+ # Do not compress assets
33
+ config.assets.compress = false
34
+
35
+ # Expands the lines which load the assets
36
+ config.assets.debug = true
37
+
38
+ # debuging styles with FireSass for Firebug
39
+ config.sass[:debug_info] = true
40
+ end