Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
wattsworth
/
lumen-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
dc486e8d
authored
Sep 17, 2019
by
source_reader
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
updated dependencies
parent
f4f863c5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
146 additions
and
128 deletions
Gemfile.lock
spec/factories/annotation.rb
spec/factories/data_apps.rb
spec/factories/data_views.rb
spec/factories/db_element.rb
spec/factories/db_folder.rb
spec/factories/db_stream.rb
spec/factories/dbs.rb
spec/factories/joule_modules.rb
spec/factories/nilms.rb
spec/factories/users.rb
Gemfile.lock
View file @
dc486e8d
This diff is collapsed.
Click to expand it.
spec/factories/annotation.rb
View file @
dc486e8d
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
spec/factories/data_apps.rb
View file @
dc486e8d
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
spec/factories/data_views.rb
View file @
dc486e8d
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"
}
...
...
spec/factories/db_element.rb
View file @
dc486e8d
...
@@ -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
}
...
...
spec/factories/db_folder.rb
View file @
dc486e8d
...
@@ -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
spec/factories/db_stream.rb
View file @
dc486e8d
...
@@ -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
}
"
}
...
...
spec/factories/dbs.rb
View file @
dc486e8d
...
@@ -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
...
...
spec/factories/joule_modules.rb
View file @
dc486e8d
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
spec/factories/nilms.rb
View file @
dc486e8d
...
@@ -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
{
[]
}
...
...
spec/factories/users.rb
View file @
dc486e8d
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment