ruby-zoom 3.3.2 → 3.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zoom.rb +5 -1
- data/lib/zoom/error.rb +1 -0
- data/lib/zoom/error/executable_not_found_error.rb +3 -2
- data/lib/zoom/error/invalid_tag_error.rb +8 -0
- data/lib/zoom/error/profile_already_exists_error.rb +3 -2
- data/lib/zoom/error/profile_can_not_be_modified_error.rb +3 -2
- data/lib/zoom/error/profile_class_unknown_error.rb +3 -2
- data/lib/zoom/error/profile_does_not_exist_error.rb +3 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcc735c6609a0afddcf0e3897ee184467df99b3e
|
4
|
+
data.tar.gz: 914a9993a7d63133cb60defe2a410ea5e2e941cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cd0ae718c8af7f45812d0ce44bcefbc5e2871acbc9b3812d149097d41d4c6446d4840507b0b4a8b043133705ca8613b39953df16df5b24e5f67f48c6e31ff7c
|
7
|
+
data.tar.gz: 5c19b7345ffef7fd49b13921c0c0550e4f77c74b004dc630ad54e121e59f1d7e63a0224e35b7282d26db4d3c077144a8cb4b58685079f9206eb57ea4c657a02c
|
data/lib/zoom.rb
CHANGED
@@ -456,6 +456,10 @@ class Zoom
|
|
456
456
|
|
457
457
|
def parse_tags(results)
|
458
458
|
tags = Array.new
|
459
|
+
if (results.nil? || results.empty?)
|
460
|
+
raise Zoom::Error::InvalidTagError.new
|
461
|
+
end
|
462
|
+
|
459
463
|
results.split(",").each do |num|
|
460
464
|
if (!num.scan(/^[0-9]+$/).empty?)
|
461
465
|
tags.push(num.to_i)
|
@@ -465,7 +469,7 @@ class Zoom
|
|
465
469
|
tags.push(i)
|
466
470
|
end
|
467
471
|
else
|
468
|
-
|
472
|
+
raise Zoom::Error::InvalidTagError.new(num)
|
469
473
|
end
|
470
474
|
end
|
471
475
|
return tags
|
data/lib/zoom/error.rb
CHANGED
@@ -2,6 +2,7 @@ class Zoom::Error < RuntimeError
|
|
2
2
|
end
|
3
3
|
|
4
4
|
require "zoom/error/executable_not_found_error"
|
5
|
+
require "zoom/error/invalid_tag_error"
|
5
6
|
require "zoom/error/profile_already_exists_error"
|
6
7
|
require "zoom/error/profile_can_not_be_modified_error"
|
7
8
|
require "zoom/error/profile_class_unknown_error"
|
@@ -1,7 +1,8 @@
|
|
1
1
|
require "zoom/error"
|
2
2
|
|
3
3
|
class Zoom::Error::ExecutableNotFoundError < Zoom::Error
|
4
|
-
def initialize(exe)
|
5
|
-
super("Executable #{exe}
|
4
|
+
def initialize(exe = nil)
|
5
|
+
super("Executable not found: #{exe}") if (exe)
|
6
|
+
super("Executable not found") if (exe.nil?)
|
6
7
|
end
|
7
8
|
end
|
@@ -1,7 +1,8 @@
|
|
1
1
|
require "zoom/error"
|
2
2
|
|
3
3
|
class Zoom::Error::ProfileAlreadyExistsError < Zoom::Error
|
4
|
-
def initialize(profile)
|
5
|
-
super("Profile #{profile}
|
4
|
+
def initialize(profile = nil)
|
5
|
+
super("Profile already exists: #{profile}") if (profile)
|
6
|
+
super("Profile already exists") if (profile.nil?)
|
6
7
|
end
|
7
8
|
end
|
@@ -1,7 +1,8 @@
|
|
1
1
|
require "zoom/error"
|
2
2
|
|
3
3
|
class Zoom::Error::ProfileCanNotBeModifiedError < Zoom::Error
|
4
|
-
def initialize(profile)
|
5
|
-
super("Profile
|
4
|
+
def initialize(profile = nil)
|
5
|
+
super("Profile can not be modified: #{profile}") if (profile)
|
6
|
+
super("Profile can not be modified") if (profile.nil?)
|
6
7
|
end
|
7
8
|
end
|
@@ -1,7 +1,8 @@
|
|
1
1
|
require "zoom/error"
|
2
2
|
|
3
3
|
class Zoom::Error::ProfileClassUnknownError < Zoom::Error
|
4
|
-
def initialize(clas)
|
5
|
-
super("Profile class #{clas}
|
4
|
+
def initialize(clas = nil)
|
5
|
+
super("Profile class unknown: #{clas}") if (clas)
|
6
|
+
super("Profile class unknown") if (clas.nil?)
|
6
7
|
end
|
7
8
|
end
|
@@ -1,7 +1,8 @@
|
|
1
1
|
require "zoom/error"
|
2
2
|
|
3
3
|
class Zoom::Error::ProfileDoesNotExistError < Zoom::Error
|
4
|
-
def initialize(profile)
|
5
|
-
super("Profile
|
4
|
+
def initialize(profile = nil)
|
5
|
+
super("Profile does not exist: #{profile}") if (profile)
|
6
|
+
super("Profile does not exist") if (profile.nil?)
|
6
7
|
end
|
7
8
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-zoom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Whittaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -79,6 +79,7 @@ files:
|
|
79
79
|
- lib/zoom.rb
|
80
80
|
- lib/zoom/error.rb
|
81
81
|
- lib/zoom/error/executable_not_found_error.rb
|
82
|
+
- lib/zoom/error/invalid_tag_error.rb
|
82
83
|
- lib/zoom/error/profile_already_exists_error.rb
|
83
84
|
- lib/zoom/error/profile_can_not_be_modified_error.rb
|
84
85
|
- lib/zoom/error/profile_class_unknown_error.rb
|
@@ -90,7 +91,7 @@ files:
|
|
90
91
|
- lib/zoom/profile/grep.rb
|
91
92
|
- lib/zoom/profile/passwords.rb
|
92
93
|
- lib/zoom/profile/pt.rb
|
93
|
-
homepage:
|
94
|
+
homepage: https://mjwhitta.github.io/zoom
|
94
95
|
licenses:
|
95
96
|
- GPL-3.0
|
96
97
|
metadata: {}
|