mongoid-shell 0.4.3 → 0.4.4
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -21
- data/LICENSE.md +1 -1
- data/README.md +6 -6
- data/lib/mongoid/shell/commands/base.rb +1 -1
- data/lib/mongoid/shell/errors/base.rb +1 -1
- data/lib/mongoid/shell/properties/host.rb +3 -3
- data/lib/mongoid/shell/properties/password.rb +2 -2
- data/lib/mongoid/shell/properties/primary.rb +6 -6
- data/lib/mongoid/shell/properties/username.rb +2 -2
- data/lib/mongoid/shell/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 281b10f7bd8d03398017dd86286d9fb9f188738f
|
4
|
+
data.tar.gz: e45e3e8df36e8df3dc6ccad7451e84580c69fd40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01de62b1af19ff3d15b3deb906e534bb46124549a934ee9122bfcb885569b1a8a6aa653d3738cd9504812d40dc94b6485356a62cf383a8025494067808a8d049
|
7
|
+
data.tar.gz: 3ae7256e0dfc0f4800b7c1c8087cf8cc9d2b1a9b7947f79d744f232a5aa14dca4f0de971ce9b5d1a0ed9ea323d67ad90cf89867f2c8f0d8bc00bc398660c25e3
|
data/CHANGELOG.md
CHANGED
@@ -1,35 +1,34 @@
|
|
1
|
-
0.4.
|
2
|
-
================
|
1
|
+
### 0.4.4 (6/4/2017)
|
3
2
|
|
4
|
-
* [#
|
3
|
+
* [#11](https://github.com/mongoid/mongoid-shell/pull/11): Compatibility with Mongoid 6 - [@jbach](https://github.com/jbach).
|
4
|
+
* [#12](https://github.com/mongoid/mongoid-shell/pull/12): Added Danger, PR linter - [@dblock](https://github.com/dblock).
|
5
5
|
|
6
|
-
0.4.
|
7
|
-
================
|
6
|
+
### 0.4.3 (6/1/2016)
|
8
7
|
|
9
|
-
* [#
|
8
|
+
* [#9](https://github.com/mongoid/mongoid-shell/pull/9): Remove example and spec alleging that `--collection` can be specified multiple times - [@joeyAghion](https://github.com/joeyAghion).
|
10
9
|
|
11
|
-
0.4.
|
12
|
-
==================
|
10
|
+
### 0.4.2 (2/9/2015)
|
13
11
|
|
14
|
-
* [#
|
12
|
+
* [#8](https://github.com/mongoid/mongoid-shell/pull/8): Support repeatable parameters; add `excludeCollection` and `excludeCollectionsWithPrefix` to `mongodump` - [@joeyAghion](https://github.com/joeyAghion).
|
15
13
|
|
16
|
-
0.4.
|
17
|
-
==================
|
14
|
+
### 0.4.1 (10/25/2015)
|
18
15
|
|
19
|
-
* [#
|
16
|
+
* [#7](https://github.com/mongoid/mongoid-shell/pull/7): Added support for `mongoimport` and `mongoexport` - [@hoang1417](https://github.com/hoang1417).
|
20
17
|
|
21
|
-
0.
|
22
|
-
================
|
18
|
+
### 0.4.0 (10/20/2015)
|
23
19
|
|
24
|
-
* [#
|
25
|
-
|
26
|
-
|
20
|
+
* [#6](https://github.com/mongoid/mongoid-shell/pull/6): Compatibility with Mongoid 5.x - [@dblock](https://github.com/dblock).
|
21
|
+
|
22
|
+
### 0.3.0 (7/1/2014)
|
23
|
+
|
24
|
+
* [#3](https://github.com/mongoid/mongoid-shell/pull/3): Added Mongoid 4.x support - [@pawelniewie](https://github.com/pawelniewie), [@dblock](https://github.com/dblock).
|
25
|
+
* [#2](https://github.com/mongoid/mongoid-shell/pull/2): Added support for `--noIndexRestore` to `Mongoid::Shell::Commands::Mongorestore` - [@macreery](https://github.com/macreery).
|
26
|
+
* [#1](https://github.com/mongoid/mongoid-shell/pull/1): Enforced compatibility with Mongoid 3.x only - [@macreery](https://github.com/macreery).
|
27
27
|
* Fix: the `mongorestore` command requires a primary node in a replica set - [@dblock](https://github.com/dblock).
|
28
28
|
* Added Rubocop, Ruby style linter - [@dblock](https://github.com/dblock).
|
29
29
|
* Upgraded to RSpec 3.x expectation syntax - [@dblock](https://github.com/dblock).
|
30
30
|
|
31
|
-
0.2.0 (1/29/2013)
|
32
|
-
=================
|
31
|
+
### 0.2.0 (1/29/2013)
|
33
32
|
|
34
33
|
* Added `Mongoid::Shell::Commands::Mongo` that generates a command line which connects to the session's primary node - [@dblock](https://github.com/dblock).
|
35
34
|
* Added `Mongoid::Shell::Commands::Mongostat` that generates a command line for `mongostat` - [@dblock](https://github.com/dblock).
|
@@ -39,7 +38,6 @@
|
|
39
38
|
* Added support for `--nodb`, `--norc`, `--quiet` and `--ipv6` to `Mongoid::Shell::Commands::Mongo` - [@dblock](https://github.com/dblock).
|
40
39
|
* It's now possible to override built-in `db`, `username`, `password`, `host` and `primary` - [@dblock](https://github.com/dblock).
|
41
40
|
|
42
|
-
0.1.0 (1/27/2013)
|
43
|
-
==================
|
41
|
+
### 0.1.0 (1/27/2013)
|
44
42
|
|
45
43
|
* Initial public release with support for `mongodump` - [@dblock](https://github.com/dblock).
|
data/LICENSE.md
CHANGED
data/README.md
CHANGED
@@ -2,9 +2,9 @@ Mongoid::Shell
|
|
2
2
|
==============
|
3
3
|
|
4
4
|
[](https://badge.fury.io/rb/mongoid-shell)
|
5
|
-
[](https://travis-ci.org/mongoid/mongoid-shell)
|
6
|
+
[](https://gemnasium.com/mongoid/mongoid-shell)
|
7
|
+
[](https://codeclimate.com/github/mongoid/mongoid-shell)
|
8
8
|
|
9
9
|
Create mongo command-lines from Mongoid configuration.
|
10
10
|
|
@@ -47,7 +47,7 @@ system mongodump.to_s # mongodump --excludeCollection users --excludeCollection
|
|
47
47
|
Compatibility
|
48
48
|
-------------
|
49
49
|
|
50
|
-
This gem supports Mongoid 3, 4 and
|
50
|
+
This gem supports Mongoid 3, 4, 5 and 6.
|
51
51
|
|
52
52
|
Supported Commands
|
53
53
|
------------------
|
@@ -121,6 +121,6 @@ Fork the project. Make your feature addition or bug fix with tests. Send a pull
|
|
121
121
|
Copyright and License
|
122
122
|
---------------------
|
123
123
|
|
124
|
-
MIT License, see [LICENSE](http://github.com/
|
124
|
+
MIT License, see [LICENSE](http://github.com/mongoid/mongoid-shell/raw/master/LICENSE.md) for details.
|
125
125
|
|
126
|
-
(c) 2013-
|
126
|
+
(c) 2013-2016 [Daniel Doubrovkine](http://github.com/dblock), [Artsy Inc.](http://artsy.net)
|
@@ -9,7 +9,7 @@ module Mongoid
|
|
9
9
|
def host
|
10
10
|
@host || begin
|
11
11
|
node = session.cluster.nodes.first
|
12
|
-
|
12
|
+
raise Mongoid::Shell::Errors::SessionNotConnectedError unless node
|
13
13
|
node.address == 'localhost:27017' ? nil : node.address
|
14
14
|
end
|
15
15
|
end
|
@@ -17,7 +17,7 @@ module Mongoid
|
|
17
17
|
def host
|
18
18
|
@host || begin
|
19
19
|
node = session.cluster.nodes.first
|
20
|
-
|
20
|
+
raise Mongoid::Shell::Errors::SessionNotConnectedError unless node
|
21
21
|
node.address.original == 'localhost:27017' ? nil : node.address.original
|
22
22
|
end
|
23
23
|
end
|
@@ -25,7 +25,7 @@ module Mongoid
|
|
25
25
|
def host
|
26
26
|
@host || begin
|
27
27
|
node = session.cluster.servers.first
|
28
|
-
|
28
|
+
raise Mongoid::Shell::Errors::SessionNotConnectedError unless node
|
29
29
|
node.address.to_s == 'localhost:27017' ? nil : node.address.to_s
|
30
30
|
end
|
31
31
|
end
|
@@ -16,7 +16,7 @@ module Mongoid
|
|
16
16
|
def password
|
17
17
|
@password || begin
|
18
18
|
node = session.cluster.nodes.first
|
19
|
-
|
19
|
+
raise Mongoid::Shell::Errors::SessionNotConnectedError unless node
|
20
20
|
return nil if !node.credentials.key?(db) || node.credentials[db].empty?
|
21
21
|
node.credentials[db][1]
|
22
22
|
end
|
@@ -25,7 +25,7 @@ module Mongoid
|
|
25
25
|
def password
|
26
26
|
@password || begin
|
27
27
|
server = session.cluster.servers.first
|
28
|
-
|
28
|
+
raise Mongoid::Shell::Errors::SessionNotConnectedError unless server
|
29
29
|
server.context.with_connection do |connection|
|
30
30
|
connection.options[:password]
|
31
31
|
end
|
@@ -8,27 +8,27 @@ module Mongoid
|
|
8
8
|
if ::Mongoid::Compatibility::Version.mongoid3?
|
9
9
|
def primary
|
10
10
|
@primary || begin
|
11
|
-
|
11
|
+
raise Mongoid::Shell::Errors::SessionNotConnectedError unless session.cluster.nodes.any?
|
12
12
|
node = session.cluster.nodes.find(&:primary?)
|
13
|
-
|
13
|
+
raise Mongoid::Shell::Errors::MissingPrimaryNodeError unless node
|
14
14
|
node.address == 'localhost:27017' ? nil : node.address
|
15
15
|
end
|
16
16
|
end
|
17
17
|
elsif ::Mongoid::Compatibility::Version.mongoid4?
|
18
18
|
def primary
|
19
19
|
@primary || begin
|
20
|
-
|
20
|
+
raise Mongoid::Shell::Errors::SessionNotConnectedError unless session.cluster.nodes.any?
|
21
21
|
node = session.cluster.nodes.find(&:primary?)
|
22
|
-
|
22
|
+
raise Mongoid::Shell::Errors::MissingPrimaryNodeError unless node
|
23
23
|
node.address.original == 'localhost:27017' ? nil : node.address.original
|
24
24
|
end
|
25
25
|
end
|
26
26
|
else
|
27
27
|
def primary
|
28
28
|
@primary || begin
|
29
|
-
|
29
|
+
raise Mongoid::Shell::Errors::SessionNotConnectedError unless session.cluster.servers.any?
|
30
30
|
node = session.cluster.servers.find { |server| server.primary? || server.standalone? }
|
31
|
-
|
31
|
+
raise Mongoid::Shell::Errors::MissingPrimaryNodeError unless node
|
32
32
|
node.address.to_s == 'localhost:27017' ? nil : node.address.to_s
|
33
33
|
end
|
34
34
|
end
|
@@ -16,7 +16,7 @@ module Mongoid
|
|
16
16
|
def username
|
17
17
|
@username || begin
|
18
18
|
node = session.cluster.nodes.first
|
19
|
-
|
19
|
+
raise Mongoid::Shell::Errors::SessionNotConnectedError unless node
|
20
20
|
return nil if !node.credentials.key?(db) || node.credentials[db].empty?
|
21
21
|
node.credentials[db][0]
|
22
22
|
end
|
@@ -25,7 +25,7 @@ module Mongoid
|
|
25
25
|
def username
|
26
26
|
@username || begin
|
27
27
|
server = session.cluster.servers.first
|
28
|
-
|
28
|
+
raise Mongoid::Shell::Errors::SessionNotConnectedError unless server
|
29
29
|
server.context.with_connection do |connection|
|
30
30
|
connection.options[:user]
|
31
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid-shell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Doubrovkine
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongoid
|
@@ -84,7 +84,7 @@ files:
|
|
84
84
|
- lib/mongoid/shell/properties/username.rb
|
85
85
|
- lib/mongoid/shell/version.rb
|
86
86
|
- lib/mongoid_shell.rb
|
87
|
-
homepage: http://github.com/
|
87
|
+
homepage: http://github.com/mongoid/mongoid-shell
|
88
88
|
licenses:
|
89
89
|
- MIT
|
90
90
|
metadata: {}
|
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
104
|
version: 1.3.6
|
105
105
|
requirements: []
|
106
106
|
rubyforge_project:
|
107
|
-
rubygems_version: 2.6.
|
107
|
+
rubygems_version: 2.6.12
|
108
108
|
signing_key:
|
109
109
|
specification_version: 4
|
110
110
|
summary: Derive shell commands from Mongoid configuration options.
|