Skip to content

Commit

Permalink
getting ready for Passenger server
Browse files Browse the repository at this point in the history
  • Loading branch information
markwilkinson committed Apr 2, 2019
1 parent 99e490c commit 365d4d5
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 5 deletions.
1 change: 1 addition & 0 deletions MetricsEvaluatorCode/Ruby/fairmetrics/.gitignore
Expand Up @@ -21,3 +21,4 @@
/yarn-error.log

.byebug_history
Passenger.json
5 changes: 4 additions & 1 deletion MetricsEvaluatorCode/Ruby/fairmetrics/Gemfile
Expand Up @@ -10,8 +10,10 @@ end
gem 'rails', '~> 5.1.4'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Passenger as the app server
gem 'passenger'
# Use Puma as the app server
gem 'puma', '~> 3.7'
#gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
Expand Down Expand Up @@ -48,6 +50,7 @@ gem 'jwt'
gem 'simple_command'
gem 'json-ld', '~> 3.0.2'
gem 'rest-client', '~> 2.0.2'
gem 'will_paginate', '~> 3.1.0'

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
Expand Down
10 changes: 7 additions & 3 deletions MetricsEvaluatorCode/Ruby/fairmetrics/Gemfile.lock
Expand Up @@ -122,8 +122,10 @@ GEM
addressable (~> 2.3)
json-schema (~> 2.8)
openssl (2.0.3)
passenger (6.0.2)
rack
rake (>= 0.8.1)
public_suffix (3.0.1)
puma (3.11.2)
rack (2.0.3)
rack-cors (1.0.2)
rack-test (0.8.2)
Expand Down Expand Up @@ -233,6 +235,7 @@ GEM
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
will_paginate (3.1.7)
xpath (3.0.0)
nokogiri (~> 1.8)

Expand All @@ -253,7 +256,7 @@ DEPENDENCIES
nokogiri
open_api_parser
openssl
puma (~> 3.7)
passenger
rack-cors
rails (~> 5.1.4)
rdf-json
Expand All @@ -270,6 +273,7 @@ DEPENDENCIES
turbolinks (~> 5)
uglifier (>= 1.3.0)
web-console (>= 3.3.0)
will_paginate (~> 3.1.0)

BUNDLED WITH
2.0.1
1.17.3
6 changes: 6 additions & 0 deletions MetricsEvaluatorCode/Ruby/fairmetrics/Passenger.json_template
@@ -0,0 +1,6 @@
{
"environment": "production",
"port": 3000,
"daemonize": true,
"user": "yourusername"
}
Expand Up @@ -3,4 +3,5 @@ class Evaluation < ApplicationRecord
attr_accessor :subject

validates_presence_of :collection, :resource, :executor, :title
self.per_page = 10
end
Expand Up @@ -16,6 +16,6 @@ end

metrics_url = "https://purl.org/fair-metrics/"

json.extract! metric, :name, :orcid, :creator, :description, :email, :test_of_metric, :smarturl, :created_at, :updated_at
json.extract! metric, :name, :orcid, :creator, :description, :email, :test_of_metric, :smarturl, :created_at, :updated_at, :deprecated

json.principle metrics_url + metric.principle.to_s

0 comments on commit 365d4d5

Please sign in to comment.