Commit dc486e8d by source_reader

updated dependencies

parent f4f863c5
FactoryBot.define do FactoryBot.define do
factory :annotation do factory :annotation do
title { Faker::Lorem.words(3).join(' ') } title { Faker::Lorem.words(number: 3).join(' ') }
content { Faker::Lorem.sentence } content { Faker::Lorem.sentence }
start_time { Faker::Number.between(1000,2000) } start_time { Faker::Number.between(from: 1000, to: 2000) }
end_time { Faker::Number.between(3000,4000)} end_time { Faker::Number.between(from: 3000, to: 4000)}
id { Faker::Number.unique.number.to_i} id { Faker::Number.unique.number.to_i}
end end
end end
\ No newline at end of file
FactoryBot.define do FactoryBot.define do
factory :data_app do factory :data_app do
joule_id { Faker::Number.number(6).to_i} joule_id { Faker::Number.number(digits: 6).to_i}
end end
end end
FactoryBot.define do FactoryBot.define do
factory :data_view do factory :data_view do
name { Faker::Lorem.words(3).join(' ') } name { Faker::Lorem.words(number: 3).join(' ') }
description { Faker::Lorem.sentence } description { Faker::Lorem.sentence }
visibility { "public" } visibility { "public" }
redux_json { "auto generated from factory" } redux_json { "auto generated from factory" }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# generic DbStream # generic DbStream
FactoryBot.define do FactoryBot.define do
factory :db_element do factory :db_element do
name { Faker::Lorem.unique.words(3).join(' ') } name { Faker::Lorem.unique.words(number: 3).join(' ') }
units { 'volts' } units { 'volts' }
sequence(:column) sequence(:column)
default_max { 100 } default_max { 100 }
......
...@@ -5,10 +5,10 @@ FactoryBot.define do ...@@ -5,10 +5,10 @@ FactoryBot.define do
factory :db_folder, aliases: [:root_folder] do factory :db_folder, aliases: [:root_folder] do
name { Faker::Lorem.word } name { Faker::Lorem.word }
description { Faker::Lorem.sentence } description { Faker::Lorem.sentence }
start_time { Faker::Number.number(6)} start_time { Faker::Number.number(digits: 6)}
end_time { start_time + Faker::Number.number(5) } end_time { start_time + Faker::Number.number(digits: 5) }
size_on_disk { Faker::Number.number(6) } size_on_disk { Faker::Number.number(digits: 6) }
hidden { false } hidden { false }
path { "/root/#{Faker::Lorem.word}/#{Faker::Number.unique.number(4)}" } path { "/root/#{Faker::Lorem.word}/#{Faker::Number.unique.number(digits: 4)}" }
end end
end end
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
# generic DbStream # generic DbStream
FactoryBot.define do FactoryBot.define do
factory :db_stream do factory :db_stream do
name { Faker::Lorem.words(3).join(' ') } name { Faker::Lorem.words(number: 3).join(' ') }
name_abbrev { Faker::Lorem.word } name_abbrev { Faker::Lorem.word }
description { Faker::Lorem.sentence } description { Faker::Lorem.sentence }
delete_locked { false } delete_locked { false }
start_time { Faker::Number.number(6).to_i} start_time { Faker::Number.number(digits: 6).to_i}
end_time { start_time + Faker::Number.number(5).to_i } end_time { start_time + Faker::Number.number(digits: 5).to_i }
total_time {end_time - start_time} total_time {end_time - start_time}
size_on_disk { Faker::Number.number(6).to_i } size_on_disk { Faker::Number.number(digits: 6).to_i }
hidden { false } hidden { false }
path { "/root/streams/#{Faker::Lorem.unique.word}" } path { "/root/streams/#{Faker::Lorem.unique.word}" }
data_type { "float32_#{elements_count}" } data_type { "float32_#{elements_count}" }
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
FactoryBot.define do FactoryBot.define do
factory :db do factory :db do
url { "" } url { "" }
max_points_per_plot { Faker::Number.number(3) } max_points_per_plot { Faker::Number.number(digits: 3) }
size_db { Faker::Number.number(5) } size_db { Faker::Number.number(digits: 5) }
size_other { Faker::Number.number(5) } size_other { Faker::Number.number(digits: 5) }
size_total { size_db + size_other } size_total { size_db + size_other }
available { true } available { true }
root_folder root_folder
......
FactoryBot.define do FactoryBot.define do
factory :joule_module do factory :joule_module do
name { Faker::Lorem.words(3).join(' ') } name { Faker::Lorem.words(number: 3).join(' ') }
description { Faker::Lorem.sentence } description { Faker::Lorem.sentence }
exec_cmd { '/path/to/cmd' } exec_cmd { '/path/to/cmd' }
web_interface { false } web_interface { false }
status { 'running' } status { 'running' }
joule_id { Faker::Number.number(3).to_i } joule_id { Faker::Number.number(digits: 3).to_i }
end end
end end
...@@ -5,11 +5,11 @@ FactoryBot.define do ...@@ -5,11 +5,11 @@ FactoryBot.define do
factory :nilm do factory :nilm do
db db
name {Faker::Lorem.unique.words(3).join(' ')} name {Faker::Lorem.unique.words(number: 3).join(' ')}
description { Faker::Lorem.sentence } description { Faker::Lorem.sentence }
url {Faker::Internet.unique.url} url {Faker::Internet.unique.url}
node_type { 'nilmdb' } node_type { 'nilmdb' }
key {Faker::Lorem.characters(20)} key {Faker::Lorem.characters(number: 20)}
transient do transient do
admins { [] } admins { [] }
owners { [] } owners { [] }
......
...@@ -3,7 +3,7 @@ FactoryBot.define do ...@@ -3,7 +3,7 @@ FactoryBot.define do
first_name {Faker::Name.first_name} first_name {Faker::Name.first_name}
last_name {Faker::Name.first_name} last_name {Faker::Name.first_name}
email {Faker::Internet.unique.email} email {Faker::Internet.unique.email}
password {Faker::Lorem.characters(10)} password {Faker::Lorem.characters(number: 10)}
end end
......
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