-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3d6c253
commit ec17a20
Showing
10 changed files
with
85 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -482,6 +482,7 @@ GEM | |
|
||
PLATFORMS | ||
x86_64-darwin-19 | ||
x86_64-darwin-20 | ||
|
||
DEPENDENCIES | ||
aasm (~> 5.2.0) | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
class DigitalProduct < ApplicationRecord | ||
has_many :digital_product_versions | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class DigitalProductVersion < ApplicationRecord | ||
belongs_to :digital_product | ||
end |
19 changes: 19 additions & 0 deletions
19
db/migrate/20220405005734_create_digital_product_versions.rb
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
class CreateDigitalProductVersions < ActiveRecord::Migration[7.0] | ||
def change | ||
create_table :digital_product_versions do |t| | ||
t.references :digital_product | ||
t.string :store_url | ||
t.string :platform | ||
t.string :version_number | ||
t.date :publish_date | ||
t.string :description | ||
t.string :whats_new | ||
t.string :screenshot_url | ||
t.string :device | ||
t.string :language | ||
t.string :average_rating | ||
t.integer :number_of_ratings | ||
t.timestamps | ||
end | ||
end | ||
end |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FactoryBot.define do | ||
factory :digital_product do | ||
organization | ||
user | ||
service { 'Test Service' } | ||
url { 'test Url' } | ||
code_repository_url { 'Test code_repository_url' } | ||
language { 'Ruby' } | ||
aasm_status { 'published' } | ||
short_description { 'test product' } | ||
long_description { ' adsfasdfadsfadfasdfasfasdfasdf' } | ||
notes { 'Test notes' } | ||
tags { 'red green blue' } | ||
certified_at { Time.now } | ||
end | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FactoryBot.define do | ||
factory :digital_product_versions do | ||
digital_product | ||
store_url { 'https/something.com' } | ||
platform { 'iOS' } | ||
version_number { '1.9' } | ||
publish_date { Date.today } | ||
description { 'Test description' } | ||
whats_new { 'things' } | ||
screenshot_url { 'https://something.com/image' } | ||
device { 'tablet' } | ||
language { 'ObjectiveC' } | ||
average_rating { '4.5' } | ||
number_of_ratings { 25 } | ||
end | ||
end |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.describe DigitalProductVersion, type: :model do | ||
pending "add some examples to (or delete) #{__FILE__}" | ||
end |
This file contains 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