Compare commits
2 Commits
show-owner
...
change-big
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
015ed83ac2 | ||
|
|
1045a8c328 |
@@ -6,6 +6,6 @@ module MailHelper
|
|||||||
"1. Tell us the name of the video: \n\n" \
|
"1. Tell us the name of the video: \n\n" \
|
||||||
"2. Attach each EDL to this email. Please make sure to indicate whether the EDL is a Video Only, Graphics Only, or Audio Only EDL."
|
"2. Attach each EDL to this email. Please make sure to indicate whether the EDL is a Video Only, Graphics Only, or Audio Only EDL."
|
||||||
|
|
||||||
mail_to "info@bigmedia.ai", content, subject: subject, body: body
|
mail_to "info@mesuite.ai", content, subject: subject, body: body
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
class AdminMailer < ApplicationMailer
|
class AdminMailer < ApplicationMailer
|
||||||
default to: %w(bray@bigmedia.ai lee@bigmedia.ai)
|
default to: %w[bray@mesuite.ai]
|
||||||
|
|
||||||
def new_video(video)
|
def new_video(video)
|
||||||
@video = video
|
@video = video
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class ApplicationMailer < ActionMailer::Base
|
class ApplicationMailer < ActionMailer::Base
|
||||||
default from: ENV.fetch("MAILER_FROM_ADDRESS") { "support@bigmedia.ai" }
|
default from: ENV.fetch("MAILER_FROM_ADDRESS") { "support@mesuite.ai" }
|
||||||
layout "mailer"
|
layout "mailer"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class AcquiredMediaRelease < ApplicationRecord
|
|||||||
|
|
||||||
class << self
|
class << self
|
||||||
def custom_csv_exportable_headers
|
def custom_csv_exportable_headers
|
||||||
%i[name file_infos_count owner_info]
|
%i[name file_infos_count]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class AppHost
|
|||||||
use_ssl: false,
|
use_ssl: false,
|
||||||
},
|
},
|
||||||
production: {
|
production: {
|
||||||
host: "bigmedia.ai",
|
host: "mesuite.ai",
|
||||||
use_ssl: true,
|
use_ssl: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
module CsvExportable
|
module CsvExportable
|
||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
||||||
COMMON_HEADERS = %i[approved notes tags signed_at].freeze
|
COMMON_HEADERS = %i[approved? notes tags signed_at].freeze
|
||||||
COMMON_VALUES = %w[approved? clean_notes clean_tags signed_on].freeze
|
COMMON_VALUES = %w[clean_notes clean_tags signed_on].freeze
|
||||||
|
|
||||||
included do
|
included do
|
||||||
class << self
|
class << self
|
||||||
@@ -29,20 +29,11 @@ module CsvExportable
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def owner_info
|
|
||||||
compact_contact_info(name: person_name, address: person_address, phone: person_phone, email: person_email)
|
|
||||||
end
|
|
||||||
|
|
||||||
def contact_info
|
def contact_info
|
||||||
owner_info
|
|
||||||
end
|
|
||||||
|
|
||||||
def compact_contact_info(name: nil, address: nil, phone: nil, email: nil)
|
|
||||||
contact_info = ''
|
contact_info = ''
|
||||||
contact_info += "#{name}; " if name.present?
|
contact_info += "#{person_address}; " if person_address.present?
|
||||||
contact_info += "#{address}; " if address.present?
|
contact_info += "P: #{person_phone}; " if person_phone.present?
|
||||||
contact_info += "P: #{phone}; " if phone.present?
|
contact_info += "E: #{person_email}" if person_email.present?
|
||||||
contact_info += "E: #{email}" if email.present?
|
|
||||||
contact_info.delete_suffix '; '
|
contact_info.delete_suffix '; '
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class LocationRelease < ApplicationRecord
|
|||||||
|
|
||||||
class << self
|
class << self
|
||||||
def custom_csv_exportable_headers
|
def custom_csv_exportable_headers
|
||||||
%i[location_info owner_info amendment_signed_column]
|
%i[name address]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -67,18 +67,6 @@ class LocationRelease < ApplicationRecord
|
|||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
def location_info
|
|
||||||
compact_contact_info(name: name, address: address)
|
|
||||||
end
|
|
||||||
|
|
||||||
def amendment_signed_column
|
|
||||||
if amendment_signable?
|
|
||||||
amendment_signed?
|
|
||||||
else
|
|
||||||
I18n.t('location_releases.csv.no_amendment_clause')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def end_date_after_start_date
|
def end_date_after_start_date
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class MaterialRelease < ApplicationRecord
|
|||||||
|
|
||||||
class << self
|
class << self
|
||||||
def custom_csv_exportable_headers
|
def custom_csv_exportable_headers
|
||||||
%i[name owner_info]
|
%i[name]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -18,9 +18,6 @@
|
|||||||
<%= fa_icon("warning", text: t(".no_media"), class: "text-danger") %>
|
<%= fa_icon("warning", text: t(".no_media"), class: "text-danger") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
<%= contact_info_for(acquired_media_release.contact_person) %>
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
<%= notes_preview acquired_media_release.notes.order_by_recent %>
|
<%= notes_preview acquired_media_release.notes.order_by_recent %>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -29,7 +29,6 @@
|
|||||||
<th><%= t '.table_headers.approved'%></th>
|
<th><%= t '.table_headers.approved'%></th>
|
||||||
<th><%= AcquiredMediaRelease.human_attribute_name(:name) %></th>
|
<th><%= AcquiredMediaRelease.human_attribute_name(:name) %></th>
|
||||||
<th><%= t(".table_headers.file_infos_count") %></th>
|
<th><%= t(".table_headers.file_infos_count") %></th>
|
||||||
<th><%= t(".table_headers.owner_info") %></th>
|
|
||||||
<th><%= t(".table_headers.notes") %></th>
|
<th><%= t(".table_headers.notes") %></th>
|
||||||
<th><%= t(".table_headers.tags") %></th>
|
<th><%= t(".table_headers.tags") %></th>
|
||||||
<th><%= t(".table_headers.signed_at") %></th>
|
<th><%= t(".table_headers.signed_at") %></th>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="<%= I18n.locale %>">
|
<html lang="<%= I18n.locale %>">
|
||||||
<head>
|
<head>
|
||||||
<title>BiGMedia.ai App</title>
|
<title>MESuite.ai App</title>
|
||||||
<%= csrf_meta_tags %>
|
<%= csrf_meta_tags %>
|
||||||
<%= csp_meta_tag %>
|
<%= csp_meta_tag %>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="<%= I18n.locale %>">
|
<html lang="<%= I18n.locale %>">
|
||||||
<head>
|
<head>
|
||||||
<title>BiGMedia.ai App</title>
|
<title>MESuite.ai App</title>
|
||||||
<%= csrf_meta_tags %>
|
<%= csrf_meta_tags %>
|
||||||
<%= csp_meta_tag %>
|
<%= csp_meta_tag %>
|
||||||
|
|
||||||
|
|||||||
@@ -18,9 +18,6 @@
|
|||||||
<td>
|
<td>
|
||||||
<%= material_release.name %>
|
<%= material_release.name %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
<%= contact_info_for(material_release.contact_person) %>
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
<%= notes_preview material_release.notes.order_by_recent %>
|
<%= notes_preview material_release.notes.order_by_recent %>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -29,10 +29,10 @@
|
|||||||
<th><%= t '.table_headers.approved'%></th>
|
<th><%= t '.table_headers.approved'%></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th><%= MaterialRelease.human_attribute_name(:name) %></th>
|
<th><%= MaterialRelease.human_attribute_name(:name) %></th>
|
||||||
<th><%= t(".table_headers.owner_info") %>
|
|
||||||
<th><%= t(".table_headers.notes") %></th>
|
<th><%= t(".table_headers.notes") %></th>
|
||||||
<th><%= t(".table_headers.tags") %></th>
|
<th><%= t(".table_headers.tags") %></th>
|
||||||
<th><%= t(".table_headers.signed_at") %></th>
|
<th><%= t(".table_headers.signed_at") %></th>
|
||||||
|
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|||||||
@@ -10,5 +10,5 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If you have questions about how to use the software, please visit <%= link_to "BiGMedia.ai", "https://www.bigmedia.ai/contact" %>.
|
If you have questions about how to use the software, please visit <%= link_to "MESuite.ai", "https://www.mesuite.ai/contact" %>.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -7,4 +7,4 @@ Please click below to set your password.
|
|||||||
<%= edit_password_reset_url(id: @user.password_reset_token, host: AppHost.new.domain_with_port) %>
|
<%= edit_password_reset_url(id: @user.password_reset_token, host: AppHost.new.domain_with_port) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
If you have questions about how to use the software, please visit https://www.bigmedia.ai/contact.
|
If you have questions about how to use the software, please visit https://www.mesuite.ai/contact.
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ en:
|
|||||||
file_infos_count: No. Files
|
file_infos_count: No. Files
|
||||||
name: Name
|
name: Name
|
||||||
notes: Notes
|
notes: Notes
|
||||||
owner_info: Owner Info
|
|
||||||
signed_at: Date Signed
|
signed_at: Date Signed
|
||||||
tags: Tags
|
tags: Tags
|
||||||
new:
|
new:
|
||||||
@@ -827,8 +826,6 @@ en:
|
|||||||
location_releases:
|
location_releases:
|
||||||
create:
|
create:
|
||||||
notice: The location release has been created
|
notice: The location release has been created
|
||||||
csv:
|
|
||||||
no_amendment_clause: No amendment clause
|
|
||||||
destroy:
|
destroy:
|
||||||
alert: The location release has been deleted
|
alert: The location release has been deleted
|
||||||
edit:
|
edit:
|
||||||
@@ -852,7 +849,6 @@ en:
|
|||||||
empty: Location Releases will appear here
|
empty: Location Releases will appear here
|
||||||
table_headers:
|
table_headers:
|
||||||
amendment_signed: Amendment
|
amendment_signed: Amendment
|
||||||
amendment_signed_column: Amendment
|
|
||||||
approved: Approved
|
approved: Approved
|
||||||
location_info: Location Info
|
location_info: Location Info
|
||||||
notes: Notes
|
notes: Notes
|
||||||
@@ -907,7 +903,6 @@ en:
|
|||||||
approved: Approved
|
approved: Approved
|
||||||
name: Name
|
name: Name
|
||||||
notes: Notes
|
notes: Notes
|
||||||
owner_info: Owner Info
|
|
||||||
signed_at: Date Signed
|
signed_at: Date Signed
|
||||||
tags: Tags
|
tags: Tags
|
||||||
material_release:
|
material_release:
|
||||||
@@ -932,6 +927,7 @@ en:
|
|||||||
empty: Medical releases will appear here
|
empty: Medical releases will appear here
|
||||||
table_headers:
|
table_headers:
|
||||||
approved: Approved
|
approved: Approved
|
||||||
|
approved?: Approved
|
||||||
contact_info: Contact info
|
contact_info: Contact info
|
||||||
name: Person name
|
name: Person name
|
||||||
notes: Notes
|
notes: Notes
|
||||||
|
|||||||
@@ -16,11 +16,9 @@ es:
|
|||||||
heading: Guardian Photo
|
heading: Guardian Photo
|
||||||
index:
|
index:
|
||||||
table_headers:
|
table_headers:
|
||||||
approved: Appproved (ES)
|
|
||||||
file_infos_count: No. Files (ES)
|
file_infos_count: No. Files (ES)
|
||||||
name: Name (ES)
|
name: Name (ES)
|
||||||
notes: Notes (ES)
|
notes: Notes (ES)
|
||||||
owner_info: Owner Info (ES)
|
|
||||||
signed_at: Date Signed (ES)
|
signed_at: Date Signed (ES)
|
||||||
tags: Tags (ES)
|
tags: Tags (ES)
|
||||||
activerecord:
|
activerecord:
|
||||||
@@ -66,7 +64,6 @@ es:
|
|||||||
index:
|
index:
|
||||||
imported_appearance_release_missing_attachment: Person photo or contract missing for imported appearance release (ES)
|
imported_appearance_release_missing_attachment: Person photo or contract missing for imported appearance release (ES)
|
||||||
table_headers:
|
table_headers:
|
||||||
approved: Approved (ES)
|
|
||||||
contact_info: ""
|
contact_info: ""
|
||||||
name: ""
|
name: ""
|
||||||
notes: ""
|
notes: ""
|
||||||
@@ -405,8 +402,6 @@ es:
|
|||||||
update: Approve (ES)
|
update: Approve (ES)
|
||||||
update: 'Actualizar %{model}'
|
update: 'Actualizar %{model}'
|
||||||
location_releases:
|
location_releases:
|
||||||
csv:
|
|
||||||
no_amendment_clause: No amendment clause (ES)
|
|
||||||
form:
|
form:
|
||||||
photos:
|
photos:
|
||||||
dropzone_label: Tap to take a photo of the Property (optional) (ES)
|
dropzone_label: Tap to take a photo of the Property (optional) (ES)
|
||||||
@@ -414,8 +409,6 @@ es:
|
|||||||
table_headers:
|
table_headers:
|
||||||
address: Address (ES)
|
address: Address (ES)
|
||||||
amendment_signed: Amendment (ES)
|
amendment_signed: Amendment (ES)
|
||||||
amendment_signed_column: Amendment signed (ES)
|
|
||||||
approved: Approved (ES)
|
|
||||||
notes: Notes (ES)
|
notes: Notes (ES)
|
||||||
signed_at: Date Signed (ES)
|
signed_at: Date Signed (ES)
|
||||||
tags: Tags (ES)
|
tags: Tags (ES)
|
||||||
@@ -441,10 +434,8 @@ es:
|
|||||||
heading: Guardian Photo
|
heading: Guardian Photo
|
||||||
index:
|
index:
|
||||||
table_headers:
|
table_headers:
|
||||||
approved: Approved (ES)
|
|
||||||
name: Name (ES)
|
name: Name (ES)
|
||||||
notes: Notes (ES)
|
notes: Notes (ES)
|
||||||
owner_info: Owner Info
|
|
||||||
signed_at: Date Signed (ES)
|
signed_at: Date Signed (ES)
|
||||||
tags: Tags (ES)
|
tags: Tags (ES)
|
||||||
medical_releases:
|
medical_releases:
|
||||||
@@ -453,6 +444,7 @@ es:
|
|||||||
index:
|
index:
|
||||||
table_headers:
|
table_headers:
|
||||||
approved: Approved (ES)
|
approved: Approved (ES)
|
||||||
|
approved?: Approved (ES)
|
||||||
contact_info: Contact info (ES)
|
contact_info: Contact info (ES)
|
||||||
name: Person name (ES)
|
name: Person name (ES)
|
||||||
notes: Notes (ES)
|
notes: Notes (ES)
|
||||||
@@ -466,7 +458,6 @@ es:
|
|||||||
misc_releases:
|
misc_releases:
|
||||||
index:
|
index:
|
||||||
table_headers:
|
table_headers:
|
||||||
approved: Approved (ES)
|
|
||||||
contact_info: Contact info (ES)
|
contact_info: Contact info (ES)
|
||||||
name: Person name (ES)
|
name: Person name (ES)
|
||||||
notes: Notes (ES)
|
notes: Notes (ES)
|
||||||
@@ -475,7 +466,6 @@ es:
|
|||||||
music_releases:
|
music_releases:
|
||||||
index:
|
index:
|
||||||
table_headers:
|
table_headers:
|
||||||
approved: Approved (ES)
|
|
||||||
composers_count: No. Composers (ES)
|
composers_count: No. Composers (ES)
|
||||||
file_infos_count: No. Files (ES)
|
file_infos_count: No. Files (ES)
|
||||||
name: Name (ES)
|
name: Name (ES)
|
||||||
@@ -637,7 +627,6 @@ es:
|
|||||||
heading: Guardian Photo (ES)
|
heading: Guardian Photo (ES)
|
||||||
index:
|
index:
|
||||||
table_headers:
|
table_headers:
|
||||||
approved: Approved (ES)
|
|
||||||
email: Email (ES)
|
email: Email (ES)
|
||||||
name: Name (ES)
|
name: Name (ES)
|
||||||
notes: Notes (ES)
|
notes: Notes (ES)
|
||||||
|
|||||||
@@ -4,22 +4,6 @@ FactoryBot.define do
|
|||||||
|
|
||||||
name "Test Acquired Media Release"
|
name "Test Acquired Media Release"
|
||||||
|
|
||||||
trait :with_address do
|
|
||||||
person_address_street1 "St1"
|
|
||||||
person_address_street2 "St2"
|
|
||||||
person_address_city "City"
|
|
||||||
person_address_state "State"
|
|
||||||
person_address_zip "123"
|
|
||||||
person_address_country "US"
|
|
||||||
end
|
|
||||||
|
|
||||||
trait :with_owner_info do
|
|
||||||
person_first_name "Jane"
|
|
||||||
person_last_name "Doe"
|
|
||||||
person_phone "100-555-1001"
|
|
||||||
person_email "owner@email.com"
|
|
||||||
end
|
|
||||||
|
|
||||||
trait :native do
|
trait :native do
|
||||||
signature do
|
signature do
|
||||||
path = Rails.root.join("spec", "fixtures", "files", "signature.png")
|
path = Rails.root.join("spec", "fixtures", "files", "signature.png")
|
||||||
|
|||||||
@@ -4,20 +4,10 @@ FactoryBot.define do
|
|||||||
|
|
||||||
name "Test Materials"
|
name "Test Materials"
|
||||||
|
|
||||||
trait :with_address do
|
|
||||||
person_address_street1 "St1"
|
|
||||||
person_address_street2 "St2"
|
|
||||||
person_address_city "City"
|
|
||||||
person_address_state "State"
|
|
||||||
person_address_zip "123"
|
|
||||||
person_address_country "US"
|
|
||||||
end
|
|
||||||
|
|
||||||
trait :native do
|
trait :native do
|
||||||
person_first_name "Jane"
|
person_first_name "Jane"
|
||||||
person_last_name "Doe"
|
person_last_name "Doe"
|
||||||
person_phone "100-555-1001"
|
person_phone "100-555-1001"
|
||||||
person_email "owner@email.com"
|
|
||||||
|
|
||||||
signature do
|
signature do
|
||||||
path = Rails.root.join("spec", "fixtures", "files", "signature.png")
|
path = Rails.root.join("spec", "fixtures", "files", "signature.png")
|
||||||
|
|||||||
@@ -165,24 +165,6 @@ feature "User managing acquired_media releases" do
|
|||||||
sign_in current_user
|
sign_in current_user
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "index table shows owner info" do
|
|
||||||
release = create(:acquired_media_release, :with_owner_info, :with_address, project: project)
|
|
||||||
|
|
||||||
visit project_acquired_media_releases_path(project)
|
|
||||||
|
|
||||||
expect(page).to have_content owner_info_table_header
|
|
||||||
|
|
||||||
expect(page).to have_content release.person_first_name
|
|
||||||
expect(page).to have_content release.person_last_name
|
|
||||||
expect(page).to have_content release.person_phone
|
|
||||||
expect(page).to have_content release.person_email
|
|
||||||
expect(page).to have_content release.person_address_street1
|
|
||||||
expect(page).to have_content release.person_address_city
|
|
||||||
expect(page).to have_content release.person_address_state
|
|
||||||
expect(page).to have_content release.person_address_zip
|
|
||||||
expect(page).to have_content release.person_address_country
|
|
||||||
end
|
|
||||||
|
|
||||||
scenario "creating a release for an adult", js: true do
|
scenario "creating a release for an adult", js: true do
|
||||||
visit new_project_acquired_media_release_path(project)
|
visit new_project_acquired_media_release_path(project)
|
||||||
|
|
||||||
@@ -280,7 +262,6 @@ feature "User managing acquired_media releases" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
scenario "creating, updating, destroying a release", js: true do
|
scenario "creating, updating, destroying a release", js: true do
|
||||||
resize_window_to(1_000, 1_000) do
|
|
||||||
release_data = {
|
release_data = {
|
||||||
name: "Test Acquired Media Release",
|
name: "Test Acquired Media Release",
|
||||||
applicable_media: ApplicableMedium.last.label,
|
applicable_media: ApplicableMedium.last.label,
|
||||||
@@ -345,7 +326,6 @@ feature "User managing acquired_media releases" do
|
|||||||
expect(page).not_to have_content("New name")
|
expect(page).not_to have_content("New name")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
scenario "viewing the contract PDF for an adult" do
|
scenario "viewing the contract PDF for an adult" do
|
||||||
acquired_media_release = create(:acquired_media_release_with_contract_template,
|
acquired_media_release = create(:acquired_media_release_with_contract_template,
|
||||||
@@ -856,8 +836,4 @@ feature "User managing acquired_media releases" do
|
|||||||
def successful_import_message
|
def successful_import_message
|
||||||
t 'acquired_media_releases.create.notice'
|
t 'acquired_media_releases.create.notice'
|
||||||
end
|
end
|
||||||
|
|
||||||
def owner_info_table_header
|
|
||||||
t 'acquired_media_releases.index.table_headers.owner_info'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -185,24 +185,6 @@ feature "User managing material releases" do
|
|||||||
sign_in current_user
|
sign_in current_user
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "index table shows owner info" do
|
|
||||||
release = create(:material_release, :native, :with_address, project: project)
|
|
||||||
|
|
||||||
visit project_material_releases_path(project)
|
|
||||||
|
|
||||||
expect(page).to have_content owner_info_table_header
|
|
||||||
|
|
||||||
expect(page).to have_content release.person_first_name
|
|
||||||
expect(page).to have_content release.person_last_name
|
|
||||||
expect(page).to have_content release.person_phone
|
|
||||||
expect(page).to have_content release.person_email
|
|
||||||
expect(page).to have_content release.person_address_street1
|
|
||||||
expect(page).to have_content release.person_address_city
|
|
||||||
expect(page).to have_content release.person_address_state
|
|
||||||
expect(page).to have_content release.person_address_zip
|
|
||||||
expect(page).to have_content release.person_address_country
|
|
||||||
end
|
|
||||||
|
|
||||||
scenario "creating a release for and adult", js: true do
|
scenario "creating a release for and adult", js: true do
|
||||||
visit new_project_material_release_path(project)
|
visit new_project_material_release_path(project)
|
||||||
|
|
||||||
@@ -831,8 +813,4 @@ feature "User managing material releases" do
|
|||||||
def signature_field
|
def signature_field
|
||||||
'material_release_signature_base64'
|
'material_release_signature_base64'
|
||||||
end
|
end
|
||||||
|
|
||||||
def owner_info_table_header
|
|
||||||
t 'material_releases.index.table_headers.owner_info'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ feature "User managing videos" do
|
|||||||
expect(page).to have_selector "#video_edl_file", visible: :all
|
expect(page).to have_selector "#video_edl_file", visible: :all
|
||||||
expect(page).to have_selector "#video_graphics_only_edl_file", visible: :all
|
expect(page).to have_selector "#video_graphics_only_edl_file", visible: :all
|
||||||
expect(page).to have_selector "#video_audio_only_edl_file", visible: :all
|
expect(page).to have_selector "#video_audio_only_edl_file", visible: :all
|
||||||
expect(page).to have_link "click here", href: /mailto:info@bigmedia\.ai/
|
expect(page).to have_link "click here", href: /mailto:info@mesuite\.ai/
|
||||||
|
|
||||||
fill_in_video_fields name: "New name", number: "99"
|
fill_in_video_fields name: "New name", number: "99"
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ RSpec.describe MailHelper, type: :helper do
|
|||||||
link = CGI.unescape helper.mail_to_for_multiple_edls("test content", project)
|
link = CGI.unescape helper.mail_to_for_multiple_edls("test content", project)
|
||||||
|
|
||||||
expect(link).to match "test content"
|
expect(link).to match "test content"
|
||||||
expect(link).to match "info@bigmedia.ai"
|
expect(link).to match "info@mesuite.ai"
|
||||||
expect(link).to match /Multiple Adobe Premiere EDLs needed for Test Account's Test Project project/
|
expect(link).to match /Multiple Adobe Premiere EDLs needed for Test Account's Test Project project/
|
||||||
expect(link).to match "INSTRUCTIONS"
|
expect(link).to match "INSTRUCTIONS"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -25,31 +25,6 @@ describe GenerateContractsZipJob do
|
|||||||
end
|
end
|
||||||
|
|
||||||
describe ".perform_now" do
|
describe ".perform_now" do
|
||||||
shared_examples "generates ZIP containig CSV file with all releases data" do
|
|
||||||
it "generates ZIP containing CSV file with all releases data for all release types" do
|
|
||||||
lowercase_plural = subject.constantize.model_name.plural
|
|
||||||
GenerateContractsZipJob.perform_now(project, download, subject, project.public_send(lowercase_plural).ids)
|
|
||||||
|
|
||||||
generated_zip = download.file.blob.download
|
|
||||||
csv_file_name = "#{project.name.parameterize}_#{lowercase_plural.gsub('_', '-')}.csv"
|
|
||||||
Zip::InputStream.open(StringIO.new(generated_zip)) do |io|
|
|
||||||
while entry = io.get_next_entry
|
|
||||||
next unless entry.name == csv_file_name
|
|
||||||
|
|
||||||
csv_file = entry.get_input_stream.read
|
|
||||||
|
|
||||||
release_class = Object.const_get subject
|
|
||||||
release_headers = release_class.csv_headers
|
|
||||||
|
|
||||||
release_headers.each do |header|
|
|
||||||
expect(csv_file).to match header
|
|
||||||
expect(csv_file).not_to match translation_missing
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
it "updates a download record and creates attachment for it" do
|
it "updates a download record and creates attachment for it" do
|
||||||
GenerateContractsZipJob.perform_now(project, download, "AppearanceRelease", project.appearance_releases.ids)
|
GenerateContractsZipJob.perform_now(project, download, "AppearanceRelease", project.appearance_releases.ids)
|
||||||
|
|
||||||
@@ -60,60 +35,36 @@ describe GenerateContractsZipJob do
|
|||||||
expect(download.file).to be_attached
|
expect(download.file).to be_attached
|
||||||
end
|
end
|
||||||
|
|
||||||
context "generates ZIP for acquired media releases" do
|
it "generates ZIP containing CSV file with all releases data for all release types" do
|
||||||
let(:release) { create(:acquired_media_release_with_contract_template, :native, project: project) }
|
release_types = %w[AcquiredMediaRelease AppearanceRelease LocationRelease MaterialRelease MedicalRelease MiscRelease MusicRelease TalentRelease]
|
||||||
subject { 'AcquiredMediaRelease' }
|
create_releases_for_all_types
|
||||||
|
|
||||||
it_behaves_like "generates ZIP containig CSV file with all releases data"
|
release_types.each do |type|
|
||||||
|
lowercase_plural = type.constantize.model_name.plural
|
||||||
|
GenerateContractsZipJob.perform_now(project, download, type, project.public_send(lowercase_plural).ids)
|
||||||
|
|
||||||
|
generated_zip = download.file.blob.download
|
||||||
|
csv_file_name = "#{project.name.parameterize}_#{lowercase_plural.gsub('_', '-')}.csv"
|
||||||
|
Zip::InputStream.open(StringIO.new(generated_zip)) do |io|
|
||||||
|
while entry = io.get_next_entry
|
||||||
|
next unless entry.name == csv_file_name
|
||||||
|
|
||||||
|
csv_file = entry.get_input_stream.read
|
||||||
|
|
||||||
|
release_class = Object.const_get type
|
||||||
|
release_headers = release_class.csv_headers
|
||||||
|
|
||||||
|
release_headers.each do |header|
|
||||||
|
expect(csv_file).to match header
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "generates ZIP for appearance releases" do
|
dummy_zip_file_name = "#{project.name.parameterize}_#{lowercase_plural.gsub('_', '-')}.zip"
|
||||||
let(:release) { create(:appearance_release_with_contract_template, :native, project: project, person_name: "John Doe") }
|
if File.exist?(file_fixture(dummy_zip_file_name))
|
||||||
subject { 'AppearanceRelease' }
|
File.delete(file_fixture(dummy_zip_file_name))
|
||||||
|
|
||||||
it_behaves_like "generates ZIP containig CSV file with all releases data"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context "generates ZIP for location releases" do
|
|
||||||
let(:release) { create(:location_release_with_contract_template, :native, project: project) }
|
|
||||||
subject { 'LocationRelease' }
|
|
||||||
|
|
||||||
it_behaves_like "generates ZIP containig CSV file with all releases data"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context "generates ZIP for material releases" do
|
|
||||||
let(:release) { create(:material_release_with_contract_template, :native, project: project) }
|
|
||||||
subject { 'MaterialRelease' }
|
|
||||||
|
|
||||||
it_behaves_like "generates ZIP containig CSV file with all releases data"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context "generates ZIP for medical releases" do
|
|
||||||
let(:release) { create(:medical_release_with_contract_template, :native, project: project) }
|
|
||||||
subject { 'MedicalRelease' }
|
|
||||||
|
|
||||||
it_behaves_like "generates ZIP containig CSV file with all releases data"
|
|
||||||
end
|
|
||||||
|
|
||||||
context "generates ZIP for misc releases" do
|
|
||||||
let(:release) { create(:misc_release_with_contract_template, :native, project: project) }
|
|
||||||
subject { 'MiscRelease' }
|
|
||||||
|
|
||||||
it_behaves_like "generates ZIP containig CSV file with all releases data"
|
|
||||||
end
|
|
||||||
|
|
||||||
context "generates ZIP for music releases" do
|
|
||||||
let(:release) { create(:music_release_with_contract_template, project: project) }
|
|
||||||
subject { 'MusicRelease' }
|
|
||||||
|
|
||||||
it_behaves_like "generates ZIP containig CSV file with all releases data"
|
|
||||||
end
|
|
||||||
|
|
||||||
context "generates ZIP for talent releases" do
|
|
||||||
let(:release) { create(:talent_release_with_contract_template, :native, project: project) }
|
|
||||||
subject { 'TalentRelease' }
|
|
||||||
|
|
||||||
it_behaves_like "generates ZIP containig CSV file with all releases data"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context "When there are errors" do
|
context "When there are errors" do
|
||||||
@@ -137,16 +88,21 @@ describe GenerateContractsZipJob do
|
|||||||
# Delete the file created in fixture.
|
# Delete the file created in fixture.
|
||||||
# Or the tests will fail on next run due to already existing files in existing zip.
|
# Or the tests will fail on next run due to already existing files in existing zip.
|
||||||
path = Rails.root.join("spec", "fixtures", "files")
|
path = Rails.root.join("spec", "fixtures", "files")
|
||||||
releases = %w[acquired-media appearance location material medical misc music talent]
|
if File.exists? "#{path}/my-video-project_appearance-releases.zip"
|
||||||
releases.each do |release|
|
File.delete("#{path}/my-video-project_appearance-releases.zip")
|
||||||
if File.exists? "#{path}/my-video-project_#{release}-releases.zip"
|
|
||||||
File.delete("#{path}/my-video-project_#{release}-releases.zip")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
def translation_missing
|
|
||||||
/translation missing/
|
def create_releases_for_all_types
|
||||||
|
create(:acquired_media_release_with_contract_template, :native, project: project)
|
||||||
|
create(:appearance_release_with_contract_template, :native, project: project, person_name: "John Doe")
|
||||||
|
create(:location_release_with_contract_template, :native, project: project)
|
||||||
|
create(:material_release_with_contract_template, :native, project: project)
|
||||||
|
create(:medical_release_with_contract_template, :native, project: project)
|
||||||
|
create(:misc_release_with_contract_template, :native, project: project)
|
||||||
|
create(:music_release_with_contract_template, project: project)
|
||||||
|
create(:talent_release_with_contract_template, :native, project: project)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ RSpec.describe AdminMailer do
|
|||||||
|
|
||||||
it "renders the headers" do
|
it "renders the headers" do
|
||||||
expect(mail.subject).to eq("[New Video] Test Account has uploaded a new video")
|
expect(mail.subject).to eq("[New Video] Test Account has uploaded a new video")
|
||||||
expect(mail.to).to eq(["bray@bigmedia.ai", "lee@bigmedia.ai"])
|
expect(mail.to).to eq(["bray@mesuite.ai"])
|
||||||
expect(mail.from).to eq(["support@bigmedia.ai"])
|
expect(mail.from).to eq(["support@mesuite.ai"])
|
||||||
end
|
end
|
||||||
|
|
||||||
it "renders the body" do
|
it "renders the body" do
|
||||||
@@ -24,8 +24,8 @@ RSpec.describe AdminMailer do
|
|||||||
|
|
||||||
it "renders the headers" do
|
it "renders the headers" do
|
||||||
expect(mail.subject).to eq("[Updated Video EDL File] Test Account has updated the EDL file for video_file.mp4")
|
expect(mail.subject).to eq("[Updated Video EDL File] Test Account has updated the EDL file for video_file.mp4")
|
||||||
expect(mail.to).to eq(["bray@bigmedia.ai", "lee@bigmedia.ai"])
|
expect(mail.to).to eq(["bray@mesuite.ai"])
|
||||||
expect(mail.from).to eq(["support@bigmedia.ai"])
|
expect(mail.from).to eq(["support@mesuite.ai"])
|
||||||
end
|
end
|
||||||
|
|
||||||
it "renders the body" do
|
it "renders the body" do
|
||||||
@@ -41,8 +41,8 @@ RSpec.describe AdminMailer do
|
|||||||
|
|
||||||
it "renders the headers" do
|
it "renders the headers" do
|
||||||
expect(mail.subject).to eq("[Updated Video Graphics Only EDL File] Test Account has updated the Graphics Only EDL file for video_file.mp4")
|
expect(mail.subject).to eq("[Updated Video Graphics Only EDL File] Test Account has updated the Graphics Only EDL file for video_file.mp4")
|
||||||
expect(mail.to).to eq(["bray@bigmedia.ai", "lee@bigmedia.ai"])
|
expect(mail.to).to eq(["bray@mesuite.ai"])
|
||||||
expect(mail.from).to eq(["support@bigmedia.ai"])
|
expect(mail.from).to eq(["support@mesuite.ai"])
|
||||||
end
|
end
|
||||||
|
|
||||||
it "renders the body" do
|
it "renders the body" do
|
||||||
@@ -58,8 +58,8 @@ RSpec.describe AdminMailer do
|
|||||||
|
|
||||||
it "renders the headers" do
|
it "renders the headers" do
|
||||||
expect(mail.subject).to eq("[Updated Video Audio Only EDL File] Test Account has updated the Audio Only EDL file for video_file.mp4")
|
expect(mail.subject).to eq("[Updated Video Audio Only EDL File] Test Account has updated the Audio Only EDL file for video_file.mp4")
|
||||||
expect(mail.to).to eq(["bray@bigmedia.ai", "lee@bigmedia.ai"])
|
expect(mail.to).to eq(["bray@mesuite.ai"])
|
||||||
expect(mail.from).to eq(["support@bigmedia.ai"])
|
expect(mail.from).to eq(["support@mesuite.ai"])
|
||||||
end
|
end
|
||||||
|
|
||||||
it "renders the body" do
|
it "renders the body" do
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ describe UserMailer do
|
|||||||
it "renders the headers" do
|
it "renders the headers" do
|
||||||
expect(mail.subject).to eq("Password reset")
|
expect(mail.subject).to eq("Password reset")
|
||||||
expect(mail.to).to eq([user.email])
|
expect(mail.to).to eq([user.email])
|
||||||
expect(mail.from).to eq(["support@bigmedia.ai"])
|
expect(mail.from).to eq(["support@mesuite.ai"])
|
||||||
end
|
end
|
||||||
|
|
||||||
it "renders the body" do
|
it "renders the body" do
|
||||||
@@ -24,7 +24,7 @@ describe UserMailer do
|
|||||||
it "renders the headers" do
|
it "renders the headers" do
|
||||||
expect(mail.subject).to eq("You've been added to a project in the ME Suite")
|
expect(mail.subject).to eq("You've been added to a project in the ME Suite")
|
||||||
expect(mail.to).to eq([user.email])
|
expect(mail.to).to eq([user.email])
|
||||||
expect(mail.from).to eq(["support@bigmedia.ai"])
|
expect(mail.from).to eq(["support@mesuite.ai"])
|
||||||
end
|
end
|
||||||
|
|
||||||
it "renders the body" do
|
it "renders the body" do
|
||||||
@@ -50,7 +50,7 @@ describe UserMailer do
|
|||||||
it "renders the headers" do
|
it "renders the headers" do
|
||||||
expect(mail.subject).to eq("Welcome to BiG")
|
expect(mail.subject).to eq("Welcome to BiG")
|
||||||
expect(mail.to).to eq([user.email])
|
expect(mail.to).to eq([user.email])
|
||||||
expect(mail.from).to eq(["support@bigmedia.ai"])
|
expect(mail.from).to eq(["support@mesuite.ai"])
|
||||||
end
|
end
|
||||||
|
|
||||||
it "renders the body" do
|
it "renders the body" do
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ describe AppHost do
|
|||||||
|
|
||||||
app_domain = AppHost.new(env, "production")
|
app_domain = AppHost.new(env, "production")
|
||||||
|
|
||||||
expect(app_domain.domain).to eq("bigmedia.ai")
|
expect(app_domain.domain).to eq("mesuite.ai")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user