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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 787d3ec908264292cd348697cb7b1a5cfcb48fba
4
- data.tar.gz: 1a3c8d5b4dc9b164eff714f97f44df3abd652768
3
+ metadata.gz: dcc735c6609a0afddcf0e3897ee184467df99b3e
4
+ data.tar.gz: 914a9993a7d63133cb60defe2a410ea5e2e941cb
5
5
  SHA512:
6
- metadata.gz: 363e2d63ceaf7a0ef3633eee69f267e08f0d09346a2cacbd79a9d6d13e71df0a184144a597fc35236315e454fdf46041a245e1f2a2ffce15468676043465b238
7
- data.tar.gz: 7b5f54d4bc572c91c0d8f8626f206dd5778d98ff8dd3c7975ce070b6efa0e4bf140cb3ee314ab043c74d1b60ac8a46cc3f74e56ea639bf63264a5653e4646135
6
+ metadata.gz: 0cd0ae718c8af7f45812d0ce44bcefbc5e2871acbc9b3812d149097d41d4c6446d4840507b0b4a8b043133705ca8613b39953df16df5b24e5f67f48c6e31ff7c
7
+ data.tar.gz: 5c19b7345ffef7fd49b13921c0c0550e4f77c74b004dc630ad54e121e59f1d7e63a0224e35b7282d26db4d3c077144a8cb4b58685079f9206eb57ea4c657a02c
@@ -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
- puts "Tag #{num} not formatted properly. Ignoring."
472
+ raise Zoom::Error::InvalidTagError.new(num)
469
473
  end
470
474
  end
471
475
  return tags
@@ -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} not found!")
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
@@ -0,0 +1,8 @@
1
+ require "zoom/error"
2
+
3
+ class Zoom::Error::InvalidTagError < Zoom::Error
4
+ def initialize(tag = nil)
5
+ super("Invalid tag: #{tag}") if (tag)
6
+ super("Invalid tag") if (tag.nil?)
7
+ end
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} already exists!")
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 #{profile} can not be modified!")
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} unknown!")
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 #{profile} does not exist!")
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.2
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-09 00:00:00.000000000 Z
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: http://mjwhitta.github.io/zoom
94
+ homepage: https://mjwhitta.github.io/zoom
94
95
  licenses:
95
96
  - GPL-3.0
96
97
  metadata: {}