genevalidatorapp 1.5.4 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +1 -124
  3. data/Rakefile +12 -9
  4. data/genevalidatorapp.gemspec +28 -31
  5. data/lib/genevalidatorapp.rb +2 -2
  6. data/lib/genevalidatorapp/config.rb +1 -1
  7. data/lib/genevalidatorapp/database.rb +3 -3
  8. data/lib/genevalidatorapp/genevalidator.rb +27 -32
  9. data/lib/genevalidatorapp/routes.rb +2 -2
  10. data/lib/genevalidatorapp/server.rb +1 -1
  11. data/lib/genevalidatorapp/version.rb +1 -1
  12. data/public/src/js/plots.js +1 -1
  13. data/public/web_files/js/GV_compiled_js.min.js +33 -14
  14. data/{spec → test}/database/funky_ids/funky_ids.fa +0 -0
  15. data/{spec → test}/database/funky_ids/funky_ids.fa.nhr +0 -0
  16. data/{spec → test}/database/funky_ids/funky_ids.fa.nin +0 -0
  17. data/{spec → test}/database/funky_ids/funky_ids.fa.nog +0 -0
  18. data/{spec → test}/database/funky_ids/funky_ids.fa.nsd +0 -0
  19. data/{spec → test}/database/funky_ids/funky_ids.fa.nsi +0 -0
  20. data/{spec → test}/database/funky_ids/funky_ids.fa.nsq +0 -0
  21. data/{spec → test}/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta +0 -0
  22. data/{spec → test}/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta.phr +0 -0
  23. data/{spec → test}/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta.pin +0 -0
  24. data/{spec → test}/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta.pog +0 -0
  25. data/{spec → test}/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta.psd +0 -0
  26. data/{spec → test}/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta.psi +0 -0
  27. data/{spec → test}/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta.psq +0 -0
  28. data/{spec → test}/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta +0 -0
  29. data/{spec → test}/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta.nhr +0 -0
  30. data/{spec → test}/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta.nin +0 -0
  31. data/{spec → test}/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta.nog +0 -0
  32. data/{spec → test}/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta.nsd +0 -0
  33. data/{spec → test}/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta.nsi +0 -0
  34. data/{spec → test}/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta.nsq +0 -0
  35. data/{spec → test}/database/unformatted/Cardiocondyla_obscurior/Cobs1.4.proteins.fa +0 -0
  36. data/{spec → test}/database/without_parse_seqids/without_parse_seqids.fa +0 -0
  37. data/{spec → test}/database/without_parse_seqids/without_parse_seqids.fa.phr +0 -0
  38. data/{spec → test}/database/without_parse_seqids/without_parse_seqids.fa.pin +0 -0
  39. data/{spec → test}/database/without_parse_seqids/without_parse_seqids.fa.psq +0 -0
  40. data/{spec → test}/empty_config.yml +0 -0
  41. data/{spec/route_spec.rb → test/test_route_spec.rb} +22 -23
  42. data/views/results.slim +2 -2
  43. metadata +68 -134
  44. data/bin/genevalidatorapp +0 -284
  45. data/docker/Dockerfile +0 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 955fcd74d359c54ce421064d7aced2408857e7dc
4
- data.tar.gz: 1c35fb396c2c5a0a059d265944c6e9299e8af259
2
+ SHA256:
3
+ metadata.gz: 395f62d66b4d5a0afa5d2504f24f8617bd681317ce6a814452b571bd5c6027f4
4
+ data.tar.gz: afbaf5e9b493f37f6c9ef0678e9e3df88b8faa4a40c45ae255f95eac24c81975
5
5
  SHA512:
6
- metadata.gz: 0d188f08c4144fa3351c78d2c1e3cde7602dab41fed60c50a60cb371dce1a340852498f738b223aaeca6d9b8d47a99ba1af61f2c1d1b3a9097658df42e8e686c
7
- data.tar.gz: c1be3117819f1efdcb9c92150da757e6a9f0daff2062c9e0f25782ae5d21db95335360338cf82f52c76eb539c4f557c87408023224bd74d454c86add87d4c3ab
6
+ metadata.gz: f516b9f6522c7907e89fae95749aa8b33be3c0bbf970d645aa408feb102971a17e26e6dabb030af1d9c8dbdad19979ab35e006c18b8ea36c4ed778065b12d8af
7
+ data.tar.gz: e6a83a2c9d22cd18580c232f73a1c44a378f30fca0517849244b49f42c01168d4d505157740ee04dbd5a57ff56c2fdb4b85aced8bc6443c3dd0e471091fd1424
data/README.md CHANGED
@@ -4,133 +4,10 @@
4
4
  [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/wurmlab/genevalidatorapp/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/wurmlab/genevalidatorapp/?branch=master)
5
5
 
6
6
 
7
-
8
-
9
-
10
-
11
-
12
7
  ## Introduction
13
8
 
14
- This is a online web application for [GeneValidator](https://github.com/wurmlab/genevalidator). This app is currently hosted at: [genevalidator.sbcs.qmul.ac.uk](http://genevalidator.sbcs.qmul.ac.uk).
15
-
16
- GeneValidator helps in identifing problems with gene predictions and provides useful information extracted from analysing orthologs in BLAST databases. The results produced can be used by biocurators and researchers who need accurate gene predictions.
17
-
18
- If you use GeneValidator in your work, please cite us as follows:
19
- > [Dragan M<sup>&Dagger;</sup>, Moghul MI<sup>&Dagger;</sup>, Priyam A, Bustos C & Wurm Y. 2016. GeneValidator: identify problems with protein-coding gene predictions. <em>Bioinformatics</em>, doi: 10.1093/bioinformatics/btw015](http://bioinformatics.oxfordjournals.org/content/early/2016/01/18/bioinformatics.btw015).
20
-
21
-
22
-
23
-
24
-
25
-
26
- -
27
- ## Installation
28
- ### Installation Requirements
29
- * Ruby (>= 2.0.0)
30
- * NCBI BLAST+ (>= 2.2.30+) (download [here](http://blast.ncbi.nlm.nih.gov/Blast.cgi?PAGE_TYPE=BlastDocs&DOC_TYPE=Download)).
31
- * MAFFT installation (>=7.273) (download [here](http://mafft.cbrc.jp/alignment/software/)).
32
-
33
- Please see [here](https://gist.github.com/IsmailM/b783e8a06565197084e6) for more help with installing the prerequisites.
34
-
35
- ### Installation
36
- Simply run the following command in the terminal.
37
-
38
- ```bash
39
- gem install genevalidatorapp
40
- ```
41
-
42
- If that doesn't work, try `sudo gem install genevalidatorapp` instead.
43
-
44
- ##### Running From Source (Not Recommended)
45
- It is also possible to run from source. However, this is not recommended.
46
-
47
- ```bash
48
- # Clone the repository.
49
- git clone https://github.com/wurmlab/genevalidatorapp.git
50
-
51
- # Move into GeneValidatorApp source directory.
52
- cd GeneValidatorApp
53
-
54
- # Install bundler
55
- gem install bundler
56
-
57
- # Use bundler to install dependencies
58
- bundle install
59
-
60
- # Optional: run tests and build the gem from source
61
- bundle exec rake
62
-
63
- # Run GeneValidator.
64
- bundle exec genevalidatorapp -h
65
- # note that `bundle exec` executes GeneValidatorApp in the context of the bundle
66
-
67
- # Alternativaly, install GeneValidatorApp as a gem
68
- bundle exec rake install
69
- genevalidatorapp -h
70
- ```
71
-
72
-
73
-
74
-
75
- ## Launch GeneValidator
76
-
77
- To configure and launch GeneValidatorApp, run the following from a command line.
78
-
79
- ```bash
80
- genevalidatorapp
81
- ```
82
-
83
- GeneValidatorApp will automatically guide you through an interactive setup process to help locate BLAST+ binaries and ask for the location of BLAST+ databases.
84
-
85
- That's it! Open http://localhost:4567/ and start using GeneValidator!
86
-
87
-
88
-
89
-
90
-
91
-
92
- ## Advanced Usage
93
-
94
- See `$ genevalidatorapp -h` for more information on all the options available when running GeneValidatorApp.
95
-
96
- ```bash
97
- SUMMARY:
98
- GeneValidator - Identify problems with predicted genes
99
-
100
- USAGE:
101
- $ genevalidatorapp [options]
102
-
103
- Examples:
104
- # Launch GeneValidatorApp with the given config file
105
- $ genevalidatorapp --config ~/.genevalidatorapp.conf
106
-
107
- # Launch GeneValidatorApp with 8 threads at port 8888
108
- $ genevalidatorapp --num_threads 8 --port 8888
109
-
110
- # Create a config file with the other arguments
111
- $ genevalidatorapp -s -d ~/database_dir
112
-
113
- -c, --config_file Use the given configuration file
114
- -b, --bin Load BLAST+ and/or MAFFT binaries from this directory
115
- -d, --database_dir Read BLAST database from this directory
116
- -f, --default_database_path The path to the default BLAST database
117
- -n, --num_threads Number of threads to use to run a BLAST search
118
- -r, --require Load extension from this file
119
- -H, --host Host to run GeneValidatorApp on
120
- -p, --port Port to run GeneValidatorApp on
121
- -s, --set Set configuration value in default or given config file
122
- -l, --list_databases List BLAST databases
123
- -D, --devel Start GeneValidatorApp in development mode
124
- -v, --version Print version number of GeneValidatorApp that will be loaded
125
- -h, --help Display this help message.
126
- ```
127
-
9
+ This repository is part of the GeneValidator Package and is used internally by GeneValidator - Please see [https://github.com/wurmlab/genevalidator](https://github.com/wurmlab/genevalidator) for more information.
128
10
 
129
- ## Using Docker
130
- ```bash
131
- # With protein database files inside a folder named db
132
- docker run --rm -ti -p 4567:4567 -v $(pwd)/db:/db wurmlab/genevalidator
133
- ```
134
11
 
135
12
  <hr>
136
13
 
data/Rakefile CHANGED
@@ -1,21 +1,24 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core'
3
- require 'rspec/core/rake_task'
1
+ require 'rake/testtask'
2
+ GEMSPEC = Gem::Specification::load('genevalidatorapp.gemspec')
4
3
 
5
4
  task default: [:build]
6
5
 
7
6
  desc 'Builds and installs'
8
7
  task install: [:build] do
9
- require_relative 'lib/genevalidatorapp/version'
10
- sh "gem install ./genevalidatorapp-#{GeneValidatorApp::VERSION}.gem"
8
+ sh "gem install #{Rake.original_dir}/genevalidatorapp-#{GEMSPEC.version}.gem"
11
9
  end
12
10
 
13
11
  desc 'Runs tests and builds gem (default)'
14
12
  task build: [:test] do
15
- sh 'gem build genevalidatorapp.gemspec'
13
+ sh "gem build #{Rake.original_dir}/genevalidatorapp.gemspec"
16
14
  end
17
15
 
18
- task test: :spec
19
- RSpec::Core::RakeTask.new(:spec) do |spec|
20
- spec.pattern = FileList['spec/**/*_spec.rb']
16
+ desc 'Runs tests'
17
+ task :test do
18
+ Rake::TestTask.new do |t|
19
+ t.libs.push 'lib'
20
+ t.test_files = FileList['test/test_*.rb']
21
+ t.verbose = false
22
+ t.warning = false
23
+ end
21
24
  end
@@ -3,39 +3,36 @@ lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'genevalidatorapp/version'
5
5
 
6
- Gem::Specification.new do |spec|
7
- spec.name = 'genevalidatorapp'
8
- spec.version = GeneValidatorApp::VERSION
9
- spec.authors = ['Monica Dragan', 'Ismail Moghul', 'Anurag Priyam',
6
+ Gem::Specification.new do |s|
7
+ s.name = 'genevalidatorapp'
8
+ s.version = GeneValidatorApp::VERSION
9
+ s.authors = ['Monica Dragan', 'Ismail Moghul', 'Anurag Priyam',
10
10
  'Yannick Wurm']
11
- spec.email = 'y.wurm@qmul.ac.uk'
12
- spec.summary = 'A Web App wrapper for GeneValidator.'
13
- spec.description = 'A Web App wrapper for GeneValidator, a program for' \
11
+ s.email = 'y.wurm@qmul.ac.uk'
12
+ s.summary = 'A Web App wrapper for GeneValidator.'
13
+ s.description = 'A Web App wrapper for GeneValidator, a program for' \
14
14
  ' validating gene predictions.'
15
- spec.homepage = 'https://wurmlab.github.io/tools/genevalidator/'
16
- spec.license = 'AGPL'
17
-
18
- spec.files = `git ls-files -z`.split("\x0")
19
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
- spec.require_paths = ['lib']
22
-
23
- spec.required_ruby_version = '>= 2.0.0'
24
-
25
- spec.add_development_dependency 'bundler', '~> 1.6'
26
- spec.add_development_dependency 'rake', '~>10.3'
27
- spec.add_development_dependency('rspec', '~> 2.8', '>= 2.8.0')
28
- spec.add_development_dependency 'rack-test', '~> 0.6'
29
- spec.add_development_dependency('capybara', '~> 2.4', '>= 2.4.4')
30
- spec.add_development_dependency 'w3c_validators', '~>1.1'
31
-
32
- spec.add_dependency 'genevalidator', '~>1.6'
33
- spec.add_dependency 'bio', '~>1.4'
34
- spec.add_dependency 'sinatra', '~>1.4'
35
- spec.add_dependency 'sinatra-cross_origin', '~> 0.3'
36
- spec.add_dependency 'slim', '~>3.0'
37
- spec.add_dependency 'slop', '~>3.6'
38
- spec.post_install_message = <<INFO
15
+ s.homepage = 'https://wurmlab.github.io/tools/genevalidator/'
16
+ s.license = 'AGPL'
17
+
18
+ s.files = `git ls-files -z`.split("\x0")
19
+ s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
21
+ s.require_paths = ['lib']
22
+
23
+ s.required_ruby_version = '>= 2.2.0'
24
+
25
+ s.add_development_dependency 'bundler', '~> 1.6'
26
+ s.add_development_dependency 'capybara', '~> 2.4', '>= 2.4.4'
27
+ s.add_development_dependency 'minitest', '~> 5.10'
28
+ s.add_development_dependency 'rake', '~> 12.3'
29
+ # s.add_development_dependency 'w3c_validators', '~>1.1'
30
+
31
+ s.add_dependency 'bio', '~>1.4'
32
+ s.add_dependency 'sinatra', '~>1.4'
33
+ s.add_dependency 'sinatra-cross_origin', '~> 0.3'
34
+ s.add_dependency 'slim', '~>3.0'
35
+ s.post_install_message = <<INFO
39
36
 
40
37
  ------------------------------------------------------------------------
41
38
  Thank you for validating your gene predictions with GeneValidator!
@@ -57,7 +57,7 @@ module GeneValidatorApp
57
57
  puts " Is GeneValidator already accessible at #{server_url}?"
58
58
  puts ' No? Try running GeneValidator on another port, like so:'
59
59
  puts
60
- puts ' genevalidatorapp -p 4570.'
60
+ puts ' genevalidator app -p 4570.'
61
61
  rescue Errno::EACCES
62
62
  puts "** Need root privilege to bind to port #{config[:port]}."
63
63
  puts ' It is not advisable to run GeneValidator as root.'
@@ -73,7 +73,7 @@ module GeneValidatorApp
73
73
 
74
74
  def on_stop
75
75
  puts
76
- puts '** Thank you for using GeneValidatorApp :).'
76
+ puts '** Thank you for using GeneValidator :).'
77
77
  puts ' Please cite: '
78
78
  puts ' Dragan M, Moghul MI, Priyam A, Bustos C, Wurm Y. 2016.'
79
79
  puts ' GeneValidator: identify problems with protein-coding gene'
@@ -76,7 +76,7 @@ module GeneValidatorApp
76
76
  :port => 4567,
77
77
  :host => '0.0.0.0',
78
78
  :gv_public_dir => File.join(Dir.home, '.genevalidatorapp/'),
79
- :max_characters => 'undefined',
79
+ :max_characters => 'undefined'
80
80
  }
81
81
  end
82
82
 
@@ -73,9 +73,9 @@ module GeneValidatorApp
73
73
  ' "%p::%f::%t"'
74
74
  list = `#{cmd} 2>&1`
75
75
  list.each_line do |line|
76
- type, name, title = line.split('::', 3)
76
+ type, name, title = line.split('::', 3)
77
77
  next if multipart_database_name?(name)
78
- next unless type.downcase == 'protein'
78
+ next unless type.casecmp('protein').zero?
79
79
  self << Database.new(name, title, type)
80
80
  end
81
81
  end
@@ -88,7 +88,7 @@ module GeneValidatorApp
88
88
  # /home/ben/pd.ben/sequenceserver/db/nr => no
89
89
  # /home/ben/pd.ben/sequenceserver/db/img3.5.finished.faa.01 => yes
90
90
  def multipart_database_name?(db_name)
91
- !(db_name.match(/.+\/\S+\d{2}$/).nil?)
91
+ !db_name.match(%r{.+\/\S+\d{2}$}).nil?
92
92
  end
93
93
  end
94
94
 
@@ -44,9 +44,8 @@ module GeneValidatorApp
44
44
  def run
45
45
  write_seq_to_file
46
46
  run_genevalidator
47
- copy_json_folder
48
47
  { parsed_json: parse_output_json, json_url: @json_url,
49
- results_url: @url }
48
+ results_url: @url, unique_id: @unique_id }
50
49
  end
51
50
 
52
51
  private
@@ -90,24 +89,24 @@ module GeneValidatorApp
90
89
  # Simply asserts whether that the seq param is present
91
90
  def check_seq_param_present
92
91
  return if @params[:seq]
93
- fail ArgumentError, 'No input sequence provided.'
92
+ raise ArgumentError, 'No input sequence provided.'
94
93
  end
95
94
 
96
95
  def check_seq_length
97
96
  return unless config[:max_characters] != 'undefined'
98
97
  return if @params[:seq].length < config[:max_characters]
99
- fail ArgumentError, 'The input sequence is too long.'
98
+ raise ArgumentError, 'The input sequence is too long.'
100
99
  end
101
100
 
102
101
  # Asserts whether the validations param are specified
103
102
  def check_validations_param_present
104
103
  return if @params[:validations]
105
- fail ArgumentError, 'No validations specified'
104
+ raise ArgumentError, 'No validations specified'
106
105
  end
107
106
 
108
107
  # Asserts whether the database parameter is present
109
108
  def check_database_params_present
110
- fail ArgumentError, 'No database specified' unless @params[:database]
109
+ raise ArgumentError, 'No database specified' unless @params[:database]
111
110
  end
112
111
 
113
112
  def obtain_db_path
@@ -155,17 +154,7 @@ module GeneValidatorApp
155
154
  # Asserts that the input file has been generated and is not empty
156
155
  def assert_input_file_present
157
156
  return if File.exist?(@input_file) && !File.zero?(@input_file)
158
- fail 'GeneValidatorApp was unable to create the input file.'
159
- end
160
-
161
- # Returns 'blastp' if sequence contains amino acids or returns 'blastx'
162
- # if it contains nucleic acids.
163
- def get_blast_type(sequences)
164
- (check_seq_type(sequences) == Bio::Sequence::AA) ? 'blastp' : 'blastx'
165
- end
166
-
167
- def check_seq_type(sequences)
168
- Bio::Sequence.new(Bio::FastaFormat.new(sequences).seq).guess(0.9)
157
+ raise 'GeneValidatorApp was unable to create the input file.'
169
158
  end
170
159
 
171
160
  # Runs GeneValidator
@@ -178,11 +167,20 @@ module GeneValidatorApp
178
167
  end
179
168
 
180
169
  def run_gv
181
- cmd = "genevalidator -v '#{@params[:validations].join(',')}'" \
182
- " -d #{@db} -n #{config[:num_threads]} #{@input_file}"
183
- logger.debug("GV command: $ #{cmd}")
184
- log_file = (logger.debug?) ? '' : "> #{@gv_log_file} 2>&1"
185
- `#{cmd} #{log_file}`
170
+ run_opt = gv_params
171
+ GeneValidator.init(run_opt)
172
+ GeneValidator.run
173
+ end
174
+
175
+ def gv_params
176
+ {
177
+ validations: @params[:validations],
178
+ db: @db,
179
+ num_threads: config[:num_threads],
180
+ input_fasta_file: @input_file,
181
+ output_formats: %w[json html],
182
+ output_dir: File.join(@run_dir, 'output')
183
+ }
186
184
  end
187
185
 
188
186
  def create_gv_log_file
@@ -192,21 +190,21 @@ module GeneValidatorApp
192
190
 
193
191
  # Assets whether the results file is produced by GeneValidator.
194
192
  def assert_json_output_file_produced
195
- @json_file = File.join(@run_dir, 'input_file.fa.json')
193
+ @json_file = File.join(@run_dir, 'output/input_file_results.json')
196
194
  return if File.exist?(@json_file)
197
- fail 'GeneValidator did not produce the required output file.'
195
+ raise 'GeneValidator did not produce the required output file.'
198
196
  end
199
197
 
200
198
  # Reuturns the URL of the results page.
201
199
  def produce_result_url_link(url)
202
200
  url.gsub(/input/, '').gsub(%r{/*$}, '') +
203
- "/GeneValidator/#{@unique_id}/input_file.fa.html/results1.html"
201
+ "/GeneValidator/#{@unique_id}/output/results.html"
204
202
  end
205
203
 
206
204
  # Reuturns the URL of the results page.
207
205
  def produce_json_url_link(url)
208
206
  url.gsub(/input/, '').gsub(%r{/*$}, '') +
209
- "/GeneValidator/#{@unique_id}/input_file.fa.json"
207
+ "/GeneValidator/#{@unique_id}/output/input_file_results.json"
210
208
  end
211
209
 
212
210
  def parse_output_json
@@ -215,14 +213,11 @@ module GeneValidatorApp
215
213
  end
216
214
 
217
215
  def output_json_file_path
218
- "#{@input_file}.json"
216
+ File.join(@run_dir, 'output/input_file_results.json')
219
217
  end
220
218
 
221
- def copy_json_folder
222
- json_dir = File.join("#{@input_file}.html", 'files/json', '/.')
223
- web_dir_json = File.join(public_dir, 'web_files/json')
224
- logger.debug("Moving JSON files from #{json_dir} to #{web_dir_json}")
225
- FileUtils.cp_r(json_dir, web_dir_json)
219
+ def individual_json_path
220
+ "/GeneValidator/#{@unique_id}/output/html_files/json"
226
221
  end
227
222
  end
228
223
  end
@@ -30,10 +30,10 @@ module GeneValidatorApp
30
30
  set :logging, nil
31
31
 
32
32
  # This is the app root...
33
- set :root, lambda { GeneValidatorApp.root }
33
+ set :root, -> { GeneValidatorApp.root }
34
34
 
35
35
  # This is the full path to the public folder...
36
- set :public_folder, lambda { GeneValidatorApp.public_dir }
36
+ set :public_folder, -> { GeneValidatorApp.public_dir }
37
37
  end
38
38
 
39
39
  # Set up global variables for the templates...
@@ -49,7 +49,7 @@ module GeneValidatorApp
49
49
  private
50
50
 
51
51
  def setup_signal_handlers
52
- [:INT, :TERM].each do |sig|
52
+ %i[INT TERM].each do |sig|
53
53
  trap sig do
54
54
  stop
55
55
  end