Commit cde58fc45137582878f72d6c777ad39e0f56042d

Authored by Victor Costa
2 parents c9ee3770 7db6046a

Merge branch 'master' into stable

Gemfile
... ... @@ -19,6 +19,7 @@ gem 'grape', '~> 0.2.1'
19 19 gem 'rest-client', '~> 1.6.7'
20 20 gem 'exception_notification', '~> 4.0.1'
21 21 gem 'gettext', '~> 2.2.1', :require => false, :group => :development
  22 +gem 'locale', '~> 2.0.5'
22 23  
23 24 # FIXME list here all actual dependencies (i.e. the ones in debian/control),
24 25 # with their GEM names (not the Debian package names)
... ...
app/helpers/profile_helper.rb
... ... @@ -41,6 +41,7 @@ module ProfileHelper
41 41 :birth_date => _('Date of birth'),
42 42 :created_at => _('Profile created at'),
43 43 :members_count => _('Members'),
  44 + :privacy_setting => _('Privacy setting'),
44 45 :article_tags => _('Tags')
45 46 }
46 47  
... ... @@ -64,7 +65,7 @@ module ProfileHelper
64 65  
65 66 def title(field, entry = nil)
66 67 return self.send("#{field}_custom_title", entry) if MULTIPLE[kind].include?(field) && entry.present?
67   - CUSTOM_LABELS[field.to_sym] || field.to_s.humanize
  68 + CUSTOM_LABELS[field.to_sym] || _(field.to_s.humanize)
68 69 end
69 70  
70 71 def display_field(field)
... ...
config/application.rb
... ... @@ -115,6 +115,9 @@ module Noosfero
115 115 :key => '_noosfero_session',
116 116 }
117 117  
  118 + config.time_zone = File.read('/etc/timezone').split("\n").first
  119 + config.active_record.default_timezone = :local
  120 +
118 121 config.i18n.load_path += Dir.glob "#{Rails.root}/{baseplugins,config/plugins/*}/locales/*.{rb,yml}"
119 122  
120 123 Noosfero::Plugin.setup(config)
... ...
debian/changelog
... ... @@ -22,6 +22,12 @@ noosfero (0.99.0~rc20140618202455) wheezy-test; urgency=low
22 22  
23 23 -- Rodrigo Souto <rodrigo@colivre.coop.br> Wed, 18 Jun 2014 20:25:01 +0000
24 24  
  25 +noosfero (0.47.5) unstable; urgency=low
  26 +
  27 + * Bugfixes release
  28 +
  29 + -- Daniela Soares Feitosa <daniela@colivre.coop.br> Thu, 23 Oct 2014 02:24:14 +0000
  30 +
25 31 noosfero (0.47.4) unstable; urgency=low
26 32  
27 33 * Bugfixes and performance optimizations
... ...
lib/tasks/ci.rake 0 → 100644
... ... @@ -0,0 +1,34 @@
  1 +namespace :ci do
  2 +
  3 + desc 'Continuous integration smoke test'
  4 + task :smoke do
  5 +
  6 + current_branch = `git rev-parse --abbrev-ref HEAD`.strip
  7 + from = ENV['PREV_HEAD'] || "origin/#{current_branch}"
  8 + to = ENV['HEAD'] || current_branch
  9 + changed_files = `git diff --name-only #{from}..#{to}`.split
  10 +
  11 + unless $stdout.isatty
  12 + sh "git", "log", "--name-status", "#{from}..#{to}"
  13 + end
  14 +
  15 + # explicitly changed tests
  16 + tests = changed_files.select { |f| f =~ /test\/.*_test\.rb$/ }
  17 + features = changed_files.select { |f| f =~ /\.feature$/ }
  18 +
  19 + # match changed code files to their respective tests
  20 + changed_files.each do |f|
  21 + if f =~ /^(app|lib)\//
  22 + basename = File.basename(f, '.rb')
  23 + Dir.glob("test/**/#{basename}_test.rb").each do |t|
  24 + tests << t unless tests.include?(t)
  25 + end
  26 + end
  27 + end
  28 +
  29 + sh 'testrb', *tests unless tests.empty?
  30 + sh 'cucumber', *features unless features.empty?
  31 + sh 'cucumber', '-p', 'selenium', *features unless features.empty?
  32 + end
  33 +
  34 +end
... ...
plugins/remote_user/lib/remote_user_plugin.rb
... ... @@ -24,6 +24,7 @@ class RemoteUserPlugin &lt; Noosfero::Plugin
24 24 self.current_user = User.find_by_login(remote_user)
25 25 unless self.current_user
26 26 self.current_user = User.create!(:login => remote_user, :email => (remote_user + '@remote.user'), :password => ('pw4'+remote_user), :password_confirmation => ('pw4'+remote_user))
  27 + self.current_user.activate
27 28 end
28 29 self.current_user.save!
29 30 else
... ... @@ -34,6 +35,7 @@ class RemoteUserPlugin &lt; Noosfero::Plugin
34 35 self.current_user = User.find_by_login(remote_user)
35 36 unless self.current_user
36 37 self.current_user = User.create!(:login => remote_user, :email => (remote_user + '@remote.user'), :password => ('pw4'+remote_user), :password_confirmation => ('pw4'+remote_user))
  38 + self.current_user.activate
37 39 end
38 40 self.current_user.save!
39 41 end
... ...
plugins/remote_user/test/functional/remote_user_plugin_test.rb
... ... @@ -52,6 +52,7 @@ class AccountControllerTest &lt; ActionController::TestCase
52 52  
53 53 assert_equal 1, User.count
54 54 assert_equal "testuser", User.last.login
  55 + assert_equal true, User.last.activated?
55 56 assert_equal User.last.id, session[:user]
56 57 end
57 58  
... ... @@ -67,6 +68,7 @@ class AccountControllerTest &lt; ActionController::TestCase
67 68  
68 69 assert_equal 2, User.count
69 70 assert_equal "another_user", User.last.login
  71 + assert_equal true, User.last.activated?
70 72 assert_equal User.last.id, session[:user]
71 73 end
72 74 end
... ...
plugins/send_email/controllers/send_email_plugin_admin_controller.rb
1 1 class SendEmailPluginAdminController < PluginsController
2   - append_view_path File.join(File.dirname(__FILE__) + '/../views')
3 2  
4 3 def index
5 4 @environment = environment
... ...
plugins/send_email/lib/send_email_plugin.rb
  1 +require 'send_email_plugin/core_ext'
  2 +
1 3 class SendEmailPlugin < Noosfero::Plugin
2 4  
3 5 def self.plugin_name
... ...
plugins/send_email/lib/send_email_plugin/core_ext.rb 0 → 100644
... ... @@ -0,0 +1,4 @@
  1 +Environment.class_eval do
  2 + attr_accessible :send_email_plugin_allow_to
  3 +end
  4 +
... ...
plugins/send_email/views/send_email_plugin_admin/index.html.erb 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +<h1><%= _("SendEmailPlugin's config") %></h1>
  2 +
  3 +<%= form_for :environment, :url => {:action => 'index'}, :html => {:method => 'post'} do |f| %>
  4 + <%= labelled_form_field(_("E-Mail addresses you want to allow to send"), f.text_area(:send_email_plugin_allow_to, :rows => 8)) %>
  5 + <small><%= _('(list of email addresses separated by comma)') %></small>
  6 + <% button_bar do %>
  7 + <%= submit_button 'save', _('Save'), :cancel => {:controller => 'plugins'} %>
  8 + <% end %>
  9 +<% end %>
... ...
plugins/send_email/views/send_email_plugin_admin/index.rhtml
... ... @@ -1,9 +0,0 @@
1   -<h1><%= _("SendEmailPlugin's config") %></h1>
2   -
3   -<%= form_for :environment, :url => {:action => 'index'}, :html => {:method => 'post'} do |f| %>
4   - <%= labelled_form_field(_("E-Mail addresses you want to allow to send"), f.text_area(:send_email_plugin_allow_to, :rows => 8)) %>
5   - <small><%= _('(list of email addresses separated by comma)') %></small>
6   - <% button_bar do %>
7   - <%= submit_button 'save', _('Save'), :cancel => {:controller => 'plugins'} %>
8   - <% end %>
9   -<% end %>