sequenceserver 1.1.0.beta → 1.1.0.beta2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sequenceserver might be problematic. Click here for more details.

Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +7 -7
  3. data/README.md +9 -11
  4. data/Rakefile +2 -15
  5. data/lib/sequenceserver/database.rb +7 -1
  6. data/lib/sequenceserver/routes.rb +5 -2
  7. data/lib/sequenceserver/version.rb +1 -1
  8. data/lib/sequenceserver.rb +3 -1
  9. data/package.json +2 -3
  10. data/public/config.js +0 -7
  11. data/public/css/sequenceserver.css +8 -17
  12. data/public/css/sequenceserver.min.css +2 -2
  13. data/public/js/report.js +62 -45
  14. data/public/js/search.js +24 -17
  15. data/public/js/sequenceserver.js +23 -60
  16. data/public/sequenceserver-report.min.js +17 -0
  17. data/public/sequenceserver-search.min.js +11 -0
  18. data/sequenceserver.gemspec +5 -5
  19. data/spec/capybara_spec.rb +3 -3
  20. data/spec/sequence_spec.rb +2 -2
  21. data/views/layout.erb +1 -13
  22. data/views/report.erb +13 -0
  23. data/views/search.erb +45 -0
  24. metadata +26 -92
  25. data/public/css/sequenceserver.min.css.gz +0 -0
  26. data/public/sequenceserver.min.js +0 -26
  27. data/public/sequenceserver.min.js.gz +0 -0
  28. data/public/vendor/npm/object-assign@2.1.1/.jspm-hash +0 -1
  29. data/public/vendor/npm/object-assign@2.1.1/.jspm.json +0 -72
  30. data/public/vendor/npm/object-assign@2.1.1/index.js +0 -27
  31. data/public/vendor/npm/object-assign@2.1.1/package.json +0 -38
  32. data/public/vendor/npm/object-assign@2.1.1.js +0 -1
  33. data/public/vendor/npm/qs@2.4.1/.jshintignore +0 -1
  34. data/public/vendor/npm/qs@2.4.1/.jshintrc +0 -10
  35. data/public/vendor/npm/qs@2.4.1/.jspm-hash +0 -1
  36. data/public/vendor/npm/qs@2.4.1/.jspm.json +0 -61
  37. data/public/vendor/npm/qs@2.4.1/.npmignore +0 -18
  38. data/public/vendor/npm/qs@2.4.1/.travis.yml +0 -6
  39. data/public/vendor/npm/qs@2.4.1/CHANGELOG.md +0 -68
  40. data/public/vendor/npm/qs@2.4.1/CONTRIBUTING.md +0 -1
  41. data/public/vendor/npm/qs@2.4.1/LICENSE +0 -28
  42. data/public/vendor/npm/qs@2.4.1/Makefile +0 -8
  43. data/public/vendor/npm/qs@2.4.1/README.md +0 -233
  44. data/public/vendor/npm/qs@2.4.1/index.js +0 -2
  45. data/public/vendor/npm/qs@2.4.1/lib/index.js +0 -8
  46. data/public/vendor/npm/qs@2.4.1/lib/parse.js +0 -100
  47. data/public/vendor/npm/qs@2.4.1/lib/stringify.js +0 -67
  48. data/public/vendor/npm/qs@2.4.1/lib/utils.js +0 -132
  49. data/public/vendor/npm/qs@2.4.1/lib.js +0 -2
  50. data/public/vendor/npm/qs@2.4.1/package.json +0 -29
  51. data/public/vendor/npm/qs@2.4.1/test/parse.js +0 -359
  52. data/public/vendor/npm/qs@2.4.1.js +0 -1
  53. data/public/vendor/npm/react-router@0.13.3/.jspm-hash +0 -1
  54. data/public/vendor/npm/react-router@0.13.3/.jspm.json +0 -70
  55. data/public/vendor/npm/react-router@0.13.3/README.md +0 -140
  56. data/public/vendor/npm/react-router@0.13.3/lib/Cancellation.js +0 -9
  57. data/public/vendor/npm/react-router@0.13.3/lib/History.js +0 -31
  58. data/public/vendor/npm/react-router@0.13.3/lib/Match.js +0 -80
  59. data/public/vendor/npm/react-router@0.13.3/lib/Navigation.js +0 -22
  60. data/public/vendor/npm/react-router@0.13.3/lib/PathUtils.js +0 -154
  61. data/public/vendor/npm/react-router@0.13.3/lib/PropTypes.js +0 -15
  62. data/public/vendor/npm/react-router@0.13.3/lib/Redirect.js +0 -12
  63. data/public/vendor/npm/react-router@0.13.3/lib/Route.js +0 -133
  64. data/public/vendor/npm/react-router@0.13.3/lib/ScrollHistory.js +0 -53
  65. data/public/vendor/npm/react-router@0.13.3/lib/State.js +0 -25
  66. data/public/vendor/npm/react-router@0.13.3/lib/TestUtils.js +0 -102
  67. data/public/vendor/npm/react-router@0.13.3/lib/Transition.js +0 -58
  68. data/public/vendor/npm/react-router@0.13.3/lib/actions/LocationActions.js +0 -25
  69. data/public/vendor/npm/react-router@0.13.3/lib/behaviors/ImitateBrowserBehavior.js +0 -19
  70. data/public/vendor/npm/react-router@0.13.3/lib/behaviors/ScrollToTopBehavior.js +0 -15
  71. data/public/vendor/npm/react-router@0.13.3/lib/components/ActiveHandler.js +0 -111
  72. data/public/vendor/npm/react-router@0.13.3/lib/components/ContextWrapper.js +0 -39
  73. data/public/vendor/npm/react-router@0.13.3/lib/components/DefaultRoute.js +0 -41
  74. data/public/vendor/npm/react-router@0.13.3/lib/components/Link.js +0 -119
  75. data/public/vendor/npm/react-router@0.13.3/lib/components/NotFoundRoute.js +0 -41
  76. data/public/vendor/npm/react-router@0.13.3/lib/components/Redirect.js +0 -40
  77. data/public/vendor/npm/react-router@0.13.3/lib/components/Route.js +0 -67
  78. data/public/vendor/npm/react-router@0.13.3/lib/components/RouteHandler.js +0 -111
  79. data/public/vendor/npm/react-router@0.13.3/lib/createRouter.js +0 -329
  80. data/public/vendor/npm/react-router@0.13.3/lib/createRoutesFromReactChildren.js +0 -59
  81. data/public/vendor/npm/react-router@0.13.3/lib/getWindowScrollPosition.js +0 -19
  82. data/public/vendor/npm/react-router@0.13.3/lib/index.js +0 -26
  83. data/public/vendor/npm/react-router@0.13.3/lib/isReactChildren.js +0 -14
  84. data/public/vendor/npm/react-router@0.13.3/lib/locations/HashLocation.js +0 -79
  85. data/public/vendor/npm/react-router@0.13.3/lib/locations/HistoryLocation.js +0 -64
  86. data/public/vendor/npm/react-router@0.13.3/lib/locations/RefreshLocation.js +0 -18
  87. data/public/vendor/npm/react-router@0.13.3/lib/locations/StaticLocation.js +0 -50
  88. data/public/vendor/npm/react-router@0.13.3/lib/locations/TestLocation.js +0 -104
  89. data/public/vendor/npm/react-router@0.13.3/lib/runRouter.js +0 -16
  90. data/public/vendor/npm/react-router@0.13.3/lib/supportsHistory.js +0 -17
  91. data/public/vendor/npm/react-router@0.13.3/lib.js +0 -2
  92. data/public/vendor/npm/react-router@0.13.3/package.json +0 -36
  93. data/public/vendor/npm/react-router@0.13.3/umd/ReactRouter.js +0 -3388
  94. data/public/vendor/npm/react-router@0.13.3/umd/ReactRouter.min.js +0 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a0dbd474f1aa6eb105d183ad81de21e9cc7ace1c
4
- data.tar.gz: a57253303745d75b265f72d93f40b063ee76aee3
3
+ metadata.gz: cccfc5a0df6982dde1187b7f12d043092d6b72c4
4
+ data.tar.gz: ce2dbf97a61770f721fd3501e150817e4e33f095
5
5
  SHA512:
6
- metadata.gz: 4a37d2c17a8aa7ffe88e57b229a7c7bc5c9c19705469ecc0c23194b2123dbd21d062294f34fe494516fb12f8ff01728c566ab268d874f460cad617fc44542c72
7
- data.tar.gz: fdc3d9bee70e07242cedc4f8671d989cbe22e19f6341f40f433db3b548a016ca24d30347fc91cc3b85a4af0799da6ed7c56305fd51707715e80cf360d2f528b0
6
+ metadata.gz: 7c75136b0c361e18f5d5d6dedfd4ad3aa8a730d3002f7be1823a47e7c6e6c0de1451116d6369af6c6cb5431e17d30cf64e2049960449cfab31d2566d1c0a7228
7
+ data.tar.gz: 4871277a05d19b600fc2611958623aa38b6328a1e271917aeedf840a0901550f2f76f86e6f59ee31793e95a946ab2ba092308622c8e30290b7065f2913719ccf
data/.travis.yml CHANGED
@@ -8,25 +8,21 @@ rvm:
8
8
  addons:
9
9
  firefox: "58.0"
10
10
 
11
- code_climate:
12
- repo_token:
13
- secure: "cT2wvWS2Uk2trYGwZ38Qo9XWCeL+OOXH0lVmLfNb1Xy/tWAXycDdZsc9CN8igjhD+/cKvvh529/qdDm2PJnb1Hux1bxHSTuMuE2xQWlfJqaOR/IX0z96MbP1eITKjhGv9vccmIPdV3Rh/OQLeHkyqyHvXio9NXiARMJUZDTpRuA="
14
-
15
11
  branches:
16
12
  only:
17
13
  - 1.0.x # stable
18
14
  - master
19
15
 
20
16
  install:
21
- - wget -c "https://github.com/mozilla/geckodriver/releases/download/v0.20.0/geckodriver-v0.20.0-macos.tar.gz"
17
+ - wget -c "https://github.com/mozilla/geckodriver/releases/download/v0.20.0/geckodriver-v0.20.0-linux64.tar.gz"
22
18
  - mkdir geckodriver && tar xvf geckodriver-*.tar.gz -C geckodriver
23
- - export PATH="geckodriver:$PATH"
19
+ - export PATH="$PWD/geckodriver:$PATH"
24
20
  - wget -c "ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.6.0/ncbi-blast-2.6.0+-x64-linux.tar.gz"
25
21
  - tar xvf ncbi-blast-*.tar.gz
26
22
  - gem install bundler && bundle
27
23
  - bundle exec bin/sequenceserver -s -b ncbi-blast-2.6.0+/bin -d spec/database/sample
28
24
 
29
- script: xvfb-run bundle exec rake spec
25
+ script: xvfb-run bundle exec rspec
30
26
 
31
27
  cache:
32
28
  directories:
@@ -34,3 +30,7 @@ cache:
34
30
  - ncbi-blast-2.6.0+
35
31
 
36
32
  sudo: false
33
+
34
+ env:
35
+ global:
36
+ - CC_TEST_REPORTER_ID=ec48bb03c72db6b43ce71fd488110b4707abfde4386c144d886d711378d8db64
data/README.md CHANGED
@@ -34,12 +34,6 @@ npm install
34
34
  bundle
35
35
  ```
36
36
 
37
- We use capybara-webkit for functional testing, which requires [`qt` to be
38
- installed](https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit).
39
-
40
- We use JSPM (via Node) for front-end package management and building JavaScript
41
- and CSS files.
42
-
43
37
  If you are deploying SequenceServer from git you can skip `npm install` step
44
38
  and skip installing gems used for testing (and `qt`), etc. by running:
45
39
 
@@ -53,15 +47,19 @@ logs verbosely and uses raw front-end files.
53
47
  bundle exec bin/sequenceserver -D
54
48
  ```
55
49
 
56
- Run the specs, lint the code, build front-end and package everything as a gem.
50
+ Run tests:
51
+ ```
52
+ bundle exec rspec
53
+ ```
54
+
55
+ Run code style checkers (rubocop, csslint, eslint) -
57
56
  ```
58
- rake
57
+ codeclimate analyze
59
58
  ```
60
59
 
61
- Sometimes you may just want to run the specs or lint the code:
60
+ Build minifies JS and CSS bundles:
62
61
  ```
63
- rake spec
64
- rake lint
62
+ npm run-script build
65
63
  ```
66
64
 
67
65
  ## Using Docker
data/Rakefile CHANGED
@@ -1,21 +1,8 @@
1
- require 'rspec/core'
2
- require 'rspec/core/rake_task'
3
-
4
- desc 'Run specs'
5
- RSpec::Core::RakeTask.new(:spec) do |spec|
6
- spec.pattern = FileList['spec/**/*_spec.rb']
7
- spec.pattern.exclude(ENV['exclude'])
8
- end
9
-
10
- desc 'Run CodeClimate (rubocop, csslint, eslint)'
11
- task :lint do
12
- sh 'codeclimate analyze'
13
- end
14
-
15
1
  desc 'Concatenate, minify and gzip JS and CSS files; build gem'
16
2
  task :build do
17
3
  sh 'npm run-script build'
4
+ # FIXME: clean up the dir before gem
18
5
  sh 'gem build sequenceserver.gemspec'
19
6
  end
20
7
 
21
- task :default => [:spec, :lint, :build]
8
+ task :default => [:build]
@@ -21,6 +21,11 @@ module SequenceServer
21
21
  # and use `parse_seqids` option of `makeblastdb` to format databases.
22
22
  Database = Struct.new(:name, :title, :type, :nsequences, :ncharacters,
23
23
  :updated_on) do
24
+
25
+ extend Forwardable
26
+
27
+ def_delegators SequenceServer, :config, :sys
28
+
24
29
  def initialize(*args)
25
30
  args[2].downcase! # database type
26
31
  args.each(&:freeze)
@@ -32,7 +37,8 @@ module SequenceServer
32
37
  attr_reader :id
33
38
 
34
39
  def include?(accession)
35
- out = `blastdbcmd -entry '#{accession}' -db #{name} 2> /dev/null`
40
+ cmd = "blastdbcmd -entry '#{accession}' -db #{name}"
41
+ out, _ = sys(cmd, path: config[:bin])
36
42
  !out.empty?
37
43
  end
38
44
 
@@ -49,6 +49,9 @@ module SequenceServer
49
49
  frame_options = SequenceServer.config[:frame_options]
50
50
  frame_options && { :frame_options => frame_options }
51
51
  }
52
+
53
+ # Serve compressed responses.
54
+ use Rack::Deflater
52
55
  end
53
56
 
54
57
  # For any request that hits the app, log incoming params at debug level.
@@ -58,7 +61,7 @@ module SequenceServer
58
61
 
59
62
  # Returns base HTML. Rest happens client-side: rendering the search form.
60
63
  get '/' do
61
- erb :layout
64
+ erb :search, layout: true
62
65
  end
63
66
 
64
67
  # Returns data that is used to render the search form client side. These
@@ -93,7 +96,7 @@ module SequenceServer
93
96
  # Returns base HTML. Rest happens client-side: polling for and rendering
94
97
  # the results.
95
98
  get '/:jid' do |jid|
96
- erb :layout
99
+ erb :report, layout: true
97
100
  end
98
101
 
99
102
  # @params sequence_ids: whitespace separated list of sequence ids to
@@ -1,4 +1,4 @@
1
1
  # Define version number.
2
2
  module SequenceServer
3
- VERSION = '1.1.0.beta'
3
+ VERSION = '1.1.0.beta2'
4
4
  end
@@ -96,9 +96,11 @@ module SequenceServer
96
96
  temp_stdout_file = Tempfile.new 'sequenceserver-sys'
97
97
  temp_stderr_file = Tempfile.new 'sequenceserver-sys'
98
98
 
99
+ # Log the command we are going to run - use -D option to view.
99
100
  logger.debug("Executing: #{command}")
100
101
 
101
- # Fork.
102
+ # Run command in a child process. This allows us to control PATH
103
+ # and pwd of the running process.
102
104
  child_pid = fork do
103
105
  # Set the PATH environment variable to the binary directory or
104
106
  # safe directory.
data/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "SequenceServer",
3
3
  "description": "BLAST searching made easy!",
4
- "version": "1.1.0.beta",
4
+ "version": "1.1.0-beta",
5
5
  "homepage": "http://www.sequenceserver.com",
6
6
  "repository": "https://github.com/yannickwurm/sequenceserver",
7
7
  "author": {
@@ -14,7 +14,7 @@
14
14
  "jspm": "^0.16.2"
15
15
  },
16
16
  "scripts": {
17
- "build": "jspm bundle-sfx --minify --skip-source-maps js/sequenceserver.js public/sequenceserver.min.js && cleancss public/css/sequenceserver.css > public/css/sequenceserver.min.css && gzip -kf public/sequenceserver.min.js && gzip -kf public/css/sequenceserver.min.css"
17
+ "build": "jspm bundle-sfx --minify --skip-source-maps js/search.js public/sequenceserver-search.min.js && jspm bundle-sfx --minify --skip-source-maps js/report.js public/sequenceserver-report.min.js && cleancss public/css/sequenceserver.css > public/css/sequenceserver.min.css"
18
18
  },
19
19
  "jspm": {
20
20
  "directories": {
@@ -29,7 +29,6 @@
29
29
  "jquery-ui": "github:components/jqueryui@^1.11.4",
30
30
  "nicgirault/circosJs": "github:nicgirault/circosJs@^1.7.0",
31
31
  "react": "npm:react@^0.13.3",
32
- "react-router": "npm:react-router@^0.13.3",
33
32
  "underscore": "npm:underscore@^1.8.3",
34
33
  "webshim": "npm:webshim@^1.15.8"
35
34
  },
data/public/config.js CHANGED
@@ -26,7 +26,6 @@ System.config({
26
26
  "jquery-ui": "github:components/jqueryui@1.11.4",
27
27
  "nicgirault/circosJs": "github:nicgirault/circosJs@1.7.0",
28
28
  "react": "npm:react@0.13.3",
29
- "react-router": "npm:react-router@0.13.3",
30
29
  "underscore": "npm:underscore@1.8.3",
31
30
  "webshim": "npm:webshim@1.15.8",
32
31
  "github:components/jqueryui@1.11.4": {
@@ -101,12 +100,6 @@ System.config({
101
100
  "npm:path-browserify@0.0.0": {
102
101
  "process": "github:jspm/nodelibs-process@0.1.1"
103
102
  },
104
- "npm:react-router@0.13.3": {
105
- "object-assign": "npm:object-assign@2.1.1",
106
- "process": "github:jspm/nodelibs-process@0.1.1",
107
- "qs": "npm:qs@2.4.1",
108
- "react": "npm:react@0.13.3"
109
- },
110
103
  "npm:react@0.13.3": {
111
104
  "buffer": "github:jspm/nodelibs-buffer@0.1.0",
112
105
  "envify": "npm:envify@3.4.0",
@@ -224,13 +224,6 @@ a.disabled:hover {
224
224
  font-weight: normal;
225
225
  }
226
226
 
227
- /**
228
- * Set padding: 10px and 15px on li.
229
- */
230
- .list-padded li {
231
- padding: 10px 15px;
232
- }
233
-
234
227
  /**
235
228
  * Reset Bootstrap's CSS for pre tags.
236
229
  */
@@ -336,14 +329,16 @@ input[name="advanced"] {
336
329
  /**********************
337
330
  Sidebar
338
331
  **********************/
339
- .sidebar {
340
- /* Line up with "Results" on left. */
332
+ .sidebar > div {
333
+ /* To line up with the results on the right */
341
334
  margin-top: 20px;
342
335
  }
343
- .sidebar > .section-header > h4 {
344
- padding: 10px 0 0 0;
336
+ .sidebar h4 {
345
337
  font-size: 14px;
346
338
  }
339
+ .sidebar li a {
340
+ padding: 7px 10px;
341
+ }
347
342
 
348
343
  .sidebar.affix {
349
344
  margin-top: 0;
@@ -362,14 +357,10 @@ input[name="advanced"] {
362
357
  }
363
358
  }
364
359
 
365
- .index {
366
- max-height: 416px; /* will accomodate 10 elements. IE 7 and above only. */
367
- overflow-y: auto;
368
- }
369
-
370
360
  /* Result per query. */
371
361
  .overview {
372
- margin: 30px 0;
362
+ /* To line up with the sidebar on the left */
363
+ margin: 20px 0;
373
364
  }
374
365
  .resultn {
375
366
  margin-bottom: 50px;