openbel-api 0.5.0-java → 0.5.1-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 51e6f9a762021d8b56fd1bf8a2dfe97a42c97b98
4
- data.tar.gz: 3f83ea9644a89fc9c019858594ebe6e31507a4b2
3
+ metadata.gz: 1e92506a6a1b43f887a0b8a0b90a89e79784aa1c
4
+ data.tar.gz: a460b94a82a4430ffcd3a24c627fae818ca30c81
5
5
  SHA512:
6
- metadata.gz: ada40940474506e44d79afb3300733149a363716b7d2bc8bf8232a3264079fd91f85b58ab8363554ff0f3a96c686e270f93f4eb907cbb789b9fa8bf9fce35d8a
7
- data.tar.gz: 0166d8e47e7db5f1354df5cd7c8e6740f2da365d4f34747e4aabc6f7431eb9cfa21c83aed9e333ee11576c87529ccca5635fef8c04bf62e1a60ee75123bd2848
6
+ metadata.gz: a2c221355ede69af12b3cce38a99d70126cfa763aed4dfdc6674783724220066711ad5c4a903e6b15320d46f950b6c091406dad8f031f3c09a4fb2d1b44b90e0
7
+ data.tar.gz: edad2faa9587a091ba86baca74c6446dbb489430efdb3f485153b5eaf5dce142dc4b0a4b8bd4b8dbae7eff822a969c0117b5f711e99fb60663bc60913212d0cf
data/.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  'Nick Bargnesi',
12
12
  'William Hayes'
13
13
  ]
14
- spec.date = %q{2015-12-17}
14
+ spec.date = %q{2015-12-18}
15
15
  spec.email = %q{abargnesi@selventa.com}
16
16
  spec.files = [
17
17
  Dir.glob('app/**/*.{json,rb,ru}'),
@@ -3,6 +3,12 @@ All notable changes to openbel-api will be documented in this file. The curated
3
3
 
4
4
  This project adheres to [Semantic Versioning][Semantic Versioning].
5
5
 
6
+ ## [0.5.1][0.5.1] - 2015-12-18
7
+ ### Fixed
8
+ - Authentication error for MongoDB user when faceting on `GET /api/evidence` ([Issue #93][93]).
9
+
10
+ -----
11
+
6
12
  ## [0.5.0][0.5.0] - 2015-12-17
7
13
  ### Added
8
14
  - Report API version from executables (`openbel-api`, `openbel-config`) and REST API (`GET /api/version`) ([Issue #91][91]).
@@ -34,8 +40,10 @@ This project adheres to [Semantic Versioning][Semantic Versioning].
34
40
  - Retrieve equivalent namespace values from the individual.
35
41
  - Retrieve orthologous namespace values from the individual.
36
42
 
43
+ [0.5.1]: https://github.com/OpenBEL/openbel-api/compare/0.5.0...0.5.1
37
44
  [0.5.0]: https://github.com/OpenBEL/openbel-api/compare/0.4.0...0.5.0
38
45
  [Semantic Versioning]: http://semver.org
39
46
  [MongoDB User Authentication]: https://github.com/OpenBEL/openbel-api/wiki/Configuring-the-Evidence-Store#mongodb-user-authentication
40
47
  [91]: https://github.com/OpenBEL/openbel-api/issues/91
41
48
  [92]: https://github.com/OpenBEL/openbel-api/issues/92
49
+ [93]: https://github.com/OpenBEL/openbel-api/issues/93
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.1
@@ -33,11 +33,7 @@ module OpenBEL
33
33
  {:"$**" => Mongo::TEXT },
34
34
  :background => true
35
35
  )
36
- @evidence_facets = EvidenceFacets.new(
37
- :host => host,
38
- :port => port,
39
- :database => db
40
- )
36
+ @evidence_facets = EvidenceFacets.new(options)
41
37
  end
42
38
 
43
39
  def create_evidence(evidence)
@@ -12,10 +12,19 @@ module OpenBEL
12
12
  include FacetFilter
13
13
 
14
14
  def initialize(options = {})
15
- host = options.delete(:host)
16
- port = options.delete(:port)
17
- db = options.delete(:database)
15
+ host = options[:host]
16
+ port = options[:port]
17
+ db = options[:database]
18
18
  @db = MongoClient.new(host, port).db(db)
19
+
20
+ # Authenticate user if provided.
21
+ username = options[:username]
22
+ password = options[:password]
23
+ if username && password
24
+ auth_db = options[:authentication_database] || db
25
+ @db.authenticate(username, password, nil, auth_db)
26
+ end
27
+
19
28
  @evidence = @db[:evidence]
20
29
  @evidence_facets = @db[:evidence_facets]
21
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openbel-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: java
6
6
  authors:
7
7
  - Anthony Bargnesi
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-12-17 00:00:00.000000000 Z
13
+ date: 2015-12-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  requirement: !ruby/object:Gem::Requirement