samanage 1.8.0 → 1.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/changelog.md +4 -0
- data/lib/samanage.rb +9 -8
- data/lib/samanage/api/comments.rb +2 -0
- data/lib/samanage/api/custom_fields.rb +3 -0
- data/lib/samanage/api/custom_forms.rb +2 -0
- data/lib/samanage/api/departments.rb +3 -0
- data/lib/samanage/api/groups.rb +4 -1
- data/lib/samanage/api/hardwares.rb +2 -0
- data/lib/samanage/api/incidents.rb +3 -0
- data/lib/samanage/api/mobiles.rb +3 -0
- data/lib/samanage/api/other_assets.rb +4 -0
- data/lib/samanage/api/sites.rb +2 -0
- data/lib/samanage/api/users.rb +2 -0
- data/samanage.gemspec +3 -1
- data/spec/api/samanage_user_spec.rb +0 -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: 0ab1208aa59cadeb2047f640bb87445bdc5f4cf1
|
4
|
+
data.tar.gz: e007b60853fcfaf54476344234e95ba0ab790942
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e599dcce813c29db9589801a5b37dff279bf7803e600421ea7e99f9e93d2f0a89a683bb436086b81968fbbf979068f8f16b45a53e1f3bd720991d3e3c7c20aa
|
7
|
+
data.tar.gz: b5b485f16acfdf1f891e3c686392c80baac640579a1edcdbb0188f767790b4a30f377c963149e9499d82a8e40c64e7ae13f531cdf94e2624b2fa75bd0e836ece
|
data/changelog.md
CHANGED
data/lib/samanage.rb
CHANGED
@@ -2,20 +2,21 @@ $LOAD_PATH << File.dirname(__FILE__)
|
|
2
2
|
require 'httparty'
|
3
3
|
|
4
4
|
require 'samanage/api'
|
5
|
-
require 'samanage/api/users'
|
6
|
-
require 'samanage/api/requester'
|
7
|
-
require 'samanage/api/hardwares'
|
8
|
-
require 'samanage/api/other_assets'
|
9
|
-
require 'samanage/api/mobiles'
|
10
|
-
require 'samanage/api/incidents'
|
11
5
|
require 'samanage/api/comments'
|
12
6
|
require 'samanage/api/custom_fields'
|
13
7
|
require 'samanage/api/custom_forms'
|
8
|
+
require 'samanage/api/departments'
|
14
9
|
require 'samanage/api/groups'
|
10
|
+
require 'samanage/api/hardwares'
|
11
|
+
require 'samanage/api/incidents'
|
12
|
+
require 'samanage/api/mobiles'
|
13
|
+
require 'samanage/api/other_assets'
|
14
|
+
require 'samanage/api/requester'
|
15
15
|
require 'samanage/api/sites'
|
16
|
-
require 'samanage/api/
|
16
|
+
require 'samanage/api/users'
|
17
17
|
require 'samanage/error'
|
18
18
|
require 'samanage/url_builder'
|
19
|
-
module Samanage
|
20
19
|
|
20
|
+
module Samanage
|
21
|
+
VERSION = '1.8.1'
|
21
22
|
end
|
data/lib/samanage/api/groups.rb
CHANGED
@@ -32,10 +32,13 @@ module Samanage
|
|
32
32
|
self.execute(path: path)
|
33
33
|
end
|
34
34
|
|
35
|
-
def add_member_to_group(email: nil, group_id: nil)
|
35
|
+
def add_member_to_group(email: nil, group_id: nil, group_name: nil)
|
36
|
+
group_id = group_id ||= self.find_group_id_by_name(group: group_name)
|
36
37
|
user_id = self.find_user_id_by_email(email: email)
|
37
38
|
member_path = "memberships.json?group_id=#{group_id}.json&user_ids=#{user_id}"
|
38
39
|
self.execute(path: member_path, http_method: 'post')
|
39
40
|
end
|
41
|
+
alias_method :groups, :collect_groups
|
42
|
+
|
40
43
|
end
|
41
44
|
end
|
data/lib/samanage/api/mobiles.rb
CHANGED
data/lib/samanage/api/sites.rb
CHANGED
data/lib/samanage/api/users.rb
CHANGED
data/samanage.gemspec
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
$:.push File.expand_path("../lib", __FILE__)
|
2
|
+
require 'samanage'
|
3
|
+
|
2
4
|
Gem::Specification.new do |s|
|
3
5
|
s.name = 'samanage'
|
4
|
-
s.version =
|
6
|
+
s.version = Samanage::VERSION
|
5
7
|
s.date = Date.today.strftime("%Y-%m-%d")
|
6
8
|
s.summary = "Samanage Ruby Gem"
|
7
9
|
s.description = "Connect to Samanage using Ruby!"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: samanage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Walls
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|