map_reduced 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,5 +8,5 @@ require 'uri'
8
8
  require 'pathname'
9
9
 
10
10
  module MapReduced
11
- VERSION = "0.1.0"
11
+ VERSION = "0.1.1"
12
12
  end
@@ -10,8 +10,10 @@ module MapReduced
10
10
  uri = URI.parse(string)
11
11
  connection = Mongo::Connection.new(uri.host, uri.port)
12
12
  database = uri.path.gsub(/^\//, "")
13
- connection.add_auth(database, uri.user, uri.password)
14
- connection.apply_saved_authentication
13
+ if uri.user && uri.password
14
+ connection.add_auth(database, uri.user, uri.password)
15
+ connection.apply_saved_authentication
16
+ end
15
17
  @db = connection.db(database)
16
18
  else
17
19
  @db = Mongo::Connection.new.db(string)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: map_reduced
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Scott Burton