shells 0.1.5 → 0.1.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/shells/version.rb +1 -1
  3. data/lib/shells.rb +10 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 13762830a779f79e8479b3d5c41fe66962ed63b9
4
- data.tar.gz: 24241daef4637de27a2905a03daee0aba6e85bfe
3
+ metadata.gz: 84290cfa99c45a5ed364ed2768d33bd53065efa6
4
+ data.tar.gz: bf1b5abab47b36aaf979578203b650ca2ed750c1
5
5
  SHA512:
6
- metadata.gz: b2e6a7496728f5cd40741c5eeb8a83675a48a2a364b703e420e67d929ff9b1039d6eb2080e3d993141fd9be6ef8796fa2c66e7fce965e19965eb592a0fba219e
7
- data.tar.gz: c6377f55371051f7df873a78a0befe1e7c7a79c6a32ad3e3eac2493a95b423a7b48b84e2fc3694a14bbd31833e54f2bd983bcbfdc309fc74d459995e5050eced
6
+ metadata.gz: 246b734e106f7b40d4de02278a8a5f66f0191bb1341b92e68990d120ca23fb712d1aacb85dbb35c12c1856fe57f990b156f349d3f70f196db3ee50eb0cb24d66
7
+ data.tar.gz: f5f99c98cbbdd287442e65fd9f371a3ce761047a64dc8b779616b5efcc65cd2c7a0187ff915ae435014509f25ce90d06c2898b35031a59aa999ec406eb221b78
@@ -1,5 +1,5 @@
1
1
  module Shells
2
2
  ##
3
3
  # The current version of the gem.
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.6"
5
5
  end
data/lib/shells.rb CHANGED
@@ -22,7 +22,16 @@ module Shells
22
22
  # Provides the ability for the Shells module to allow sessions to be instantiated without calling +new+.
23
23
  def self.method_missing(m, *args, &block) #:nodoc:
24
24
 
25
- is_const = const_defined?(m) rescue nil
25
+ is_const =
26
+ if m.to_s =~ /^[A-Z][a-zA-Z0-9_]*$/ # must start with uppercase and contain only letters, numbers, and underscores.
27
+ begin
28
+ const_defined?(m)
29
+ rescue NameError # if for some reason we still get a NameError, it's obviously not a constant.
30
+ false
31
+ end
32
+ else
33
+ false
34
+ end
26
35
 
27
36
  if is_const
28
37
  val = const_get(m)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shells
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Beau Barker
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-19 00:00:00.000000000 Z
11
+ date: 2017-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh