mongo-configure 0.1.3 → 0.1.4

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: 4e2534eea0023e79da6c7e2b641b48b4a89c3ab6
4
- data.tar.gz: ebe719470b725566e7eb0551256d16ca1f544a27
3
+ metadata.gz: e35ff567d3786ea6be16a320d1740f4d2910273b
4
+ data.tar.gz: 4a1e7f101cf949763e58b00e13187e2d1feb2006
5
5
  SHA512:
6
- metadata.gz: f2699702c389bb617b423361ed0d1950fe9b8a98b6e81f9bb6ba37f544f117cd16d6e12986f877e12e923c8aaf474c692ef49f1683c0b1749f2f5622d903746e
7
- data.tar.gz: 4cc5516c75a98b58e8e0262930af967ad8475c70c6d4a70f84cadd207107ff5afddc5029b21820cb2ec9ec3586ff433231c74f0f35f8270dade2f956acb48b50
6
+ metadata.gz: bf651f421536f5b639933ebcf9ea6039c1144cfa1f217c04584d2b6dcde6235e73e279246b6a34706a9b60d36265460bbad0940a1aaedde3cf772c86a227994a
7
+ data.tar.gz: 1d83d69ef0173bfb45a7dac8877e5de1a446393dc89a1c749f1a77d6f53067059f821c2859ab1b910b397549579f9745353f2370618026f5ed8256805c36e24d
@@ -1,12 +1,14 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - 2.1.2
4
+ - 2.1.1
3
5
  - 2.1.0
4
6
  - 2.0.0
5
7
  - 1.9.3
6
8
  - 1.9.2
7
9
  - jruby-18mode
8
10
  - jruby-19mode
9
- - rbx
11
+ - rbx-2
10
12
  before_install:
11
13
  - gem update bundler
12
14
  - bundle --version
data/Gemfile CHANGED
@@ -2,3 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in mongo-configure.gemspec
4
4
  gemspec
5
+
6
+ platform :rbx do
7
+ gem 'rubysl'
8
+ end
@@ -1,5 +1,5 @@
1
1
  module Mongo
2
2
  module Configure
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
@@ -2,35 +2,81 @@ require 'mongo/configure/uri'
2
2
 
3
3
  describe 'parsing Mongo URIs' do
4
4
  describe 'falling back to defaults' do
5
- subject { Mongo::Configure::URI.new }
6
- its(:scheme) { should == 'mongodb' }
7
- its(:host) { should == 'localhost' }
8
- its(:port) { should == '27017' }
9
- its(:database) { should == '' }
10
- its(:user) { should == nil }
11
- its(:password) { should == nil }
12
- its(:to_s) { should == 'mongodb://localhost:27017/' }
5
+ let(:uri) { Mongo::Configure::URI.new }
6
+ it "sets scheme" do
7
+ expect(uri.scheme).to eq 'mongodb'
8
+ end
9
+ it "sets host" do
10
+ expect(uri.host).to eq 'localhost'
11
+ end
12
+ it "sets port" do
13
+ expect(uri.port).to eq '27017'
14
+ end
15
+ it "sets database" do
16
+ expect(uri.database).to eq ''
17
+ end
18
+ it "sets user" do
19
+ expect(uri.user).to eq nil
20
+ end
21
+ it "sets password" do
22
+ expect(uri.password).to eq nil
23
+ end
24
+ it "sets to_s" do
25
+ expect(uri.to_s).to eq 'mongodb://localhost:27017/'
26
+ end
13
27
  end
14
28
  describe 'setting elements' do
15
- subject { Mongo::Configure::URI.new "secretsquirrel",'server.name','666','data','user','s3kr1t' }
16
- its(:scheme) { should == 'secretsquirrel' }
17
- its(:host) { should == 'server.name' }
18
- its(:port) { should == '666' }
19
- its(:database) { should == 'data' }
20
- its(:user) { should == 'user' }
21
- its(:password) { should == 's3kr1t' }
22
- its(:auth) { should == 'user:s3kr1t@' }
23
- its(:to_s) { should == 'secretsquirrel://user:s3kr1t@server.name:666/data' }
29
+ let(:uri) { Mongo::Configure::URI.new "secretsquirrel",'server.name','666','data','user','s3kr1t' }
30
+ it "sets scheme" do
31
+ expect(uri.scheme).to eq 'secretsquirrel'
32
+ end
33
+ it "sets host" do
34
+ expect(uri.host).to eq 'server.name'
35
+ end
36
+ it "sets port" do
37
+ expect(uri.port).to eq '666'
38
+ end
39
+ it "sets database" do
40
+ expect(uri.database).to eq 'data'
41
+ end
42
+ it "sets user" do
43
+ expect(uri.user).to eq 'user'
44
+ end
45
+ it "sets password" do
46
+ expect(uri.password).to eq 's3kr1t'
47
+ end
48
+ it "sets auth" do
49
+ expect(uri.auth).to eq 'user:s3kr1t@'
50
+ end
51
+ it "sets to_s" do
52
+ expect(uri.to_s).to eq 'secretsquirrel://user:s3kr1t@server.name:666/data'
53
+ end
24
54
  end
25
55
  describe 'parsing a supplied uri' do
26
- subject { Mongo::Configure::URI.parse "secretsquirrel://user:s3kr1t@server.name:666/data" }
27
- its(:scheme) { should == 'secretsquirrel' }
28
- its(:host) { should == 'server.name' }
29
- its(:port) { should == '666' }
30
- its(:database) { should == 'data' }
31
- its(:user) { should == 'user' }
32
- its(:password) { should == 's3kr1t' }
33
- its(:auth) { should == 'user:s3kr1t@' }
34
- its(:to_s) { should == 'secretsquirrel://user:s3kr1t@server.name:666/data' }
56
+ let(:uri) { Mongo::Configure::URI.parse "secretsquirrel://user:s3kr1t@server.name:666/data" }
57
+ it "sets scheme" do
58
+ expect(uri.scheme).to eq 'secretsquirrel'
59
+ end
60
+ it "sets host" do
61
+ expect(uri.host).to eq 'server.name'
62
+ end
63
+ it "sets port" do
64
+ expect(uri.port).to eq '666'
65
+ end
66
+ it "sets database" do
67
+ expect(uri.database).to eq 'data'
68
+ end
69
+ it "sets user" do
70
+ expect(uri.user).to eq 'user'
71
+ end
72
+ it "sets password" do
73
+ expect(uri.password).to eq 's3kr1t'
74
+ end
75
+ it "sets auth" do
76
+ expect(uri.auth).to eq 'user:s3kr1t@'
77
+ end
78
+ it "sets to_s" do
79
+ expect(uri.to_s).to eq 'secretsquirrel://user:s3kr1t@server.name:666/data'
80
+ end
35
81
  end
36
82
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongo-configure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Rowe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-22 00:00:00.000000000 Z
11
+ date: 2014-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: morphine
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  version: '0'
107
107
  requirements: []
108
108
  rubyforge_project:
109
- rubygems_version: 2.2.0
109
+ rubygems_version: 2.2.2
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: A simple gem for configuring mongo databases.