jabe 0.5.9 → 0.6.0
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/{LICENSE.txt → MIT-LICENSE} +1 -1
- data/README.textile +46 -31
- data/Rakefile +30 -47
- data/app/assets/images/jabe/delete.png +0 -0
- data/{public/images → app/assets/images/jabe}/delete_page.png +0 -0
- data/{public/images → app/assets/images/jabe}/full_page.png +0 -0
- data/{public/images → app/assets/images/jabe}/gravatar.gif +0 -0
- data/{public/javascripts → app/assets/javascripts/jabe}/application.js +15 -0
- data/{public/javascripts → app/assets/javascripts/jabe}/libs/dd_belatedpng.js +0 -0
- data/{public/javascripts → app/assets/javascripts/jabe}/libs/modernizr-1.6.min.js +0 -0
- data/{public/javascripts → app/assets/javascripts/jabe}/plugins.js +0 -0
- data/app/assets/stylesheets/jabe/application.css +3 -0
- data/app/{stylesheets → assets/stylesheets/jabe}/boilerplate.scss +0 -0
- data/app/{stylesheets → assets/stylesheets/jabe}/jabe.scss +47 -8
- data/app/controllers/jabe/admin/base_controller.rb +7 -0
- data/app/controllers/jabe/admin/entries_controller.rb +49 -0
- data/app/controllers/jabe/admin/settings_controller.rb +13 -0
- data/app/controllers/jabe/application_controller.rb +5 -0
- data/app/controllers/jabe/comments_controller.rb +34 -0
- data/app/controllers/jabe/entries_controller.rb +30 -0
- data/app/controllers/jabe/feed_controller.rb +8 -0
- data/app/controllers/jabe/sessions_controller.rb +4 -0
- data/app/helpers/jabe/application_helper.rb +25 -0
- data/app/mailers/jabe/comment_mailer.rb +12 -0
- data/app/models/jabe/admin.rb +11 -0
- data/app/models/jabe/comment.rb +35 -0
- data/app/models/jabe/entry.rb +22 -0
- data/app/models/jabe/settings.rb +14 -0
- data/app/views/{admin → jabe/admin}/entries/_form.html.haml +1 -1
- data/app/views/{admin → jabe/admin}/entries/edit.html.haml +0 -0
- data/app/views/{admin → jabe/admin}/entries/index.html.haml +9 -7
- data/app/views/{admin → jabe/admin}/entries/new.html.haml +0 -0
- data/app/views/{admin → jabe/admin}/settings/edit.html.haml +2 -1
- data/app/views/jabe/comment_mailer/notification.html.erb +19 -0
- data/app/views/jabe/confirmations/new.html.erb +15 -0
- data/app/views/{entries → jabe/entries}/index.html.haml +4 -3
- data/app/views/jabe/entries/show.html.haml +49 -0
- data/app/views/{feed → jabe/feed}/index.xml.builder +3 -3
- data/app/views/jabe/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/jabe/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/jabe/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/jabe/passwords/edit.html.erb +19 -0
- data/app/views/jabe/passwords/new.html.erb +15 -0
- data/app/views/jabe/registrations/edit.html.erb +22 -0
- data/app/views/jabe/registrations/new.html.erb +17 -0
- data/app/views/jabe/sessions/new.html.erb +15 -0
- data/app/views/jabe/shared/_links.erb +25 -0
- data/app/views/jabe/unlocks/new.html.erb +15 -0
- data/app/views/layouts/jabe/_flashes.html.haml +3 -0
- data/app/views/layouts/{_footer.html.haml → jabe/_footer.html.haml} +0 -0
- data/app/views/layouts/jabe/_header.html.haml +4 -0
- data/app/views/layouts/jabe/_sidebar.html.haml +21 -0
- data/app/views/layouts/jabe/application.html.haml +63 -0
- data/{test/dummy/vendor/plugins/acts_as_textiled/init.rb → config/initializers/acts_as_textiled.rb} +2 -1
- data/config/initializers/devise.rb +3 -0
- data/config/initializers/settings.rb +5 -5
- data/config/initializers/simple_form.rb +93 -0
- data/config/initializers/time_formats.rb +1 -2
- data/config/locales/simple_form.en.yml +24 -0
- data/config/routes.rb +10 -5
- data/{test/dummy/db/migrate/20101229224027_create_settings.rb → db/migrate/20101230010434_create_settings.rb} +7 -2
- data/{lib/generators/jabe/templates/migrations/devise_create_admins.rb → db/migrate/20101230010436_devise_create_admins.rb} +6 -6
- data/{test/dummy/db/migrate/20101229224030_create_entries.rb → db/migrate/20101230010437_create_entries.rb} +2 -2
- data/{test/dummy/db/migrate/20101229224031_create_comments.rb → db/migrate/20101230010438_create_comments.rb} +3 -4
- data/{test/dummy/vendor/plugins/acts_as_textiled/lib/acts_as_textiled.rb → lib/acts_as_textiled/base.rb} +0 -0
- data/lib/jabe.rb +7 -15
- data/lib/jabe/engine.rb +5 -0
- data/lib/jabe/version.rb +3 -0
- data/lib/tasks/jabe_tasks.rake +4 -0
- metadata +187 -601
- data/Gemfile +0 -35
- data/Gemfile.lock +0 -214
- data/VERSION +0 -1
- data/app/controllers/admin/base_controller.rb +0 -3
- data/app/controllers/admin/entries_controller.rb +0 -42
- data/app/controllers/admin/settings_controller.rb +0 -11
- data/app/controllers/comments_controller.rb +0 -25
- data/app/controllers/entries_controller.rb +0 -26
- data/app/controllers/feed_controller.rb +0 -8
- data/app/helpers/jabe_helper.rb +0 -13
- data/app/models/admin.rb +0 -9
- data/app/models/comment.rb +0 -22
- data/app/models/entry.rb +0 -17
- data/app/models/settings.rb +0 -7
- data/app/stylesheets/_will_paginate.scss +0 -102
- data/app/stylesheets/handheld.scss +0 -7
- data/app/views/entries/_comment_form.html.haml +0 -3
- data/app/views/entries/show.html.haml +0 -38
- data/app/views/layouts/_header.html.haml +0 -4
- data/app/views/layouts/_sidebar.html.haml +0 -21
- data/app/views/layouts/application.html.haml +0 -59
- data/config/initializers/sass.rb +0 -5
- data/lib/generators/jabe/migrations/migrations_generator.rb +0 -38
- data/lib/generators/jabe/stylesheets/stylesheets_generator.rb +0 -9
- data/lib/generators/jabe/templates/migrations/add_new_settings.rb +0 -17
- data/lib/generators/jabe/templates/migrations/create_comments.rb +0 -20
- data/lib/generators/jabe/templates/migrations/create_entries.rb +0 -16
- data/lib/generators/jabe/templates/migrations/create_settings.rb +0 -21
- data/lib/generators/jabe/templates/migrations/create_slugs.rb +0 -18
- data/public/.htaccess +0 -220
- data/public/apple-touch-icon.png +0 -0
- data/public/blackbird/blackbird.css +0 -80
- data/public/blackbird/blackbird.js +0 -365
- data/public/blackbird/blackbird.png +0 -0
- data/public/crossdomain.xml +0 -25
- data/public/javascripts/jquery-ui.js +0 -11511
- data/public/javascripts/jquery-ui.min.js +0 -404
- data/public/javascripts/jquery.js +0 -7179
- data/public/javascripts/jquery.min.js +0 -167
- data/public/javascripts/libs/profiling/charts.swf +0 -0
- data/public/javascripts/libs/profiling/config.js +0 -59
- data/public/javascripts/libs/profiling/yahoo-profiling.css +0 -7
- data/public/javascripts/libs/profiling/yahoo-profiling.min.js +0 -39
- data/public/javascripts/rails.js +0 -154
- data/public/nginx.conf +0 -108
- data/public/robots.txt +0 -5
- data/test/dummy/app/controllers/application_controller.rb +0 -3
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/config/application.rb +0 -52
- data/test/dummy/config/boot.rb +0 -10
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -26
- data/test/dummy/config/environments/production.rb +0 -49
- data/test/dummy/config/environments/test.rb +0 -35
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/devise.rb +0 -142
- data/test/dummy/config/initializers/inflections.rb +0 -10
- data/test/dummy/config/initializers/mime_types.rb +0 -5
- data/test/dummy/config/initializers/secret_token.rb +0 -7
- data/test/dummy/config/initializers/session_store.rb +0 -8
- data/test/dummy/config/routes.rb +0 -58
- data/test/dummy/db/migrate/20101229224028_create_slugs.rb +0 -18
- data/test/dummy/db/migrate/20101229224029_devise_create_admins.rb +0 -26
- data/test/dummy/db/migrate/20110104004400_add_new_settings.rb +0 -17
- data/test/dummy/db/schema.rb +0 -110
- data/test/dummy/features/step_definitions/admin_steps.rb +0 -14
- data/test/dummy/features/step_definitions/email_steps.rb +0 -194
- data/test/dummy/features/step_definitions/entry_steps.rb +0 -54
- data/test/dummy/features/step_definitions/support_steps.rb +0 -3
- data/test/dummy/features/step_definitions/web_steps.rb +0 -219
- data/test/dummy/features/support/blueprints.rb +0 -37
- data/test/dummy/features/support/env.rb +0 -59
- data/test/dummy/features/support/paths.rb +0 -39
- data/test/dummy/spec/spec_helper.rb +0 -0
- data/test/dummy/spec/support/blueprints.rb +0 -9
- data/test/dummy/vendor/plugins/acts_as_textiled/test/fixtures/author.rb +0 -4
- data/test/dummy/vendor/plugins/acts_as_textiled/test/fixtures/story.rb +0 -4
- data/test/dummy/vendor/plugins/acts_as_textiled/test/helper.rb +0 -87
- data/test/dummy/vendor/plugins/acts_as_textiled/test/textiled_test.rb +0 -145
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<h2>Sign up</h2>
|
|
2
|
+
|
|
3
|
+
<%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
|
|
4
|
+
<%= f.error_notification %>
|
|
5
|
+
|
|
6
|
+
<div class="inputs">
|
|
7
|
+
<%= f.input :email, :required => true, :autofocus => true %>
|
|
8
|
+
<%= f.input :password, :required => true %>
|
|
9
|
+
<%= f.input :password_confirmation, :required => true %>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<div class="actions">
|
|
13
|
+
<%= f.button :submit, "Sign up" %>
|
|
14
|
+
</div>
|
|
15
|
+
<% end %>
|
|
16
|
+
|
|
17
|
+
<%= render :partial => "devise/shared/links" %>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<h2>Sign in</h2>
|
|
2
|
+
|
|
3
|
+
<%= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
|
|
4
|
+
<div class="inputs">
|
|
5
|
+
<%= f.input :email, :required => false, :autofocus => true %>
|
|
6
|
+
<%= f.input :password, :required => false %>
|
|
7
|
+
<%= f.input :remember_me, :as => :boolean if devise_mapping.rememberable? %>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<div class="actions">
|
|
11
|
+
<%= f.button :submit, "Sign in" %>
|
|
12
|
+
</div>
|
|
13
|
+
<% end %>
|
|
14
|
+
|
|
15
|
+
<%= render :partial => "devise/shared/links" %>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<%- if controller_name != 'sessions' %>
|
|
2
|
+
<%= link_to "Sign in", new_session_path(resource_name) %><br />
|
|
3
|
+
<% end -%>
|
|
4
|
+
|
|
5
|
+
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
|
6
|
+
<%= link_to "Sign up", new_registration_path(resource_name) %><br />
|
|
7
|
+
<% end -%>
|
|
8
|
+
|
|
9
|
+
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
|
|
10
|
+
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
|
|
11
|
+
<% end -%>
|
|
12
|
+
|
|
13
|
+
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
|
14
|
+
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
|
|
15
|
+
<% end -%>
|
|
16
|
+
|
|
17
|
+
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
|
18
|
+
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
|
|
19
|
+
<% end -%>
|
|
20
|
+
|
|
21
|
+
<%- if devise_mapping.omniauthable? %>
|
|
22
|
+
<%- resource_class.omniauth_providers.each do |provider| %>
|
|
23
|
+
<%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
|
|
24
|
+
<% end -%>
|
|
25
|
+
<% end -%>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<h2>Resend unlock instructions</h2>
|
|
2
|
+
|
|
3
|
+
<%= simple_form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
|
|
4
|
+
<%= f.error_notification %>
|
|
5
|
+
|
|
6
|
+
<div class="inputs">
|
|
7
|
+
<%= f.input :email, :required => true %>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<div class="actions">
|
|
11
|
+
<%= f.button :submit, "Resend unlock instructions" %>
|
|
12
|
+
</div>
|
|
13
|
+
<% end %>
|
|
14
|
+
|
|
15
|
+
<%= render :partial => "devise/shared/links" %>
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
%h2
|
|
2
|
+
= Jabe::SETTINGS.sidebar_heading
|
|
3
|
+
|
|
4
|
+
- unless Jabe::SETTINGS.github_username.blank?
|
|
5
|
+
.link
|
|
6
|
+
= link_to 'Github', Jabe::SETTINGS.github_username
|
|
7
|
+
|
|
8
|
+
- unless Jabe::SETTINGS.twitter_username.blank?
|
|
9
|
+
.link
|
|
10
|
+
= link_to 'Twitter', Jabe::SETTINGS.twitter_username
|
|
11
|
+
|
|
12
|
+
- unless Jabe::SETTINGS.facebook_url.blank?
|
|
13
|
+
.link
|
|
14
|
+
= link_to 'Facebook', Jabe::SETTINGS.facebook_url
|
|
15
|
+
|
|
16
|
+
- if Jabe::SETTINGS.show_github_badge
|
|
17
|
+
#github-badge
|
|
18
|
+
|
|
19
|
+
:javascript
|
|
20
|
+
GITHUB_USERNAME="#{ Jabe::SETTINGS.github_username}";
|
|
21
|
+
= javascript_include_tag 'http://drnicjavascript.rubyforge.org/github_badge/dist/github-badge-launcher.js'
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
/[if lt IE 7 ] <html lang="en" class="no-js ie6">
|
|
3
|
+
/[if IE 7 ] <html lang="en" class="no-js ie7">
|
|
4
|
+
/[if IE 8 ] <html lang="en" class="no-js ie8">
|
|
5
|
+
/[if IE 9 ] <html lang="en" class="no-js ie9">
|
|
6
|
+
/ [if (gt IE 9)|!(IE)]><!
|
|
7
|
+
%html.no-js{:lang => "en"}
|
|
8
|
+
/ <![endif]
|
|
9
|
+
%head
|
|
10
|
+
%meta{:charset => "utf-8"}/
|
|
11
|
+
%meta{:content => "IE=edge,chrome=1", "http-equiv" => "X-UA-Compatible"}/
|
|
12
|
+
%title
|
|
13
|
+
= "#{@page_title} - " if @page_title
|
|
14
|
+
= Jabe::SETTINGS.site_name
|
|
15
|
+
%meta{:content => "", :name => "description"}/
|
|
16
|
+
%meta{:content => "", :name => "author"}/
|
|
17
|
+
%meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}/
|
|
18
|
+
%link{:href => "/favicon.ico", :rel => "shortcut icon"}/
|
|
19
|
+
%link{:href => "/apple-touch-icon.png", :rel => "apple-touch-icon"}/
|
|
20
|
+
= csrf_meta_tag
|
|
21
|
+
= auto_discovery_link_tag :atom, feed_path
|
|
22
|
+
= stylesheet_link_tag 'jabe/application', 'application'
|
|
23
|
+
= yield :stylesheets
|
|
24
|
+
/ = javascript_include_tag 'jabe/libs/modernizr-1.6.min.js'
|
|
25
|
+
%body
|
|
26
|
+
#container
|
|
27
|
+
%header
|
|
28
|
+
= render 'layouts/jabe/header'
|
|
29
|
+
- if admin_signed_in?
|
|
30
|
+
%nav.nav.admin
|
|
31
|
+
%ul
|
|
32
|
+
%li= link_to 'Entries', admin_entries_path
|
|
33
|
+
%li= link_to 'Settings', edit_admin_settings_path
|
|
34
|
+
%li= link_to 'Logout', destroy_admin_session_path, :method => :delete
|
|
35
|
+
#main
|
|
36
|
+
#content
|
|
37
|
+
= render 'layouts/jabe/flashes'
|
|
38
|
+
= yield
|
|
39
|
+
#sidebar
|
|
40
|
+
= render 'layouts/jabe/sidebar'
|
|
41
|
+
%footer
|
|
42
|
+
= render 'layouts/jabe/footer'
|
|
43
|
+
= javascript_include_tag 'jabe/application.js'
|
|
44
|
+
|
|
45
|
+
/[if lt IE 7 ]
|
|
46
|
+
%script{ :type => 'text/javascript', :charset => 'utf-8' }
|
|
47
|
+
DD_belatedPNG.fix('img, .png_bg')
|
|
48
|
+
|
|
49
|
+
%script{ :type => 'text/javascript', :charset => 'utf-8' }
|
|
50
|
+
$(document).ready(function() {
|
|
51
|
+
= yield :on_ready
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
- unless Jabe::SETTINGS.google_tracker_id.blank?
|
|
55
|
+
:javascript
|
|
56
|
+
var _gaq = [['_setAccount', '#{ Jabe::SETTINGS.google_tracker_id}'], ['_trackPageview']];
|
|
57
|
+
(function(d, t) {
|
|
58
|
+
var g = d.createElement(t),
|
|
59
|
+
s = d.getElementsByTagName(t)[0];
|
|
60
|
+
g.async = true;
|
|
61
|
+
g.src = ('https:' == location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
|
62
|
+
s.parentNode.insertBefore(g, s);
|
|
63
|
+
})(document, 'script');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
begin
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
rescue ActiveRecord::StatementInvalid
|
|
5
|
-
end
|
|
1
|
+
# begin
|
|
2
|
+
# Jabe::SETTINGS = Jabe::Settings.first || Jabe::Settings.create
|
|
3
|
+
# Jabe::SETTINGS.do_updates
|
|
4
|
+
# rescue ActiveRecord::StatementInvalid
|
|
5
|
+
# end
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Use this setup block to configure all options available in SimpleForm.
|
|
2
|
+
SimpleForm.setup do |config|
|
|
3
|
+
# Components used by the form builder to generate a complete input. You can remove
|
|
4
|
+
# any of them, change the order, or even add your own components to the stack.
|
|
5
|
+
# config.components = [ :placeholder, :label_input, :hint, :error ]
|
|
6
|
+
|
|
7
|
+
# Default tag used on hints.
|
|
8
|
+
# config.hint_tag = :span
|
|
9
|
+
|
|
10
|
+
# CSS class to add to all hint tags.
|
|
11
|
+
# config.hint_class = :hint
|
|
12
|
+
|
|
13
|
+
# CSS class used on errors.
|
|
14
|
+
# config.error_class = :error
|
|
15
|
+
|
|
16
|
+
# Default tag used on errors.
|
|
17
|
+
# config.error_tag = :span
|
|
18
|
+
|
|
19
|
+
# Method used to tidy up errors.
|
|
20
|
+
# config.error_method = :first
|
|
21
|
+
|
|
22
|
+
# Default tag used for error notification helper.
|
|
23
|
+
# config.error_notification_tag = :p
|
|
24
|
+
|
|
25
|
+
# CSS class to add for error notification helper.
|
|
26
|
+
# config.error_notification_class = :error_notification
|
|
27
|
+
|
|
28
|
+
# ID to add for error notification helper.
|
|
29
|
+
# config.error_notification_id = nil
|
|
30
|
+
|
|
31
|
+
# You can wrap all inputs in a pre-defined tag.
|
|
32
|
+
# config.wrapper_tag = :div
|
|
33
|
+
|
|
34
|
+
# CSS class to add to all wrapper tags.
|
|
35
|
+
# config.wrapper_class = :input
|
|
36
|
+
|
|
37
|
+
# CSS class to add to the wrapper if the field has errors.
|
|
38
|
+
# config.wrapper_error_class = :field_with_errors
|
|
39
|
+
|
|
40
|
+
# You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
|
|
41
|
+
# config.collection_wrapper_tag = nil
|
|
42
|
+
|
|
43
|
+
# You can wrap each item in a collection of radio/check boxes with a tag, defaulting to span.
|
|
44
|
+
# config.item_wrapper_tag = :span
|
|
45
|
+
|
|
46
|
+
# Series of attempts to detect a default label method for collection.
|
|
47
|
+
# config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
|
|
48
|
+
|
|
49
|
+
# Series of attempts to detect a default value method for collection.
|
|
50
|
+
# config.collection_value_methods = [ :id, :to_s ]
|
|
51
|
+
|
|
52
|
+
# How the label text should be generated altogether with the required text.
|
|
53
|
+
# config.label_text = lambda { |label, required| "#{required} #{label}" }
|
|
54
|
+
|
|
55
|
+
# You can define the class to use on all labels. Default is nil.
|
|
56
|
+
# config.label_class = nil
|
|
57
|
+
|
|
58
|
+
# You can define the class to use on all forms. Default is simple_form.
|
|
59
|
+
# config.form_class = :simple_form
|
|
60
|
+
|
|
61
|
+
# Whether attributes are required by default (or not). Default is true.
|
|
62
|
+
# config.required_by_default = true
|
|
63
|
+
|
|
64
|
+
# Tell browsers whether to use default HTML5 validations (novalidate option).
|
|
65
|
+
# Default is enabled.
|
|
66
|
+
# config.browser_validations = true
|
|
67
|
+
|
|
68
|
+
# Determines whether HTML5 types (:email, :url, :search, :tel) and attributes
|
|
69
|
+
# (e.g. required) are used or not. True by default.
|
|
70
|
+
# Having this on in non-HTML5 compliant sites can cause odd behavior in
|
|
71
|
+
# HTML5-aware browsers such as Chrome.
|
|
72
|
+
config.html5 = false
|
|
73
|
+
|
|
74
|
+
# Custom mappings for input types. This should be a hash containing a regexp
|
|
75
|
+
# to match as key, and the input type that will be used when the field name
|
|
76
|
+
# matches the regexp as value.
|
|
77
|
+
# config.input_mappings = { /count/ => :integer }
|
|
78
|
+
|
|
79
|
+
# Collection of methods to detect if a file type was given.
|
|
80
|
+
# config.file_methods = [ :mounted_as, :file?, :public_filename ]
|
|
81
|
+
|
|
82
|
+
# Default priority for time_zone inputs.
|
|
83
|
+
# config.time_zone_priority = nil
|
|
84
|
+
|
|
85
|
+
# Default priority for country inputs.
|
|
86
|
+
# config.country_priority = nil
|
|
87
|
+
|
|
88
|
+
# Default size for text inputs.
|
|
89
|
+
# config.default_input_size = 50
|
|
90
|
+
|
|
91
|
+
# When false, do not use translations for labels, hints or placeholders.
|
|
92
|
+
# config.translate = true
|
|
93
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
en:
|
|
2
|
+
simple_form:
|
|
3
|
+
"yes": 'Yes'
|
|
4
|
+
"no": 'No'
|
|
5
|
+
required:
|
|
6
|
+
text: 'required'
|
|
7
|
+
mark: '*'
|
|
8
|
+
# You can uncomment the line below if you need to overwrite the whole required html.
|
|
9
|
+
# When using html, text and mark won't be used.
|
|
10
|
+
# html: '<abbr title="required">*</abbr>'
|
|
11
|
+
error_notification:
|
|
12
|
+
default_message: "Some errors were found, please take a look:"
|
|
13
|
+
# Labels and hints examples
|
|
14
|
+
# labels:
|
|
15
|
+
# password: 'Password'
|
|
16
|
+
# user:
|
|
17
|
+
# new:
|
|
18
|
+
# email: 'E-mail para efetuar o sign in.'
|
|
19
|
+
# edit:
|
|
20
|
+
# email: 'E-mail.'
|
|
21
|
+
# hints:
|
|
22
|
+
# username: 'User name to sign in.'
|
|
23
|
+
# password: 'No special characters, please.'
|
|
24
|
+
|
data/config/routes.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
Jabe::Engine.routes.draw do
|
|
2
2
|
|
|
3
3
|
root :to => "entries#index"
|
|
4
4
|
|
|
@@ -15,10 +15,14 @@ Rails.application.routes.draw do
|
|
|
15
15
|
resources :entries
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
devise_for :admin,
|
|
19
|
-
:
|
|
20
|
-
:
|
|
21
|
-
|
|
18
|
+
devise_for :admin,
|
|
19
|
+
:module => :devise,
|
|
20
|
+
:sign_out_via => [ :get ],
|
|
21
|
+
:class_name => 'Jabe::Admin',
|
|
22
|
+
:path_names => {
|
|
23
|
+
:sign_in => 'login',
|
|
24
|
+
:sign_out => 'logout'
|
|
25
|
+
}
|
|
22
26
|
|
|
23
27
|
match "/:year/:month/:day/:id" => 'entries#show',
|
|
24
28
|
:constraints => {
|
|
@@ -26,4 +30,5 @@ Rails.application.routes.draw do
|
|
|
26
30
|
:month => /\d{1,2}/,
|
|
27
31
|
:day => /\d{1,2}/
|
|
28
32
|
}
|
|
33
|
+
|
|
29
34
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
class CreateSettings < ActiveRecord::Migration
|
|
2
2
|
def self.up
|
|
3
|
-
create_table :
|
|
3
|
+
create_table :jabe_settings do |t|
|
|
4
4
|
t.string :site_url
|
|
5
5
|
t.string :host_name
|
|
6
6
|
t.string :mail_from
|
|
@@ -10,12 +10,17 @@ class CreateSettings < ActiveRecord::Migration
|
|
|
10
10
|
t.string :google_tracker_id
|
|
11
11
|
t.boolean :blackbird_enabled
|
|
12
12
|
t.integer :entries_per_page
|
|
13
|
+
t.string :sidebar_heading
|
|
14
|
+
t.string :github_username
|
|
15
|
+
t.string :twitter_username
|
|
16
|
+
t.string :show_github_badge
|
|
17
|
+
t.string :facebook_url
|
|
13
18
|
|
|
14
19
|
t.timestamps
|
|
15
20
|
end
|
|
16
21
|
end
|
|
17
22
|
|
|
18
23
|
def self.down
|
|
19
|
-
drop_table :
|
|
24
|
+
drop_table :jabe_settings
|
|
20
25
|
end
|
|
21
26
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
class DeviseCreateAdmins < ActiveRecord::Migration
|
|
2
2
|
def self.up
|
|
3
|
-
create_table(:
|
|
3
|
+
create_table(:jabe_admins) do |t|
|
|
4
4
|
t.database_authenticatable :null => false
|
|
5
5
|
t.recoverable
|
|
6
6
|
t.rememberable
|
|
@@ -14,13 +14,13 @@ class DeviseCreateAdmins < ActiveRecord::Migration
|
|
|
14
14
|
t.timestamps
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
add_index :
|
|
18
|
-
add_index :
|
|
19
|
-
# add_index :
|
|
20
|
-
# add_index :
|
|
17
|
+
add_index :jabe_admins, :email, :unique => true
|
|
18
|
+
add_index :jabe_admins, :reset_password_token, :unique => true
|
|
19
|
+
# add_index :jabe_admins, :confirmation_token, :unique => true
|
|
20
|
+
# add_index :jabe_admins, :unlock_token, :unique => true
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
def self.down
|
|
24
|
-
drop_table :
|
|
24
|
+
drop_table :jabe_admins
|
|
25
25
|
end
|
|
26
26
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
class CreateEntries < ActiveRecord::Migration
|
|
2
2
|
def self.up
|
|
3
|
-
create_table :
|
|
3
|
+
create_table :jabe_entries do |t|
|
|
4
4
|
t.string :cached_slug
|
|
5
5
|
t.string :title
|
|
6
6
|
t.text :body
|
|
@@ -11,6 +11,6 @@ class CreateEntries < ActiveRecord::Migration
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def self.down
|
|
14
|
-
drop_table :
|
|
14
|
+
drop_table :jabe_entries
|
|
15
15
|
end
|
|
16
16
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
class CreateComments < ActiveRecord::Migration
|
|
2
2
|
def self.up
|
|
3
|
-
create_table :
|
|
3
|
+
create_table :jabe_comments do |t|
|
|
4
4
|
t.integer :entry_id
|
|
5
5
|
t.string :name
|
|
6
6
|
t.string :email
|
|
@@ -10,11 +10,10 @@ class CreateComments < ActiveRecord::Migration
|
|
|
10
10
|
t.timestamps
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
add_index :
|
|
13
|
+
add_index :jabe_comments, :entry_id
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def self.down
|
|
17
|
-
|
|
18
|
-
drop_table :comments
|
|
17
|
+
drop_table :jabe_comments
|
|
19
18
|
end
|
|
20
19
|
end
|