Skip to content

Commit

Permalink
Merge pull request #74 from otobus/mustafaturan/update_travis_scripts
Browse files Browse the repository at this point in the history
Update travis script
Allow nil value type on optional attributes of Event struct
  • Loading branch information
Mustafa TURAN authored Oct 15, 2018
2 parents 7c1456c + 0a4f799 commit ea8268f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ matrix:
include:
- elixir: 1.7
otp_release: 21.0
env:
- MIX_ENV=test
script:
- mix dialyzer
- mix coveralls.travis
- mix credo --strict
- mix test
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [1.6.X]
- Update type names and docs for consistent naming convention (Note: there is no logic or method name change)
- Update the Travis script to prevent breaks on merges:
- - Include dialyzer warnings
- - Include coverage
- - Include credo checks
- Update `EventBus.Model.Event` struct optional attribute type specs to allow `nil` values

## [1.5.X]
- Fix Elixir `v1.7.x` warnings for string to atom conversions
Expand Down
10 changes: 5 additions & 5 deletions lib/event_bus/models/event.ex
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ defmodule EventBus.Model.Event do
"""
@type t :: %__MODULE__{
id: String.t() | integer(),
transaction_id: String.t() | integer(),
transaction_id: String.t() | integer() | nil,
topic: atom(),
data: any(),
initialized_at: integer(),
occurred_at: integer(),
source: String.t(),
ttl: integer()
initialized_at: integer() | nil,
occurred_at: integer() | nil,
source: String.t() | nil,
ttl: integer() | nil
}

@doc """
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ defmodule EventBus.Mixfile do
defp deps do
[
{:credo, "~> 0.10", only: [:dev, :test]},
{:dialyxir, "~> 1.0.0-rc.3", only: [:dev], runtime: false},
{:dialyxir, "~> 1.0.0-rc.3", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.10", only: [:test]},
{:ex_doc, "~> 0.19", only: [:dev]}
]
Expand Down

0 comments on commit ea8268f

Please sign in to comment.