[Git][noosfero/noosfero][master] 6 commits: profile_test: don't use deprecated method on ruby 2.3
Bráulio Bhavamitra
gitlab at mg.gitlab.com
Sun Mar 5 18:25:34 BRT 2017
Bráulio Bhavamitra pushed to branch master at Noosfero / noosfero
Commits:
be82b206 by Braulio Bhavamitra at 2017-03-05T17:42:00-03:00
profile_test: don't use deprecated method on ruby 2.3
- - - - -
5bd3c2a4 by Braulio Bhavamitra at 2017-03-05T17:42:23-03:00
application_record: fix infinite loop in development
- - - - -
07d00bdb by Braulio Bhavamitra at 2017-03-05T17:46:41-03:00
travis: update ruby to 2.3.3
- - - - -
b53e4dcc by Braulio Bhavamitra at 2017-03-05T18:00:31-03:00
travis: install geckodriver
- - - - -
89c2fee2 by Braulio Bhavamitra at 2017-03-05T18:03:38-03:00
presenter: lib can't load app
- - - - -
4c773d23 by Braulio Bhavamitra at 2017-03-05T18:08:16-03:00
travis: ensure usage of supported firefox
- - - - -
5 changed files:
- .travis.yml
- app/models/application_record.rb
- lib/presenter.rb → app/presenters/presenter.rb
- config/environments/development.rb
- test/unit/profile_test.rb
Changes:
=====================================
.travis.yml
=====================================
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,7 +18,7 @@ cache: bundler
language: ruby
rvm:
- - 2.3.1
+ - 2.3.3
services:
- postgresql
@@ -32,6 +32,14 @@ addons:
artifacts:
paths:
- $(ls tmp/artifact* | tr "\n" ":")
+ firefox: '48.0.2'
+
+before_install:
+ # geckodriver, from http://www.columbia.edu/~njn2118/journal/2016/10/28.html
+ - wget https://github.com/mozilla/geckodriver/releases/download/v0.14.0/geckodriver-v0.14.0-linux64.tar.gz
+ - mkdir geckodriver
+ - tar -xzf geckodriver-v0.14.0-linux64.tar.gz -C geckodriver
+ - export PATH=$PATH:$PWD/geckodriver
before_script:
- mkdir -p tmp/{pids,cache} log cache
=====================================
app/models/application_record.rb
=====================================
--- a/app/models/application_record.rb
+++ b/app/models/application_record.rb
@@ -19,7 +19,7 @@ class ApplicationRecord < ActiveRecord::Base
self.class.name.underscore
end
- alias :meta_cache_key :cache_key
+ alias_method :meta_cache_key, :cache_key
def cache_key
key = [Noosfero::VERSION, meta_cache_key]
key.unshift ApplicationRecord.connection.schema_search_path
=====================================
lib/presenter.rb → app/presenters/presenter.rb
=====================================
--- a/lib/presenter.rb
+++ b/app/presenters/presenter.rb
@@ -57,7 +57,3 @@ class Presenter
end
end
-# Preload Presenters to allow `Presenter.for()` to work
-Dir.glob(File.join('app', 'presenters', '*.rb')) do |file|
- load file
-end
=====================================
config/environments/development.rb
=====================================
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -6,7 +6,7 @@ Noosfero::Application.configure do
# since you don't have to restart the webserver when you make code changes.
config.cache_classes = false
- config.eager_load = false
+ config.eager_load = true
# Show full error reports and disable caching
config.action_controller.perform_caching = false
=====================================
test/unit/profile_test.rb
=====================================
--- a/test/unit/profile_test.rb
+++ b/test/unit/profile_test.rb
@@ -1587,7 +1587,7 @@ class ProfileTest < ActiveSupport::TestCase
should 'list all events' do
profile = fast_create(Profile)
event1 = Event.new(:name => 'Ze Birthday', :start_date => DateTime.now.in_time_zone)
- event2 = Event.new(:name => 'Mane Birthday', :start_date => DateTime.now.in_time_zone >> 1)
+ event2 = Event.new(:name => 'Mane Birthday', :start_date => DateTime.now.in_time_zone + 1.day)
profile.events << [event1, event2]
assert_includes profile.events, event1
assert_includes profile.events, event2
@@ -1887,7 +1887,7 @@ class ProfileTest < ActiveSupport::TestCase
assert_equal 2, env.profiles.without_image.count
assert_not_includes env.profiles.without_image, with_image
end
-
+
should 'find profiles with top image' do
env = fast_create(Environment)
2.times do |n|
@@ -2245,7 +2245,7 @@ class ProfileTest < ActiveSupport::TestCase
assert_not_includes profiles, p3
assert_not_includes profiles, p4
end
-
+
['post_content', 'edit_profile', 'destroy_profile'].each do |permission|
should "return true in #{permission} when user has this permission" do
profile = fast_create(Profile)
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/d5b8b2ba93d47a6897b189ada055153f3403e1f2...4c773d2309eab1461c3bddd7303f839ed0900752
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170305/a28b7143/attachment-0001.html>
More information about the Noosfero-dev
mailing list