Created
February 28, 2014 17:37
-
-
Save rnaveiras/9275669 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| company = Company.find_by_name 'BT TV' | |
| exit(0) unless company | |
| ActiveRecord::Base.transaction do | |
| User.current = company.users.find_by_login('bebanjo_btvision') | |
| tmt = company.titles_metadata_template | |
| mg = tmt.metadata_groups.create!(:name => 'Direct to Platform', :position => 6) | |
| key = mg.metadata_keys.new(:name => 'DtP Placements') | |
| key.multiple = true | |
| key.enumeration = { | |
| '05439ca3-0f94-4c7a-9c4a-3aec2a87da14' => 'Cardinal Catchup/TV Players/4oD', | |
| 'c55e87d8-ff41-42c2-91bd-c1cfbb406e29' => 'Cardinal Catchup/TV Players/ITV Net Player', | |
| '37a8eb77-287b-4367-9420-635603cd120d' => 'Cardinal Catchup/TV Players/Demand 5', | |
| 'e276433f-c291-4a4c-ae7b-d6367faf1d46' => 'TV Search By Channel', | |
| '004-002-002-002' => 'TV Search By Category', | |
| '004-001-004-002' => 'Film Search By Channel', | |
| '004-001-002-002' => 'Film Search By Category', | |
| '0a8b08d4-26e5-4c26-a755-49899a520d54' => 'Kids Pre-School Players', | |
| '004-003-002-002' => 'Kids Search By Category (All)', | |
| '76025c90-7796-41ac-a7a2-2fa1429635f7' => 'On Demand/Sky Movies/.../Disney', | |
| '48904ff5-dc23-48c5-8299-93eeee70b9b9' => 'On Demand/Sky Movies/.../Family', | |
| '77e00cbe-0dbe-4ee0-b873-cbf8032a808d' => 'On Demand/Sky Movies/.../Comedy', | |
| '58030f19-8b1e-4887-afa7-6597b8e05676' => 'On Demand/Sky Movies/.../Action', | |
| 'a1d496a1-634a-49a8-82d2-417c166f9c60' => 'On Demand/Sky Movies/.../Thriller', | |
| 'e380e89f-f11b-4ff9-99a6-41c3bed0a5e6' => 'On Demand/Sky Movies/.../Horror', | |
| '00a97e23-c9e5-472a-84ee-7e7a96f4d10b' => 'On Demand/Sky Movies/.../SciFi', | |
| '0fd4e369-dc41-4148-bc5b-29180185c7ca' => 'On Demand/Sky Movies/.../Indie', | |
| '3eb44061-d24c-4ee3-a8dc-4822aeb0ef43' => 'On Demand/Sky Movies/.../Drama', | |
| '3aa04a5a-adb3-405b-809e-6d4725585b93' => 'On Demand/Sky Movies/.../Classics', | |
| '03489a58-a04d-4a31-a2a8-5b5baa9db2d8' => 'On Demand/Sky Movies/.../Specials', | |
| '4c73d294-fc79-45ee-b1c4-1b37f93b4796' => 'On Demand/.../Hidden placement(MiscFilm)', | |
| '004-001-003-002' => 'On Demand/Film/Search A-Z', | |
| '004-002-001-001' => 'On Demand/TV/New/Featured', | |
| 'ff7965c8-89e1-4e44-985c-4b38aa811a4b' => 'TV Search By Channel 4 On Demand', | |
| 'a48e1f41-608e-46e9-a850-47954709ee2c' => 'TV > Search By Channel > ITV Net Player', | |
| 'b5cc67f3-3742-407f-9aa2-381c6916e1c8' => 'Kids > Search By Preschool players > Milkshake' } | |
| key.save! | |
| end | |
| puts 'Diret to Platform has been created under metadata group Direct to Platform' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment