• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

appfolio / validates_timeliness / 19
98%
master: 98%

Build:
Build:
LAST BUILD BRANCH: supportRails52
DEFAULT BRANCH: master
Ran 12 Jul 2018 08:17PM UTC
Jobs 11
Files 7
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
19

Pull #7

travis-ci

web-flow
pl - add support for Rails 5.1, 5.2

- change gemspec
- appraisal
- generate gemfiles

---

- fix `active_record.time_zone_aware_types` error happen in 5.1 and 5.2

```
DEPRECATION WARNING: Time columns will become time zone aware in Rails 5.1. This still causes `String`s to be parsed as if they were in `Time.zone`, and `Time`s to be converted to `Time.zone`.

To keep the old behavior, you must add the following to your initializer:

    config.active_record.time_zone_aware_types = [:datetime]

To silence this deprecation warning, add the following:

    config.active_record.time_zone_aware_types = [:datetime, :time]
```

What does this even mean? I found an article explain it well http://engineering.liefery.com/2017/10/25/times-in-rails-5.html
Here is a quick summary:

```
Here’s a good way of thinking about it: which columns in your application should return an ActiveSupport::TimeWithZone object?

To keep the old behaviour and only have datetime columns return an ActiveSupport::TimeWithZone object, use [:datetime].
To use the new behaviour and have time columns also return an ActiveSupport::TimeWithZone object, use [:datetime, :time].
```
Here is where I found how to config it without `Rails.config` http://api.rubyonrails.org/classes/ActiveRecord/Timestamp.html

As the testcases suggest, it expects the old behaviour, i.e. only `datetime` is time zone aware.
https://github.com/appfolio/validates_timeliness/blob/<a class=hub.com/appfolio/validates_timeliness/commit/4c80b403e500f36ca3d0d93cf312c0a30828b71c">4c80b403e/spec/validates_timeliness/orm/active_record_spec.rb#L90-L105

I changed `spec_helper.rb` to set `time_zone_aware_types`, but I don't know how to enforce it in a Rails app.

---

In `lib/validates_timeliness/orm/active_record.rb`, the `timeliness_column_for_attribute` function depends on the internal implementation of ActiveRecord.
https://github.com/appfolio/validates_timeliness/blob/4c80b403e500f36ca3d0d93cf312c0a30828b71c/lib/validates_timeliness/orm/active_record.rb#L17-L33

It gave me a really hard ... (continued)
Pull Request #7: Support rails5.1 and rails 5.2

8 of 8 new or added lines in 1 file covered. (100.0%)

246 of 252 relevant lines covered (97.62%)

228.22 hits per line

Jobs
ID Job ID Ran Files Coverage
1 19.1 (2.1.5, gemfiles/rails_4_0.gemfile) 01 Jan 2010 12:00AM UTC 0
94.44
Travis Job 19.1
2 19.2 (2.1.5, gemfiles/rails_4_1.gemfile) 01 Jan 2010 12:00AM UTC 0
94.44
Travis Job 19.2
3 19.3 (2.1.5, gemfiles/rails_4_2.gemfile) 01 Jan 2010 12:00AM UTC 0
94.05
Travis Job 19.3
4 19.4 (2.2.2, gemfiles/rails_4_0.gemfile) 01 Jan 2010 12:00AM UTC 0
94.44
Travis Job 19.4
5 19.5 (2.2.2, gemfiles/rails_4_1.gemfile) 01 Jan 2010 12:00AM UTC 0
94.44
Travis Job 19.5
6 19.6 (2.2.2, gemfiles/rails_4_2.gemfile) 01 Jan 2010 12:00AM UTC 0
94.05
Travis Job 19.6
7 19.7 (2.2.2, gemfiles/rails_5_0.gemfile) 01 Jan 2010 12:00AM UTC 0
94.05
Travis Job 19.7
8 19.8 (2.3.0, gemfiles/rails_4_0.gemfile) 01 Jan 2010 12:00AM UTC 0
94.44
Travis Job 19.8
9 19.9 (2.3.0, gemfiles/rails_4_1.gemfile) 01 Jan 2010 12:00AM UTC 0
94.44
Travis Job 19.9
10 19.10 (2.3.0, gemfiles/rails_4_2.gemfile) 01 Jan 2010 12:00AM UTC 0
94.05
Travis Job 19.10
11 19.11 (2.3.0, gemfiles/rails_5_0.gemfile) 01 Jan 2010 12:00AM UTC 0
94.05
Travis Job 19.11
Source Files on build 19
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #19
  • Pull Request #7
  • PR Base - appfolio (#16)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc