mongoid-shell 0.4.5 → 0.4.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b0e80be659912607683e05be144ad4456b51a999
4
- data.tar.gz: 9d43a23815209ba7354f1fc22bc8a7f54286d382
2
+ SHA256:
3
+ metadata.gz: 588223889e515c052ca759aee135dad1e7d111527db90a98c16ea402779a0d1a
4
+ data.tar.gz: 1ac95659f22a0b76a67f764899d46724f722581824fbe16a5dd7365d84362eb3
5
5
  SHA512:
6
- metadata.gz: d7fb5e80531426776aa4828a30e9dd5d328dff0db4430e20e50f5498c8ad72a1146c5b493e688283ec95ef65fc648fbd6fae72db52ff2d15eac0200d8b332aed
7
- data.tar.gz: 8a35c2256c55e8fa5c2ac3dcf2b998e7b8e32331b3f35e27fac021ffac1cf676419afd2ad42670443142465a2973a1294f4ccf81fcc53ef3bfb1344f03397ddf
6
+ metadata.gz: 30bddfdbbea07fccc19c61230747adb8547a0ccebbc8eaecea09f81e22eed9a1420f910a40aed101787cefac28f8f68da4559c2af4ae082332c63c45ccff2c2a
7
+ data.tar.gz: 6a72123870b1542236c4f472573ebbf011ad1b340d7200a968bac7557d048ab549fa03eb1161bb7812f374dff04cf14b2fb4f0ec0ccfea2ce3ceeb08100ba938
@@ -1,3 +1,7 @@
1
+ ### 0.4.6 (12/29/2017)
2
+
3
+ * [#16](https://github.com/mongoid/mongoid-shell/pull/16): Add `--ssl` and `--authenticationDatabase` support to all commands - [@cavvia](https://github.com/cavvia).
4
+
1
5
  ### 0.4.5 (9/7/2017)
2
6
 
3
7
  * [#13](https://github.com/mongoid/mongoid-shell/issues/13): Support masking sensitive values with `to_s(mask_sensitive: true)` - [@dblock](https://github.com/dblock).
data/README.md CHANGED
@@ -69,7 +69,7 @@ The mongo shell is an interactive JavaScript shell for MongoDB. The `Mongoid::Sh
69
69
  Mongoid::Shell::Commands::Mongo.new.to_s
70
70
  ```
71
71
 
72
- Supports `--username`, `--password`, `--eval`, `--nodb`, `--norc`, `--quiet` and `--ipv6`.
72
+ Supports `--username`, `--password`, `--eval`, `--nodb`, `--norc`, `--quiet`, `--ipv6`, `--ssl` and `--authenticationDatabase`.
73
73
 
74
74
  ### Mongodump
75
75
 
@@ -80,7 +80,7 @@ mongodump = Mongoid::Shell::Commands::Mongodump.new(collection: 'test')
80
80
  mongodump.to_s # mongodump --db test --collection test
81
81
  ```
82
82
 
83
- The `Mongoid::Shell::Commands::Mongodump` class supports `--db`, `--host`, `--username`, `--password`, `--query`, `--out`, `--collection`, `--excludeCollection`, `--excludeCollectionsWithPrefix`, `--directoryperdb`, `--journal`, `--oplog`, `--repair`, `--forceTableScan`, `--dbpath` and `--ipv6`.
83
+ The `Mongoid::Shell::Commands::Mongodump` class supports `--db`, `--host`, `--username`, `--password`, `--query`, `--out`, `--collection`, `--excludeCollection`, `--excludeCollectionsWithPrefix`, `--directoryperdb`, `--journal`, `--oplog`, `--repair`, `--forceTableScan`, `--dbpath`, `--ipv6`, `--ssl` and `--authenticationDatabase`
84
84
 
85
85
  ### Mongorestore
86
86
 
@@ -91,7 +91,7 @@ mongorestore = Mongoid::Shell::Commands::Mongorestore.new(collection: 'test', re
91
91
  mongorestore.to_s # mongorestore --db test --collection test /tmp/db_backup
92
92
  ```
93
93
 
94
- The `Mongoid::Shell::Commands::Mongorestore` class supports `--db`, `--host`, `--username`, `--password`, `--collection`, `--ipv6`, `--dbpath`, `--directoryperdb`, `--journal`, `--objcheck`, `--filter`, `--drop`, `--oplogReplay`, `--keepIndexVersion` and `--noIndexRestore`.
94
+ The `Mongoid::Shell::Commands::Mongorestore` class supports `--db`, `--host`, `--username`, `--password`, `--collection`, `--ipv6`, `--dbpath`, `--directoryperdb`, `--journal`, `--objcheck`, `--filter`, `--drop`, `--oplogReplay`, `--keepIndexVersion`, `--noIndexRestore`, `--ssl` and `--authenticationDatabase`
95
95
 
96
96
  ### Mongoexport
97
97
 
@@ -120,7 +120,7 @@ The `Mongoid::Shell::Commands::Mongoimport` class supports `--verbose`, `--quiet
120
120
 
121
121
  The mongostat utility provides a quick overview of the status of a currently running mongod or mongos instance.
122
122
 
123
- The `Mongoid::Shell::Commands::Mongostat` class supports `--host`, `--username`, `--password`, `--rowcount`, `--discover`, `--noheaders`, `--http` and `--all`.
123
+ The `Mongoid::Shell::Commands::Mongostat` class supports `--host`, `--username`, `--password`, `--rowcount`, `--discover`, `--noheaders`, `--http`, `--all`, `--ssl` and `--authenticationDatabase`.
124
124
 
125
125
  Contributing
126
126
  ------------
@@ -6,6 +6,8 @@ module Mongoid
6
6
  include Mongoid::Shell::Properties::Database
7
7
  include Mongoid::Shell::Properties::Username
8
8
  include Mongoid::Shell::Properties::Password
9
+ include Mongoid::Shell::Properties::AuthenticationDatabase
10
+ include Mongoid::Shell::Properties::SSL
9
11
 
10
12
  arg :host_port_and_db
11
13
 
@@ -16,6 +18,8 @@ module Mongoid
16
18
  option :norc
17
19
  option :quiet
18
20
  option :ipv6
21
+ option :authenticationDatabase
22
+ option :ssl
19
23
 
20
24
  def host_port_and_db
21
25
  [primary, db].compact.join('/')
@@ -6,6 +6,8 @@ module Mongoid
6
6
  include Mongoid::Shell::Properties::Database
7
7
  include Mongoid::Shell::Properties::Username
8
8
  include Mongoid::Shell::Properties::Password
9
+ include Mongoid::Shell::Properties::AuthenticationDatabase
10
+ include Mongoid::Shell::Properties::SSL
9
11
 
10
12
  option :host
11
13
  option :db
@@ -23,6 +25,8 @@ module Mongoid
23
25
  option :forceTableScan
24
26
  option :dbpath
25
27
  option :ipv6
28
+ option :authenticationDatabase
29
+ option :ssl
26
30
  end
27
31
  end
28
32
  end
@@ -6,6 +6,8 @@ module Mongoid
6
6
  include Mongoid::Shell::Properties::Database
7
7
  include Mongoid::Shell::Properties::Username
8
8
  include Mongoid::Shell::Properties::Password
9
+ include Mongoid::Shell::Properties::AuthenticationDatabase
10
+ include Mongoid::Shell::Properties::SSL
9
11
 
10
12
  # args
11
13
  option :db
@@ -6,6 +6,8 @@ module Mongoid
6
6
  include Mongoid::Shell::Properties::Database
7
7
  include Mongoid::Shell::Properties::Username
8
8
  include Mongoid::Shell::Properties::Password
9
+ include Mongoid::Shell::Properties::AuthenticationDatabase
10
+ include Mongoid::Shell::Properties::SSL
9
11
 
10
12
  option :db
11
13
  option :host
@@ -6,6 +6,8 @@ module Mongoid
6
6
  include Mongoid::Shell::Properties::Database
7
7
  include Mongoid::Shell::Properties::Username
8
8
  include Mongoid::Shell::Properties::Password
9
+ include Mongoid::Shell::Properties::AuthenticationDatabase
10
+ include Mongoid::Shell::Properties::SSL
9
11
 
10
12
  option :host
11
13
  option :db
@@ -22,6 +24,8 @@ module Mongoid
22
24
  option :oplogReplay
23
25
  option :keepIndexVersion
24
26
  option :noIndexRestore
27
+ option :authenticationDatabase
28
+ option :ssl
25
29
 
26
30
  arg :restore
27
31
 
@@ -6,6 +6,8 @@ module Mongoid
6
6
  include Mongoid::Shell::Properties::Database
7
7
  include Mongoid::Shell::Properties::Username
8
8
  include Mongoid::Shell::Properties::Password
9
+ include Mongoid::Shell::Properties::AuthenticationDatabase
10
+ include Mongoid::Shell::Properties::SSL
9
11
 
10
12
  option :host
11
13
  option :username
@@ -15,6 +17,8 @@ module Mongoid
15
17
  option :noheaders
16
18
  option :http
17
19
  option :all
20
+ option :authenticationDatabase
21
+ option :ssl
18
22
  end
19
23
  end
20
24
  end
@@ -3,3 +3,5 @@ require 'mongoid/shell/properties/primary'
3
3
  require 'mongoid/shell/properties/database'
4
4
  require 'mongoid/shell/properties/username'
5
5
  require 'mongoid/shell/properties/password'
6
+ require 'mongoid/shell/properties/authentication_database'
7
+ require 'mongoid/shell/properties/ssl'
@@ -0,0 +1,13 @@
1
+ module Mongoid
2
+ module Shell
3
+ module Properties
4
+ module AuthenticationDatabase
5
+ attr_accessor :authenticationDatabase
6
+
7
+ def authenticationDatabase
8
+ @authenticationDatabase || session.options['auth_source']
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,14 @@
1
+ module Mongoid
2
+ module Shell
3
+ module Properties
4
+ module SSL
5
+ attr_accessor :ssl
6
+
7
+ def ssl
8
+ return @ssl unless @ssl.nil?
9
+ session.options['ssl']
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module Shell
3
- VERSION = '0.4.5'.freeze
3
+ VERSION = '0.4.6'.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.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Doubrovkine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-08 00:00:00.000000000 Z
11
+ date: 2017-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid
@@ -77,10 +77,12 @@ files:
77
77
  - lib/mongoid/shell/errors/missing_session_error.rb
78
78
  - lib/mongoid/shell/errors/session_not_connected_error.rb
79
79
  - lib/mongoid/shell/properties.rb
80
+ - lib/mongoid/shell/properties/authentication_database.rb
80
81
  - lib/mongoid/shell/properties/database.rb
81
82
  - lib/mongoid/shell/properties/host.rb
82
83
  - lib/mongoid/shell/properties/password.rb
83
84
  - lib/mongoid/shell/properties/primary.rb
85
+ - lib/mongoid/shell/properties/ssl.rb
84
86
  - lib/mongoid/shell/properties/username.rb
85
87
  - lib/mongoid/shell/version.rb
86
88
  - lib/mongoid_shell.rb
@@ -104,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
106
  version: 1.3.6
105
107
  requirements: []
106
108
  rubyforge_project:
107
- rubygems_version: 2.6.12
109
+ rubygems_version: 2.7.3
108
110
  signing_key:
109
111
  specification_version: 4
110
112
  summary: Derive shell commands from Mongoid configuration options.