Commit fa392969 by John Doe

fixed deployment rake task

parent 47fc7d75
Showing with 5 additions and 4 deletions
...@@ -14,7 +14,7 @@ namespace :local do ...@@ -14,7 +14,7 @@ namespace :local do
# Create an admin user" # Create an admin user"
@admin = User.find_by_email(ADMIN_EMAIL) @admin = User.find_by_email(ADMIN_EMAIL)
if(@admin.nil?) if @admin.nil?
puts 'Creating new admin user' puts 'Creating new admin user'
@admin = FactoryBot.create(:user, @admin = FactoryBot.create(:user,
first_name: 'John', first_name: 'John',
...@@ -23,11 +23,12 @@ namespace :local do ...@@ -23,11 +23,12 @@ namespace :local do
password_confirmation: ADMIN_PASSWORD, password_confirmation: ADMIN_PASSWORD,
email: ADMIN_EMAIL) email: ADMIN_EMAIL)
end end
@installation = Nilm.find_by_url("http://localhost/nilmdb") @installation = Nilm.find_by_url("http://localhost:8088")
if(@installation.nil?) if @installation.nil?
puts 'Creating new local installation' puts 'Creating new local installation'
#create a local installation #create a local installation
nilm_creator = CreateNilm.new @node_adapter = Joule::Adapter.new("http://localhost:8088")
nilm_creator = CreateNilm.new(@node_adapter)
nilm_creator.run( nilm_creator.run(
name: 'local', name: 'local',
description: 'local database', description: 'local database',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment