ripple_keycloak 0.2.2 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1198c74e3f6951a694db9a8a9e4f7ba5dee02d24fb81ef70427cc511d117829d
4
- data.tar.gz: 6aa4bb997c0663e16c291cc0c7897cc1d3e6ada531dc90c2cea6416a91e31622
3
+ metadata.gz: 2fc3aec161e5fb228b5f767a2e34717997af5108f21aefd0ee0d9f325bc17792
4
+ data.tar.gz: 0d99267b260bf69ddf1a9350d9ae48482a5838c6b902baad6498e716694dbce2
5
5
  SHA512:
6
- metadata.gz: 16fa67d6652b16df30e6d5e65894b748b8d07d681bef26e3b4f0f656e3da7076e2341ba85738eb71d3ca98dc55acf45290a3b0ccee30062aa0ffa928d526bdb9
7
- data.tar.gz: 66d5931d61d89049b3976c94237c2d7f65d0962c8770e8123cbba9bd296a336aaadc33a89e5d524ef6f5f9631435c79c72e6505e4d29f62389dee08000c1016f
6
+ metadata.gz: db1b060183864e19821c3448b368528f825e206dbf85602aea355ddfab16ce7121ddf8cdf19e4bbbf343256c31b085cb162a96e5dedfab690080a9d086bf5f0f
7
+ data.tar.gz: 63533e1c9e024366d09cbfb78f0b07d1f15b9ea831ea86dc80bdf727e44e7ebfbe5a8fc351bb8ba0aca25cf294c9cac7a121300368254d044fc17c0fe333a54e
@@ -3,7 +3,7 @@ name: Ruby Gem
3
3
  on:
4
4
  push:
5
5
  tags:
6
- - v*
6
+ - 'v*'
7
7
 
8
8
  jobs:
9
9
  build:
File without changes
data/.gitignore CHANGED
File without changes
data/.rspec CHANGED
File without changes
File without changes
File without changes
data/Gemfile CHANGED
File without changes
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2020 Ollie Nye
3
+ Copyright (c) 2020 Hex Event Solutions Limited
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Ripple Keycloak
2
2
 
3
3
  ![Lint and test](https://github.com/hex-event-solutions/ripple_keycloak/workflows/Lint%20and%20test/badge.svg)
4
+ [![Gem Version](https://badge.fury.io/rb/ripple_keycloak.svg)](https://badge.fury.io/rb/ripple_keycloak)
4
5
 
5
6
  Slim interface focused on groups, roles and users for Keycloak's Admin REST API
6
7
 
data/Rakefile CHANGED
File without changes
File without changes
data/bin/setup CHANGED
File without changes
File without changes
@@ -10,7 +10,7 @@ module RippleKeycloak
10
10
  end
11
11
 
12
12
  def search(value)
13
- client.get("#{@object_type}?search=#{value}")
13
+ client.get("#{@object_type}?search=#{value}").parsed_response
14
14
  end
15
15
 
16
16
  def all(first: nil, max: nil)
@@ -18,15 +18,15 @@ module RippleKeycloak
18
18
  url += "first=#{first}&" if first
19
19
  url += "max=#{max}" if max
20
20
 
21
- client.get(url)
21
+ client.get(url).parsed_response
22
22
  end
23
23
 
24
24
  def find(id)
25
- client.get("#{@object_type}/#{id}")
25
+ client.get("#{@object_type}/#{id}").parsed_response
26
26
  end
27
27
 
28
28
  def find_by(field:, value:)
29
- results = search(value).parsed_response
29
+ results = search(value)
30
30
  if results.is_a? Array
31
31
  results.each do |instance|
32
32
  return instance if instance[field] == value
@@ -36,7 +36,7 @@ module RippleKeycloak
36
36
  end
37
37
 
38
38
  def delete(id)
39
- client.delete("#{@object_type}/#{id}")
39
+ client.delete("#{@object_type}/#{id}").parsed_response
40
40
  end
41
41
 
42
42
  private
File without changes
File without changes
@@ -25,7 +25,9 @@ module RippleKeycloak
25
25
 
26
26
  error_class = error_map[response['error']]
27
27
 
28
- raise error_class, formatted_error
28
+ raise error_class, formatted_error unless error_class.nil?
29
+
30
+ raise RippleKeycloak::Error, formatted_error
29
31
  end
30
32
  end
31
33
  end
File without changes
File without changes
File without changes
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RippleKeycloak
4
- VERSION = '0.2.2'
4
+ VERSION = '0.4.1'
5
5
  end
File without changes
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.require_paths = ['lib']
27
27
 
28
28
  spec.add_dependency('activesupport', '6.0.3.1')
29
- spec.add_dependency('httparty', '0.18.0')
29
+ spec.add_dependency('httparty', '0.18.1')
30
30
 
31
31
  spec.add_development_dependency('rspec', '3.9.0')
32
32
  spec.add_development_dependency('rubocop', '0.85.1')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ripple_keycloak
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hex Event Solutions Limited
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-18 00:00:00.000000000 Z
11
+ date: 2020-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.18.0
33
+ version: 0.18.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.18.0
40
+ version: 0.18.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -73,7 +73,6 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
- - ".github/workflows/bump-version.yml"
77
76
  - ".github/workflows/gem-push.yml"
78
77
  - ".github/workflows/lint-and-test.yml"
79
78
  - ".gitignore"
@@ -1,22 +0,0 @@
1
- name: Bump gem version tag
2
-
3
- on:
4
- push:
5
- branches: [ master ]
6
-
7
- jobs:
8
- tag-new-versions:
9
- runs-on: ubuntu-latest
10
- steps:
11
- - uses: actions/checkout@v2
12
- with:
13
- fetch-depth: 2
14
- - uses: salsify/action-detect-and-tag-new-version@v1
15
- with:
16
- version-command: |
17
- ruby print_version.rb
18
- - name: Push any new tags
19
- uses: ad-m/github-push-action@master
20
- with:
21
- github_token: ${{ secrets.GITHUB_TOKEN }}
22
- tags: true