Merge pull request #3112 from TracksApp/ror_70

Upgrade to RoR 7.0
This commit is contained in:
Jyri-Petteri Paloposki 2025-06-29 13:37:27 +03:00 committed by GitHub
commit b32cb2090e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 213 additions and 164 deletions

View file

@ -6,18 +6,8 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
ruby: ["3.0", "3.1", "3.2", "3.3"] ruby: ["3.2", "3.3"]
db: [sqlite, mysql, postgres] db: [sqlite, mysql, postgres]
exclude:
- ruby: "3.1"
db: sqlite
- ruby: "3.1"
db: postgres
- ruby: "3.2"
db: sqlite
- ruby: "3.2"
db: postgres
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- run: bash -x script/cibuild ${{ matrix.ruby }} ${{ matrix.db }} - run: bash -x script/cibuild ${{ matrix.ruby }} ${{ matrix.db }}

View file

@ -3,7 +3,7 @@ source 'https://rubygems.org'
gem 'actionpack-xml_parser', '~> 2.0' gem 'actionpack-xml_parser', '~> 2.0'
gem 'activemodel-serializers-xml', '~> 1.0.3' gem 'activemodel-serializers-xml', '~> 1.0.3'
gem 'rails', '~> 6.1' gem 'rails', '~> 7.0'
gem 'font-awesome-sass', '~> 6.7.2' gem 'font-awesome-sass', '~> 6.7.2'
gem 'jquery-rails', '~> 4.6' gem 'jquery-rails', '~> 4.6'
@ -30,9 +30,11 @@ gem 'pg', '~> 1.5', group: :postgresql
# See https://github.com/sstephenson/execjs#readme for more supported runtimes # See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'mini_racer', group: :therubyracer gem 'mini_racer', group: :therubyracer
gem 'sprockets-rails'
group :assets do group :assets do
gem 'coffee-rails', '~> 5.0.0' gem 'coffee-rails', '~> 5.0.0'
gem 'sassc-rails', '~> 2.1.2' gem 'dartsass-sprockets'
gem 'bootstrap-sass', '3.4.1' gem 'bootstrap-sass', '3.4.1'
gem 'uglifier', '>=1.3.0' gem 'uglifier', '>=1.3.0'
gem 'listen' gem 'listen'

View file

@ -4,81 +4,101 @@ GEM
RedCloth (4.3.4) RedCloth (4.3.4)
aasm (5.5.0) aasm (5.5.0)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
actioncable (6.1.7.9) actioncable (7.1.5.1)
actionpack (= 6.1.7.9) actionpack (= 7.1.5.1)
activesupport (= 6.1.7.9) activesupport (= 7.1.5.1)
nio4r (~> 2.0) nio4r (~> 2.0)
websocket-driver (>= 0.6.1) websocket-driver (>= 0.6.1)
actionmailbox (6.1.7.9) zeitwerk (~> 2.6)
actionpack (= 6.1.7.9) actionmailbox (7.1.5.1)
activejob (= 6.1.7.9) actionpack (= 7.1.5.1)
activerecord (= 6.1.7.9) activejob (= 7.1.5.1)
activestorage (= 6.1.7.9) activerecord (= 7.1.5.1)
activesupport (= 6.1.7.9) activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
mail (>= 2.7.1) mail (>= 2.7.1)
actionmailer (6.1.7.9) net-imap
actionpack (= 6.1.7.9) net-pop
actionview (= 6.1.7.9) net-smtp
activejob (= 6.1.7.9) actionmailer (7.1.5.1)
activesupport (= 6.1.7.9) actionpack (= 7.1.5.1)
actionview (= 7.1.5.1)
activejob (= 7.1.5.1)
activesupport (= 7.1.5.1)
mail (~> 2.5, >= 2.5.4) mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0) net-imap
actionpack (6.1.7.9) net-pop
actionview (= 6.1.7.9) net-smtp
activesupport (= 6.1.7.9) rails-dom-testing (~> 2.2)
rack (~> 2.0, >= 2.0.9) actionpack (7.1.5.1)
actionview (= 7.1.5.1)
activesupport (= 7.1.5.1)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3) rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.0, >= 1.2.0) rails-html-sanitizer (~> 1.6)
actionpack-xml_parser (2.0.1) actionpack-xml_parser (2.0.1)
actionpack (>= 5.0) actionpack (>= 5.0)
railties (>= 5.0) railties (>= 5.0)
actiontext (6.1.7.9) actiontext (7.1.5.1)
actionpack (= 6.1.7.9) actionpack (= 7.1.5.1)
activerecord (= 6.1.7.9) activerecord (= 7.1.5.1)
activestorage (= 6.1.7.9) activestorage (= 7.1.5.1)
activesupport (= 6.1.7.9) activesupport (= 7.1.5.1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5) nokogiri (>= 1.8.5)
actionview (6.1.7.9) actionview (7.1.5.1)
activesupport (= 6.1.7.9) activesupport (= 7.1.5.1)
builder (~> 3.1) builder (~> 3.1)
erubi (~> 1.4) erubi (~> 1.11)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.1, >= 1.2.0) rails-html-sanitizer (~> 1.6)
activejob (6.1.7.9) activejob (7.1.5.1)
activesupport (= 6.1.7.9) activesupport (= 7.1.5.1)
globalid (>= 0.3.6) globalid (>= 0.3.6)
activemodel (6.1.7.9) activemodel (7.1.5.1)
activesupport (= 6.1.7.9) activesupport (= 7.1.5.1)
activemodel-serializers-xml (1.0.3) activemodel-serializers-xml (1.0.3)
activemodel (>= 5.0.0.a) activemodel (>= 5.0.0.a)
activesupport (>= 5.0.0.a) activesupport (>= 5.0.0.a)
builder (~> 3.1) builder (~> 3.1)
activerecord (6.1.7.9) activerecord (7.1.5.1)
activemodel (= 6.1.7.9) activemodel (= 7.1.5.1)
activesupport (= 6.1.7.9) activesupport (= 7.1.5.1)
activestorage (6.1.7.9) timeout (>= 0.4.0)
actionpack (= 6.1.7.9) activestorage (7.1.5.1)
activejob (= 6.1.7.9) actionpack (= 7.1.5.1)
activerecord (= 6.1.7.9) activejob (= 7.1.5.1)
activesupport (= 6.1.7.9) activerecord (= 7.1.5.1)
activesupport (= 7.1.5.1)
marcel (~> 1.0) marcel (~> 1.0)
mini_mime (>= 1.1.0) activesupport (7.1.5.1)
activesupport (6.1.7.9) base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2) concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2) i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1) minitest (>= 5.1)
mutex_m
securerandom (>= 0.3)
tzinfo (~> 2.0) tzinfo (~> 2.0)
zeitwerk (~> 2.3)
acts_as_list (1.2.4) acts_as_list (1.2.4)
activerecord (>= 6.1) activerecord (>= 6.1)
activesupport (>= 6.1) activesupport (>= 6.1)
ast (2.4.2) ast (2.4.2)
autoprefixer-rails (10.4.7.0) autoprefixer-rails (10.4.21.0)
execjs (~> 2) execjs (~> 2)
backport (1.2.0) backport (1.2.0)
base64 (0.3.0)
bcrypt (3.1.20) bcrypt (3.1.20)
benchmark (0.4.0) benchmark (0.4.0)
bigdecimal (3.2.2)
bootstrap-sass (3.4.1) bootstrap-sass (3.4.1)
autoprefixer-rails (>= 5.2.1) autoprefixer-rails (>= 5.2.1)
sassc (>= 2.0.0) sassc (>= 2.0.0)
@ -98,16 +118,25 @@ GEM
execjs execjs
coffee-script-source (1.12.2) coffee-script-source (1.12.2)
concurrent-ruby (1.3.4) concurrent-ruby (1.3.4)
connection_pool (2.5.3)
crass (1.0.6) crass (1.0.6)
dartsass-sprockets (3.2.1)
railties (>= 4.0.0)
sassc-embedded (~> 1.80.1)
sprockets (> 3.0)
sprockets-rails
tilt
database_cleaner (2.1.0) database_cleaner (2.1.0)
database_cleaner-active_record (>= 2, < 3) database_cleaner-active_record (>= 2, < 3)
database_cleaner-active_record (2.2.0) database_cleaner-active_record (2.2.0)
activerecord (>= 5.a) activerecord (>= 5.a)
database_cleaner-core (~> 2.0.0) database_cleaner-core (~> 2.0.0)
database_cleaner-core (2.0.1) database_cleaner-core (2.0.1)
date (3.4.0) date (3.4.1)
diff-lcs (1.5.1) diff-lcs (1.5.1)
docile (1.1.5) docile (1.1.5)
drb (2.2.3)
erb (5.0.1)
erubi (1.13.0) erubi (1.13.0)
execjs (2.10.0) execjs (2.10.0)
factory_bot (6.5.0) factory_bot (6.5.0)
@ -120,6 +149,9 @@ GEM
sassc (~> 2.0) sassc (~> 2.0)
globalid (1.2.1) globalid (1.2.1)
activesupport (>= 6.1) activesupport (>= 6.1)
google-protobuf (4.31.1)
bigdecimal
rake (>= 13)
highline (3.0.1) highline (3.0.1)
htmlentities (4.3.4) htmlentities (4.3.4)
i18n (1.14.6) i18n (1.14.6)
@ -134,6 +166,11 @@ GEM
rails-i18n rails-i18n
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
terminal-table (>= 1.5.1) terminal-table (>= 1.5.1)
io-console (0.8.0)
irb (1.15.2)
pp (>= 0.6.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
jaro_winkler (1.6.0) jaro_winkler (1.6.0)
jquery-rails (4.6.0) jquery-rails (4.6.0)
rails-dom-testing (>= 1, < 3) rails-dom-testing (>= 1, < 3)
@ -167,7 +204,6 @@ GEM
net-pop net-pop
net-smtp net-smtp
marcel (1.0.4) marcel (1.0.4)
method_source (1.1.0)
mime-types (3.4.1) mime-types (3.4.1)
mime-types-data (~> 3.2015) mime-types-data (~> 3.2015)
mime-types-data (3.2023.0218.1) mime-types-data (3.2023.0218.1)
@ -179,15 +215,16 @@ GEM
minitest-stub-const (0.6) minitest-stub-const (0.6)
mocha (2.7.1) mocha (2.7.1)
ruby2_keywords (>= 0.0.5) ruby2_keywords (>= 0.0.5)
mutex_m (0.3.0)
mysql2 (0.5.6) mysql2 (0.5.6)
net-imap (0.4.17) net-imap (0.5.9)
date date
net-protocol net-protocol
net-pop (0.1.2) net-pop (0.1.2)
net-protocol net-protocol
net-protocol (0.2.2) net-protocol (0.2.2)
timeout timeout
net-smtp (0.5.0) net-smtp (0.5.1)
net-protocol net-protocol
nio4r (2.7.4) nio4r (2.7.4)
nokogiri (1.17.2) nokogiri (1.17.2)
@ -200,29 +237,39 @@ GEM
ast (~> 2.4.1) ast (~> 2.4.1)
racc racc
pg (1.5.9) pg (1.5.9)
pp (0.6.2)
prettyprint
prettyprint (0.2.0)
psych (5.2.6)
date
stringio
puma (6.5.0) puma (6.5.0)
nio4r (~> 2.0) nio4r (~> 2.0)
racc (1.8.1) racc (1.8.1)
rack (2.2.10) rack (2.2.10)
rack-mini-profiler (3.3.1) rack-mini-profiler (3.3.1)
rack (>= 1.2.0) rack (>= 1.2.0)
rack-session (1.0.2)
rack (< 3)
rack-test (2.1.0) rack-test (2.1.0)
rack (>= 1.3) rack (>= 1.3)
rails (6.1.7.9) rackup (1.0.1)
actioncable (= 6.1.7.9) rack (< 3)
actionmailbox (= 6.1.7.9) webrick
actionmailer (= 6.1.7.9) rails (7.1.5.1)
actionpack (= 6.1.7.9) actioncable (= 7.1.5.1)
actiontext (= 6.1.7.9) actionmailbox (= 7.1.5.1)
actionview (= 6.1.7.9) actionmailer (= 7.1.5.1)
activejob (= 6.1.7.9) actionpack (= 7.1.5.1)
activemodel (= 6.1.7.9) actiontext (= 7.1.5.1)
activerecord (= 6.1.7.9) actionview (= 7.1.5.1)
activestorage (= 6.1.7.9) activejob (= 7.1.5.1)
activesupport (= 6.1.7.9) activemodel (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
bundler (>= 1.15.0) bundler (>= 1.15.0)
railties (= 6.1.7.9) railties (= 7.1.5.1)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.5) rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1) actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1)
@ -241,12 +288,14 @@ GEM
actionview (> 3.1) actionview (> 3.1)
activesupport (> 3.1) activesupport (> 3.1)
railties (> 3.1) railties (> 3.1)
railties (6.1.7.9) railties (7.1.5.1)
actionpack (= 6.1.7.9) actionpack (= 7.1.5.1)
activesupport (= 6.1.7.9) activesupport (= 7.1.5.1)
method_source irb
rackup (>= 1.0.0)
rake (>= 12.2) rake (>= 12.2)
thor (~> 1.0) thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rainbow (3.1.1) rainbow (3.1.1)
rake (13.2.1) rake (13.2.1)
rb-fsevent (0.11.2) rb-fsevent (0.11.2)
@ -254,7 +303,12 @@ GEM
ffi (~> 1.0) ffi (~> 1.0)
rbs (3.6.1) rbs (3.6.1)
logger logger
rdoc (6.14.1)
erb
psych (>= 4.0.0)
regexp_parser (2.10.0) regexp_parser (2.10.0)
reline (0.6.1)
io-console (~> 0.5)
reverse_markdown (3.0.0) reverse_markdown (3.0.0)
nokogiri nokogiri
rexml (3.4.0) rexml (3.4.0)
@ -280,14 +334,14 @@ GEM
sanitize (6.1.3) sanitize (6.1.3)
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.12.0) nokogiri (>= 1.12.0)
sass-embedded (1.89.2)
google-protobuf (~> 4.31)
rake (>= 13)
sassc (2.4.0) sassc (2.4.0)
ffi (~> 1.9) ffi (~> 1.9)
sassc-rails (2.1.2) sassc-embedded (1.80.4)
railties (>= 4.0.0) sass-embedded (~> 1.80)
sassc (>= 2.0) securerandom (0.4.1)
sprockets (> 3.0)
sprockets-rails
tilt
simplecov (0.13.0) simplecov (0.13.0)
docile (~> 1.1.0) docile (~> 1.1.0)
json (>= 1.8, < 3) json (>= 1.8, < 3)
@ -321,6 +375,7 @@ GEM
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
sqlite3 (1.7.3) sqlite3 (1.7.3)
mini_portile2 (~> 2.8.0) mini_portile2 (~> 2.8.0)
stringio (3.1.7)
stripe (13.3.1) stripe (13.3.1)
terminal-table (3.0.2) terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3) unicode-display_width (>= 1.1.1, < 3)
@ -328,7 +383,7 @@ GEM
climate_control (>= 0.0.3, < 1.0) climate_control (>= 0.0.3, < 1.0)
thor (1.3.2) thor (1.3.2)
tilt (2.6.0) tilt (2.6.0)
timeout (0.4.1) timeout (0.4.3)
tolk (5.0.2) tolk (5.0.2)
rails (>= 6.0, < 7.2) rails (>= 6.0, < 7.2)
safe_yaml (>= 0.8.6) safe_yaml (>= 0.8.6)
@ -341,7 +396,9 @@ GEM
execjs (>= 0.3.0, < 3) execjs (>= 0.3.0, < 3)
unicode-display_width (2.6.0) unicode-display_width (2.6.0)
uniform_notifier (1.16.0) uniform_notifier (1.16.0)
websocket-driver (0.7.6) webrick (1.9.1)
websocket-driver (0.8.0)
base64
websocket-extensions (>= 0.1.0) websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5) websocket-extensions (0.1.5)
will_paginate (4.0.1) will_paginate (4.0.1)
@ -363,6 +420,7 @@ DEPENDENCIES
byebug byebug
codeclimate-test-reporter (= 1.0.9) codeclimate-test-reporter (= 1.0.9)
coffee-rails (~> 5.0.0) coffee-rails (~> 5.0.0)
dartsass-sprockets
database_cleaner (~> 2) database_cleaner (~> 2)
factory_bot_rails factory_bot_rails
font-awesome-sass (~> 6.7.2) font-awesome-sass (~> 6.7.2)
@ -379,7 +437,7 @@ DEPENDENCIES
pg (~> 1.5) pg (~> 1.5)
puma (~> 6.5) puma (~> 6.5)
rack-mini-profiler rack-mini-profiler
rails (~> 6.1) rails (~> 7.0)
rails-controller-testing rails-controller-testing
rails-dom-testing (~> 2.2.0) rails-dom-testing (~> 2.2.0)
rails_autolink rails_autolink
@ -387,10 +445,10 @@ DEPENDENCIES
rspec-expectations rspec-expectations
rubocop (~> 1.70) rubocop (~> 1.70)
sanitize (~> 6.1) sanitize (~> 6.1)
sassc-rails (~> 2.1.2)
simplecov simplecov
solargraph solargraph
spring (~> 4) spring (~> 4)
sprockets-rails
sqlite3 (~> 1.4) sqlite3 (~> 1.4)
stripe stripe
tolk (~> 5.0.2) tolk (~> 5.0.2)

View file

@ -10,9 +10,9 @@
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives. // about supported directives.
// //
//= require jquery
//= require jquery_ujs //= require jquery_ujs
//= require bootstrap-sprockets //= require jquery3
//= require bootstrap
//= require jquery-ui/widgets/autocomplete //= require jquery-ui/widgets/autocomplete
//= require jquery-ui/widgets/datepicker //= require jquery-ui/widgets/datepicker

View file

@ -21,7 +21,6 @@
} }
.bootstrap { .bootstrap {
@import "bootstrap-sprockets";
@import "bootstrap"; @import "bootstrap";
@import "tracks-logo"; @import "tracks-logo";
@import "login"; @import "login";

View file

@ -1,5 +1,5 @@
require_dependency "login_system" require_dependency "login_system"
require_dependency "tracks/source_view" require_dependency "tracks/source_view_switching"
class ApplicationController < ActionController::Base class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception. # Prevent CSRF attacks by raising an exception.

View file

@ -11,7 +11,7 @@ xml.rss :version => "2.0" do
xml.item do xml.item do
xml.title h(context.title) xml.title h(context.title)
xml.description context_summary(context, count_undone_todos_phrase(context)) xml.description context_summary(context, count_undone_todos_phrase(context))
xml.pubDate context.created_at.to_s(:rfc822) xml.pubDate context.created_at.to_formatted_s(:rfc822)
xml.link context_url(context) xml.link context_url(context)
xml.guid context_url(context) xml.guid context_url(context)
end end

View file

@ -11,7 +11,7 @@ xml.rss :version => "2.0" do
xml.item do xml.item do
xml.title h(todo.description) xml.title h(todo.description)
xml.description feed_content_for_todo(todo) xml.description feed_content_for_todo(todo)
xml.pubDate todo.created_at.to_s(:rfc822) xml.pubDate todo.created_at.to_formatted_s(:rfc822)
xml.link (todo.project && !todo.project.is_a?(NullProject)) ? project_url(todo.project) : context_url(todo.context) xml.link (todo.project && !todo.project.is_a?(NullProject)) ? project_url(todo.project) : context_url(todo.context)
xml.guid todo_url(todo) xml.guid todo_url(todo)
end end

View file

@ -21,7 +21,7 @@ module Tracksapp
# Custom directories with classes and modules you want to be autoloadable. # Custom directories with classes and modules you want to be autoloadable.
# config.autoload_paths += %W(#{config.root}/extras) # config.autoload_paths += %W(#{config.root}/extras)
config.autoload_paths += %W(#{config.root}/lib) # config.autoload_paths += %W(#{config.root}/lib)
config.eager_load_paths += %W(#{config.root}/lib) config.eager_load_paths += %W(#{config.root}/lib)
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.

View file

@ -1,26 +1,26 @@
test: test:
adapter: <%= ENV.fetch('DATABASE_TYPE') %> adapter: <%= ENV['DATABASE_TYPE'] %>
encoding: <%= ENV.fetch('DATABASE_ENCODING') %> encoding: <%= ENV['DATABASE_ENCODING'] %>
database: <%= ENV.fetch('DATABASE_NAME') %> database: <%= ENV['DATABASE_NAME'] %>
host: <%= ENV.fetch('DATABASE_HOST') %> host: <%= ENV['DATABASE_HOST'] %>
port: <%= ENV.fetch('DATABASE_PORT') %> port: <%= ENV['DATABASE_PORT'] %>
username: <%= ENV.fetch('DATABASE_USERNAME') %> username: <%= ENV['DATABASE_USERNAME'] %>
password: <%= ENV.fetch('DATABASE_PASSWORD') %> password: <%= ENV['DATABASE_PASSWORD'] %>
development: development:
adapter: <%= ENV.fetch('DATABASE_TYPE') %> adapter: <%= ENV['DATABASE_TYPE'] %>
encoding: <%= ENV.fetch('DATABASE_ENCODING') %> encoding: <%= ENV['DATABASE_ENCODING'] %>
database: <%= ENV.fetch('DATABASE_NAME') %> database: <%= ENV['DATABASE_NAME'] %>
host: <%= ENV.fetch('DATABASE_HOST') %> host: <%= ENV['DATABASE_HOST'] %>
port: <%= ENV.fetch('DATABASE_PORT') %> port: <%= ENV['DATABASE_PORT'] %>
username: <%= ENV.fetch('DATABASE_USERNAME') %> username: <%= ENV['DATABASE_USERNAME'] %>
password: <%= ENV.fetch('DATABASE_PASSWORD') %> password: <%= ENV['DATABASE_PASSWORD'] %>
production: production:
adapter: <%= ENV.fetch('DATABASE_TYPE') %> adapter: <%= ENV['DATABASE_TYPE'] %>
encoding: <%= ENV.fetch('DATABASE_ENCODING') %> encoding: <%= ENV['DATABASE_ENCODING'] %>
database: <%= ENV.fetch('DATABASE_NAME') %> database: <%= ENV['DATABASE_NAME'] %>
host: <%= ENV.fetch('DATABASE_HOST') %> host: <%= ENV['DATABASE_HOST'] %>
port: <%= ENV.fetch('DATABASE_PORT') %> port: <%= ENV['DATABASE_PORT'] %>
username: <%= ENV.fetch('DATABASE_USERNAME') %> username: <%= ENV['DATABASE_USERNAME'] %>
password: <%= ENV.fetch('DATABASE_PASSWORD') %> password: <%= ENV['DATABASE_PASSWORD'] %>

View file

@ -472,7 +472,7 @@ de:
)'" )'"
'3': 'Go to %{preferences_link} and enter your incoming Mailgun email address '3': 'Go to %{preferences_link} and enter your incoming Mailgun email address
(e.g. tracks@user.mailgun.com) in the "%{sms_email_name}" box.' (e.g. tracks@user.mailgun.com) in the "%{sms_email_name}" box.'
'4': 'Select a default context for emails to be put in with "%{sms_context_name"' '4': 'Select a default context for emails to be put in with "%{sms_context_name}"'
'5': "Add your Mailgun API key (not the Public API key) to the Tracks 'site.yml'" '5': "Add your Mailgun API key (not the Public API key) to the Tracks 'site.yml'"
'6': "Update the mailmap in 'site.yml' to define which senders can send emails\ '6': "Update the mailmap in 'site.yml' to define which senders can send emails\
\ to which incoming addresses. For example, to send emails from your work\ \ to which incoming addresses. For example, to send emails from your work\

View file

@ -1268,7 +1268,7 @@ fi:
tickler_items_due: tickler_items_due:
one: Yksi muistilistan merkintä on nyt ajankohtainen päivitä sivu nähdäksesi one: Yksi muistilistan merkintä on nyt ajankohtainen päivitä sivu nähdäksesi
sen. sen.
other: '{%count} muistilistan merkintää on nyt ajankohtaisia päivitä sivu other: '%{count} muistilistan merkintää on nyt ajankohtaisia päivitä sivu
nähdäksesi ne.' nähdäksesi ne.'
to_tickler: muistilistaan to_tickler: muistilistaan
unable_to_add_dependency: Riippuvuuden lisääminen epäonnistui unable_to_add_dependency: Riippuvuuden lisääminen epäonnistui

View file

@ -921,7 +921,7 @@ fr:
delete: Supprimer delete: Supprimer
delete_action: Supprimer action delete_action: Supprimer action
delete_recurring_action_confirm: Êtes-vous sûr·e de vouloir supprimer l'action delete_recurring_action_confirm: Êtes-vous sûr·e de vouloir supprimer l'action
récurrente « % {description} » ? récurrente « %{description} » ?
delete_recurring_action_title: Supprimer l'action récurrente delete_recurring_action_title: Supprimer l'action récurrente
deleted_success: Action supprimée avec succès. deleted_success: Action supprimée avec succès.
depends_on: Dépend de depends_on: Dépend de

View file

@ -424,7 +424,7 @@ nl:
)'" )'"
'3': 'Go to %{preferences_link} and enter your incoming Mailgun email address '3': 'Go to %{preferences_link} and enter your incoming Mailgun email address
(e.g. tracks@user.mailgun.com) in the "%{sms_email_name}" box.' (e.g. tracks@user.mailgun.com) in the "%{sms_email_name}" box.'
'4': 'Select a default context for emails to be put in with "%{sms_context_name"' '4': 'Select a default context for emails to be put in with "%{sms_context_name}"'
'5': "Add your Mailgun API key (not the Public API key) to the Tracks 'site.yml'" '5': "Add your Mailgun API key (not the Public API key) to the Tracks 'site.yml'"
'6': "Update the mailmap in 'site.yml' to define which senders can send emails '6': "Update the mailmap in 'site.yml' to define which senders can send emails
to which incoming addresses. For example, to send emails from your work to which incoming addresses. For example, to send emails from your work

View file

@ -459,7 +459,7 @@ ru:
интернета. Тогда Mailgun сможет отправлять на него данные. интернета. Тогда Mailgun сможет отправлять на него данные.
description: Если вы хотите отправлять письма в Tracks, но не можете запустить description: Если вы хотите отправлять письма в Tracks, но не можете запустить
почтовый сервер на том же сервере, то можно использовать встроенную в Tracks почтовый сервер на том же сервере, то можно использовать встроенную в Tracks
поддержку {mailgun_link}. поддержку %{mailgun_link}.
example_names: example_names:
tag: tag:
'2': метка2 '2': метка2

View file

@ -35,7 +35,7 @@ tr:
etiketlerinizi ve notlarınızı içerir etiketlerinizi ve notlarınızı içerir
csv_notes_title: CSV dosyası (sadece notlar) csv_notes_title: CSV dosyası (sadece notlar)
xml_link_title: XML dosyası (sadece eylemler) xml_link_title: XML dosyası (sadece eylemler)
yaml_description: ':{yaml}: Dışarı aktarmak için en iyisidir.' yaml_description: '%{yaml}: Dışarı aktarmak için en iyisidir.'
download_link: İndirme bağlantısı download_link: İndirme bağlantısı
yaml_link_title: YAML dosyası yaml_link_title: YAML dosyası
xml_description: '%{xml}: Veri aktarımı ve düzenleme için en iyisidir' xml_description: '%{xml}: Veri aktarımı ve düzenleme için en iyisidir'
@ -148,7 +148,7 @@ tr:
other: Günler other: Günler
note: note:
one: Not yok one: Not yok
other: 1 not var other: '%{count} not var'
actions_midsentence: actions_midsentence:
one: eylem one: eylem
other: eylemler other: eylemler

View file

@ -34,5 +34,5 @@ else
$docker_compose run web bin/rake db:migrate $docker_compose run web bin/rake db:migrate
$docker_compose run web bin/rake db:seed $docker_compose run web bin/rake db:seed
fi fi
$docker_compose run web bin/rake test echo "==> Running the tests…"
$docker_compose run web bin/rails test

View file

@ -124,7 +124,7 @@ class ContextsControllerTest < ActionController::TestCase
%w(guid link).each do |node| %w(guid link).each do |node|
assert_select node, /http:\/\/test.host\/contexts\/.+/ assert_select node, /http:\/\/test.host\/contexts\/.+/
end end
assert_select 'pubDate', contexts(:agenda).created_at.to_s(:rfc822) assert_select 'pubDate', contexts(:agenda).created_at.to_formatted_s(:rfc822)
end end
end end
end end

View file

@ -102,7 +102,7 @@ class ProjectsControllerTest < ActionController::TestCase
%w(guid link).each do |node| %w(guid link).each do |node|
assert_select node, /http:\/\/test.host\/projects\/.+/ assert_select node, /http:\/\/test.host\/projects\/.+/
end end
assert_select 'pubDate', projects(:timemachine).updated_at.to_s(:rfc822) assert_select 'pubDate', projects(:timemachine).updated_at.to_formatted_s(:rfc822)
end end
end end
end end

View file

@ -403,7 +403,7 @@ class TodosControllerTest < ActionController::TestCase
assert_equal "bar, foo", t.tag_list assert_equal "bar, foo", t.tag_list
expected = Date.new(2006,11,30) expected = Date.new(2006,11,30)
actual = t.due.to_date actual = t.due.to_date
assert_equal expected, actual, "Expected #{expected.to_s(:db)}, was #{actual.to_s(:db)}" assert_equal expected, actual, "Expected #{expected.to_formatted_s(:db)}, was #{actual.to_formatted_s(:db)}"
end end
def test_update_todos_with_blank_project_name def test_update_todos_with_blank_project_name
@ -551,7 +551,7 @@ class TodosControllerTest < ActionController::TestCase
assert_select 'description', /.*/ assert_select 'description', /.*/
assert_select 'link', %r{http://test.host/contexts/.+} assert_select 'link', %r{http://test.host/contexts/.+}
assert_select 'guid', %r{http://test.host/todos/.+} assert_select 'guid', %r{http://test.host/todos/.+}
assert_select 'pubDate', todos(:call_bill_gates_every_day).created_at.to_s(:rfc822) assert_select 'pubDate', todos(:call_bill_gates_every_day).created_at.to_formatted_s(:rfc822)
end end
end end
end end

View file

@ -5,7 +5,7 @@
<% <%
def today def today
Time.zone.now.utc.to_s(:db) Time.zone.now.utc.to_formatted_s(:db)
end end
%> %>

View file

@ -4,15 +4,15 @@
# rails does automatically in models or controllers! Convert to utc manually! # rails does automatically in models or controllers! Convert to utc manually!
<% <%
def today def today
Time.zone.now.utc.to_s(:db) Time.zone.now.utc.to_formatted_s(:db)
end end
def next_week def next_week
1.week.from_now.utc.to_s(:db) 1.week.from_now.utc.to_formatted_s(:db)
end end
def last_week def last_week
1.week.ago.utc.to_s(:db) 1.week.ago.utc.to_formatted_s(:db)
end end
%> %>

View file

@ -4,13 +4,13 @@
# rails does automatically in models or controllers! Convert to utc manually! # rails does automatically in models or controllers! Convert to utc manually!
<% <%
def today def today
Time.zone.now.utc.beginning_of_day.to_s(:db) Time.zone.now.utc.beginning_of_day.to_formatted_s(:db)
end end
def yesterday def yesterday
1.day.ago.utc.beginning_of_day.to_s(:db) 1.day.ago.utc.beginning_of_day.to_formatted_s(:db)
end end
def last_week def last_week
1.week.ago.utc.beginning_of_day.to_s(:db) 1.week.ago.utc.beginning_of_day.to_formatted_s(:db)
end end
%> %>

View file

@ -3,27 +3,27 @@
<% <%
def today def today
Time.zone.now.utc.beginning_of_day.to_s(:db) Time.zone.now.utc.beginning_of_day.to_formatted_s(:db)
end end
def next_week def next_week
1.week.from_now.utc.beginning_of_day.to_s(:db) 1.week.from_now.utc.beginning_of_day.to_formatted_s(:db)
end end
def last_week def last_week
1.week.ago.utc.beginning_of_day.to_s(:db) 1.week.ago.utc.beginning_of_day.to_formatted_s(:db)
end end
def two_weeks_ago def two_weeks_ago
2.weeks.ago.utc.beginning_of_day.to_s(:db) 2.weeks.ago.utc.beginning_of_day.to_formatted_s(:db)
end end
def two_weeks_hence def two_weeks_hence
2.weeks.from_now.utc.beginning_of_day.to_s(:db) 2.weeks.from_now.utc.beginning_of_day.to_formatted_s(:db)
end end
def way_back def way_back
Time.zone.local(2008,1,1).utc.to_s(:db) Time.zone.local(2008,1,1).utc.to_formatted_s(:db)
end end
%> %>

View file

@ -3,7 +3,7 @@
<% <%
def today def today
Time.zone.now.utc.beginning_of_day.to_s(:db) Time.zone.now.utc.beginning_of_day.to_formatted_s(:db)
end end
%> %>

View file

@ -8,27 +8,27 @@ def yesterday
Time.zone.now.utc.beginning_of_day - 1.day Time.zone.now.utc.beginning_of_day - 1.day
end end
def today def today
Time.zone.now.utc.beginning_of_day.to_s(:db) Time.zone.now.utc.beginning_of_day.to_formatted_s(:db)
end end
def tomorrow def tomorrow
(Time.zone.now.utc.beginning_of_day + 1.day).to_s(:db) (Time.zone.now.utc.beginning_of_day + 1.day).to_formatted_s(:db)
end end
def next_week def next_week
1.week.from_now.utc.beginning_of_day.to_s(:db) 1.week.from_now.utc.beginning_of_day.to_formatted_s(:db)
end end
def last_week def last_week
1.week.ago.utc.beginning_of_day.to_s(:db) 1.week.ago.utc.beginning_of_day.to_formatted_s(:db)
end end
def two_weeks_ago def two_weeks_ago
2.weeks.ago.utc.beginning_of_day.to_s(:db) 2.weeks.ago.utc.beginning_of_day.to_formatted_s(:db)
end end
def two_weeks_hence def two_weeks_hence
2.weeks.from_now.utc.beginning_of_day.to_s(:db) 2.weeks.from_now.utc.beginning_of_day.to_formatted_s(:db)
end end
%> %>

View file

@ -110,7 +110,7 @@ class RecurringTodoTest < ActiveSupport::TestCase
# every_day should return start_day if it is in the future # every_day should return start_day if it is in the future
@every_day.start_from = @in_three_days @every_day.start_from = @in_three_days
due_date = @every_day.get_due_date(nil) due_date = @every_day.get_due_date(nil)
assert_equal @in_three_days.at_midnight.to_s(:db), due_date.to_s(:db) assert_equal @in_three_days.at_midnight.to_formatted_s(:db), due_date.to_formatted_s(:db)
due_date = @every_day.get_due_date(@tomorrow) due_date = @every_day.get_due_date(@tomorrow)
assert_equal @in_three_days.at_midnight, due_date assert_equal @in_three_days.at_midnight, due_date

View file

@ -122,8 +122,8 @@ module RecurringTodos
travel_to Time.zone.local(2013,1,1) do travel_to Time.zone.local(2013,1,1) do
rt = create_recurring_todo rt = create_recurring_todo
assert_equal Time.zone.parse("2013-01-01 00:00:00"), rt.send(:determine_start, nil), "no previous date, use today" assert_equal Time.zone.parse("2013-01-01 00:00:00"), rt.send(:determine_start, nil), "no previous date, use today"
assert_equal Time.zone.parse("2013-01-01 00:00:00"), rt.send(:determine_start, nil, 1.day).to_s(:db), "no previous date, use today without offset" assert_equal Time.zone.parse("2013-01-01 00:00:00"), rt.send(:determine_start, nil, 1.day).to_formatted_s(:db), "no previous date, use today without offset"
assert_equal Time.zone.parse("2013-01-02 00:00:00"), rt.send(:determine_start, Time.zone.now, 1.day).to_s(:db), "use previous date and offset" assert_equal Time.zone.parse("2013-01-02 00:00:00"), rt.send(:determine_start, Time.zone.now, 1.day).to_formatted_s(:db), "use previous date and offset"
end end
end end
@ -131,14 +131,14 @@ module RecurringTodos
rt = create_recurring_todo rt = create_recurring_todo
# march 2014 has 5 saturdays, the last will return the 5th # march 2014 has 5 saturdays, the last will return the 5th
assert_equal Time.zone.parse("2014-03-01 00:00:00"), rt.send(:get_xth_day_of_month, 1, 6, 3, 2014).to_s(:db) assert_equal Time.zone.parse("2014-03-01 00:00:00"), rt.send(:get_xth_day_of_month, 1, 6, 3, 2014).to_formatted_s(:db)
assert_equal Time.zone.parse("2014-03-22 00:00:00"), rt.send(:get_xth_day_of_month, 4, 6, 3, 2014).to_s(:db) assert_equal Time.zone.parse("2014-03-22 00:00:00"), rt.send(:get_xth_day_of_month, 4, 6, 3, 2014).to_formatted_s(:db)
assert_equal Time.zone.parse("2014-03-29 00:00:00"), rt.send(:get_xth_day_of_month, 5, 6, 3, 2014).to_s(:db) assert_equal Time.zone.parse("2014-03-29 00:00:00"), rt.send(:get_xth_day_of_month, 5, 6, 3, 2014).to_formatted_s(:db)
# march 2014 has 4 fridays, the last will return the 4th # march 2014 has 4 fridays, the last will return the 4th
assert_equal Time.zone.parse("2014-03-07 00:00:00"), rt.send(:get_xth_day_of_month, 1, 5, 3, 2014).to_s(:db) assert_equal Time.zone.parse("2014-03-07 00:00:00"), rt.send(:get_xth_day_of_month, 1, 5, 3, 2014).to_formatted_s(:db)
assert_equal Time.zone.parse("2014-03-28 00:00:00"), rt.send(:get_xth_day_of_month, 4, 5, 3, 2014).to_s(:db) assert_equal Time.zone.parse("2014-03-28 00:00:00"), rt.send(:get_xth_day_of_month, 4, 5, 3, 2014).to_formatted_s(:db)
assert_equal Time.zone.parse("2014-03-28 00:00:00"), rt.send(:get_xth_day_of_month, 5, 5, 3, 2014).to_s(:db) assert_equal Time.zone.parse("2014-03-28 00:00:00"), rt.send(:get_xth_day_of_month, 5, 5, 3, 2014).to_formatted_s(:db)
assert_raise(RuntimeError, "should check on valid weekdays"){ rt.send(:get_xth_day_of_month, 5, 9, 3, 2014) } assert_raise(RuntimeError, "should check on valid weekdays"){ rt.send(:get_xth_day_of_month, 5, 9, 3, 2014) }
assert_raise(RuntimeError, "should check on valid count x"){ rt.send(:get_xth_day_of_month, 6, 5, 3, 2014) } assert_raise(RuntimeError, "should check on valid count x"){ rt.send(:get_xth_day_of_month, 6, 5, 3, 2014) }

View file

@ -10,7 +10,7 @@ class TodoTest < ActiveSupport::TestCase
end end
def next_week def next_week
1.week.from_now.beginning_of_day.to_s(:db) 1.week.from_now.beginning_of_day.to_formatted_s(:db)
end end
# Test loading a todo item # Test loading a todo item