Skip to content

Commit b496dbc

Browse files
committed
VIP - Delete deprecated modules/functions and macros
Based on mishka-group/mishka_installer#99 Pre-0.1.6
1 parent 54b24f0 commit b496dbc

16 files changed

+61
-767
lines changed

.github/workflows/ci.yml

+4-24
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,16 @@ jobs:
1818
matrix:
1919
include:
2020
- pair:
21-
elixir: "1.15.7"
22-
otp: "26.2.1"
23-
postgres: "14.1-alpine"
21+
elixir: "1.17.1"
22+
otp: "27.0"
2423

2524
runs-on: ubuntu-latest
2625

27-
services:
28-
postgres:
29-
image: postgres:${{matrix.pair.postgres}}
30-
env:
31-
POSTGRES_DB: mishka_test
32-
POSTGRES_PASSWORD: postgres
33-
POSTGRES_USER: postgres
34-
options: >-
35-
--health-cmd pg_isready
36-
--health-interval 10s
37-
--health-timeout 5s
38-
--health-retries 5
39-
ports:
40-
- 5432/tcp
41-
4226
steps:
43-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v4
4428

4529
- uses: erlef/setup-beam@v1
30+
id: beam
4631
with:
4732
otp-version: ${{matrix.pair.otp}}
4833
elixir-version: ${{matrix.pair.elixir}}
@@ -53,15 +38,10 @@ jobs:
5338
mix local.rebar --force
5439
5540
- name: Source Compiling
56-
env:
57-
DATABASE_DEVELOPERT_URL: postgresql://postgres:postgres@localhost:${{job.services.postgres.ports[5432]}}/mishka_developer_tools_test
5841
run: |
5942
mix deps.get
6043
mix deps.compile
6144
6245
- name: Run test with temporary information
63-
env:
64-
DATABASE_DEVELOPERT_URL: postgresql://postgres:postgres@localhost:${{job.services.postgres.ports[5432]}}/mishka_developer_tools_test
6546
run: |
66-
mix dialyzer
6747
mix test --trace

CHANGELOG.md

+17-117
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@
44

55
- [x] Add `Crypto` helper module
66
- [x] Add new optional dependencies and their wrappers [`nimble_totp`, `joken`, `jason`, `plug`, `bcrypt_elixir`, `pbkdf2_elixir`, `argon2_elixir`]
7+
- [x] Add a normal and basic `validated_password?` function
8+
- [x] Add basic elixir wrapper for erlang queue
9+
- [x] Add new validattion for erlang queue inside `guarded_struct`
10+
- [x] Add some helpers functions for erlang queue
11+
12+
### Improvement:
13+
14+
- [x] Fix and Add compile time check is there geo url module or not
15+
- [x] Support Struct as the builder entry
16+
- [x] Improve some `dialyzer` warning
17+
- [x] General improvements for the new version of Mishka Installer - [Refactor and Rewriting the Mishka installer project with Erlang's built-in databases - 0.1.0](https://github.com/mishka-group/mishka_installer/pull/99)
18+
19+
### Extra:
20+
21+
- [x] Update `ex_doc` dep
22+
- [x] Update Github `CI`
23+
- [x] Delete all ecto deps and custom macro and tests
724

825
# Changelog for MishkaDeveloperTools 0.1.5
926

@@ -86,120 +103,3 @@ end
86103
### Docs
87104

88105
- [x] Add LiveBook
89-
90-
# Changelog for MishkaDeveloperTools 0.1.3
91-
92-
**Features**:
93-
94-
- [x] Support List `conditional_field`
95-
96-
```elixir
97-
"actor": [
98-
"http://joe.example.org",
99-
{
100-
"type": "Person",
101-
"id": "http://sally.example.org",
102-
"name": "Sally"
103-
},
104-
:test
105-
]
106-
```
107-
108-
- [x] Covering `hint` inside derive `conditional_field` and normal `derive`
109-
- [x] Support `domain` key inside children fields
110-
- [x] Support new derives: `not_flatten_empty`, `not_flatten_empty_item` as validation
111-
- [x] Support `not_empty` and `max_len`, `min_len` for list in validation derive.
112-
113-
**Fixed bugs**:
114-
115-
- [x] Fix and Remove `downcase` bug in `strip_tags`
116-
- [x] Fix and Remove preventer of calling a `struct` inside itself
117-
- [x] Fix domain core key to prevent it not to check domain when the key is `nil`
118-
119-
**Improvements**:
120-
121-
- [x] Changing the structure of on core key based on the value of the caller
122-
- [x] Support calling struct inside itself
123-
- [x] Separate all test of `GuardedStruct` macro in different files
124-
- [x] Add `dialyzer` for GuardedStruct macro
125-
126-
# Changelog for MishkaDeveloperTools 0.1.2
127-
128-
---
129-
130-
- [x] Solving the problem of creating extra `atom` in case of a mistake or an attack on the system. It could be a `security` issue, please update.
131-
132-
---
133-
134-
- [x] Add allowed parent domain core key `Enum` derive style
135-
- [x] Add allowed parent domain core key `either` derive style
136-
- [x] Add allowed parent domain core key `equal` derive style
137-
- [x] Add allowed parent domain core key `custom` derive style
138-
- [x] Add driver for accepting `custom` function
139-
- [x] Add status to auto core key if the data of key exists do not create auto value
140-
- [x] Add Conditional field structure `macro` (**Multiple states of a field**)
141-
- [x] Add Supporting new `Typespecs` for `list(struct())` and previous one `struct()`
142-
- [x] Add Supporting new sanitizer for `:string_float`
143-
- [x] Add Supporting new validation for `:string_float`
144-
- [x] Add Supporting new validation for `:some_string_float`
145-
146-
# Changelog for MishkaDeveloperTools 0.1.1
147-
148-
- [x] Add `derive` for sanitizing and validating `Either`
149-
- [x] Add `derive` for sanitizing and validating `Enum`, improved
150-
- [x] Add `derive` for sanitizing and validating `equal`
151-
- [x] Add `exception` when macro is configed for `error: true`, only can be called inside `sub_field` and `guardedstruct` macro
152-
- [x] Add `authorized_fields` validating option for `sub_field` and `guardedstruct` macro
153-
- [x] Calling a struct from another module
154-
- [x] Calling list of structs from another module
155-
- [x] Add capability of having a `field` with list of structs
156-
- [x] Add capability of having a `sub_field` with list of structs
157-
- [x] Add Automatic generator for a specific key `on`
158-
- [x] Add a dependent key to another key `auto`
159-
- [x] Add a key to get a value from another key `from`
160-
- [x] Add struct information function
161-
- [x] Add transmitting whole output of builder function to its children
162-
- [x] Add new style of builder entries to accept tuple with keys
163-
- [x] Add `auto`, `on`, `from` core keys for list of structs
164-
- [x] Re-structured outputs for new capabilities with backward compatibility
165-
- [x] Add permission access module in runtime
166-
167-
# Changelog for MishkaDeveloperTools 0.1.0
168-
169-
- [x] Add Guardedstruct macro
170-
- [x] Support nested struct in macro
171-
- [x] Add `derive` for Validation and Sanitization
172-
- [x] Add custom validator and main validator
173-
- [x] Add custom validator and main validator from finding in a module
174-
- [x] Add `__struct__`, `keys`, `enforce_keys` and `builder` functions
175-
- [x] Add `required_fields` validation with `:halt` status
176-
- [x] Add calling nested fields and struct from another module
177-
- [x] Add `Derive.Parser.convert_to_atom_map` to Change string map to atom map
178-
- [x] Add `derive` for sanitizing and validating `Trim`
179-
- [x] Add `derive` for sanitizing and validating `Lowercase`
180-
- [x] Add `derive` for sanitizing and validating `Uppercase`
181-
- [x] Add `derive` for sanitizing and validating `Max` length
182-
- [x] Add `derive` for sanitizing and validating `Min` length
183-
- [x] Add `derive` for sanitizing and validating Safe String `false` or `true` value
184-
- [x] Add `derive` for sanitizing and validating `Email`
185-
- [x] Add `derive` for sanitizing and validating `Location`
186-
- [x] Add `derive` for sanitizing and validating `Date`
187-
- [x] Add `derive` for sanitizing and validating `DateTime`
188-
- [x] Add `derive` for sanitizing and validating `basic_html` sanitize
189-
- [x] Add `derive` for sanitizing and validating `html5` sanitize
190-
- [x] Add `derive` for sanitizing and validating `markdown_html` sanitize
191-
- [x] Add `derive` for sanitizing and validating `strip_tags` sanitize
192-
- [x] Add `derive` for sanitizing and validating `Regex` runner
193-
- [x] Add `derive` for sanitizing and validating `Range`
194-
- [x] Add `derive` for sanitizing and validating Validate `URL`
195-
- [x] Add `derive` for sanitizing and validating Validate `IPV4`
196-
- [x] Add `derive` for sanitizing and validating Validate `Enum`
197-
- [x] Add `derive` for sanitizing and validating Validate `Tag`
198-
- [x] Add `derive` for sanitizing and validating Validate `UUID`
199-
- [x] Add `derive` for sanitizing and validating Validate `Not empty string`
200-
- [x] Add `derive` for sanitizing and validating Validate `Equal`
201-
- [x] Add a `:halt` error to filter validations output from showing after `halt` error
202-
- [x] Update all dependencies to last version
203-
- [x] Fix tests for Elixir `1.15`
204-
- [x] Make all dependencies optional based on user requirements
205-
- [x] improve documents

README.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
We tried to deliver a series of our client's [**CMS**](https://github.com/mishka-group/mishka-cms) built on [**Elixir**](https://elixir-lang.org/) at the start of the [**Mishka Group**](https://github.com/mishka-group) project, but we recently archived this open-source project and have yet to make plans to rework and expand it. This system was created using [**Phoenix**](https://www.phoenixframework.org/) and [**Phoenix LiveView**](https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.html). After a long period, a series of macros and functional modules emerged from this project and our other projects, which we are gradually publishing in this library.
44

5-
> **NOTICE**: Do not use the master branch; this library is under heavy development. Expect version `0.1.5`, and for using the new features, please wait until a new release is out.
5+
> **NOTICE**: Do not use the master branch; this library is under heavy development. Expect version `0.1.6`, and for using the new features, please wait until a new release is out.
66
77
---
88

@@ -20,10 +20,6 @@ We tried to deliver a series of our client's [**CMS**](https://github.com/mishka
2020
> Consider the scenario in which you are responsible for maintaining each user's access level in the database related to users.
2121
> **It is unix like way**.
2222
23-
- ### [Basic CRUD](https://github.com/mishka-group/mishka_developer_tools/blob/master/guidance/crud.md)
24-
25-
> **This part of the project is deprecated, please do not use it. In the future, a good update may be provided for it.**
26-
2723
---
2824

2925
> **Mishka developer tools** provides some macros and modules to make creating your elixir application as easy as possible
@@ -35,7 +31,7 @@ The package can be installed by adding `mishka_developer_tools` to your list of
3531
```elixir
3632
def deps do
3733
[
38-
{:mishka_developer_tools, "~> 0.1.5"}
34+
{:mishka_developer_tools, "~> 0.1.6"}
3935
]
4036
end
4137
```

guidance/guarded-struct.livemd

+3-3
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ NormalValidatorStruct.builder(%{name: "Mishka"})
279279
NormalValidatorStruct.builder(%{name: :mishka})
280280
```
281281

282-
> **Note**: There are other ways to call the `validator` function. Using a Tuple is the first method. It is shown in the code excerpt above. The module address appears in the first entry, and the function name in Atomic form appears in the second.
282+
> **Note**: There are other ways to call the `validator` function. Using a Tuple is the first method. It is shown in the code excerpt above. The module address appears in the first entry, and the function name in Atomic form appears in the second.
283283
> Note that you can use `__MODULE__` if you define it in this module.
284284
> But there's a simpler method. The module itself has a reserved word for `validator`. It only has to be valued as a field; the macro will verify that the input is accurate.
285285
@@ -959,7 +959,7 @@ defmodule AutoCoreKeyStruct do
959959
end
960960

961961
def create_uuid(default) do
962-
Ecto.UUID.generate() <> "-#{default}"
962+
MishkaDeveloperTools.Helper.UUID.generate() <> "-#{default}"
963963
end
964964
end
965965
```
@@ -1094,7 +1094,7 @@ defmodule FromCoreKeyStruct do
10941094
end
10951095

10961096
def create_uuid(default) do
1097-
Ecto.UUID.generate() <> "-#{default}"
1097+
MishkaDeveloperTools.Helper.UUID.generate() <> "-#{default}"
10981098
end
10991099
end
11001100
```

guidance/guarded-struct.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ defmodule TestAutoValueStruct do
780780
end
781781

782782
def create_uuid(default) do
783-
Ecto.UUID.generate() <> "-#{default}"
783+
MishkaDeveloperTools.Helper.UUID.generate() <> "-#{default}"
784784
end
785785
end
786786
```
@@ -878,7 +878,7 @@ defmodule TestAutoValueStruct do
878878
end
879879

880880
def create_uuid(default) do
881-
Ecto.UUID.generate() <> "-#{default}"
881+
MishkaDeveloperTools.Helper.UUID.generate() <> "-#{default}"
882882
end
883883
end
884884
```

0 commit comments

Comments
 (0)