zabbixapi 2.4.6 → 2.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +17 -7
- data/lib/zabbixapi/classes/applications.rb +1 -1
- data/lib/zabbixapi/client.rb +1 -1
- data/lib/zabbixapi/version.rb +1 -1
- data/spec/mediatype.rb +6 -3
- data/spec/server.rb +2 -2
- data/spec/user.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e527079a1480ac3175e6cb8db6b1754b2b59bec
|
4
|
+
data.tar.gz: a032b442b07c115dc0b5275dc1c26be1a387cfe8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6367ff0bed467de9596ed84d92c6e507b417c5b90203278c24a8f0963bbe2b16177ed8ff46010437712cbe81ca09ad029b9cb740a363304a6490ef1c763ee5b
|
7
|
+
data.tar.gz: d9a3b31befd619ab851aad5392bd2d2c514bf9437b313c6f4917d6ee5e15642e16a570ae089e20b68f58bf5868f7030a57ed29c9ecd7a4b2ac09c80b8bd74caf
|
data/.travis.yml
CHANGED
@@ -1,24 +1,34 @@
|
|
1
1
|
language:
|
2
2
|
- ruby
|
3
3
|
addons:
|
4
|
-
postgresql: "9.
|
4
|
+
postgresql: "9.5"
|
5
5
|
rvm:
|
6
6
|
- 1.9.3
|
7
7
|
- 2.0
|
8
8
|
- 2.1
|
9
9
|
before_script:
|
10
|
-
- sudo apt-get purge postgresql-9.1 postgresql-9.2 postgresql-9.3
|
10
|
+
- sudo apt-get purge postgresql-9.1 postgresql-9.2 postgresql-9.3 postgresql-9.4 postgresql-9.5
|
11
|
+
- wget -qO - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
|
12
|
+
- echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" | sudo tee /etc/apt/sources.list.d/postgresql.list
|
11
13
|
- wget -qO - http://repo.zabbix.com/zabbix-official-repo.key | sudo apt-key add -
|
12
|
-
- echo "deb http://repo.zabbix.com/zabbix/
|
14
|
+
- echo "deb http://repo.zabbix.com/zabbix/3.0/ubuntu/ trusty main" | sudo tee /etc/apt/sources.list.d/zabbix.list
|
13
15
|
- sudo apt-get update
|
16
|
+
- sudo dpkg-reconfigure locales
|
17
|
+
- sudo apt-get install curl
|
18
|
+
- sudo apt-get install apache2
|
14
19
|
- sudo apt-get install libiodbc2
|
15
|
-
- sudo apt-get install postgresql
|
20
|
+
- sudo apt-get install postgresql-9.5
|
16
21
|
- sudo apt-get install zabbix-frontend-php
|
17
22
|
- sudo useradd -r zabbix
|
18
23
|
- sudo apt-get install zabbix-server-pgsql
|
19
24
|
- sudo apt-get install php5-pgsql
|
20
|
-
- sudo
|
21
|
-
- 'echo -e "local all all trust\nhost all all 127.0.0.1/32 trust\nhost all all ::1/128 trust" | sudo tee /etc/postgresql/9.
|
22
|
-
- sudo
|
25
|
+
- sudo sed -i "s,;date.timezone =,date.timezone = 'US/Eastern'," /etc/php5/apache2/php.ini
|
26
|
+
- 'echo -e "local all postgres trust\nlocal all all trust\nhost all all 127.0.0.1/32 trust\nhost all all ::1/128 trust" | sudo tee /etc/postgresql/9.5/main/pg_hba.conf'
|
27
|
+
- sudo /etc/init.d/postgresql restart
|
28
|
+
- sudo pg_ctlcluster 9.5 main reload
|
29
|
+
- sudo -u postgres createdb zabbix
|
30
|
+
- sudo -u postgres createuser -a -d -E zabbix
|
31
|
+
- zcat /usr/share/doc/zabbix-server-pgsql/create.sql.gz | LC_ALL=C psql -U zabbix
|
23
32
|
- echo "$(curl -fsSL https://gist.githubusercontent.com/evtuhovich/9544441/raw/d661863063b76cc8e2599bc44d8595b1f86ece38/zabbix)" | sudo tee /etc/zabbix/web/zabbix.conf.php
|
33
|
+
- sudo service apache2 restart
|
24
34
|
script: "ZABBIX_HOST_URL=http://localhost/zabbix/api_jsonrpc.php bundle exec rspec spec/*"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class ZabbixApi
|
2
2
|
class Applications
|
3
3
|
|
4
|
-
API_PARAMETERS = %w(applicationids groupids hostids inherited itemids templated templateids
|
4
|
+
API_PARAMETERS = %w(applicationids groupids hostids inherited itemids templated templateids selectItems)
|
5
5
|
|
6
6
|
def initialize(client)
|
7
7
|
@client = client
|
data/lib/zabbixapi/client.rb
CHANGED
@@ -33,7 +33,7 @@ class ZabbixApi
|
|
33
33
|
@proxy_port = @proxy_uri.port
|
34
34
|
@proxy_user, @proxy_pass = @proxy_uri.userinfo.split(/:/) if @proxy_uri.userinfo
|
35
35
|
end
|
36
|
-
unless api_version =~ /2\.4\.\d+/
|
36
|
+
unless api_version =~ /(2\.4|3\.[02])\.\d+/
|
37
37
|
raise ApiError.new("Zabbix API version: #{api_version} is not support by this version of zabbixapi")
|
38
38
|
end
|
39
39
|
@auth_hash = auth
|
data/lib/zabbixapi/version.rb
CHANGED
data/spec/mediatype.rb
CHANGED
@@ -14,7 +14,8 @@ describe 'mediatype' do
|
|
14
14
|
:description => @mediatype,
|
15
15
|
:type => 0,
|
16
16
|
:smtp_server => "127.0.0.1",
|
17
|
-
:smtp_email => "zabbix@test.com"
|
17
|
+
:smtp_email => "zabbix@test.com",
|
18
|
+
:smtp_helo => "test.com"
|
18
19
|
)
|
19
20
|
mediatypeid.should be_kind_of(Integer)
|
20
21
|
end
|
@@ -27,7 +28,8 @@ describe 'mediatype' do
|
|
27
28
|
:description => @mediatype,
|
28
29
|
:type => 0,
|
29
30
|
:smtp_server => "127.0.0.1",
|
30
|
-
:smtp_email => "zabbix@test.com"
|
31
|
+
:smtp_email => "zabbix@test.com",
|
32
|
+
:smtp_helo => "test.com"
|
31
33
|
)
|
32
34
|
end
|
33
35
|
|
@@ -35,7 +37,8 @@ describe 'mediatype' do
|
|
35
37
|
it "should return id" do
|
36
38
|
zbx.mediatypes.create_or_update(
|
37
39
|
:description => @mediatype,
|
38
|
-
:smtp_email => "zabbix2@test.com"
|
40
|
+
:smtp_email => "zabbix2@test.com",
|
41
|
+
:smtp_helo => "test.com"
|
39
42
|
).should eq @mediatypeid
|
40
43
|
end
|
41
44
|
|
data/spec/server.rb
CHANGED
@@ -8,8 +8,8 @@ describe 'server' do
|
|
8
8
|
zbx.server.version.should be_kind_of(String)
|
9
9
|
end
|
10
10
|
|
11
|
-
it "should be 2.4.x" do
|
12
|
-
zbx.server.version.should match(/2\.4\.\d+/)
|
11
|
+
it "should be 2.4.x or 3.0.x or 3.2.x" do
|
12
|
+
zbx.server.version.should match(/(2\.4|3\.[02])\.\d+/)
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
data/spec/user.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zabbixapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vasiliev D.V.
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-03-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|