Skip to content

Commit

Permalink
[WPB-14436] Bump deps, fix README. (#4347)
Browse files Browse the repository at this point in the history
* Update hscim README.

* Extend hscim version bounds.

* Recover accidentally removed weed.

* hscim changelog.
  • Loading branch information
fisx authored Nov 28, 2024
1 parent 9cce5ad commit 76d2a48
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 44 deletions.
14 changes: 14 additions & 0 deletions libs/hscim/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
0.4.0.6:
- bump dependencies
- re-introduce putUser function accidentally removed in 0.4.0.3

0.4.0.4:
- update README

0.4.0.3:
- drop client function for putUser
- bump ormulu
- bump dependencies
- make delete user idempotent (do not throw 404)
- clean up email address type

0.4.0:
- update dependencies

Expand Down
29 changes: 1 addition & 28 deletions libs/hscim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,4 @@
This implements part of the [SCIM standard](http://www.simplecloud.info)
for identity management. The parts that are currently supported are:

* User schema version 2.0

## Building

This project uses stack. You can install the sample executable with

```sh
stack install
```

## Developing and testing

This library only implements the schemas and endpoints defined by the
SCIM standard. You will need to implement the actual storage by giving
an instance for the `Persistence` class.

There's a simple in-memory implementation of this class, which is used
for tests. You can run the tests with the standard stack interface:

```sh
stack test
```

# Contributing

Before submitting a PR, make sure to install [ormolu](https://github.com/tweag/ormolu)
by doing `stack install ormolu` (we pin the version in our `stack.yaml` file)
and run `make format`.
* User schema version 2.0 (partial)
2 changes: 1 addition & 1 deletion libs/hscim/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
}:
mkDerivation {
pname = "hscim";
version = "0.4.0.2";
version = "0.4.0.6";
src = gitignoreSource ./.;
isLibrary = true;
isExecutable = true;
Expand Down
30 changes: 15 additions & 15 deletions libs/hscim/hscim.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12
name: hscim
version: 0.4.0.2
version: 0.4.0.6
synopsis: hscim json schema and server implementation
description:
The README file will answer all the questions you might have
Expand Down Expand Up @@ -86,7 +86,7 @@ library
aeson >=2.1.2 && <2.2
, aeson-qq >=0.8.4 && <0.9
, attoparsec >=0.14.4 && <0.15
, base >=4.17.2 && <4.19
, base >=4.17.2 && <4.21
, bytestring >=0.10.4 && <0.12
, case-insensitive >=1.2.1 && <1.3
, email-validate >=2.3.2 && <2.4
Expand Down Expand Up @@ -147,14 +147,14 @@ executable hscim-server
-Wunused-packages

build-depends:
base
, email-validate
base >=4.18.2 && <4.21
, email-validate >=2.3.2 && <2.4
, hscim
, network-uri
, stm
, stm-containers
, time
, warp
, network-uri >=2.6.4 && <2.7
, stm >=2.5.1 && <2.6
, stm-containers >=1.2.1 && <1.3
, time >=1.12.2 && <1.13
, warp >=3 && <3.5

default-language: Haskell2010

Expand Down Expand Up @@ -203,25 +203,25 @@ test-suite spec

build-tool-depends: hspec-discover:hspec-discover
build-depends:
aeson
aeson >=2.1.2 && <2.2
, attoparsec
, base
, bytestring
, email-validate
, email-validate >=2.3.2 && <2.4
, hedgehog
, hscim
, hscim >=0.4.0 && <0.5
, hspec
, hspec-expectations
, hspec-wai
, http-types
, http-types >=0.12.4 && <0.13
, hw-hspec-hedgehog
, indexed-traversable
, microlens
, network-uri
, servant
, servant >=0.19 && <0.21
, servant-server
, stm-containers
, text
, text >=2.0.2 && <2.1
, wai
, wai-extra

Expand Down
10 changes: 10 additions & 0 deletions libs/hscim/src/Web/Scim/Client.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module Web.Scim.Client
getUsers,
getUser,
postUser,
putUser,
patchUser,
deleteUser,

Expand Down Expand Up @@ -133,6 +134,15 @@ postUser ::
IO (StoredUser tag)
postUser env tok = case users (scimClients env) tok of ((_ :<|> (_ :<|> r)) :<|> (_ :<|> (_ :<|> _))) -> r

putUser ::
(HasScimClient tag) =>
ClientEnv ->
Maybe (AuthData tag) ->
UserId tag ->
User tag ->
IO (StoredUser tag)
putUser env tok = case users (scimClients env) tok of ((_ :<|> (_ :<|> _)) :<|> (r :<|> (_ :<|> _))) -> r

patchUser ::
(HasScimClient tag) =>
ClientEnv ->
Expand Down
1 change: 1 addition & 0 deletions weeder.toml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ roots = [ # may of the entries here are about general-purpose module
"^Web.Scim.Client.patchUser",
"^Web.Scim.Client.postGroup",
"^Web.Scim.Client.postUser",
"^Web.Scim.Client.putUser",
"^Web.Scim.Client.putGroup",
"^Web.Scim.Client.resourceTypes",
"^Web.Scim.Client.schema",
Expand Down

0 comments on commit 76d2a48

Please sign in to comment.