Commit 32e82533 by source_reader

migrated to rails 5.2.2

parent 60d1cc21
......@@ -2,6 +2,7 @@ AllCops:
TargetRubyVersion: 2.3
Include:
- '**/config.ru'
- 'spec/**/*'
Exclude:
- '**/Rakefile'
- 'db/**/*'
......
......@@ -2,7 +2,7 @@ source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '5.2.0'
gem 'rails', '5.2.2'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
......@@ -38,6 +38,8 @@ gem 'devise_invitable'
gem 'omniauth'
gem 'oj' # fast json
gem 'mini_magick'
gem 'bootsnap'
gem 'rubocop-rspec'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
......
GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.0)
actionpack (= 5.2.0)
actioncable (5.2.2)
actionpack (= 5.2.2)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.0)
actionpack (= 5.2.0)
actionview (= 5.2.0)
activejob (= 5.2.0)
actionmailer (5.2.2)
actionpack (= 5.2.2)
actionview (= 5.2.2)
activejob (= 5.2.2)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.0)
actionview (= 5.2.0)
activesupport (= 5.2.0)
actionpack (5.2.2)
actionview (= 5.2.2)
activesupport (= 5.2.2)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.0)
activesupport (= 5.2.0)
actionview (5.2.2)
activesupport (= 5.2.2)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.0)
activesupport (= 5.2.0)
activejob (5.2.2)
activesupport (= 5.2.2)
globalid (>= 0.3.6)
activemodel (5.2.0)
activesupport (= 5.2.0)
activerecord (5.2.0)
activemodel (= 5.2.0)
activesupport (= 5.2.0)
activemodel (5.2.2)
activesupport (= 5.2.2)
activerecord (5.2.2)
activemodel (= 5.2.2)
activesupport (= 5.2.2)
arel (>= 9.0)
activestorage (5.2.0)
actionpack (= 5.2.0)
activerecord (= 5.2.0)
activestorage (5.2.2)
actionpack (= 5.2.2)
activerecord (= 5.2.2)
marcel (~> 0.3.1)
activesupport (5.2.0)
activesupport (5.2.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
airbrussh (1.3.0)
airbrussh (1.3.1)
sshkit (>= 1.6.1, != 1.7.0)
arel (9.0.0)
ast (2.4.0)
backports (3.11.3)
backports (3.11.4)
bcrypt (3.1.12)
bcrypt (3.1.12-x64-mingw32)
bindex (0.5.0)
bootsnap (1.3.2)
msgpack (~> 1.0)
builder (3.2.3)
byebug (10.0.2)
capistrano (3.10.2)
capistrano (3.11.0)
airbrussh (>= 1.0.0)
i18n
rake (>= 10.0.0)
sshkit (>= 1.9.0)
capistrano-bundler (1.3.0)
capistrano-bundler (1.4.0)
capistrano (~> 3.1)
sshkit (~> 1.2)
capistrano-passenger (0.2.0)
capistrano (~> 3.0)
capistrano-rails (1.3.1)
capistrano-rails (1.4.0)
capistrano (~> 3.1)
capistrano-bundler (~> 1.1)
capistrano-rbenv (2.1.3)
capistrano-rbenv (2.1.4)
capistrano (~> 3.1)
sshkit (~> 1.3)
capybara (3.1.0)
capybara (3.12.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
xpath (~> 3.0)
regexp_parser (~> 1.2)
xpath (~> 3.2)
coderay (1.1.2)
concurrent-ruby (1.0.5)
concurrent-ruby (1.1.3)
crack (0.4.3)
safe_yaml (~> 1.0.0)
crass (1.0.4)
cucumber (3.1.0)
cucumber (3.1.2)
builder (>= 2.1.2)
cucumber-core (~> 3.1.0)
cucumber-expressions (~> 5.0.4)
cucumber-core (~> 3.2.0)
cucumber-expressions (~> 6.0.1)
cucumber-wire (~> 0.0.1)
diff-lcs (~> 1.3)
gherkin (~> 5.0)
gherkin (~> 5.1.0)
multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.1.2)
cucumber-core (3.1.0)
cucumber-core (3.2.1)
backports (>= 3.8.0)
cucumber-tag_expressions (~> 1.1.0)
gherkin (>= 5.0.0)
cucumber-expressions (5.0.17)
gherkin (~> 5.0)
cucumber-expressions (6.0.1)
cucumber-rails (1.6.0)
capybara (>= 1.1.2, < 4)
cucumber (>= 3.0.2, < 4)
......@@ -104,40 +107,40 @@ GEM
railties (>= 4, < 6)
cucumber-tag_expressions (1.1.1)
cucumber-wire (0.0.1)
daemons (1.2.6)
daemons (1.3.0)
database_cleaner (1.7.0)
devise (4.4.3)
devise (4.5.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0, < 6.0)
responders
warden (~> 1.2.3)
devise_invitable (1.7.4)
devise_invitable (1.7.5)
actionmailer (>= 4.1.0)
devise (>= 4.0.0)
devise_token_auth (0.1.43)
devise (> 3.5.2, < 4.5)
rails (< 6)
devise_token_auth (1.0.0)
devise (> 3.5.2, < 4.6)
rails (>= 4.2.0, < 6)
diff-lcs (1.3)
docile (1.3.0)
docile (1.3.1)
erubi (1.7.1)
eventmachine (1.2.7)
eventmachine (1.2.7-x64-mingw32)
execjs (2.7.0)
factory_bot (4.8.2)
factory_bot (4.11.1)
activesupport (>= 3.0.0)
factory_bot_rails (4.8.2)
factory_bot (~> 4.8.2)
factory_bot_rails (4.11.1)
factory_bot (~> 4.11.1)
railties (>= 3.0.0)
faker (1.8.7)
faker (1.9.1)
i18n (>= 0.7)
ffi (1.9.23)
ffi (1.9.23-x64-mingw32)
ffi (1.9.25)
ffi (1.9.25-x64-mingw32)
formatador (0.2.5)
gherkin (5.0.0)
gherkin (5.1.0)
globalid (0.4.1)
activesupport (>= 4.2.0)
guard (2.14.2)
guard (2.15.0)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (>= 1.0.12, < 2.0)
......@@ -156,11 +159,13 @@ GEM
rubocop (~> 0.20)
hashdiff (0.3.7)
hashie (3.5.7)
httparty (0.16.2)
httparty (0.16.3)
mime-types (~> 3.0)
multi_xml (>= 0.5.2)
i18n (1.0.1)
i18n (1.2.0)
concurrent-ruby (~> 1.0)
jbuilder (2.7.0)
jaro_winkler (1.5.1)
jbuilder (2.8.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
jquery-rails (4.3.3)
......@@ -172,123 +177,129 @@ GEM
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.2.2)
loofah (2.2.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lumberjack (1.0.13)
mail (2.7.0)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.2)
marcel (0.3.3)
mimemagic (~> 0.3.2)
method_source (0.9.0)
mime-types (3.1)
method_source (0.9.2)
mime-types (3.2.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mime-types-data (3.2018.0812)
mimemagic (0.3.2)
mini_magick (4.8.0)
mini_mime (1.0.0)
mini_magick (4.9.2)
mini_mime (1.0.1)
mini_portile2 (2.3.0)
minitest (5.11.3)
msgpack (1.2.4)
msgpack (1.2.4-x64-mingw32)
multi_json (1.13.1)
multi_test (0.1.2)
multi_xml (0.6.0)
nenv (0.3.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (4.2.0)
net-ssh (5.0.2)
nio4r (2.3.1)
nokogiri (1.8.2)
nokogiri (1.8.5)
mini_portile2 (~> 2.3.0)
nokogiri (1.8.2-x64-mingw32)
nokogiri (1.8.5-x64-mingw32)
mini_portile2 (~> 2.3.0)
notiffany (0.1.1)
nenv (~> 0.1)
shellany (~> 0.0)
oj (3.6.0)
oj (3.7.4)
omniauth (1.8.1)
hashie (>= 3.4.6, < 3.6.0)
rack (>= 1.6.2, < 3)
orm_adapter (0.5.0)
parallel (1.12.1)
parser (2.5.1.0)
parser (2.5.3.0)
ast (~> 2.4.0)
pg (1.0.0)
pg (1.0.0-x64-mingw32)
powerpack (0.1.1)
pry (0.11.3)
pg (1.1.3)
pg (1.1.3-x64-mingw32)
powerpack (0.1.2)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
public_suffix (3.0.2)
rack (2.0.5)
public_suffix (3.0.3)
rack (2.0.6)
rack-cors (1.0.2)
rack-test (1.0.0)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.0)
actioncable (= 5.2.0)
actionmailer (= 5.2.0)
actionpack (= 5.2.0)
actionview (= 5.2.0)
activejob (= 5.2.0)
activemodel (= 5.2.0)
activerecord (= 5.2.0)
activestorage (= 5.2.0)
activesupport (= 5.2.0)
rails (5.2.2)
actioncable (= 5.2.2)
actionmailer (= 5.2.2)
actionpack (= 5.2.2)
actionview (= 5.2.2)
activejob (= 5.2.2)
activemodel (= 5.2.2)
activerecord (= 5.2.2)
activestorage (= 5.2.2)
activesupport (= 5.2.2)
bundler (>= 1.3.0)
railties (= 5.2.0)
railties (= 5.2.2)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
railties (5.2.0)
actionpack (= 5.2.0)
activesupport (= 5.2.0)
railties (5.2.2)
actionpack (= 5.2.2)
activesupport (= 5.2.2)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
thor (>= 0.19.0, < 2.0)
rainbow (3.0.0)
rake (12.3.1)
rake (12.3.2)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rdoc (4.3.0)
regexp_parser (1.3.0)
responders (2.4.0)
actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3)
rspec (3.7.0)
rspec-core (~> 3.7.0)
rspec-expectations (~> 3.7.0)
rspec-mocks (~> 3.7.0)
rspec-core (3.7.1)
rspec-support (~> 3.7.0)
rspec-expectations (3.7.0)
rspec (3.8.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-core (3.8.0)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-support (~> 3.8.0)
rspec-json_expectations (2.1.0)
rspec-mocks (3.7.0)
rspec-mocks (3.8.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-rails (3.7.2)
rspec-support (~> 3.8.0)
rspec-rails (3.8.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.7.0)
rspec-expectations (~> 3.7.0)
rspec-mocks (~> 3.7.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.1)
rubocop (0.56.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
rubocop (0.61.1)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5)
parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.9.0)
unicode-display_width (~> 1.4.0)
rubocop-rspec (1.30.1)
rubocop (>= 0.60.0)
ruby-progressbar (1.10.0)
ruby_dep (1.5.0)
safe_yaml (1.0.4)
sass (3.5.6)
sass (3.7.2)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
......@@ -312,7 +323,7 @@ GEM
activesupport (>= 4.2)
spring-commands-rspec (1.0.4)
spring (>= 0.9.1)
sprockets (3.7.1)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
......@@ -321,7 +332,7 @@ GEM
sprockets (>= 3.0.0)
sqlite3 (1.3.13)
sqlite3 (1.3.13-x64-mingw32)
sshkit (1.16.0)
sshkit (1.18.0)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
terminal-notifier (2.0.0)
......@@ -330,35 +341,35 @@ GEM
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thor (0.20.0)
thor (0.20.3)
thread_safe (0.3.6)
tilt (2.0.8)
turbolinks (5.1.1)
turbolinks-source (~> 5.1)
turbolinks-source (5.1.0)
tilt (2.0.9)
turbolinks (5.2.0)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.5)
thread_safe (~> 0.1)
tzinfo-data (1.2018.5)
tzinfo-data (1.2018.7)
tzinfo (>= 1.0.0)
uglifier (4.1.10)
uglifier (4.1.20)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.3.2)
unicode-display_width (1.4.0)
vcr (4.0.0)
warden (1.2.7)
rack (>= 1.0)
web-console (3.6.2)
warden (1.2.8)
rack (>= 2.0.6)
web-console (3.7.0)
actionview (>= 5.0)
activemodel (>= 5.0)
bindex (>= 0.4.0)
railties (>= 5.0)
webmock (3.4.1)
webmock (3.4.2)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
websocket-driver (0.7.0)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
xpath (3.0.0)
xpath (3.2.0)
nokogiri (~> 1.8)
PLATFORMS
......@@ -366,6 +377,7 @@ PLATFORMS
x64-mingw32
DEPENDENCIES
bootsnap
byebug
capistrano (~> 3.6)
capistrano-passenger
......@@ -388,10 +400,11 @@ DEPENDENCIES
omniauth
pg
rack-cors
rails (= 5.2.0)
rails (= 5.2.2)
rspec-json_expectations
rspec-rails (~> 3.1)
rubocop
rubocop-rspec
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
simplecov
......@@ -409,4 +422,4 @@ DEPENDENCIES
webmock
BUNDLED WITH
1.16.1
1.17.2
#!/usr/bin/env ruby
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
load Gem.bin_path('bundler', 'bundle')
#!/usr/bin/env ruby
require 'pathname'
require 'fileutils'
include FileUtils
# path to your application root.
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
APP_ROOT = File.expand_path('..', __dir__)
def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
......@@ -18,7 +17,6 @@ chdir APP_ROOT do
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')
# puts "\n== Copying sample files =="
# unless File.exist?('config/database.yml')
# cp 'config/database.yml.sample', 'config/database.yml'
......
#!/usr/bin/env ruby
require 'pathname'
require 'fileutils'
include FileUtils
# path to your application root.
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
APP_ROOT = File.expand_path('..', __dir__)
def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
......
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
require 'bundler/setup' # Set up gems listed in the Gemfile.
require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
......@@ -13,12 +13,13 @@ Rails.application.configure do
config.consider_all_requests_local = true
# Enable/disable caching. By default caching is disabled.
if Rails.root.join('tmp/caching-dev.txt').exist?
# Run rails dev:cache to toggle caching.
if Rails.root.join('tmp', 'caching-dev.txt').exist?
config.action_controller.perform_caching = true
config.cache_store = :memory_store
config.public_file_server.headers = {
'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
'Cache-Control' => "public, max-age=#{2.days.to_i}"
}
else
config.action_controller.perform_caching = false
......@@ -26,16 +27,13 @@ Rails.application.configure do
config.cache_store = :null_store
end
# render json on error since this is an API app
config.debug_exception_response_format = :api
# Store uploaded files on the local file system (see config/storage.yml for options)
config.active_storage.service = :local
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
config.action_mailer.perform_caching = false
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings =
{ :address => "localhost", :port => 1025 }
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
......@@ -43,32 +41,14 @@ Rails.application.configure do
# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load
# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = true
# Highlight code that triggered database queries in logs.
config.active_record.verbose_query_logs = true
# Suppress logger output for asset requests.
config.assets.quiet = true
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker
config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'
resource '*',
:headers => :any,
:expose => ['access-token', 'expiry', 'token-type', 'uid', 'client'],
:methods => [:get, :post, :options, :delete, :put]
end
end
config.interface_url_template = lambda do |id|
#return "http://#{id}.interfaces.wattsworth.local"
return "http://wattsworth.local/api/interfaces/#{id}/"
end
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
end
......@@ -4,6 +4,10 @@ Rails.application.configure do
# Code is not reloaded between requests.
config.cache_classes = true
# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
# config.require_master_key = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web servers
# and those relying on copy on write to perform better.
......
......@@ -15,7 +15,7 @@ Rails.application.configure do
# Configure public file server for tests with Cache-Control for performance.
config.public_file_server.enabled = true
config.public_file_server.headers = {
'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}"
'Cache-Control' => "public, max-age=#{1.hour.to_i}"
}
# Show full error reports and disable caching.
......
# Be sure to restart your server when you modify this file.
# ActiveSupport::Reloader.to_prepare do
# ApplicationController.renderer.defaults.merge!(
# http_host: 'example.org',
# https: false
# )
# end
# Be sure to restart your server when you modify this file.
#
# This file contains migration options to ease your Rails 5.2 upgrade.
#
# Once upgraded flip defaults one by one to migrate to the new default.
#
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
# Make Active Record use stable #cache_key alongside new #cache_version method.
# This is needed for recyclable cache keys.
Rails.application.config.active_record.cache_versioning = true
# Use AES-256-GCM authenticated encryption for encrypted cookies.
# Also, embed cookie expiry in signed or encrypted cookies for increased security.
#
# This option is not backwards compatible with earlier Rails versions.
# It's best enabled when your entire app is migrated and stable on 5.2.
#
# Existing cookies will be converted on read then written with the new scheme.
Rails.application.config.action_dispatch.use_authenticated_cookie_encryption = true
# Use AES-256-GCM authenticated encryption as default cipher for encrypting messages
# instead of AES-256-CBC, when use_authenticated_message_encryption is set to true.
Rails.application.config.active_support.use_authenticated_message_encryption = true
# Add default protection from forgery to ActionController::Base instead of in
# ApplicationController.
Rails.application.config.action_controller.default_protect_from_forgery = true
# Store boolean values are in sqlite3 databases as 1 and 0 instead of 't' and
# 'f' after migrating old data.
Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true
# Use SHA-1 instead of MD5 to generate non-sensitive digests, such as the ETag header.
Rails.application.config.active_support.use_sha1_digests = true
# Make `form_with` generate id attributes for any generated HTML tags.
Rails.application.config.action_view.form_with_generates_ids = true
test:
service: Disk
root: <%= Rails.root.join("tmp/storage") %>
local:
service: Disk
root: <%= Rails.root.join("storage") %>
# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
# amazon:
# service: S3
# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
# region: us-east-1
# bucket: your_own_bucket
# Remember not to checkin your GCS keyfile to a repository
# google:
# service: GCS
# project: your_project
# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
# bucket: your_own_bucket
# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
# microsoft:
# service: AzureStorage
# storage_account_name: your_account_name
# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
# container: your_container_name
# mirror:
# service: Mirror
# primary: local
# mirrors: [ amazon, google, microsoft ]
......@@ -2,7 +2,7 @@
http_interactions:
- request:
method: get
uri: http://nuc:8088/modules.json
uri: http://nuc:8088/modules.json?statistics=1
body:
encoding: US-ASCII
string: ''
......
......@@ -2,7 +2,7 @@ FactoryBot.define do
factory :data_view do
name { Faker::Lorem.words(3).join(' ') }
description { Faker::Lorem.sentence }
visibility "public"
redux_json "auto generated from factory"
visibility { "public" }
redux_json { "auto generated from factory" }
end
end
......@@ -4,13 +4,13 @@
FactoryBot.define do
factory :db_element do
name { Faker::Lorem.unique.words(3).join(' ') }
units 'volts'
units { 'volts' }
sequence(:column)
default_max 100
default_min 0
scale_factor 1.0
offset 0.0
plottable true
display_type 'continuous'
default_max { 100 }
default_min { 0 }
scale_factor { 1.0 }
offset { 0.0 }
plottable { true }
display_type { 'continuous' }
end
end
......@@ -8,7 +8,7 @@ FactoryBot.define do
start_time { Faker::Number.number(6)}
end_time { start_time + Faker::Number.number(5) }
size_on_disk { Faker::Number.number(6) }
hidden false
hidden { false }
path { "/root/#{Faker::Lorem.word}/#{Faker::Number.unique.number(4)}" }
end
end
......@@ -6,18 +6,18 @@ FactoryBot.define do
name { Faker::Lorem.words(3).join(' ') }
name_abbrev { Faker::Lorem.word }
description { Faker::Lorem.sentence }
delete_locked false
delete_locked { false }
start_time { Faker::Number.number(6).to_i}
end_time { start_time + Faker::Number.number(5).to_i }
total_time {end_time - start_time}
size_on_disk { Faker::Number.number(6).to_i }
hidden false
hidden { false }
path { "/root/streams/#{Faker::Lorem.unique.word}" }
data_type { "float32_#{elements_count}" }
transient do
elements_count 4
decimations_count 0
elements_count { 4 }
decimations_count { 0 }
end
after(:create) do |stream, evaluator|
......
......@@ -2,12 +2,12 @@
FactoryBot.define do
factory :db do
url ""
url { "" }
max_points_per_plot { Faker::Number.number(3) }
size_db { Faker::Number.number(5) }
size_other { Faker::Number.number(5) }
size_total { size_db + size_other }
available true
available { true }
root_folder
end
end
......@@ -2,9 +2,9 @@ FactoryBot.define do
factory :joule_module do
name { Faker::Lorem.words(3).join(' ') }
description { Faker::Lorem.sentence }
exec_cmd '/path/to/cmd'
web_interface false
status 'running'
joule_id Faker::Number.number(3).to_i
exec_cmd { '/path/to/cmd' }
web_interface { false }
status { 'running' }
joule_id { Faker::Number.number(3).to_i }
end
end
......@@ -8,11 +8,11 @@ FactoryBot.define do
name {Faker::Lorem.unique.words(3).join(' ')}
description { Faker::Lorem.sentence }
url {Faker::Internet.unique.url}
node_type 'nilmdb'
node_type { 'nilmdb' }
transient do
admins []
owners []
viewers []
admins { [] }
owners { [] }
viewers { [] }
end
after(:create) do |nilm, evaluator|
......
FactoryBot.define do
factory :permission do
nilm
role "admin"
role { "admin" }
after(:build) do |permission|
# if no user or group specified, create a user
if(permission.user.blank? &&
......
FactoryBot.define do
factory :user_group do
transient do
members []
members { [] }
end
sequence :name do |n| "group#{n}" end
......@@ -11,7 +11,7 @@ FactoryBot.define do
factory :test_user_group do
transient do
size []
size { [] }
end
name { Faker::Company.unique.name }
description { Faker::ChuckNorris.fact }
......
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