Skip to content

Commit

Permalink
Dependency updates 20230104 (#276)
Browse files Browse the repository at this point in the history
* Bump actions/cache from 2.1.6 to 3.2.2
* Bump codecov/codecov-action from 1.5.0 to 3.1.1
* Bump erlef/setup-elixir from 1.7 to 1.15
* Bump actions/checkout from 2.3.4 to 3.2.0
* Bump excoveralls from 0.14.1 to 0.15.1
* Bump dialyxir from 1.1.0 to 1.2.0
* Bump ex_doc 0.24.2 => 0.29.1 (minor), earmark_parser 1.4.13 => 1.4.29, makeup 1.0.5 => 1.1.0, makeup_elixir 0.15.1 => 0.16.0 (minor), nimble_parsec 1.1.0 => 1.2.3
* Bump credo 1.5.6 => 1.6.7, bunt 0.2.0 => 0.2.1
* Bump timex 3.7.5 => 3.7.9, gettext 0.18.2 => 0.20.0 (minor), tzdata 1.1.0 => 1.1.1
* set-output is deprecated, use env "files"
* bump Erlang/OTP and Elixir versions for CI
* address credo warnings
* map_join is more efficient than `map |> join`
* fixed typespecs in test helper
* remove deprecated Mix.Config usage
* version 0.10.2
* add missing tests for string builder
* Update CHANGELOG.md
* use README for docs landing
* remove broken image
  • Loading branch information
vanvoljg committed Jan 5, 2023
1 parent 3dd3b6e commit 988bd3d
Show file tree
Hide file tree
Showing 13 changed files with 108 additions and 79 deletions.
82 changes: 41 additions & 41 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:

env:
MIX_ENV: test
OTP_VERSION_SPEC: "24.x"
ELIXIR_VERSION_SPEC: "1.12.x"
OTP_VERSION_SPEC: "25.x"
ELIXIR_VERSION_SPEC: "1.14.x"

jobs:
format:
Expand All @@ -16,8 +16,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.3.4
- uses: erlef/setup-elixir@v1.7
- uses: actions/checkout@v3.2.0
- uses: erlef/setup-elixir@v1.15
id: setup
with:
otp-version: ${{ env.OTP_VERSION_SPEC }}
Expand All @@ -32,28 +32,28 @@ jobs:

steps:
# shared steps
- uses: actions/checkout@v2.3.4
- uses: erlef/setup-elixir@v1.7
- uses: actions/checkout@v3.2.0
- uses: erlef/setup-elixir@v1.15
id: setup
with:
otp-version: ${{ env.OTP_VERSION_SPEC }}
elixir-version: ${{ env.ELIXIR_VERSION_SPEC }}
- name: Cache Keys
id: keys
run: |
echo ::set-output name=deps_key::deps-${{ runner.os }}
echo ::set-output name=lockfile_key::${{ hashFiles('mix.lock') }}
echo ::set-output name=build_key::build-${{ runner.os }}-${{ env.MIX_ENV }}
echo ::set-output name=version_key::${{ steps.setup.outputs['otp-version'] }}-${{ steps.setup.outputs['elixir-version'] }}
echo ::set-output name=files_key::${{ hashFiles('lib/**/*.ex','test/**/*.ex','mix.lock') }}
- uses: actions/cache@v2.1.6
echo "deps_key=deps-${{ runner.os }}" >> $GITHUB_OUTPUT
echo "lockfile_key=${{ hashFiles('mix.lock') }}" >> $GITHUB_OUTPUT
echo "build_key=build-${{ runner.os }}-${{ env.MIX_ENV }}" >> $GITHUB_OUTPUT
echo "version_key=${{ steps.setup.outputs['otp-version'] }}-${{ steps.setup.outputs['elixir-version'] }}" >> $GITHUB_OUTPUT
echo "files_key=${{ hashFiles('lib/**/*.ex','test/**/*.ex','mix.lock') }}" >> $GITHUB_OUTPUT
- uses: actions/cache@v3.2.2
id: deps_cache
with:
path: deps
key: ${{ steps.keys.outputs.deps_key }}-${{ steps.keys.outputs.lockfile_key }}
restore-keys: |
${{ steps.keys.outputs.deps_key }}-
- uses: actions/cache@v2.1.6
- uses: actions/cache@v3.2.2
id: build_cache
with:
path: _build
Expand All @@ -77,28 +77,28 @@ jobs:

steps:
# shared steps
- uses: actions/checkout@v2.3.4
- uses: erlef/setup-elixir@v1.7
- uses: actions/checkout@v3.2.0
- uses: erlef/setup-elixir@v1.15
id: setup
with:
otp-version: ${{ env.OTP_VERSION_SPEC }}
elixir-version: ${{ env.ELIXIR_VERSION_SPEC }}
- name: Cache Keys
id: keys
run: |
echo ::set-output name=deps_key::deps-${{ runner.os }}
echo ::set-output name=lockfile_key::${{ hashFiles('mix.lock') }}
echo ::set-output name=build_key::build-${{ runner.os }}-${{ env.MIX_ENV }}
echo ::set-output name=version_key::${{ steps.setup.outputs['otp-version'] }}-${{ steps.setup.outputs['elixir-version'] }}
echo ::set-output name=files_key::${{ hashFiles('lib/**/*.ex','test/**/*.ex','mix.lock') }}
- uses: actions/cache@v2.1.6
echo "deps_key=deps-${{ runner.os }}" >> $GITHUB_OUTPUT
echo "lockfile_key=${{ hashFiles('mix.lock') }}" >> $GITHUB_OUTPUT
echo "build_key=build-${{ runner.os }}-${{ env.MIX_ENV }}" >> $GITHUB_OUTPUT
echo "version_key=${{ steps.setup.outputs['otp-version'] }}-${{ steps.setup.outputs['elixir-version'] }}" >> $GITHUB_OUTPUT
echo "files_key=${{ hashFiles('lib/**/*.ex','test/**/*.ex','mix.lock') }}" >> $GITHUB_OUTPUT
- uses: actions/cache@v3.2.2
id: deps_cache
with:
path: deps
key: ${{ steps.keys.outputs.deps_key }}-${{ steps.keys.outputs.lockfile_key }}
restore-keys: |
${{ steps.keys.outputs.deps_key }}-
- uses: actions/cache@v2.1.6
- uses: actions/cache@v3.2.2
id: build_cache
with:
path: _build
Expand All @@ -115,7 +115,7 @@ jobs:
# job steps
- name: Run tests
run: mix coveralls.json
- uses: codecov/codecov-action@v1.5.0
- uses: codecov/codecov-action@v3.1.1
with:
fail_ci_if_error: true

Expand All @@ -128,28 +128,28 @@ jobs:

steps:
# shared steps
- uses: actions/checkout@v2.3.4
- uses: erlef/setup-elixir@v1.7
- uses: actions/checkout@v3.2.0
- uses: erlef/setup-elixir@v1.15
id: setup
with:
otp-version: ${{ env.OTP_VERSION_SPEC }}
elixir-version: ${{ env.ELIXIR_VERSION_SPEC }}
- name: Cache Keys
id: keys
run: |
echo ::set-output name=deps_key::deps-${{ runner.os }}
echo ::set-output name=lockfile_key::${{ hashFiles('mix.lock') }}
echo ::set-output name=build_key::build-${{ runner.os }}-${{ env.MIX_ENV }}
echo ::set-output name=version_key::${{ steps.setup.outputs['otp-version'] }}-${{ steps.setup.outputs['elixir-version'] }}
echo ::set-output name=files_key::${{ hashFiles('lib/**/*.ex','test/**/*.ex','mix.lock') }}
- uses: actions/cache@v2.1.6
echo "deps_key=deps-${{ runner.os }}" >> $GITHUB_OUTPUT
echo "lockfile_key=${{ hashFiles('mix.lock') }}" >> $GITHUB_OUTPUT
echo "build_key=build-${{ runner.os }}-${{ env.MIX_ENV }}" >> $GITHUB_OUTPUT
echo "version_key=${{ steps.setup.outputs['otp-version'] }}-${{ steps.setup.outputs['elixir-version'] }}" >> $GITHUB_OUTPUT
echo "files_key=${{ hashFiles('lib/**/*.ex','test/**/*.ex','mix.lock') }}" >> $GITHUB_OUTPUT
- uses: actions/cache@v3.2.2
id: deps_cache
with:
path: deps
key: ${{ steps.keys.outputs.deps_key }}-${{ steps.keys.outputs.lockfile_key }}
restore-keys: |
${{ steps.keys.outputs.deps_key }}-
- uses: actions/cache@v2.1.6
- uses: actions/cache@v3.2.2
id: build_cache
with:
path: _build
Expand Down Expand Up @@ -177,28 +177,28 @@ jobs:

steps:
# shared steps
- uses: actions/checkout@v2.3.4
- uses: erlef/setup-elixir@v1.7
- uses: actions/checkout@v3.2.0
- uses: erlef/setup-elixir@v1.15
id: setup
with:
otp-version: ${{ env.OTP_VERSION_SPEC }}
elixir-version: ${{ env.ELIXIR_VERSION_SPEC }}
- name: Cache Keys
id: keys
run: |
echo ::set-output name=deps_key::deps-${{ runner.os }}
echo ::set-output name=lockfile_key::${{ hashFiles('mix.lock') }}
echo ::set-output name=build_key::build-${{ runner.os }}-${{ env.MIX_ENV }}
echo ::set-output name=version_key::${{ steps.setup.outputs['otp-version'] }}-${{ steps.setup.outputs['elixir-version'] }}
echo ::set-output name=files_key::${{ hashFiles('lib/**/*.ex','test/**/*.ex','mix.lock') }}
- uses: actions/cache@v2.1.6
echo "deps_key=deps-${{ runner.os }}" >> $GITHUB_OUTPUT
echo "lockfile_key=${{ hashFiles('mix.lock') }}" >> $GITHUB_OUTPUT
echo "build_key=build-${{ runner.os }}-${{ env.MIX_ENV }}" >> $GITHUB_OUTPUT
echo "version_key=${{ steps.setup.outputs['otp-version'] }}-${{ steps.setup.outputs['elixir-version'] }}" >> $GITHUB_OUTPUT
echo "files_key=${{ hashFiles('lib/**/*.ex','test/**/*.ex','mix.lock') }}" >> $GITHUB_OUTPUT
- uses: actions/cache@v3.2.2
id: deps_cache
with:
path: deps
key: ${{ steps.keys.outputs.deps_key }}-${{ steps.keys.outputs.lockfile_key }}
restore-keys: |
${{ steps.keys.outputs.deps_key }}-
- uses: actions/cache@v2.1.6
- uses: actions/cache@v3.2.2
id: build_cache
with:
path: _build
Expand Down
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased][]

## [0.10.2][] - 2023-01-04

- Updated GitHub Actions steps to latest versions:

- `actions/cache` 3.2.2, `actions/checkout` 3.2.0, `erlef/setup-elixir` 1.15, `codecov/codecov-action` 3.1.1

- Updated Elixir dependencies:

- `excoveralls` 0.15.1, `dialyxir` 1.2.0, `ex_doc` 0.29.1, `earmark_parser` 1.4.29,
`makeup` 1.1.0, `makeup_elixir` 0.16.0, `nimble_parsec` 1.2.3, `credo` 1.6.7,
`bunt` 0.2.1, `timex` 3.7.9, `gettext` 0.20.0, `tzdata` 1.1.1

## [0.10.0][] - 2021-06-18

### Added
Expand Down Expand Up @@ -151,7 +163,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Initial release

[Unreleased]: https://github.com/peek-travel/cocktail/compare/0.10.0...HEAD
[Unreleased]: https://github.com/peek-travel/cocktail/compare/0.10.2...HEAD

[0.10.2]: https://github.com/peek-travel/cocktail/compare/0.10.0...0.10.2

[0.10.0]: https://github.com/peek-travel/cocktail/compare/0.9.0...0.10.0

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Cocktail ![Cocktail](./logo_with_border.png)
# Cocktail

[![CI
Status](https://github.com/peek-travel/cocktail/workflows/CI/badge.svg)](https://github.com/peek-travel/cocktail/actions)
Expand Down
3 changes: 0 additions & 3 deletions config/config.exs

This file was deleted.

1 change: 0 additions & 1 deletion config/dev.exs

This file was deleted.

1 change: 0 additions & 1 deletion config/docs.exs

This file was deleted.

1 change: 0 additions & 1 deletion config/test.exs

This file was deleted.

12 changes: 5 additions & 7 deletions lib/cocktail/builder/i_calendar.ex
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ defmodule Cocktail.Builder.ICalendar do
"""
@spec build_rule(Schedule.t()) :: String.t()
def build_rule(schedule) do
Enum.map(schedule.recurrence_rules, &do_build_rule/1) |> Enum.join()
schedule.recurrence_rules
|> Enum.map_join(&do_build_rule/1)
end

@spec build_time(Cocktail.time(), String.t()) :: String.t()
Expand Down Expand Up @@ -175,8 +176,7 @@ defmodule Cocktail.Builder.ICalendar do
days_list =
days
|> Enum.sort()
|> Enum.map(&to_string/1)
|> Enum.join(",")
|> Enum.map_join(",", &to_string/1)

"BYMONTHDAY=#{days_list}"
end
Expand All @@ -186,8 +186,7 @@ defmodule Cocktail.Builder.ICalendar do
days_list =
days
|> Enum.sort()
|> Enum.map(&by_day/1)
|> Enum.join(",")
|> Enum.map_join(",", &by_day/1)

"BYDAY=#{days_list}"
end
Expand Down Expand Up @@ -244,8 +243,7 @@ defmodule Cocktail.Builder.ICalendar do
times_list =
times
|> Enum.sort()
|> Enum.map(&format_erl_time/1)
|> Enum.join(",")
|> Enum.map_join(",", &format_erl_time/1)

"X-BYTIME=#{times_list}"
end
Expand Down
3 changes: 1 addition & 2 deletions lib/cocktail/builder/string.ex
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ defmodule Cocktail.Builder.String do
@spec build(Schedule.t()) :: String.t()
def build(%Schedule{recurrence_rules: recurrence_rules}) do
recurrence_rules
|> Enum.map(&build_rule/1)
|> Enum.join(" / ")
|> Enum.map_join(" / ", &build_rule/1)
end

@doc false
Expand Down
8 changes: 4 additions & 4 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Cocktail.Mixfile do
use Mix.Project

@version "0.10.1"
@version "0.10.2"

def project do
[
Expand Down Expand Up @@ -39,7 +39,7 @@ defmodule Cocktail.Mixfile do
defp package do
[
files: ["lib", "mix.exs", "README.md", "LICENSE.md"],
maintainers: ["Chris Dosé"],
maintainers: ["Jesse Van Volkinburg", "Chris Dosé"],
licenses: ["MIT"],
links: %{
"GitHub" => "https://github.com/peek-travel/cocktail",
Expand All @@ -51,11 +51,11 @@ defmodule Cocktail.Mixfile do

defp docs do
[
main: "Cocktail.Schedule",
main: "readme",
logo: "logo.png",
source_ref: @version,
source_url: "https://github.com/peek-travel/cocktail",
extras: ["README.md", "LICENSE.md"]
extras: ["README.md", "LICENSE.md", "CHANGELOG.md"]
]
end

Expand Down
Loading

0 comments on commit 988bd3d

Please sign in to comment.