Skip to content

Commit

Permalink
Merge branch 'release/2023.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed May 2, 2023
2 parents 8468d96 + 38d448c commit 5e122be
Show file tree
Hide file tree
Showing 18 changed files with 486 additions and 349 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: ci

on:
push:
paths-ignore:
- "doc/**"
- "**.rst"
pull_request:

jobs:
ci:
runs-on: ubuntu-latest
container:
image: shiguredo/erlang:otp-26.0-rc3-openssl-3.1.0-ubuntu-22.04-x86_64
env:
ERL_FLAGS: -enable-feature maybe_expr
steps:
- uses: actions/checkout@v3
- run: make
- name: Slack Notification
if: failure()
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: ${{ secrets.SLACK_INTERNAL_CHANNEL }}
SLACK_COLOR: danger
SLACK_TITLE: Failure test
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
17 changes: 0 additions & 17 deletions .github/workflows/make-github.yml

This file was deleted.

35 changes: 27 additions & 8 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@

## develop

## 2023.1.0

日付: 2023-05-02

- [ADD] hex_efmt と hex_elvis を追加する
- @voluntas
- [CHANGE] efmt を適用する
- @voluntas
- [CHANGE] rebar3 の minimum_otp_vsn を 26.0 にする
- @voluntas
- [UPDATE] GitHub Actions の docker の OTP を 26.0-rc3 に上げる
- @voluntas
- [ADD] slack 通知を secrets.SLACK_INTERNAL_CHANNEL に変更
- @voluntas
- [ADD] rebar3 3.20.0 を追加する
- @voluntas
- [ADD] elvis.config を追加する
- @voluntas

## 2021.3.0

- [CHANGE] applicaiton を base32 に戻す
Expand All @@ -11,31 +30,31 @@

- [ADD] rebar3 hex plugin を追加する
- [ADD] rebar3 3.17.0 を追加する
- @voluntas
- @voluntas
- [CHANGE] 最小 OTP を 24.1 に上げる
- @voluntas
- @voluntas

## 2021.1

- [FIX] `base32:decode(clockwork, _)` が Crockford になっていた問題を修正する
- @shino
- @shino
- [CHANGE] `base32:decode(crockford, _)` が Binary を返していたため `{ok, Binary}` に変更する
- @shino
- @shino

## 2020.2

- [CHANGE] Clockwork Base32 を実装する
- @szktty
- @szktty

## 2020.1.2

- [FIX] Crockford's Base32: エンコード後の文字列の先頭が "0" であるべき場合に "0" が抜け落ちる事象を修正する
- @szktty
- @szktty

## 2020.1.1

- [UPDATE] Crockford 版を数値計算で再実装
- @szktty
- @szktty

## 2020.1

Expand All @@ -46,7 +65,7 @@
## 1.1.0

- [ADD] crockford の decode を追加
- @szktty
- @szktty

## 1.0.0

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
all: clean upgrade compile test dialyzer

upgrade:
@./rebar3 do update, upgrade
@./rebar3 do update, upgrade --all

compile:
@./rebar3 xref
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ $ rebar3 shell
<<"AXQQEB10D5T20WK5C5P6RY90EXQQ4TVK44">>
```

エンコード方式の種類:
## rebar3 deps

```erlang
{deps, [{base32, "2023.1.0", {pkg, base32_clockwork}}]}.
```

## エンコード方式の種類

- `rfc4648`: RFC 4648
- `crockford`: Crockford's Base32
Expand All @@ -34,8 +40,8 @@ $ rebar3 shell
## ライセンス

```
Copyright 2020, SUZUKI Tetsuya (Original Author)
Copyright 2020, Shiguredo Inc.
Copyright 2021-2023, Shiguredo Inc.
Copyright 2021, SUZUKI Tetsuya (Original Author)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
47 changes: 47 additions & 0 deletions elvis.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[
{
elvis,
[
{config,
[#{dirs => ["src"],
filter => "*.erl",
ruleset => erl_files,
rules => [{elvis_text_style, line_length, #{limit => 120, skip_comments => whole_line}},
%% Ranch 利用のため Transport:send/2 的なのが必要なので ...
{elvis_style, invalid_dynamic_call, disable},
%% snake_case じゃない場合は本来 '' で囲うべき
{elvis_style, atom_naming_convention, #{regex => "^([a-z][a-zA-Z0-9_]*_?)*(_SUITE)?$", enclosed_atoms => ".*"}},
{elvis_style, module_naming_convention, #{regex => "^([a-z][a-z0-9]*)(_[a-z0-9]+)*(_SUITE)?$"}},
{elvis_style, variable_naming_convention, #{regex => "^(_?[A-Z][0-9a-zA-Z_]*)$"}},

{elvis_style, nesting_level, disable},
{elvis_style, god_modules, disable},
{elvis_style, state_record_and_type, disable},
{elvis_style, no_block_expressions, disable},
{elvis_style, export_used_types, disable},
{elvis_style, private_data_types, disable},
%% 要検討
{elvis_style, no_single_clause_case, disable},
%% 要検討
{elvis_style, max_function_arity, disable},
%% 要検討
{elvis_style, operator_spaces, disable},
%% 要検討
{elvis_style, no_spec_with_records, disable},
%% 要検討
{elvis_style, dont_repeat_yourself, disable}]
},
#{dirs => ["."],
filter => "rebar.config",
ruleset => rebar_config,
rules => [{elvis_project, protocol_for_deps}]
},
#{dirs => ["."],
filter => "elvis.config",
ruleset => elvis_config
}
]
}
]
}
].
26 changes: 23 additions & 3 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,16 +1,36 @@
{minimum_otp_vsn, "24.1"}.
{minimum_otp_vsn, "26.0"}.

{erl_opts, [{i, "src"},
warnings_as_errors,
warn_export_all,
warn_unused_import]}.

{xref_checks, [undefined_function_calls, undefined_functions,
{xref_checks, [undefined_function_calls,
undefined_functions,
locals_not_used,
deprecated_function_calls, deprecated_functions]}.
deprecated_function_calls,
deprecated_functions]}.

%% https://rebar3.org/docs/configuration/configuration/#dialyzer
{dialyzer, [{warnings, [extra_return,
missing_return,
no_unknown
%% overspecs
%% underspecs,
%% specdiffs
%% error_handling
]},
incremental,
{plt_apps, top_level_deps},
%% {plt_apps, all_apps},
{plt_location, local},
{base_plt_location, global}]}.

{cover_enabled, true}.

{validate_app_modules, true}.

{project_plugins, [rebar3_efmt, rebar3_lint]}.
{elvis_output_format, colors}.

{plugins, [rebar3_hex]}.
Binary file modified rebar3
Binary file not shown.
15 changes: 6 additions & 9 deletions src/base32.app.src
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
{application, base32,
[{description, "Clockwork Base32"},
{pkg_name, base32_clockwork},
{vsn, "2021.3.0"},
{vsn, "2023.1.0"},
{registered, []},
{applications,
[
kernel,
stdlib
]},
{env,[]},
[kernel,
stdlib]},
{env, []},
{modules, []},
{licenses, ["Apache License, Version 2.0"]},
{links, [{"GitHub", "https://github.com/shiguredo/base32_clockwork"}]}
]}.
{licenses, ["Apache-2.0"]},
{links, [{"GitHub", "https://github.com/shiguredo/base32_clockwork"}]}]}.
5 changes: 3 additions & 2 deletions src/base32.erl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

-type base32_format() :: rfc4648 | crockford | crockford_check | clockwork.


-spec encode(base32_format(), binary()) -> binary().
encode(rfc4648, Data) ->
base32_rfc4648:encode(Data);
Expand All @@ -14,8 +15,9 @@ encode(crockford_check, Data) ->
encode(clockwork, Data) ->
base32_clockwork:encode(Data).


-spec decode(base32_format(), binary()) ->
{ok, binary()} | {error, atom()}.
{ok, binary()} | {error, atom()}.
decode(rfc4648, Data) ->
base32_rfc4648:decode(Data);
decode(crockford, Data) ->
Expand All @@ -24,4 +26,3 @@ decode(crockford_check, Data) ->
base32_crockford:decode_check(Data);
decode(clockwork, Data) ->
base32_clockwork:decode(Data).

Loading

0 comments on commit 5e122be

Please # to comment.