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

jgraichen / acfs / 276 / 13
97%
master: 97%

Build:
DEFAULT BRANCH: master
Ran 27 Feb 2014 10:46PM UTC
Files 42
Run time –
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

27 Feb 2014 10:33PM UTC coverage: 97.436% (+0.4%) from 97.055%
rbx, gemfiles/Gemfile.rails-4-0

push

travis-ci

jgraichen
Add support for storing unknown attributes.

Assigning or receiving unknown attribute not longer raises an error
or silently drop the attributes. Instead they will be assigned to
the attributes hash an can be assessed through #attributes as well
as the attribute read/write helpers. If a public setter method
exists the method will be called. The #create class method uses this
to create a new object e.g. to kick in validations as well as
support unregistered attributes send to server. Also #save behaves
the same way, it will serialize all #attributes, even unknown.
The #initialize method will also assign unknown attributes. An
error will be raised if a private attribute setter with matching
name exists.

Example:
  class Session
    attribute :id, :integer
    attribute :user_id, :integer
  end

  session = Session.new login: 'js@example.com', password: 'secret'
  session.attributes #=> {"login"=>"js@example.com",
                     #    "password":"secret"}
  session.save       # Sends "login" and "password" as well as
                     # "id" and "user_id" attributes with default
                     # values.
                     # The server returns "id", "user_id" and
                     # "last_login".
  session.id         #=> 574658
  session.user_id    #=> 234
  session.attributes #=> {"login"=>"js@example.com",
                     #    "password":"secret",
                     #    "id":574658,
                     #    "user_id":234,
                     #    "last_login":"today"}

874 of 897 relevant lines covered (97.44%)

56.9 hits per line

Source Files on job 276.13 (rbx, gemfiles/Gemfile.rails-4-0)
  • Tree
  • List 0
  • Changed 33
  • Source Changed 4
  • Coverage Changed 33
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 276
  • Travis Job 276.13
  • f9b6d7cf on github
  • Prev Job for rbx, gemfiles/Gemfile.rails-4-0 on master (#275.13)
  • Next Job for rbx, gemfiles/Gemfile.rails-4-0 on master (#277.13)
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