From ed22faeaed753897bc93766e84d640ebf9aafe7b Mon Sep 17 00:00:00 2001 From: Marc Anguera Insa Date: Wed, 15 Aug 2018 18:52:35 +0200 Subject: [PATCH 01/17] move weekly digest email to sidekiq-cron and remove whenever --- Gemfile | 6 +--- Gemfile.lock | 22 +++++------- app/jobs/organization_notifier_job.rb | 12 +++++++ app/mailers/.gitkeep | 0 app/mailers/.keep | 0 app/services/organization_notifier_service.rb | 14 -------- bin/whenever | 16 --------- config/schedule.rb | 34 ------------------- config/schedule.yml | 4 +++ 9 files changed, 26 insertions(+), 82 deletions(-) create mode 100644 app/jobs/organization_notifier_job.rb delete mode 100644 app/mailers/.gitkeep delete mode 100644 app/mailers/.keep delete mode 100644 app/services/organization_notifier_service.rb delete mode 100755 bin/whenever delete mode 100644 config/schedule.rb diff --git a/Gemfile b/Gemfile index e034724ba..22df85abe 100644 --- a/Gemfile +++ b/Gemfile @@ -17,17 +17,13 @@ gem 'unicorn' gem 'kaminari', '~> 1.1.1' gem "simple_form", ">= 3.0.0" gem 'rollbar', '2.8.3' -gem 'whenever', require: false gem 'prawn', '~> 2.2.0' gem 'prawn-table', '~> 0.2.2' gem 'elasticsearch-model' gem 'elasticsearch-rails' gem 'skylight' gem 'sidekiq', '5.1.3' -gem 'sidekiq-cron', '0.6.3' -# TODO: remove this once the following issue has been addressed -# https://github.com/ondrejbartas/sidekiq-cron/issues/199 -gem 'rufus-scheduler', '~> 3.4.2' +gem 'sidekiq-cron', '~> 1.0.4' # Assets gem 'jquery-rails', '>= 4.2.0' diff --git a/Gemfile.lock b/Gemfile.lock index 1a521d77c..2aaabe8e4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -94,7 +94,6 @@ GEM xpath (~> 3.2) childprocess (0.9.0) ffi (~> 1.0, >= 1.0.11) - chronic (0.10.2) coderay (1.1.2) coffee-rails (4.1.0) coffee-script (>= 2.2.0) @@ -139,7 +138,7 @@ GEM multi_json erubi (1.7.1) erubis (2.7.0) - et-orbi (1.1.2) + et-orbi (1.1.4) tzinfo execjs (2.6.0) fabrication (2.11.3) @@ -151,6 +150,9 @@ GEM formtastic (3.1.5) actionpack (>= 3.2.13) formtastic_i18n (0.6.0) + fugit (1.1.5) + et-orbi (~> 1.1, >= 1.1.3) + raabro (~> 1.1) gli (2.16.0) globalid (0.4.1) activesupport (>= 4.2.0) @@ -234,6 +236,7 @@ GEM public_suffix (2.0.5) pundit (2.0.0) activesupport (>= 3.0.0) + raabro (1.1.6) rack (1.6.11) rack-protection (2.0.1) rack @@ -313,8 +316,6 @@ GEM unicode-display_width (~> 1.0, >= 1.0.1) ruby-progressbar (1.9.0) rubyzip (1.2.2) - rufus-scheduler (3.4.2) - et-orbi (~> 1.0) sass (3.4.21) sass-rails (5.0.7) railties (>= 4.0.0, < 6) @@ -334,8 +335,8 @@ GEM connection_pool (~> 2.2, >= 2.2.0) rack-protection (>= 1.5.0) redis (>= 3.3.5, < 5) - sidekiq-cron (0.6.3) - rufus-scheduler (>= 3.3.0) + sidekiq-cron (1.0.4) + fugit (~> 1.1) sidekiq (>= 4.2.1) simple_form (3.1.0) actionpack (~> 4.0) @@ -388,10 +389,7 @@ GEM nokogiri (~> 1.6) rubyzip (~> 1.0) selenium-webdriver (~> 3.0) - whenever (0.9.4) - chronic (>= 0.6.3) xpath (3.2.0) - nokogiri (~> 1.8) PLATFORMS ruby @@ -433,13 +431,12 @@ DEPENDENCIES rollbar (= 2.8.3) rspec-rails (~> 3.8.2) rubocop (~> 0.52.1) - rufus-scheduler (~> 3.4.2) sass-rails (~> 5.0.7) select2-rails selenium-webdriver (~> 3.141) shoulda-matchers (~> 3.1.2) sidekiq (= 5.1.3) - sidekiq-cron (= 0.6.3) + sidekiq-cron (~> 1.0.4) simple_form (>= 3.0.0) simplecov (~> 0.16.1) skylight @@ -447,10 +444,9 @@ DEPENDENCIES unicorn web-console (= 2.1.3) webdrivers (~> 3.0) - whenever RUBY VERSION ruby 2.3.0p0 BUNDLED WITH - 1.16.2 + 1.17.3 diff --git a/app/jobs/organization_notifier_job.rb b/app/jobs/organization_notifier_job.rb new file mode 100644 index 000000000..183f83d07 --- /dev/null +++ b/app/jobs/organization_notifier_job.rb @@ -0,0 +1,12 @@ +class OrganizationNotifierJob < ActiveJob::Base + queue_as :cron + + def perform + Organization.all.find_each do |org| + posts = org.posts.active.of_active_members.from_last_week + if posts.present? + OrganizationNotifier.recent_posts(posts).deliver_later + end + end + end +end diff --git a/app/mailers/.gitkeep b/app/mailers/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/app/mailers/.keep b/app/mailers/.keep deleted file mode 100644 index e69de29bb..000000000 diff --git a/app/services/organization_notifier_service.rb b/app/services/organization_notifier_service.rb deleted file mode 100644 index cd00e0013..000000000 --- a/app/services/organization_notifier_service.rb +++ /dev/null @@ -1,14 +0,0 @@ -class OrganizationNotifierService - def initialize(organization) - @organization = organization - end - - def send_recent_posts_to_online_members - @organization.each do |org| - posts = org.posts.active.of_active_members.from_last_week - if posts.present? - OrganizationNotifier.recent_posts(posts).deliver_now - end - end - end -end diff --git a/bin/whenever b/bin/whenever deleted file mode 100755 index 373d0612a..000000000 --- a/bin/whenever +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'whenever' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('whenever', 'whenever') diff --git a/config/schedule.rb b/config/schedule.rb deleted file mode 100644 index bf3363e67..000000000 --- a/config/schedule.rb +++ /dev/null @@ -1,34 +0,0 @@ -set :environment, "production" -set :output, "log/cron_log.log" - -every :monday, at: "9am" do - runner "OrganizationNotifierService.new(Organization.all). - send_recent_posts_to_online_members" -end - -# Cada vez que se modifique este archivo, crontab debe actualizarse: -# whenever --update-crontab - -# Use this file to easily define all of your cron jobs. -# -# It's helpful, but not entirely necessary to understand cron before proceeding. -# http://en.wikipedia.org/wiki/Cron - -# Example: -# -# set :output, "/path/to/my/cron_log.log" -# -# every 2.hours do -# command "/usr/bin/some_great_command" -# runner "MyModel.some_method" -# rake "some:great:rake:task" -# end -# -# every 4.days do -# runner "AnotherModel.prune_old_records" -# end - -# Learn more: http://github.com/javan/whenever - -# rake "pruebas:hello" #task en lib/tasks para comprobar el funcionamiento de -# whenever diff --git a/config/schedule.yml b/config/schedule.yml index 56487c3a6..7116ad52d 100644 --- a/config/schedule.yml +++ b/config/schedule.yml @@ -2,3 +2,7 @@ send_push_notifications_job: cron: '*/5 * * * *' class: 'SendPushNotificationsJob' queue: cron +weekly_digest: + cron: '0 9 * * 1' # every monday at 9am + class: 'OrganizationNotifierJob' + queue: cron From 337dc9784e6dc6ea7718180b603fd25e54b5fd0d Mon Sep 17 00:00:00 2001 From: Marc Anguera Insa Date: Wed, 5 Sep 2018 01:01:48 +0200 Subject: [PATCH 02/17] add OrganizationNotifierJob docs --- app/jobs/organization_notifier_job.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/jobs/organization_notifier_job.rb b/app/jobs/organization_notifier_job.rb index 183f83d07..e11250e62 100644 --- a/app/jobs/organization_notifier_job.rb +++ b/app/jobs/organization_notifier_job.rb @@ -1,3 +1,11 @@ +# A weekly digest email. +# +# Strategy: go throught all organizations and take latest active posts from last week +# posted by active members. Send an email to all active and online members +# with the email notifications enabled with those posts. + +# Schedule defined in config/schedule.yml file. + class OrganizationNotifierJob < ActiveJob::Base queue_as :cron From eb06ce4812e6bc5359c94ad101ccbff6eef112a7 Mon Sep 17 00:00:00 2001 From: Marc Anguera Insa Date: Wed, 13 Feb 2019 21:24:57 +0100 Subject: [PATCH 03/17] update to latest sidekiq-cron (v1.1.0) --- Gemfile | 2 +- Gemfile.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 22df85abe..bd1a7e4af 100644 --- a/Gemfile +++ b/Gemfile @@ -23,7 +23,7 @@ gem 'elasticsearch-model' gem 'elasticsearch-rails' gem 'skylight' gem 'sidekiq', '5.1.3' -gem 'sidekiq-cron', '~> 1.0.4' +gem 'sidekiq-cron', '~> 1.1.0' # Assets gem 'jquery-rails', '>= 4.2.0' diff --git a/Gemfile.lock b/Gemfile.lock index 2aaabe8e4..b0b891312 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -138,7 +138,7 @@ GEM multi_json erubi (1.7.1) erubis (2.7.0) - et-orbi (1.1.4) + et-orbi (1.1.7) tzinfo execjs (2.6.0) fabrication (2.11.3) @@ -150,8 +150,8 @@ GEM formtastic (3.1.5) actionpack (>= 3.2.13) formtastic_i18n (0.6.0) - fugit (1.1.5) - et-orbi (~> 1.1, >= 1.1.3) + fugit (1.1.8) + et-orbi (~> 1.1, >= 1.1.7) raabro (~> 1.1) gli (2.16.0) globalid (0.4.1) @@ -335,7 +335,7 @@ GEM connection_pool (~> 2.2, >= 2.2.0) rack-protection (>= 1.5.0) redis (>= 3.3.5, < 5) - sidekiq-cron (1.0.4) + sidekiq-cron (1.1.0) fugit (~> 1.1) sidekiq (>= 4.2.1) simple_form (3.1.0) @@ -436,7 +436,7 @@ DEPENDENCIES selenium-webdriver (~> 3.141) shoulda-matchers (~> 3.1.2) sidekiq (= 5.1.3) - sidekiq-cron (~> 1.0.4) + sidekiq-cron (~> 1.1.0) simple_form (>= 3.0.0) simplecov (~> 0.16.1) skylight From 4dfc623ee299d264abefa14b21be6223680d99d0 Mon Sep 17 00:00:00 2001 From: Marc Anguera Insa Date: Sat, 9 Mar 2019 15:10:17 +0100 Subject: [PATCH 04/17] update more dev deps: rubocop, byebug and fabrication :tada: --- .rubocop.yml | 20 ++++++++++---------- Gemfile | 6 +++--- Gemfile.lock | 33 ++++++++++++++++++--------------- 3 files changed, 31 insertions(+), 28 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 62dfcb6ab..ccbfce7ee 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -66,6 +66,9 @@ Style/Documentation: Layout/DotPosition: EnforcedStyle: trailing +Layout/ConditionPosition: + Enabled: false + Style/DoubleNegation: Enabled: false @@ -84,9 +87,6 @@ Style/EvenOdd: Naming/FileName: Enabled: false -Style/FlipFlop: - Enabled: false - Style/FormatString: Enabled: false @@ -187,16 +187,16 @@ Style/StringLiterals: Style/VariableInterpolation: Enabled: false -Style/TrailingCommaInLiteral: +Style/TrailingCommaInArrayLiteral: Enabled: false -Style/TrailingCommaInArguments: +Style/TrailingCommaInHashLiteral: Enabled: false -Style/TrivialAccessors: +Style/TrailingCommaInArguments: Enabled: false -Style/VariableInterpolation: +Style/TrivialAccessors: Enabled: false Style/WhenThen: @@ -214,9 +214,6 @@ Lint/AmbiguousRegexpLiteral: Lint/AssignmentInCondition: Enabled: false -Lint/ConditionPosition: - Enabled: false - Lint/DeprecatedClassMethods: Enabled: false @@ -243,3 +240,6 @@ Lint/UnderscorePrefixedVariableName: Lint/Void: Enabled: false + +Lint/FlipFlop: + Enabled: false diff --git a/Gemfile b/Gemfile index bd1a7e4af..bcfb46a53 100644 --- a/Gemfile +++ b/Gemfile @@ -36,7 +36,7 @@ gem 'select2-rails' group :development do gem "binding_of_caller", '~> 0.8.0' gem "better_errors", '~> 2.4.0' - gem 'rubocop', '~> 0.52.1', require: false + gem 'rubocop', '~> 0.65.0', require: false gem 'web-console', '2.1.3' gem 'capistrano', '~> 3.1' gem 'capistrano-rails', '~> 1.1' @@ -48,14 +48,14 @@ group :development do end group :development, :test do - gem "byebug" + gem "byebug", '~> 11.0' end group :test do gem "rspec-rails", '~> 3.8.2' gem "database_cleaner", '1.6.2' gem 'shoulda-matchers', '~> 3.1.2' - gem 'fabrication' + gem 'fabrication', '~> 2.20' gem 'faker', '~> 1.9' gem 'capybara', '~> 3.13' gem 'selenium-webdriver', '~> 3.141' diff --git a/Gemfile.lock b/Gemfile.lock index b0b891312..0fe4d2e30 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -69,8 +69,7 @@ GEM autoprefixer-rails (>= 5.2.1) sass (>= 3.3.4) builder (3.2.3) - byebug (4.0.5) - columnize (= 0.9.0) + byebug (11.0.0) capistrano (3.4.0) i18n rake (>= 10.0.0) @@ -102,7 +101,6 @@ GEM coffee-script-source execjs coffee-script-source (1.8.0) - columnize (0.9.0) concurrent-ruby (1.1.3) connection_pool (2.2.1) crass (1.0.4) @@ -141,7 +139,7 @@ GEM et-orbi (1.1.7) tzinfo execjs (2.6.0) - fabrication (2.11.3) + fabrication (2.20.1) faker (1.9.3) i18n (>= 0.7) faraday (0.9.1) @@ -172,6 +170,7 @@ GEM has_scope (~> 0.6) railties (>= 4.2, <= 5.2) responders + jaro_winkler (1.5.2) jquery-rails (4.3.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) @@ -220,19 +219,20 @@ GEM nokogiri (1.8.5) mini_portile2 (~> 2.3.0) orm_adapter (0.5.0) - parallel (1.12.1) - parser (2.5.0.0) + parallel (1.14.0) + parser (2.6.0.0) ast (~> 2.4.0) pdf-core (0.7.0) pg (0.17.1) polyamorous (1.3.3) activerecord (>= 3.0) - powerpack (0.1.1) + powerpack (0.1.2) prawn (2.2.2) pdf-core (~> 0.7.0) ttfunk (~> 1.5) prawn-table (0.2.2) prawn (>= 1.3.0, < 3.0.0) + psych (3.1.0) public_suffix (2.0.5) pundit (2.0.0) activesupport (>= 3.0.0) @@ -307,14 +307,16 @@ GEM rspec-mocks (~> 3.8.0) rspec-support (~> 3.8.0) rspec-support (3.8.0) - rubocop (0.52.1) + rubocop (0.65.0) + jaro_winkler (~> 1.5.1) parallel (~> 1.10) - parser (>= 2.4.0.2, < 3.0) + parser (>= 2.5, != 2.5.1.1) powerpack (~> 0.1) + psych (>= 3.1.0) rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.0, >= 1.0.1) - ruby-progressbar (1.9.0) + unicode-display_width (~> 1.4.0) + ruby-progressbar (1.10.0) rubyzip (1.2.2) sass (3.4.21) sass-rails (5.0.7) @@ -372,7 +374,7 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.7.2) - unicode-display_width (1.3.0) + unicode-display_width (1.4.1) unicorn (5.0.1) kgio (~> 2.6) rack @@ -390,6 +392,7 @@ GEM rubyzip (~> 1.0) selenium-webdriver (~> 3.0) xpath (3.2.0) + nokogiri (~> 1.8) PLATFORMS ruby @@ -400,7 +403,7 @@ DEPENDENCIES better_errors (~> 2.4.0) binding_of_caller (~> 0.8.0) bootstrap-sass - byebug + byebug (~> 11.0) capistrano (~> 3.1) capistrano-rails (~> 1.1) capistrano-rbenv (~> 2.1) @@ -412,7 +415,7 @@ DEPENDENCIES dotenv-rails (~> 2.7.1) elasticsearch-model elasticsearch-rails - fabrication + fabrication (~> 2.20) faker (~> 1.9) has_scope hstore_translate @@ -430,7 +433,7 @@ DEPENDENCIES rdiscount rollbar (= 2.8.3) rspec-rails (~> 3.8.2) - rubocop (~> 0.52.1) + rubocop (~> 0.65.0) sass-rails (~> 5.0.7) select2-rails selenium-webdriver (~> 3.141) From 893f7f4f8239118e6146230dc507c8f5df2ca2ee Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Wed, 22 Jan 2020 11:26:17 +0100 Subject: [PATCH 05/17] Fix production deployment This does the trick. I never understood what that metal.* is but it now times out. Manual configuration in the old production server not persisted anywhere else? I used locally to deploy with Capistrano so this is working. --- config/deploy/production.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/deploy/production.rb b/config/deploy/production.rb index a740b3ae9..240ae0b0a 100644 --- a/config/deploy/production.rb +++ b/config/deploy/production.rb @@ -1 +1 @@ -server 'metal.timeoverflow.org', user: 'timeoverflow', roles: %w(app db web) +server 'www.timeoverflow.org', user: 'timeoverflow', roles: %w(app db web) From e572437f110a977eddd801d4aebfa9bf599ce88d Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Tue, 21 Jan 2020 17:45:58 +0100 Subject: [PATCH 06/17] Remove next environment It was used while migration the production server and since this one and production configs are almost exact copies (just rails_env differs) it's no longer needed. And this brings simplicity back to this repo. The most noticeable change is the removal of `url` from production's database config as DATABASE_URL got removed in https://github.com/coopdevs/timeoverflow-provisioning/pull/21 two years ago and it's true in production: ``` timeoverflow@timeoverflow-production:~$ env | grep DATABASE DATABASE_NAME=xxx DATABASE_USER=xxx DATABASE_PASSWORD=xxx ``` --- config/database.yml | 4 ---- config/deploy/next.rb | 1 - config/environments/next.rb | 1 - config/secrets.yml | 3 --- 4 files changed, 9 deletions(-) delete mode 100644 config/deploy/next.rb delete mode 120000 config/environments/next.rb diff --git a/config/database.yml b/config/database.yml index cc142aa2d..ea70e91a2 100644 --- a/config/database.yml +++ b/config/database.yml @@ -33,7 +33,3 @@ staging: production: <<: *defaults database: <%= ENV.fetch('DATABASE_NAME', 'timeoverflow_production') %> - -next: - <<: *defaults - database: <%= ENV.fetch('DATABASE_NAME', 'timeoverflow_production') %> diff --git a/config/deploy/next.rb b/config/deploy/next.rb deleted file mode 100644 index 6b603eb07..000000000 --- a/config/deploy/next.rb +++ /dev/null @@ -1 +0,0 @@ -server 'next.timeoverflow.org', user: 'timeoverflow', roles: %w(app db web) diff --git a/config/environments/next.rb b/config/environments/next.rb deleted file mode 120000 index 0c153beb0..000000000 --- a/config/environments/next.rb +++ /dev/null @@ -1 +0,0 @@ -config/environments/production.rb \ No newline at end of file diff --git a/config/secrets.yml b/config/secrets.yml index 8dc976e9c..f915c5e4c 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -9,6 +9,3 @@ staging: production: secret_key_base: <%= ENV['SECRET_TOKEN'] %> - -next: - secret_key_base: <%= ENV['SECRET_TOKEN'] %> From 75ad2130f3d34aab535ae787d01ffbf96b66da22 Mon Sep 17 00:00:00 2001 From: marisa Date: Wed, 12 Feb 2020 13:51:56 +0100 Subject: [PATCH 07/17] Responsive table with horizontal scroll --- app/views/statistics/statistics_all_transfers.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/statistics/statistics_all_transfers.html.erb b/app/views/statistics/statistics_all_transfers.html.erb index 5cb16c02a..823b9aa4e 100644 --- a/app/views/statistics/statistics_all_transfers.html.erb +++ b/app/views/statistics/statistics_all_transfers.html.erb @@ -2,7 +2,7 @@ <%= t 'global.statistics' %>: <%= t '.transfers' %>
-
+
From 405adef71f00765f0de8d005f8b998d0bce3fbc9 Mon Sep 17 00:00:00 2001 From: marisa Date: Thu, 13 Feb 2020 11:08:51 +0100 Subject: [PATCH 08/17] Do tables responsive --- app/views/statistics/statistics_inactive_users.html.erb | 2 +- app/views/statistics/statistics_last_login.html.erb | 2 +- app/views/statistics/statistics_type_swaps.html.erb | 2 +- app/views/statistics/statistics_without_offers.html.erb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/statistics/statistics_inactive_users.html.erb b/app/views/statistics/statistics_inactive_users.html.erb index 756fadd77..addc8cfc2 100644 --- a/app/views/statistics/statistics_inactive_users.html.erb +++ b/app/views/statistics/statistics_inactive_users.html.erb @@ -2,7 +2,7 @@ <%= t 'global.statistics' %>: <%= t '.inactive_users' %>
-
+
diff --git a/app/views/statistics/statistics_last_login.html.erb b/app/views/statistics/statistics_last_login.html.erb index d2150e6d9..296127761 100644 --- a/app/views/statistics/statistics_last_login.html.erb +++ b/app/views/statistics/statistics_last_login.html.erb @@ -1,7 +1,7 @@

<%= t 'global.statistics' %>: <%= t '.last_login' %>

-
+
diff --git a/app/views/statistics/statistics_type_swaps.html.erb b/app/views/statistics/statistics_type_swaps.html.erb index cedb0859f..bd8385b13 100644 --- a/app/views/statistics/statistics_type_swaps.html.erb +++ b/app/views/statistics/statistics_type_swaps.html.erb @@ -1,7 +1,7 @@

<%= t 'global.statistics' %>: <%= t '.type_of_swaps' %>

-
+
diff --git a/app/views/statistics/statistics_without_offers.html.erb b/app/views/statistics/statistics_without_offers.html.erb index 4b61a62f1..0dc738d2c 100644 --- a/app/views/statistics/statistics_without_offers.html.erb +++ b/app/views/statistics/statistics_without_offers.html.erb @@ -1,7 +1,7 @@

<%= t 'global.statistics' %>: <%= t '.without_offers' %>

-
+
From 156b5e7614e8c86a0722f5fc912b5381b00cb3a7 Mon Sep 17 00:00:00 2001 From: marisa Date: Mon, 17 Feb 2020 12:34:38 +0100 Subject: [PATCH 09/17] Set col to a different values to improve responsiveness --- app/views/tags/_grouped_index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/tags/_grouped_index.html.erb b/app/views/tags/_grouped_index.html.erb index befe8c6c2..a3be369bb 100644 --- a/app/views/tags/_grouped_index.html.erb +++ b/app/views/tags/_grouped_index.html.erb @@ -2,7 +2,7 @@ <% alpha_tags.each_slice(6) do |gr| %>
<% gr.each do |kg, vg| %> -
+

<%= kg %>

From 1116272a131b8f7326c3ac794f3d71adf60847c6 Mon Sep 17 00:00:00 2001 From: marisa Date: Tue, 18 Feb 2020 12:11:16 +0100 Subject: [PATCH 10/17] Fix typo in Contributing --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 107016e16..7efd3bf7d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,4 +16,4 @@ Visita [la guía para empezar a desarrollar para timeoverflow](https://github.co - Modifica las traducciones directamente en el proyecto [coopdevs/timeoverflow](https://www.localeapp.com/projects/10031) en Locale. - **Eso es todo!** -- El mantenedor obtendrá las nuevas tradcciones del proyecto de Locale y las publicará en Github. +- El mantenedor obtendrá las nuevas traducciones del proyecto de Locale y las publicará en Github. From 4c87fe4a92c0f916840ef666eb3d2949565db523 Mon Sep 17 00:00:00 2001 From: Marc Anguera Insa Date: Sun, 23 Feb 2020 15:02:02 +0100 Subject: [PATCH 11/17] use deliver_now as sidekiq does not support to serialize ActiveRecord::AssociationRelation + update to latest Rubocop --- .rubocop.yml | 12 +++--------- Gemfile | 2 +- Gemfile.lock | 23 ++++++++++------------- app/jobs/organization_notifier_job.rb | 2 +- 4 files changed, 15 insertions(+), 24 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index ccbfce7ee..d36a46731 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -5,9 +5,6 @@ AllCops: Naming/AccessorMethodName: Enabled: false -Rails/ActionFilter: - Enabled: false - Style/Alias: Enabled: false @@ -57,9 +54,6 @@ Style/CommentAnnotation: Metrics/CyclomaticComplexity: Enabled: false -Rails/Delegate: - Enabled: false - Style/Documentation: Enabled: false @@ -114,7 +108,7 @@ Style/LambdaCall: Style/LineEndConcatenation: Enabled: false -Metrics/LineLength: +Layout/LineLength: Max: 80 Metrics/MethodLength: @@ -154,7 +148,7 @@ Style/PerlBackrefs: Enabled: false Naming/PredicateName: - NamePrefixBlacklist: + ForbiddenPrefixes: - is_ Style/Proc: @@ -220,7 +214,7 @@ Lint/DeprecatedClassMethods: Lint/ElseLayout: Enabled: false -Lint/HandleExceptions: +Lint/SuppressedException: Enabled: false Lint/LiteralInInterpolation: diff --git a/Gemfile b/Gemfile index 5b051e55a..e5cb555da 100644 --- a/Gemfile +++ b/Gemfile @@ -35,7 +35,7 @@ gem 'select2-rails' group :development do gem "binding_of_caller", '~> 0.8.0' gem "better_errors", '~> 2.4.0' - gem 'rubocop', '~> 0.65.0', require: false + gem 'rubocop', '~> 0.80.0', require: false gem 'web-console', '2.1.3' gem 'capistrano', '~> 3.1' gem 'capistrano-rails', '~> 1.1' diff --git a/Gemfile.lock b/Gemfile.lock index 67b65463b..b2ad984fb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -168,7 +168,7 @@ GEM has_scope (~> 0.6) railties (>= 4.2, <= 5.2) responders - jaro_winkler (1.5.2) + jaro_winkler (1.5.4) jquery-rails (4.3.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) @@ -216,20 +216,18 @@ GEM nokogiri (1.10.3) mini_portile2 (~> 2.4.0) orm_adapter (0.5.0) - parallel (1.14.0) - parser (2.6.0.0) + parallel (1.19.1) + parser (2.7.0.2) ast (~> 2.4.0) pdf-core (0.7.0) pg (0.21.0) polyamorous (1.3.3) activerecord (>= 3.0) - powerpack (0.1.2) prawn (2.2.2) pdf-core (~> 0.7.0) ttfunk (~> 1.5) prawn-table (0.2.2) prawn (>= 1.3.0, < 3.0.0) - psych (3.1.0) public_suffix (2.0.5) pundit (2.0.0) activesupport (>= 3.0.0) @@ -285,6 +283,7 @@ GEM http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) + rexml (3.2.4) rollbar (2.8.3) multi_json rspec-core (3.8.0) @@ -304,16 +303,14 @@ GEM rspec-mocks (~> 3.8.0) rspec-support (~> 3.8.0) rspec-support (3.8.0) - rubocop (0.65.0) + rubocop (0.80.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) - parser (>= 2.5, != 2.5.1.1) - powerpack (~> 0.1) - psych (>= 3.1.0) + parser (>= 2.7.0.1) rainbow (>= 2.2.2, < 4.0) + rexml ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.0, >= 1.0.1) - unicode-display_width (~> 1.4.0) + unicode-display_width (>= 1.4.0, < 1.7) ruby-progressbar (1.10.1) rubyzip (1.2.3) sass (3.4.21) @@ -372,7 +369,7 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.7.2) - unicode-display_width (1.4.1) + unicode-display_width (1.6.1) unicorn (5.0.1) kgio (~> 2.6) rack @@ -429,7 +426,7 @@ DEPENDENCIES rdiscount rollbar (= 2.8.3) rspec-rails (~> 3.8.2) - rubocop (~> 0.65.0) + rubocop (~> 0.80.0) sass-rails (~> 5.0.7) select2-rails selenium-webdriver (~> 3.142) diff --git a/app/jobs/organization_notifier_job.rb b/app/jobs/organization_notifier_job.rb index e11250e62..1bd46729c 100644 --- a/app/jobs/organization_notifier_job.rb +++ b/app/jobs/organization_notifier_job.rb @@ -13,7 +13,7 @@ def perform Organization.all.find_each do |org| posts = org.posts.active.of_active_members.from_last_week if posts.present? - OrganizationNotifier.recent_posts(posts).deliver_later + OrganizationNotifier.recent_posts(posts).deliver_now end end end From 17bd6afec1419dc389b513e23e3a790df12b6de8 Mon Sep 17 00:00:00 2001 From: Marc Anguera Insa Date: Sun, 23 Feb 2020 18:09:40 +0100 Subject: [PATCH 12/17] fixing features specs in travis --- .gitignore | 2 ++ Gemfile | 2 +- Gemfile.lock | 35 +++++++++---------- spec/controllers/inquiries_controller_spec.rb | 12 +++---- .../multi_transfers_controller_spec.rb | 4 --- spec/controllers/offers_controller_spec.rb | 4 --- spec/controllers/transfers_controller_spec.rb | 4 --- spec/controllers/users_controller_spec.rb | 3 -- spec/fabricators/user_fabricator.rb | 4 +-- spec/features/sign_in_spec.rb | 4 +-- spec/spec_helper.rb | 10 +++--- spec/support/features/session_helpers.rb | 2 +- 12 files changed, 32 insertions(+), 54 deletions(-) diff --git a/.gitignore b/.gitignore index 70a3775c7..00ec87fc7 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,5 @@ sgemset tags .localeapp + +.byebug_history diff --git a/Gemfile b/Gemfile index e5cb555da..2c30d18f8 100644 --- a/Gemfile +++ b/Gemfile @@ -58,6 +58,6 @@ group :test do gem 'faker', '~> 1.9' gem 'capybara', '~> 3.15' gem 'selenium-webdriver', '~> 3.142' - gem 'webdrivers', '~> 4.1.2' + gem 'webdrivers', '~> 4.2.0' gem 'simplecov', '~> 0.17', require: false end diff --git a/Gemfile.lock b/Gemfile.lock index b2ad984fb..fcf98c7a3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -47,8 +47,8 @@ GEM minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - addressable (2.5.1) - public_suffix (~> 2.0, >= 2.0.2) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) airbrussh (0.8.0) sshkit (>= 1.6.1, != 1.7.0) arbre (1.1.1) @@ -83,16 +83,15 @@ GEM capistrano-rbenv (2.1.3) capistrano (~> 3.1) sshkit (~> 1.3) - capybara (3.15.1) + capybara (3.31.0) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) rack-test (>= 0.6.3) - regexp_parser (~> 1.2) + regexp_parser (~> 1.5) xpath (~> 3.2) - childprocess (1.0.1) - rake (< 13.0) + childprocess (3.0.0) coderay (1.1.2) coffee-rails (4.1.0) coffee-script (>= 2.2.0) @@ -204,7 +203,7 @@ GEM mime-types (3.1) mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) - mini_mime (1.0.1) + mini_mime (1.0.2) mini_portile2 (2.4.0) minitest (5.11.3) multi_json (1.11.2) @@ -213,7 +212,7 @@ GEM net-ssh (>= 2.6.5, < 6.0.0) net-ssh (5.2.0) netrc (0.11.0) - nokogiri (1.10.3) + nokogiri (1.10.8) mini_portile2 (~> 2.4.0) orm_adapter (0.5.0) parallel (1.19.1) @@ -228,11 +227,11 @@ GEM ttfunk (~> 1.5) prawn-table (0.2.2) prawn (>= 1.3.0, < 3.0.0) - public_suffix (2.0.5) + public_suffix (4.0.3) pundit (2.0.0) activesupport (>= 3.0.0) raabro (1.1.6) - rack (1.6.11) + rack (1.6.13) rack-protection (2.0.1) rack rack-test (0.6.3) @@ -266,7 +265,7 @@ GEM thor (>= 0.18.1, < 2.0) rainbow (3.0.0) raindrops (0.16.0) - rake (12.3.3) + rake (13.0.1) ransack (1.8.6) actionpack (>= 3.0) activerecord (>= 3.0) @@ -312,7 +311,7 @@ GEM ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 1.7) ruby-progressbar (1.10.1) - rubyzip (1.2.3) + rubyzip (2.2.0) sass (3.4.21) sass-rails (5.0.7) railties (>= 4.0.0, < 6) @@ -322,9 +321,9 @@ GEM tilt (>= 1.1, < 3) select2-rails (4.0.1) thor (~> 0.14) - selenium-webdriver (3.142.3) - childprocess (>= 0.5, < 2.0) - rubyzip (~> 1.2, >= 1.2.2) + selenium-webdriver (3.142.7) + childprocess (>= 0.5, < 4.0) + rubyzip (>= 1.2.2) shoulda-matchers (3.1.2) activesupport (>= 4.0.0) sidekiq (5.1.3) @@ -381,9 +380,9 @@ GEM binding_of_caller (>= 0.7.2) railties (>= 4.0) sprockets-rails (>= 2.0, < 4.0) - webdrivers (4.1.2) + webdrivers (4.2.0) nokogiri (~> 1.6) - rubyzip (~> 1.0) + rubyzip (>= 1.3.0) selenium-webdriver (>= 3.0, < 4.0) xpath (3.2.0) nokogiri (~> 1.8) @@ -439,7 +438,7 @@ DEPENDENCIES uglifier (= 2.7.2) unicorn web-console (= 2.1.3) - webdrivers (~> 4.1.2) + webdrivers (~> 4.2.0) RUBY VERSION ruby 2.6.3p62 diff --git a/spec/controllers/inquiries_controller_spec.rb b/spec/controllers/inquiries_controller_spec.rb index 495c13a4f..f7bc2141e 100644 --- a/spec/controllers/inquiries_controller_spec.rb +++ b/spec/controllers/inquiries_controller_spec.rb @@ -11,10 +11,6 @@ organization: test_organization, category: test_category) end - - include_context "stub browser locale" - - before { set_browser_locale("ca") } describe "GET #index" do context "with a logged user" do @@ -42,7 +38,7 @@ describe "POST #create" do context "with valid params" do - context "with a logged user" do + context "with a logged user" do it "creates a new inquiry" do login(another_member.user) expect do @@ -59,7 +55,7 @@ context "with valid params" do context "with a logged user" do before { login(member.user) } - + it "located the requested @inquiry" do put "update", id: inquiry.id, inquiry: Fabricate.to_params(:inquiry) expect(assigns(:inquiry)).to eq(inquiry) @@ -83,7 +79,7 @@ end context "with invalid params" do - context "with a logged user" do + context "with a logged user" do it "does not change @inquiry's attributes" do login(member.user) @@ -103,7 +99,7 @@ describe "DELETE destroy" do before { login(member.user) } - + it "toggle active field" do delete :destroy, id: inquiry.id diff --git a/spec/controllers/multi_transfers_controller_spec.rb b/spec/controllers/multi_transfers_controller_spec.rb index bab67003e..1caa040c7 100644 --- a/spec/controllers/multi_transfers_controller_spec.rb +++ b/spec/controllers/multi_transfers_controller_spec.rb @@ -14,10 +14,6 @@ category: test_category) end - include_context "stub browser locale" - - before { set_browser_locale("en") } - it 'creates one to many transfers' do expect do login(admin.user) diff --git a/spec/controllers/offers_controller_spec.rb b/spec/controllers/offers_controller_spec.rb index 4f1db8ecf..7d0619b89 100644 --- a/spec/controllers/offers_controller_spec.rb +++ b/spec/controllers/offers_controller_spec.rb @@ -13,10 +13,6 @@ category: test_category) end - include_context "stub browser locale" - - before { set_browser_locale("ca") } - describe "GET #index" do context "with a logged user" do it "populates an array of offers" do diff --git a/spec/controllers/transfers_controller_spec.rb b/spec/controllers/transfers_controller_spec.rb index 96b4bd05f..453b861c9 100644 --- a/spec/controllers/transfers_controller_spec.rb +++ b/spec/controllers/transfers_controller_spec.rb @@ -6,10 +6,6 @@ let (:member_giver) { Fabricate(:member, organization: test_organization) } let (:member_taker) { Fabricate(:member, organization: test_organization) } - include_context 'stub browser locale' - - before { set_browser_locale('ca') } - describe '#new' do let(:user) { member_giver.user } diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb index 698af6d57..23842b261 100644 --- a/spec/controllers/users_controller_spec.rb +++ b/spec/controllers/users_controller_spec.rb @@ -34,9 +34,6 @@ let!(:wrong_user) { wrong_email_member.user } let!(:empty_email_user) { empty_email_member.user } - include_context "stub browser locale" - before { set_browser_locale("ca") } - describe "GET #index" do before { login(user) } diff --git a/spec/fabricators/user_fabricator.rb b/spec/fabricators/user_fabricator.rb index 5d0b196da..e2d5c3f34 100644 --- a/spec/fabricators/user_fabricator.rb +++ b/spec/fabricators/user_fabricator.rb @@ -1,6 +1,4 @@ Fabricator(:user) do - Faker::Config.locale = :es - username { Faker::Internet.user_name } email { Faker::Internet.email } date_of_birth { DateTime.now.utc } @@ -11,7 +9,7 @@ gender { ["male", "female"].shuffle.first } description { Faker::Lorem.paragraph } last_sign_in_at { DateTime.new(2018, 10, 1) } - terms_accepted_at DateTime.now.utc confirmed_at DateTime.now.utc + locale I18n.default_locale end diff --git a/spec/features/sign_in_spec.rb b/spec/features/sign_in_spec.rb index 03b83d9d9..341b887fa 100644 --- a/spec/features/sign_in_spec.rb +++ b/spec/features/sign_in_spec.rb @@ -12,7 +12,7 @@ sign_in_with(user.email, user.password) expect(Capybara.current_session.driver.browser.manage.cookie_named('_timeoverflow_session')).to be_truthy - expect(page).to have_no_content(I18n.t('devise.failure.invalid')) + expect(page).not_to have_selector('.alert-danger') end end @@ -20,7 +20,7 @@ it 'shows an error' do sign_in_with(user.email, 'wrong_password') - expect(page).to have_content(I18n.t('devise.failure.invalid')) + expect(page).to have_selector('.alert-danger') end end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index daa6c289b..0c9b42df5 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -139,16 +139,14 @@ DatabaseCleaner.clean end + config.before(:each, type: :feature) do + I18n.locale = I18n.default_locale + end + # Controllers must render the content of the view config.render_views end -RSpec.shared_context 'stub browser locale' do - def set_browser_locale(locale) - request.env["HTTP_ACCEPT_LANGUAGE"] = "#{locale}" - end -end - RSpec.configure(&:infer_spec_type_from_file_location!) Shoulda::Matchers.configure do |config| diff --git a/spec/support/features/session_helpers.rb b/spec/support/features/session_helpers.rb index d9a686c19..45164a79c 100644 --- a/spec/support/features/session_helpers.rb +++ b/spec/support/features/session_helpers.rb @@ -4,7 +4,7 @@ def sign_in_with(email, password) visit '/login' fill_in 'user_email', with: email fill_in 'user_password', with: password - click_button I18n.t('application.login_form.button') + find('input[type=submit]').click end end end From 3c5a6a53742984edd8c03b3f7e2ac3f9052a19f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Feb 2020 15:56:42 +0000 Subject: [PATCH 13/17] Bump loofah from 2.2.3 to 2.4.0 Bumps [loofah](https://github.com/flavorjones/loofah) from 2.2.3 to 2.4.0. - [Release notes](https://github.com/flavorjones/loofah/releases) - [Changelog](https://github.com/flavorjones/loofah/blob/master/CHANGELOG.md) - [Commits](https://github.com/flavorjones/loofah/compare/v2.2.3...v2.4.0) Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index fcf98c7a3..8ca565705 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -102,7 +102,7 @@ GEM coffee-script-source (1.8.0) concurrent-ruby (1.1.5) connection_pool (2.2.1) - crass (1.0.4) + crass (1.0.6) database_cleaner (1.6.2) debug_inspector (0.0.3) devise (4.5.0) @@ -195,7 +195,7 @@ GEM i18n (~> 0.4) json rest-client - loofah (2.2.3) + loofah (2.4.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) From 867368c12ed0bd9ac44304eebdf0bc5888498c95 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Feb 2020 19:35:08 +0000 Subject: [PATCH 14/17] Bump devise from 4.5.0 to 4.7.1 Bumps [devise](https://github.com/plataformatec/devise) from 4.5.0 to 4.7.1. - [Release notes](https://github.com/plataformatec/devise/releases) - [Changelog](https://github.com/plataformatec/devise/blob/master/CHANGELOG.md) - [Commits](https://github.com/plataformatec/devise/compare/v4.5.0...v4.7.1) Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Gemfile b/Gemfile index 2c30d18f8..45b563721 100644 --- a/Gemfile +++ b/Gemfile @@ -10,7 +10,7 @@ gem 'has_scope' gem 'pundit', '~> 2.0.0' gem 'pg', '0.21.0' gem 'hstore_translate' -gem 'devise', '~> 4.5.0' +gem 'devise', '~> 4.7.1' gem "http_accept_language", '~> 2.1.1' gem 'unicorn' gem 'kaminari', '~> 1.1.1' diff --git a/Gemfile.lock b/Gemfile.lock index 8ca565705..44ea975aa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -58,7 +58,7 @@ GEM autoprefixer-rails (6.3.1) execjs json - bcrypt (3.1.12) + bcrypt (3.1.13) better_errors (2.4.0) coderay (>= 1.0.0) erubi (>= 1.0.0) @@ -68,7 +68,7 @@ GEM bootstrap-sass (3.3.6) autoprefixer-rails (>= 5.2.1) sass (>= 3.3.4) - builder (3.2.3) + builder (3.2.4) byebug (11.0.0) capistrano (3.4.1) i18n @@ -100,15 +100,15 @@ GEM coffee-script-source execjs coffee-script-source (1.8.0) - concurrent-ruby (1.1.5) + concurrent-ruby (1.1.6) connection_pool (2.2.1) crass (1.0.6) database_cleaner (1.6.2) debug_inspector (0.0.3) - devise (4.5.0) + devise (4.7.1) bcrypt (~> 3.0) orm_adapter (~> 0.1) - railties (>= 4.1.0, < 6.0) + railties (>= 4.1.0) responders warden (~> 1.2.3) diff-lcs (1.3) @@ -205,7 +205,7 @@ GEM mime-types-data (3.2016.0521) mini_mime (1.0.2) mini_portile2 (2.4.0) - minitest (5.11.3) + minitest (5.14.0) multi_json (1.11.2) multipart-post (2.0.0) net-scp (2.0.0) @@ -253,8 +253,8 @@ GEM activesupport (>= 4.2.0, < 5.0) nokogiri (~> 1.6) rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.0.4) - loofah (~> 2.2, >= 2.2.2) + rails-html-sanitizer (1.3.0) + loofah (~> 2.3) rails-i18n (4.0.3) i18n (~> 0.6) railties (~> 4.0) @@ -275,9 +275,9 @@ GEM rdiscount (2.1.7.1) redis (4.0.1) regexp_parser (1.6.0) - responders (2.4.0) - actionpack (>= 4.2.0, < 5.3) - railties (>= 4.2.0, < 5.3) + responders (2.4.1) + actionpack (>= 4.2.0, < 6.0) + railties (>= 4.2.0, < 6.0) rest-client (2.0.1) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) @@ -360,7 +360,7 @@ GEM thread_safe (0.3.6) tilt (2.0.8) ttfunk (1.5.1) - tzinfo (1.2.5) + tzinfo (1.2.6) thread_safe (~> 0.1) uglifier (2.7.2) execjs (>= 0.3.0) @@ -403,7 +403,7 @@ DEPENDENCIES capybara (~> 3.15) coffee-rails database_cleaner (= 1.6.2) - devise (~> 4.5.0) + devise (~> 4.7.1) dotenv-rails (~> 2.7.1) elasticsearch-model elasticsearch-rails From cb7739326dc96eb76783aecb674fd76093f855d1 Mon Sep 17 00:00:00 2001 From: sseerrggii Date: Thu, 19 Sep 2019 17:37:38 +0200 Subject: [PATCH 15/17] add phone to search --- app/views/users/manage.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/manage.html.erb b/app/views/users/manage.html.erb index 6f37ae995..186bc2759 100644 --- a/app/views/users/manage.html.erb +++ b/app/views/users/manage.html.erb @@ -11,7 +11,7 @@
<%= search_form_for(@search, class: "navbar-form navbar-left", url: manage_users_path) do |f| %>
- <%= f.search_field :user_username_or_user_email_or_member_uid_search_contains, class: "form-control" %> + <%= f.search_field :user_username_or_user_email_or_user_phone_or_user_alt_phone_or_member_uid_search_contains, class: "form-control" %>