ghee 0.10.15 → 0.11.16
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 +4 -4
- data/lib/ghee/api/collaborators.rb +1 -1
- data/lib/ghee/api/orgs.rb +10 -0
- data/lib/ghee/api/users.rb +28 -1
- data/lib/ghee/version.rb +1 -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: d4632fb35cf000d7f6fe844d1d8672297502a29a
|
4
|
+
data.tar.gz: 979de725a3fac62e7af4cc5794d1f65f7d6a0abd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8fe541f0d64025037aa127a329fdcc165be9001fc5e918fe27e5c99e592969f42f97468bc7027922c1735ae4e7d2c5286e0f17ec2577d195d83b7e9b377c238
|
7
|
+
data.tar.gz: e811288c74181163b8f67f3c9f4e62edf69e21d42af1f587aae98f292ee6aabd73ca7f33b7a733cc9fa9e7f0a2aab3d1dfb398c2d6fb87f753f479dc94c57d61
|
@@ -28,7 +28,7 @@ class Ghee
|
|
28
28
|
class Proxy < ::Ghee::ResourceProxy
|
29
29
|
def collaborators(user=nil, &block)
|
30
30
|
prefix = build_prefix user, "collaborators"
|
31
|
-
|
31
|
+
Collaborators::Proxy.new(connection, prefix, user, &block)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
data/lib/ghee/api/orgs.rb
CHANGED
@@ -74,6 +74,16 @@ class Ghee
|
|
74
74
|
prefix = (!name.is_a?(Hash) and name) ? "./repos/#{self["login"]}/#{name}" : "#{path_prefix}/repos"
|
75
75
|
Ghee::API::Repos::Proxy.new(connection,prefix,params)
|
76
76
|
end
|
77
|
+
|
78
|
+
# User Membership for an org
|
79
|
+
#
|
80
|
+
# Returns json
|
81
|
+
#
|
82
|
+
|
83
|
+
def memberships(user, &block)
|
84
|
+
prefix = "#{path_prefix}/memberships/#{user}"
|
85
|
+
Proxy.new(connection, prefix, nil, &block)
|
86
|
+
end
|
77
87
|
end
|
78
88
|
|
79
89
|
# Team by id
|
data/lib/ghee/api/users.rb
CHANGED
@@ -10,6 +10,29 @@ class Ghee
|
|
10
10
|
#
|
11
11
|
module Users
|
12
12
|
|
13
|
+
#Users::Memberships modules handles a users memberships
|
14
|
+
#
|
15
|
+
#
|
16
|
+
module Memberships
|
17
|
+
|
18
|
+
# Memberships::Proxy inherits from Ghee::Proxy and
|
19
|
+
# enables defining methods on the proxy object
|
20
|
+
#
|
21
|
+
class Proxy < ::Ghee::ResourceProxy
|
22
|
+
|
23
|
+
#Org membership for the user
|
24
|
+
#
|
25
|
+
#State: string to limit scope to either active or
|
26
|
+
#pending
|
27
|
+
#
|
28
|
+
#Returns json
|
29
|
+
def orgs(state, &block)
|
30
|
+
params = state ? {state: state} : {}
|
31
|
+
connection.get("#{path_prefix}/orgs", params, &block)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
13
36
|
# Users::Proxy inherits from Ghee::Proxy and
|
14
37
|
# enables defining methods on the proxy object
|
15
38
|
#
|
@@ -47,7 +70,11 @@ class Ghee
|
|
47
70
|
Ghee::API::Orgs::Proxy.new(connection, prefix, params)
|
48
71
|
end
|
49
72
|
|
50
|
-
|
73
|
+
# Returns a Memberships Proxy
|
74
|
+
def memberships
|
75
|
+
prefix = "#{path_prefix}/memberships"
|
76
|
+
Ghee::API::Users::Memberships::Proxy.new(connection, prefix)
|
77
|
+
end
|
51
78
|
end
|
52
79
|
|
53
80
|
# Get authenticated user
|
data/lib/ghee/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ghee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Rauh
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-02-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|