Skip to content

Commit

Permalink
Remove defunct database seeding from web-app.
Browse files Browse the repository at this point in the history
This has been moved into the Lua code
(src/api-umbrella/proxy/startup/seed_database.lua) for a while now. Just
cleaning up this old, unused seeding code.
  • Loading branch information
GUI committed Feb 19, 2017
1 parent 027c2e0 commit 6438a71
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 66 deletions.
6 changes: 0 additions & 6 deletions src/api-umbrella/web-app/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ gem "mongoid_rails_migrations", "~> 1.1.0"
# Use master from git for Rails 4 compatibility.
gem "mongoid-store", :git => "https://github.com/ahoward/mongoid-store.git"

# Database seeding
#
# This branch adds mongoid compatibility:
# https://github.com/mbleigh/seed-fu/pull/80
gem "seed-fu", :git => "https://github.com/GUI/seed-fu.git", :branch => "mongoid"

# Elasticsearch
gem "elasticsearch", "~> 2.0.1"

Expand Down
9 changes: 0 additions & 9 deletions src/api-umbrella/web-app/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ GIT
addressable (~> 2.3)
omniauth (~> 1.2)

GIT
remote: https://github.com/GUI/seed-fu.git
revision: 7b265f853514923bf1e2ce9908d6134d69b3ad5c
branch: mongoid
specs:
seed-fu (2.3.6)
activesupport (>= 3.1)

GIT
remote: https://github.com/ahoward/mongoid-store.git
revision: 7b7e34e263a1e25fc0149861e1560f7f483c16ac
Expand Down Expand Up @@ -352,7 +344,6 @@ DEPENDENCIES
rollbar (~> 2.14.0)
safe_yaml (~> 1.0.4)
sass-rails (~> 5.0)
seed-fu!
sequel (~> 4.43.0)
simple_form (~> 3.4.0)

Expand Down
15 changes: 1 addition & 14 deletions src/api-umbrella/web-app/app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,7 @@ def bootstrap_class_for(flash_type)
end

def web_admin_ajax_api_user
user = ApiUser.where(:email => "[email protected]").order_by(:created_at.asc).first
unless(user)
user = ApiUser.create!({
:email => "[email protected]",
:first_name => "API Umbrella Admin",
:last_name => "Key",
:use_description => "An API key for the API Umbrella admin to use for internal ajax requests.",
:terms_and_conditions => "1",
:registration_source => "seed",
:settings_attributes => { :rate_limit_mode => "unlimited" },
}, :without_protection => true)
end

user
ApiUser.where(:email => "[email protected]").order_by(:created_at.asc).first
end

def omniauth_external_providers
Expand Down
35 changes: 0 additions & 35 deletions src/api-umbrella/web-app/db/fixtures/admin_permissions.rb

This file was deleted.

2 changes: 0 additions & 2 deletions src/api-umbrella/web-app/db/seeds.rb
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
# Seed with seed-fu
SeedFu.seed

0 comments on commit 6438a71

Please sign in to comment.