restpack_group_service 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/restpack_group_service/commands/group/get.rb +1 -6
- data/lib/restpack_group_service/commands/group/list.rb +0 -5
- data/lib/restpack_group_service/commands/membership/list.rb +0 -7
- data/lib/restpack_group_service/serializers/group.rb +1 -0
- data/lib/restpack_group_service/serializers/membership.rb +1 -0
- data/lib/restpack_group_service/version.rb +1 -1
- data/lib/restpack_group_service.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: ea6117abcc201cbaf5678975017f74376cd8d145
|
4
|
+
data.tar.gz: 48fa78ada002540d524fc52d0190e352294d3334
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7778ee62688445ab9ba522b40391e8dca156af690ecd6260fb92f236968cda7728185c15145f17a65525423879d0f234bf8a79451b31b1f1ba3adb260b061d8c
|
7
|
+
data.tar.gz: 7960f2ff18dc78b44de95a44d84651fed7e91ab07eb3b8358d70d9e4a473cbe63bb3154108ab9245dcb036b5b9af9155816312c325fc750ad52f915fdd82cd3e
|
@@ -7,12 +7,7 @@ module RestPack::Group::Service::Commands
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def execute
|
10
|
-
|
11
|
-
# https://github.com/RestPack/restpack_serializer/issues/42
|
12
|
-
result = Serializers::Group.resource(
|
13
|
-
inputs,
|
14
|
-
Models::Group.where(application_id: inputs[:application_id])
|
15
|
-
)
|
10
|
+
result = Serializers::Group.resource(inputs)
|
16
11
|
|
17
12
|
if result[:groups].empty?
|
18
13
|
status :not_found
|
@@ -14,12 +14,7 @@ module RestPack::Group::Service::Commands
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def execute
|
17
|
-
# TODO: GJ: remove the scope when we can specify custom serializer filters
|
18
|
-
# https://github.com/RestPack/restpack_serializer/issues/42
|
19
17
|
scope = Models::Group.all
|
20
|
-
scope = scope.where(application_id: application_id)
|
21
|
-
scope = scope.where(account_id: account_id) if account_id
|
22
|
-
scope = scope.where(created_by: created_by) if created_by
|
23
18
|
|
24
19
|
if is_account_group
|
25
20
|
scope = scope.where("account_id IS NOT NULL")
|
@@ -15,14 +15,7 @@ module RestPack::Group::Service::Commands
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def execute
|
18
|
-
# TODO: GJ: remove the scope when we can specify custom serializer filters
|
19
|
-
# https://github.com/RestPack/restpack_serializer/issues/42
|
20
18
|
scope = Models::Membership.all
|
21
|
-
scope = scope.where(application_id: application_id)
|
22
|
-
scope = scope.where(account_id: account_id) if account_id
|
23
|
-
scope = scope.where(group_id: group_id) if group_id
|
24
|
-
scope = scope.where(user_id: user_id) if user_id
|
25
|
-
|
26
19
|
if is_account_group
|
27
20
|
scope = scope.where("account_id IS NOT NULL")
|
28
21
|
else
|
@@ -8,5 +8,6 @@ module RestPack::Group::Service::Serializers
|
|
8
8
|
attributes :id, :application_id, :account_id, :created_by, :name,
|
9
9
|
:description, :invitation_required, :href
|
10
10
|
can_include :memberships, :invitations
|
11
|
+
can_filter_by :application_id, :account_id, :created_by
|
11
12
|
end
|
12
13
|
end
|
@@ -1,2 +1,2 @@
|
|
1
1
|
require 'restpack_service'
|
2
|
-
RestPack::Service::Loader.load 'group'
|
2
|
+
RestPack::Service::Loader.load 'group'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restpack_group_service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gavin Joyce
|
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
185
|
version: '0'
|
186
186
|
requirements: []
|
187
187
|
rubyforge_project:
|
188
|
-
rubygems_version: 2.0.
|
188
|
+
rubygems_version: 2.0.7
|
189
189
|
signing_key:
|
190
190
|
specification_version: 4
|
191
191
|
summary: Groups, Members and Invitations
|