mongoid-shell 0.4.3 → 0.4.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: d887432b9233aaa4510a98f1631ca56b7a466cf7
4
- data.tar.gz: ea103a0606457f484259e86086b405ed28a28933
3
+ metadata.gz: 281b10f7bd8d03398017dd86286d9fb9f188738f
4
+ data.tar.gz: e45e3e8df36e8df3dc6ccad7451e84580c69fd40
5
5
  SHA512:
6
- metadata.gz: 686e4a170c33c96aa19e97046efac84fa9ca7ca48b6b19c25f3d4058ac61835a2ffeed93742ff1e480651a5337367d372c37b69fb207381ce10b9c4a51f359c1
7
- data.tar.gz: 5809448c083a0decfa5cb92c7bfaa8c49ae9642654f8a486fc9244a121721b440767ee635bc4c48a23e48182f2a84a3996fcab827cb243516390d00d30310d2e
6
+ metadata.gz: 01de62b1af19ff3d15b3deb906e534bb46124549a934ee9122bfcb885569b1a8a6aa653d3738cd9504812d40dc94b6485356a62cf383a8025494067808a8d049
7
+ data.tar.gz: 3ae7256e0dfc0f4800b7c1c8087cf8cc9d2b1a9b7947f79d744f232a5aa14dca4f0de971ce9b5d1a0ed9ea323d67ad90cf89867f2c8f0d8bc00bc398660c25e3
@@ -1,35 +1,34 @@
1
- 0.4.3 (6/1/2016)
2
- ================
1
+ ### 0.4.4 (6/4/2017)
3
2
 
4
- * [#9](https://github.com/dblock/mongoid-shell/pull/9) - Remove example and spec alleging that `--collection` can be specified multiple times - [@joeyAghion](https://github.com/joeyAghion).
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.2 (2/9/2015)
7
- ================
6
+ ### 0.4.3 (6/1/2016)
8
7
 
9
- * [#8](https://github.com/dblock/mongoid-shell/pull/8) - Support repeatable parameters; add `excludeCollection` and `excludeCollectionsWithPrefix` to `mongodump` - [@joeyAghion](https://github.com/joeyAghion).
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.1 (10/25/2015)
12
- ==================
10
+ ### 0.4.2 (2/9/2015)
13
11
 
14
- * [#7](https://github.com/dblock/mongoid-shell/pull/7) - Added support for `mongoimport` and `mongoexport` - [@hoang1417](https://github.com/hoang1417).
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.0 (10/20/2015)
17
- ==================
14
+ ### 0.4.1 (10/25/2015)
18
15
 
19
- * [#6](https://github.com/dblock/mongoid-shell/pull/6) - Compatibility with Mongoid 5.x - [@dblock](https://github.com/dblock).
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.3.0 (7/1/2014)
22
- ================
18
+ ### 0.4.0 (10/20/2015)
23
19
 
24
- * [#3](https://github.com/dblock/mongoid-shell/pull/3): Added Mongoid 4.x support - [@pawelniewie](https://github.com/pawelniewie), [@dblock](https://github.com/dblock).
25
- * [#2](https://github.com/dblock/mongoid-shell/pull/2): Added support for `--noIndexRestore` to `Mongoid::Shell::Commands::Mongorestore` - [@macreery](https://github.com/macreery).
26
- * [#1](https://github.com/dblock/mongoid-shell/pull/1): Enforced compatibility with Mongoid 3.x only - [@macreery](https://github.com/macreery).
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
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2013-2015 Daniel Doubrovkine, Artsy Inc.
3
+ Copyright (c) 2013-2016 Daniel Doubrovkine, Artsy Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -2,9 +2,9 @@ Mongoid::Shell
2
2
  ==============
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/mongoid-shell.svg)](https://badge.fury.io/rb/mongoid-shell)
5
- [![Build Status](https://travis-ci.org/dblock/mongoid-shell.svg?branch=master)](https://travis-ci.org/dblock/mongoid-shell)
6
- [![Dependency Status](https://gemnasium.com/dblock/mongoid-shell.svg)](https://gemnasium.com/dblock/mongoid-shell)
7
- [![Code Climate](https://codeclimate.com/github/dblock/mongoid-shell.svg)](https://codeclimate.com/github/dblock/mongoid-shell)
5
+ [![Build Status](https://travis-ci.org/mongoid/mongoid-shell.svg?branch=master)](https://travis-ci.org/mongoid/mongoid-shell)
6
+ [![Dependency Status](https://gemnasium.com/mongoid/mongoid-shell.svg)](https://gemnasium.com/mongoid/mongoid-shell)
7
+ [![Code Climate](https://codeclimate.com/github/mongoid/mongoid-shell.svg)](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 5.
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/dblock/mongoid-shell/raw/master/LICENSE.md) for details.
124
+ MIT License, see [LICENSE](http://github.com/mongoid/mongoid-shell/raw/master/LICENSE.md) for details.
125
125
 
126
- (c) 2013-2015 [Daniel Doubrovkine](http://github.com/dblock), [Artsy Inc.](http://artsy.net)
126
+ (c) 2013-2016 [Daniel Doubrovkine](http://github.com/dblock), [Artsy Inc.](http://artsy.net)
@@ -16,7 +16,7 @@ module Mongoid
16
16
  options.each do |sym, val|
17
17
  send "#{sym}=", val
18
18
  end
19
- fail Mongoid::Shell::Errors::MissingSessionError unless @session
19
+ raise Mongoid::Shell::Errors::MissingSessionError unless @session
20
20
  end
21
21
 
22
22
  def cmd
@@ -27,7 +27,7 @@ module Mongoid
27
27
 
28
28
  private
29
29
 
30
- BASE_KEY = 'mongoid.shell.errors.messages' #:nodoc:
30
+ BASE_KEY = 'mongoid.shell.errors.messages'.freeze #:nodoc:
31
31
 
32
32
  # Given the key of the specific error and the options hash, translate the
33
33
  # message.
@@ -9,7 +9,7 @@ module Mongoid
9
9
  def host
10
10
  @host || begin
11
11
  node = session.cluster.nodes.first
12
- fail Mongoid::Shell::Errors::SessionNotConnectedError unless node
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
- fail Mongoid::Shell::Errors::SessionNotConnectedError unless node
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
- fail Mongoid::Shell::Errors::SessionNotConnectedError unless node
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
- fail Mongoid::Shell::Errors::SessionNotConnectedError unless node
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
- fail Mongoid::Shell::Errors::SessionNotConnectedError unless server
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
- fail Mongoid::Shell::Errors::SessionNotConnectedError unless session.cluster.nodes.any?
11
+ raise Mongoid::Shell::Errors::SessionNotConnectedError unless session.cluster.nodes.any?
12
12
  node = session.cluster.nodes.find(&:primary?)
13
- fail Mongoid::Shell::Errors::MissingPrimaryNodeError unless node
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
- fail Mongoid::Shell::Errors::SessionNotConnectedError unless session.cluster.nodes.any?
20
+ raise Mongoid::Shell::Errors::SessionNotConnectedError unless session.cluster.nodes.any?
21
21
  node = session.cluster.nodes.find(&:primary?)
22
- fail Mongoid::Shell::Errors::MissingPrimaryNodeError unless node
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
- fail Mongoid::Shell::Errors::SessionNotConnectedError unless session.cluster.servers.any?
29
+ raise Mongoid::Shell::Errors::SessionNotConnectedError unless session.cluster.servers.any?
30
30
  node = session.cluster.servers.find { |server| server.primary? || server.standalone? }
31
- fail Mongoid::Shell::Errors::MissingPrimaryNodeError unless node
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
- fail Mongoid::Shell::Errors::SessionNotConnectedError unless node
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
- fail Mongoid::Shell::Errors::SessionNotConnectedError unless server
28
+ raise Mongoid::Shell::Errors::SessionNotConnectedError unless server
29
29
  server.context.with_connection do |connection|
30
30
  connection.options[:user]
31
31
  end
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module Shell
3
- VERSION = '0.4.3'
3
+ VERSION = '0.4.4'.freeze
4
4
  end
5
5
  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.3
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: 2016-06-02 00:00:00.000000000 Z
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/dblock/mongoid-shell
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.4
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.