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

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

Build:
Build:
LAST BUILD BRANCH: coverage-setup
DEFAULT BRANCH: master
Ran 30 Mar 2014 01:47PM UTC
Jobs 5
Files 26
Run time 2min
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
47

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

613 of 640 relevant lines covered (95.78%)

81.65 hits per line

Jobs
ID Job ID Ran Files Coverage
1 47.1 (1.9.3) 30 Mar 2014 01:47PM UTC 0
95.9
Travis Job 47.1
2 47.2 (2.0.0) 30 Mar 2014 01:47PM UTC 0
95.9
Travis Job 47.2
4 47.4 (rbx) 30 Mar 2014 01:49PM UTC 0
98.11
Travis Job 47.4
5 47.5 (jruby) 30 Mar 2014 01:48PM UTC 0
95.9
Travis Job 47.5
6 47.6 (ruby-head) 30 Mar 2014 01:50PM UTC 0
95.9
Travis Job 47.6
Source Files on build 47
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #47
  • 2098d770 on github
  • Prev Build on embedded-objects-support (#45)
  • Next Build on embedded-objects-support (#49)
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