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

rom-rb / rom / 47 / 5
96%
master: %

Build:
Build:
LAST BUILD BRANCH: coverage-setup
DEFAULT BRANCH: master
Ran 30 Mar 2014 01:48PM UTC
Files 26
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

30 Mar 2014 01:39PM UTC coverage: 95.899% (-0.1%) from 96.013%
jruby

push

travis-ci

solnic
Attribute renaming refactor

  * Move Relation#rename operation to **the schema builder**
  * Introduce Relation#rename
  * Introduce Mapper#rename

This gives us ability to rename attribute names when defining schema
**and** makes it possible to use `rename` operation later on using rom's
relation from the environment.

Apart from changing previous behavior there's also new feature -
renaming attributes again when setting up the mappings:

  env.schema do
    base_relation(:users) do
      repository :test
      attribute :id, Integer
      attribute :user_name, String, :rename => :name # that's the new thing
    end
  end

  env.mapping do
    users do
      model User

      # here we say that tuple has :user_id key but we want to use :id
      # in our domain object
      map :id, from: :user_id

      # here we simply map the :name
      map :name
    end
  end

608 of 634 relevant lines covered (95.9%)

10.55 hits per line

Source Files on job 47.5 (jruby)
  • Tree
  • List 0
  • Changed 15
  • Source Changed 7
  • Coverage Changed 14
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 47
  • Travis Job 47.5
  • 2098d770 on github
  • Prev Job for jruby on embedded-objects-support (#45.5)
  • Next Job for jruby on embedded-objects-support (#49.5)
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