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

DavyJonesLocker / client_side_validations / 530 / 10
100%
main: 100%

Build:
Build:
LAST BUILD BRANCH: bugfix/997-proc-validations
DEFAULT BRANCH: main
Ran 05 Dec 2016 03:55PM UTC
Files 28
Run time 2s
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

05 Dec 2016 02:01PM UTC coverage: 99.487%. First build
2.3.2, gemfiles/rails_4.0.gemfile

push

travis-ci

libc
Make conditionals more inline with guides

The Ruby on Rails guide contains the following example

```
  class Computer < ApplicationRecord
    validates :mouse, presence: true,
                      if: ["market.retail?", :desktop?],
                      unless: Proc.new { |c| c.trackpad.present? }
  end
```

Arrays and Strings were not supported before. https://github.com/rails/rails/blob/38fe5ae24/activesupport/lib/active_support/callbacks.rb#L429-L458
was used for inspiration.

Initially I handled a Symbol case, and raised an error if something
unexpected is passed, but that creates more than 100 lines in the
module, and rubocop complains. So I kept the code sending a message if
something other than a Proc or a String is passed.

582 of 585 relevant lines covered (99.49%)

21.76 hits per line

Source Files on job 530.10 (2.3.2, gemfiles/rails_4.0.gemfile)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 530
  • Travis Job 530.10
  • 7ec7854c on github
  • Next Job for 2.3.2, gemfiles/rails_4.0.gemfile on fix-conditionals (#536.10)
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