diff --git a/Gemfile b/Gemfile index 312551d6c..3971c268e 100644 --- a/Gemfile +++ b/Gemfile @@ -10,6 +10,7 @@ gem 'devise' gem 'omniauth-github' gem 'pundit' gem 'rbtrace' +gem 'sentry-raven' gem 'paperclip' gem 'sinatra', :require => nil diff --git a/Gemfile.lock b/Gemfile.lock index e35cb7304..75f217f94 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -486,6 +486,8 @@ GEM activerecord (~> 4.2) schema_plus_core (~> 1.0) scrivener (0.0.3) + sentry-raven (2.7.2) + faraday (>= 0.7.6, < 1.0) sexp_processor (4.9.0) shotgun (0.9.2) rack (>= 1.0) @@ -628,6 +630,7 @@ DEPENDENCIES russian sass-rails schema_plus + sentry-raven shotgun shoulda shoulda-matchers diff --git a/app/models/container.rb b/app/models/container.rb new file mode 100644 index 000000000..1edd52dc8 --- /dev/null +++ b/app/models/container.rb @@ -0,0 +1,4 @@ +class Container < ActiveRecord::Base + belongs_to :platform + has_many :build_lists +end diff --git a/db/migrate/20170129102535_create_containers.rb b/db/migrate/20170129102535_create_containers.rb new file mode 100644 index 000000000..69556f7df --- /dev/null +++ b/db/migrate/20170129102535_create_containers.rb @@ -0,0 +1,10 @@ +class CreateContainers < ActiveRecord::Migration + def change + create_table :containers do |t| + t.string :name + t.references :platform, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20170129103216_add_container_to_build_lists.rb b/db/migrate/20170129103216_add_container_to_build_lists.rb new file mode 100644 index 000000000..e9d29b4b1 --- /dev/null +++ b/db/migrate/20170129103216_add_container_to_build_lists.rb @@ -0,0 +1,5 @@ +class AddContainerToBuildLists < ActiveRecord::Migration + def change + add_reference :build_lists, :container, index: true, foreign_key: true + end +end diff --git a/spec/models/container_spec.rb b/spec/models/container_spec.rb new file mode 100644 index 000000000..c74f254d2 --- /dev/null +++ b/spec/models/container_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe Container, type: :model do + pending "add some examples to (or delete) #{__FILE__}" +end