Skip to content

Commit

Permalink
learning about rails conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
pgwillia committed Jan 29, 2018
1 parent c1b3344 commit 029c110
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 19 deletions.
3 changes: 3 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,8 @@ class Application < Rails::Application
# Run skylight in UAT for performance metric monitoring pre-launch
config.skylight.environments += ['uat']

# we can tell crawlers to go away during the beta launch phase
config.allow_crawlers = ENV['RAILS_ALLOW_CRAWLERS'].present?

end
end
3 changes: 0 additions & 3 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,4 @@

# Which ActiveStorage service to use
config.active_storage.service = (ENV['ACTIVE_STORAGE_SERVICE'] || :local).to_sym

# we can tell crawlers to go away during the beta launch phase
config.allow_crawlers = ENV['RAILS_ALLOW_CRAWLERS'].present?
end
3 changes: 0 additions & 3 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,4 @@

# Which ActiveStorage service to use
config.active_storage.service = (ENV['ACTIVE_STORAGE_SERVICE'] || :local).to_sym

# we can tell crawlers to go away during the beta launch phase
config.allow_crawlers = ENV['RAILS_ALLOW_CRAWLERS'].present?
end
3 changes: 0 additions & 3 deletions config/environments/staging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,4 @@

# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false

# we can tell crawlers to go away during the beta launch phase
config.allow_crawlers = ENV['RAILS_ALLOW_CRAWLERS'].present?
end
3 changes: 0 additions & 3 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,4 @@

# Which ActiveStorage service to use
config.active_storage.service = (ENV['ACTIVE_STORAGE_SERVICE'] || :test).to_sym

# we can tell crawlers to go away during the beta launch phase
config.allow_crawlers = ENV['RAILS_ALLOW_CRAWLERS'].present?
end
3 changes: 0 additions & 3 deletions config/environments/uat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,4 @@

# Which ActiveStorage service to use
config.active_storage.service = (ENV['ACTIVE_STORAGE_SERVICE'] || :local).to_sym

# we can tell crawlers to go away during the beta launch phase
config.allow_crawlers = ENV['RAILS_ALLOW_CRAWLERS'].present?
end
8 changes: 4 additions & 4 deletions test/controllers/sitemap_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def before_all
get sitemapindex_url
end
should 'be valid sitemapindex xml' do
schema = Nokogiri::XML::Schema(File.open(File.join(File.dirname(__FILE__), 'siteindex.xsd')))
schema = Nokogiri::XML::Schema(File.open(Rails.root + 'test/fixtures/files/siteindex.xsd'))
document = Nokogiri::XML(@response.body)
assert_empty schema.validate(document)
end
Expand All @@ -76,7 +76,7 @@ def before_all
get items_sitemap_url
end
should 'be valid sitemap xml' do
schema = Nokogiri::XML::Schema(File.open(File.join(File.dirname(__FILE__), 'sitemap.xsd')))
schema = Nokogiri::XML::Schema(File.open(Rails.root + 'test/fixtures/files/sitemap.xsd'))
document = Nokogiri::XML(@response.body)
assert_empty schema.validate(document)
end
Expand Down Expand Up @@ -117,7 +117,7 @@ def before_all
end
should 'be valid sitemap xml' do
get collections_sitemap_url
schema = Nokogiri::XML::Schema(File.open(File.join(File.dirname(__FILE__), 'sitemap.xsd')))
schema = Nokogiri::XML::Schema(File.open(Rails.root + 'test/fixtures/files/sitemap.xsd'))
document = Nokogiri::XML(@response.body)
assert_empty schema.validate(document)
end
Expand All @@ -141,7 +141,7 @@ def before_all
end
should 'be valid sitemap xml' do
get communities_sitemap_url
schema = Nokogiri::XML::Schema(File.open(File.join(File.dirname(__FILE__), 'sitemap.xsd')))
schema = Nokogiri::XML::Schema(File.open(Rails.root + 'test/fixtures/files/sitemap.xsd'))
document = Nokogiri::XML(@response.body)
assert_empty schema.validate(document)
end
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 029c110

Please sign in to comment.