Commit 3971931c700bd4267af06e6a78e4f9a96c5af34c

Authored by Rodrigo Souto
2 parents 785006ab e69c983e

Merge branch 'stable'

app/controllers/public/account_controller.rb
... ... @@ -71,10 +71,6 @@ class AccountController < ApplicationController
71 71 @block_bot = !!session[:may_be_a_bot]
72 72 @invitation_code = params[:invitation_code]
73 73 begin
74   - if params[:user]
75   - params[:user].delete(:password_confirmation_clear)
76   - params[:user].delete(:password_clear)
77   - end
78 74 @user = User.new(params[:user])
79 75 @user.terms_of_use = environment.terms_of_use
80 76 @user.environment = environment
... ...
app/views/layouts/application-ng.rhtml
... ... @@ -69,7 +69,7 @@
69 69 <% end %>
70 70  
71 71 </span>
72   - <form action="/search" class="search_form" method="get" class="clean">
  72 + <form action="/search" class="search_form clean" method="get" id="top-search">
73 73 <input name="query" size="15" title="<%=_('Search...')%>" onfocus="this.form.className='focused';" onblur="this.form.className=''" />
74 74 <div><%=_('Press <strong>Enter</strong> to send the search query.')%></div>
75 75 <%= javascript_tag 'jQuery("#user form input").hint();' %>
... ...
app/views/shared/tiny_mce.rhtml
... ... @@ -20,7 +20,7 @@ tinyMCE.init({
20 20 editor_selector : "mceEditor",
21 21 theme : "advanced",
22 22 relative_urls : false,
23   - remove_script_host : true,
  23 + remove_script_host : false,
24 24 document_base_url : <%= environment.top_url.to_json %>,
25 25 plugins: myplugins,
26 26 theme_advanced_toolbar_location : "top",
... ...
db/migrate/20130117132943_remove_index_articles_on_name.rb 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +class RemoveIndexArticlesOnName < ActiveRecord::Migration
  2 + def self.up
  3 + remove_index :articles, :name
  4 + end
  5 +
  6 + def self.down
  7 + add_index :articles, :name
  8 + end
  9 +end
... ...
plugins/shopping_cart/public/cart.js
... ... @@ -65,7 +65,7 @@ function Cart(config) {
65 65 ).appendTo(li);
66 66 var input = $("input", li)[0];
67 67 input.lastValue = input.value;
68   - input.itemId = item.id;
  68 + input.productId = item.id;
69 69 input.ajustSize = function() {
70 70 var len = this.value.toString().length;
71 71 if(len > 2) len--;
... ... @@ -73,7 +73,7 @@ function Cart(config) {
73 73 };
74 74 input.ajustSize();
75 75 input.onchange = function() {
76   - me.updateQuantity(this, this.itemId, this.value);
  76 + me.updateQuantity(this, this.productId, this.value);
77 77 };
78 78 // document.location.href = "#"+liId;
79 79 // document.location.href = "#"+this.cartElem.id;
... ...
plugins/spaminator/lib/spaminator_plugin/spaminator.rb
... ... @@ -12,7 +12,10 @@ class SpaminatorPlugin::Spaminator
12 12 puts Benchmark.measure { run(environment) }
13 13 end
14 14  
15   - def initialize_logger(logpath)
  15 + def initialize_logger(environment)
  16 + logdir = File.join(RAILS_ROOT, 'log', SpaminatorPlugin.name.underscore)
  17 + File.makedirs(logdir) if !File.exist?(logdir)
  18 + logpath = File.join(logdir, "#{environment.name.to_slug}_#{ENV['RAILS_ENV']}_#{Time.now.strftime("%F_%T")}.log")
16 19 @logger = Logger.new(logpath)
17 20 end
18 21  
... ... @@ -28,8 +31,7 @@ class SpaminatorPlugin::Spaminator
28 31 @report = SpaminatorPlugin::Report.new(:environment => environment,
29 32 :total_people => Person.count,
30 33 :total_comments => Comment.count)
31   - logpath = File.join(SpaminatorPlugin.root_path, 'log', "#{environment.name.to_slug}_#{ENV['RAILS_ENV']}_#{Time.now.strftime("%F_%T")}.log")
32   - self.class.initialize_logger(logpath)
  34 + self.class.initialize_logger(environment)
33 35 end
34 36  
35 37 def run
... ...
test/functional/account_controller_test.rb
... ... @@ -730,12 +730,6 @@ class AccountControllerTest &lt; ActionController::TestCase
730 730 assert_template 'signup'
731 731 end
732 732  
733   - should 'remove useless user data on signup' do
734   - assert_nothing_raised do
735   - new_user :password_clear => 'nothing', :password_confirmation_clear => 'nothing'
736   - end
737   - end
738   -
739 733 should 'login after signup when no e-mail confirmation is required' do
740 734 e = Environment.default
741 735 e.enable('skip_new_user_email_confirmation')
... ...
test/functional/application_controller_test.rb
... ... @@ -217,6 +217,12 @@ class ApplicationControllerTest &lt; ActionController::TestCase
217 217 assert_no_tag :tag => 'div', :attributes => { :id => 'user_box' }, :descendant => { :tag => 'a', :attributes => { :href => 'http://web.mail/' } }
218 218 end
219 219  
  220 + should 'display search form with id' do
  221 + @controller.stubs(:get_layout).returns('application-ng')
  222 + get :index
  223 + assert_tag :tag => 'form', :attributes => { :class => 'search_form clean', :id => 'top-search' }
  224 + end
  225 +
220 226 should 'display theme test panel when testing theme' do
221 227 @request.session[:theme] = 'my-test-theme'
222 228 theme = mock
... ...