Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

upgrade to rails 3.1.0.rc4

  • Loading branch information...
commit a94ed935313677da70ca9c5a1d30bf2f7ac941a5 1 parent 6a3de5e
Ivana Vasilj authored
7 Gemfile
View
@@ -1,6 +1,11 @@
source 'http://rubygems.org'
-gem 'rails', '~> 3.0'
+gem 'rails', '3.1.0.rc4'
+gem 'sass'
+gem 'coffee-script'
+gem 'uglifier'
+gem 'jquery-rails'
+
gem 'twitter-login', '~> 0.4.2', :require => 'twitter/login'
gem 'choices'
149 Gemfile.lock
View
@@ -1,84 +1,119 @@
GEM
remote: http://rubygems.org/
specs:
- abstract (1.0.0)
- actionmailer (3.0.3)
- actionpack (= 3.0.3)
- mail (~> 2.2.9)
- actionpack (3.0.3)
- activemodel (= 3.0.3)
- activesupport (= 3.0.3)
- builder (~> 2.1.2)
- erubis (~> 2.6.6)
- i18n (~> 0.4)
- rack (~> 1.2.1)
- rack-mount (~> 0.6.13)
- rack-test (~> 0.5.6)
- tzinfo (~> 0.3.23)
- activemodel (3.0.3)
- activesupport (= 3.0.3)
- builder (~> 2.1.2)
- i18n (~> 0.4)
- activerecord (3.0.3)
- activemodel (= 3.0.3)
- activesupport (= 3.0.3)
- arel (~> 2.0.2)
- tzinfo (~> 0.3.23)
- activeresource (3.0.3)
- activemodel (= 3.0.3)
- activesupport (= 3.0.3)
- activesupport (3.0.3)
- arel (2.0.6)
- builder (2.1.2)
- choices (0.2.0)
+ actionmailer (3.1.0.rc4)
+ actionpack (= 3.1.0.rc4)
+ mail (~> 2.3.0)
+ actionpack (3.1.0.rc4)
+ activemodel (= 3.1.0.rc4)
+ activesupport (= 3.1.0.rc4)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ i18n (~> 0.6)
+ rack (~> 1.3.0)
+ rack-cache (~> 1.0.1)
+ rack-mount (~> 0.8.1)
+ rack-test (~> 0.6.0)
+ sprockets (~> 2.0.0.beta.10)
+ tzinfo (~> 0.3.27)
+ activemodel (3.1.0.rc4)
+ activesupport (= 3.1.0.rc4)
+ bcrypt-ruby (~> 2.1.4)
+ builder (~> 3.0.0)
+ i18n (~> 0.6)
+ activerecord (3.1.0.rc4)
+ activemodel (= 3.1.0.rc4)
+ activesupport (= 3.1.0.rc4)
+ arel (~> 2.1.1)
+ tzinfo (~> 0.3.27)
+ activeresource (3.1.0.rc4)
+ activemodel (= 3.1.0.rc4)
+ activesupport (= 3.1.0.rc4)
+ activesupport (3.1.0.rc4)
+ multi_json (~> 1.0)
+ arel (2.1.3)
+ bcrypt-ruby (2.1.4)
+ builder (3.0.0)
+ choices (0.2.4)
hashie (>= 0.4.0)
- erubis (2.6.6)
- abstract (>= 1.0.0)
- hashie (0.4.0)
- i18n (0.5.0)
- mail (2.2.12)
- activesupport (>= 2.3.6)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.1.1)
+ erubis (2.7.0)
+ execjs (1.2.0)
+ multi_json (~> 1.0)
+ hashie (1.0.0)
+ hike (1.1.0)
+ i18n (0.6.0)
+ jquery-rails (1.0.12)
+ railties (~> 3.0)
+ thor (~> 0.14)
+ mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
- oauth (0.4.4)
+ multi_json (1.0.3)
+ oauth (0.4.5)
polyglot (0.3.1)
- rack (1.2.1)
- rack-mount (0.6.13)
+ rack (1.3.0)
+ rack-cache (1.0.2)
+ rack (>= 0.4)
+ rack-mount (0.8.1)
rack (>= 1.0.0)
- rack-test (0.5.6)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.0)
rack (>= 1.0)
- rails (3.0.3)
- actionmailer (= 3.0.3)
- actionpack (= 3.0.3)
- activerecord (= 3.0.3)
- activeresource (= 3.0.3)
- activesupport (= 3.0.3)
+ rails (3.1.0.rc4)
+ actionmailer (= 3.1.0.rc4)
+ actionpack (= 3.1.0.rc4)
+ activerecord (= 3.1.0.rc4)
+ activeresource (= 3.1.0.rc4)
+ activesupport (= 3.1.0.rc4)
bundler (~> 1.0)
- railties (= 3.0.3)
- railties (3.0.3)
- actionpack (= 3.0.3)
- activesupport (= 3.0.3)
+ railties (= 3.1.0.rc4)
+ railties (3.1.0.rc4)
+ actionpack (= 3.1.0.rc4)
+ activesupport (= 3.1.0.rc4)
+ rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
- thor (~> 0.14.4)
- rake (0.8.7)
- sqlite3-ruby (1.3.2)
+ rdoc (~> 3.4)
+ thor (~> 0.14.6)
+ rake (0.9.2)
+ rdoc (3.7)
+ sass (3.1.3)
+ sprockets (2.0.0.beta.10)
+ hike (~> 1.0)
+ rack (~> 1.0)
+ tilt (!= 1.3.0, ~> 1.1)
+ sqlite3 (1.3.3)
+ sqlite3-ruby (1.3.3)
+ sqlite3 (>= 1.3.3)
thor (0.14.6)
+ tilt (1.3.2)
treetop (1.4.9)
polyglot (>= 0.3.1)
- twitter-login (0.4.2)
+ twitter-login (0.4.3)
hashie (>= 0.2.2)
oauth (~> 0.4.2)
yajl-ruby (>= 0.7.7)
- tzinfo (0.3.23)
- yajl-ruby (0.7.8)
+ tzinfo (0.3.29)
+ uglifier (1.0.0)
+ execjs (>= 0.3.0)
+ multi_json (>= 1.0.2)
+ yajl-ruby (0.8.2)
PLATFORMS
ruby
DEPENDENCIES
choices
- rails (~> 3.0)
+ coffee-script
+ jquery-rails
+ rails (= 3.1.0.rc4)
+ sass
sqlite3-ruby
twitter-login (~> 0.4.2)
+ uglifier
0  public/images/logo.png → app/assets/images/logo.png
View
File renamed without changes
9 app/assets/javascripts/application.js
View
@@ -0,0 +1,9 @@
+// This is a manifest file that'll be compiled into including all the files listed below.
+// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
+// be included in the compiled file accessible from http://example.com/assets/application.js
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+//= require jquery
+//= require jquery_ujs
+//= require_tree .
0  public/javascripts/items.js → app/assets/javascripts/items.js
View
File renamed without changes
0  public/javascripts/todo-lists.js → app/assets/javascripts/todo-lists.js
View
File renamed without changes
7 app/assets/stylesheets/application.css
View
@@ -0,0 +1,7 @@
+/*
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
+ *= require_self
+ *= require_tree .
+*/
0  public/stylesheets/style.css → app/assets/stylesheets/style.css
View
File renamed without changes
10 app/views/layouts/application.html.erb
View
@@ -7,9 +7,10 @@
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>Todas Listas</title>
- <%= csrf_meta_tag %>
+ <%= stylesheet_link_tag "application" %>
+ <%= javascript_include_tag "application" %>
+ <%= csrf_meta_tags %>
- <%= stylesheet_link_tag "style" %>
<link rel="icon" type="image/png" href="/favicon.ico" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
@@ -26,7 +27,7 @@
<body>
<header>
- <h1><a href="/about"><img src="/images/logo.png" alt="Todas Listas" /></a></h1>
+ <h1><a href="/about"><img src="/assets/logo.png" alt="Todas Listas" /></a></h1>
<% if logged_in? %>
<nav>
@@ -43,9 +44,6 @@
<% end %>
<%= yield %>
-
- <%= javascript_include_tag 'https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js' %>
- <%= javascript_include_tag 'rails', 'todo-lists', 'items', :cache => !Todaslistas::Application.config.heroku %>
<%= javascript_tag analytics_code if Rails.env.production? %>
3  config/application.rb
View
@@ -45,6 +45,9 @@ class Application < Rails::Application
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]
+ # Enable the asset pipeline
+ config.assets.enabled = true
+
config.twitter_login = Twitter::Login.new \
:consumer_key => config.twitter.consumer_key, :secret => config.twitter.secret
end
7 config/environments/development.rb
View
@@ -11,7 +11,6 @@
# Show full error reports and disable caching
config.consider_all_requests_local = true
- config.action_view.debug_rjs = true
config.action_controller.perform_caching = false
# Don't care if the mailer can't send
@@ -19,4 +18,10 @@
# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log
+
+ # Only use best-standards-support built into browsers
+ config.action_dispatch.best_standards_support = :builtin
+
+ # Do not compress assets
+ config.assets.compress = false
end
BIN  public/images/rails.png
View
Deleted file not rendered
160 public/javascripts/rails.js
View
@@ -1,160 +0,0 @@
-/*
- * jquery-ujs
- *
- * http://github.com/rails/jquery-ujs/blob/master/src/rails.js
- *
- * This rails.js file supports jQuery 1.4.3 and 1.4.4 .
- *
- */
-
-jQuery(function ($) {
- var csrf_token = $('meta[name=csrf-token]').attr('content'),
- csrf_param = $('meta[name=csrf-param]').attr('content');
-
- $.fn.extend({
- /**
- * Triggers a custom event on an element and returns the event result
- * this is used to get around not being able to ensure callbacks are placed
- * at the end of the chain.
- *
- * TODO: deprecate with jQuery 1.4.2 release, in favor of subscribing to our
- * own events and placing ourselves at the end of the chain.
- */
- triggerAndReturn: function (name, data) {
- var event = new $.Event(name);
- this.trigger(event, data);
-
- return event.result !== false;
- },
-
- /**
- * Handles execution of remote calls. Provides following callbacks:
- *
- * - ajax:beforeSend - is executed before firing ajax call
- * - ajax:success - is executed when status is success
- * - ajax:complete - is executed when the request finishes, whether in failure or success.
- * - ajax:error - is execute in case of error
- */
- callRemote: function () {
- var el = this,
- method = el.attr('method') || el.attr('data-method') || 'GET',
- url = el.attr('action') || el.attr('href'),
- dataType = el.attr('data-type') || ($.ajaxSettings && $.ajaxSettings.dataType);
-
- if (url === undefined) {
- throw "No URL specified for remote call (action or href must be present).";
- } else {
- var $this = $(this), data = el.is('form') ? el.serializeArray() : [];
-
- $.ajax({
- url: url,
- data: data,
- dataType: dataType,
- type: method.toUpperCase(),
- beforeSend: function (xhr) {
- // xhr.setRequestHeader("Accept", "text/javascript");
- if ($this.triggerHandler('ajax:beforeSend', xhr) === false) {
- return false;
- }
- },
- success: function (data, status, xhr) {
- el.trigger('ajax:success', [data, status, xhr]);
- },
- complete: function (xhr) {
- el.trigger('ajax:complete', xhr);
- },
- error: function (xhr, status, error) {
- el.trigger('ajax:error', [xhr, status, error]);
- }
- });
- }
- }
- });
-
- /**
- * confirmation handler
- */
-
- $('body').delegate('a[data-confirm], button[data-confirm], input[data-confirm]', 'click.rails', function () {
- var el = $(this);
- if (el.triggerAndReturn('confirm')) {
- if (!confirm(el.attr('data-confirm'))) {
- return false;
- }
- }
- });
-
-
-
- /**
- * remote handlers
- */
- $('form[data-remote]').live('submit.rails', function (e) {
- $(this).callRemote();
- e.preventDefault();
- });
-
- $('a[data-remote],input[data-remote]').live('click.rails', function (e) {
- $(this).callRemote();
- e.preventDefault();
- });
-
- /**
- * <%= link_to "Delete", user_path(@user), :method => :delete, :confirm => "Are you sure?" %>
- *
- * <a href="/users/5" data-confirm="Are you sure?" data-method="delete" rel="nofollow">Delete</a>
- */
- $('a[data-method]:not([data-remote])').live('click.rails', function (e){
- var link = $(this),
- href = link.attr('href'),
- method = link.attr('data-method'),
- form = $('<form method="post" action="'+href+'"></form>'),
- metadata_input = '<input name="_method" value="'+method+'" type="hidden" />';
-
- if (csrf_param !== undefined && csrf_token !== undefined) {
- metadata_input += '<input name="'+csrf_param+'" value="'+csrf_token+'" type="hidden" />';
- }
-
- form.hide()
- .append(metadata_input)
- .appendTo('body');
-
- e.preventDefault();
- form.submit();
- });
-
- /**
- * disable-with handlers
- */
- var disable_with_input_selector = 'input[data-disable-with]',
- disable_with_form_remote_selector = 'form[data-remote]:has(' + disable_with_input_selector + ')',
- disable_with_form_not_remote_selector = 'form:not([data-remote]):has(' + disable_with_input_selector + ')';
-
- var disable_with_input_function = function () {
- $(this).find(disable_with_input_selector).each(function () {
- var input = $(this);
- input.data('enable-with', input.val())
- .attr('value', input.attr('data-disable-with'))
- .attr('disabled', 'disabled');
- });
- };
-
- $(disable_with_form_remote_selector).live('ajax:before.rails', disable_with_input_function);
- $(disable_with_form_not_remote_selector).live('submit.rails', disable_with_input_function);
-
- $(disable_with_form_remote_selector).live('ajax:complete.rails', function () {
- $(this).find(disable_with_input_selector).each(function () {
- var input = $(this);
- input.removeAttr('disabled')
- .val(input.data('enable-with'));
- });
- });
-
- var jqueryVersion = $().jquery;
-
- if (!( (jqueryVersion === '1.4.3') || (jqueryVersion === '1.4.4'))){
- alert('This rails.js does not support the jQuery version you are using. Please read documentation.');
- }
-
-
-});
0  public/stylesheets/.gitkeep
View
No changes.
Please sign in to comment.
Something went wrong with that request. Please try again.