zapix3 0.2.3 → 0.2.4

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
2
  SHA1:
3
- metadata.gz: 3f3f33a9668f650e6509786c63ccf01b8de2a302
4
- data.tar.gz: c533c13d7637f018c4797653bd61870557af26d2
3
+ metadata.gz: fdf4aa43d2c84a63b21ae44e2368ede474e52a14
4
+ data.tar.gz: f0474e807f3a187c2d196a8754d5c9764afd38ec
5
5
  SHA512:
6
- metadata.gz: 0ff6fb058f298868d11c4a48d937fce3c278794fd16dc451cbb7df0884c70b54e11c90a1b6169f15affd386b68df11f0a704097b084b0c24f56b03a9fb271872
7
- data.tar.gz: 0842910a995a4e1cb6442ab81d095dc2481539a46af6a1f6d8b4b25b72220738e45a57255d2404a1af4873e3f1965c9d7d4cbd79171c4221da944fae81589c08
6
+ metadata.gz: cf060884d337b3ce219fa37fe1852562dd2cc628dc188f218b6df93c5e619c691e68e77eda35a018c19686446791eb446a815da7b3d4ca461c86ec06bfaa55e5
7
+ data.tar.gz: 03b995cb6919c21c19f757bf659b31811ff6b300e6d985b5fdf0f0fbfd0225dae06e536a860671fc9ff3e11e824cc978cd89202e4a93bee268f9f3930fcad4bc
data/Gemfile.lock CHANGED
@@ -1,30 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zapix3 (0.2.3)
4
+ zapix3 (0.2.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- activemodel (4.2.6)
10
- activesupport (= 4.2.6)
11
- builder (~> 3.1)
12
- activerecord (4.2.6)
13
- activemodel (= 4.2.6)
14
- activesupport (= 4.2.6)
15
- arel (~> 6.0)
16
- activesupport (4.2.6)
17
- i18n (~> 0.7)
18
- json (~> 1.7, >= 1.7.7)
19
- minitest (~> 5.1)
20
- thread_safe (~> 0.3, >= 0.3.4)
21
- tzinfo (~> 1.1)
22
- arel (6.0.3)
23
- builder (3.2.2)
24
9
  diff-lcs (1.2.5)
25
- i18n (0.7.0)
26
10
  json (1.8.3)
27
- minitest (5.9.0)
28
11
  rake (11.1.2)
29
12
  rspec (3.4.0)
30
13
  rspec-core (~> 3.4.0)
@@ -39,15 +22,11 @@ GEM
39
22
  diff-lcs (>= 1.2.0, < 2.0)
40
23
  rspec-support (~> 3.4.0)
41
24
  rspec-support (3.4.1)
42
- thread_safe (0.3.5)
43
- tzinfo (1.2.2)
44
- thread_safe (~> 0.1)
45
25
 
46
26
  PLATFORMS
47
27
  ruby
48
28
 
49
29
  DEPENDENCIES
50
- activerecord
51
30
  bundler (~> 1.3)
52
31
  json
53
32
  rake
data/lib/zapix/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Zapix
2
- VERSION = '0.2.3'.freeze
2
+ VERSION = '0.2.4'.freeze
3
3
  end
@@ -1,19 +1,10 @@
1
- require 'active_record'
2
-
3
1
  class Interface
4
- include ActiveModel::Validations
5
-
6
2
  attr_reader :type, :main, :useip, :ip, :dns, :port
7
- validates_presence_of :type, :main, :useip, :ip, :dns, :port
8
3
 
9
4
  # for more info see
10
5
  # https://www.zabbix.com/documentation/2.0/manual/appendix/api/hostinterface/definitions#host_interface
11
6
  # we assume ip and dns shall always be set
12
7
 
13
- validates_inclusion_of :type, in: 1..4
14
- validates_inclusion_of :main, in: 0..1
15
- validates_inclusion_of :useip, in: 0..1
16
-
17
8
  def initialize(attributes)
18
9
  @type = attributes['type'] ||= 1
19
10
  @main = attributes['main'] ||= 1
@@ -31,10 +22,6 @@ class Interface
31
22
  }
32
23
  end
33
24
 
34
- def read_attribute_for_validation(key)
35
- send(key)
36
- end
37
-
38
25
  def to_hash
39
26
  @result
40
27
  end
@@ -41,7 +41,7 @@ class ZabbixRPCClient
41
41
  end
42
42
 
43
43
  def authenticate
44
- p user_login('user' => @username, 'password' => @password)
44
+ user_login('user' => @username, 'password' => @password)
45
45
  user_login('user' => @username, 'password' => @password)
46
46
  end
47
47
 
data/zapix.gemspec CHANGED
@@ -22,5 +22,4 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency 'rake'
23
23
  spec.add_development_dependency 'json'
24
24
  spec.add_development_dependency 'rspec'
25
- spec.add_development_dependency 'activerecord'
26
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zapix3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - stoyan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-18 00:00:00.000000000 Z
11
+ date: 2016-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: activerecord
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - '>='
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - '>='
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
69
  description: Communication with the Zabbix API made easy. This version is compatible
84
70
  with zabbix 3.0
85
71
  email: