Skip to content

Commit 9d5ca16

Browse files
kianmengdarrenklein
authored andcommitted
Misc doc changes
Besides other documentation changes, this commit ensures the generated HTML doc for HexDocs.pm will become the main source doc for this Elixir library which leverage on latest ExDoc features.
1 parent 768e9ec commit 9d5ca16

File tree

9 files changed

+138
-37
lines changed

9 files changed

+138
-37
lines changed

.formatter.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
# Used by "mix format"
12
[
2-
# files to format
3-
inputs: ["mix.exs", "{config,lib,test,priv}/**/*.{ex,exs}"],
3+
inputs: ["{mix, .formatter}.exs", "{config,lib,test,priv}/**/*.{ex,exs}"],
44
locals_without_parens: [config: 0],
55
line_length: 120,
66
rename_deprecated_at: "1.6.1"
7-
]
7+
]

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# The directory Mix downloads your dependencies sources to.
88
/deps/
99

10-
# Where 3rd-party dependencies like ExDoc output generated docs.
10+
# Where third-party dependencies like ExDoc output generated docs.
1111
/doc/
1212

1313
# Ignore .fetch files in case you like to edit your project deps locally.
@@ -19,4 +19,11 @@ erl_crash.dump
1919
# Also ignore archive artifacts (built via "mix archive.build").
2020
*.ez
2121

22+
# Ignore package tarball (built via "mix hex.build").
23+
ex_aws_dynamo-*.tar
24+
25+
# Temporary files for e.g. tests.
26+
/tmp/
27+
28+
# Misc.
2229
/config/ddb_local_test.exs

CHANGELOG.md

Lines changed: 72 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,73 @@
1-
v2.0
1+
# Changelog
22

3-
- Major Project Split. Please see the main ExAws repository for previous changelogs.
3+
## v4.0.0 - 2020-07-06
4+
5+
- Add support for empty string/binary attributes
6+
- Empty string is saved as a space when using `put_item`
7+
8+
## v3.0.3 - 2020-07-03
9+
10+
- Update dependencies
11+
12+
## v3.0.2 - 2020-05-23
13+
14+
- Add empty prod.exs config file
15+
16+
## v3.0.1 - 2020-05-04
17+
18+
- Upcase `return_consumed_capacity` values on batch calls
19+
- Documentation updates and fixes
20+
21+
## v3.0.0 - 2020-02-22
22+
23+
- Set minimum version of `ex_aws` to 2.1.2
24+
- Remove reference to `:decode_sets_config` option
25+
26+
## v2.3.4 - 2019-10-31
27+
28+
- Additional documentation changes
29+
- Set `config/test.exs` as a 'bare-bones' config file
30+
- Import `ddb_local_test.exs` only if it has been provided.
31+
32+
## v2.3.3 - 2019-10-24
33+
34+
- Allow `expression_attribute_names` to be specified in `batch_get_item`
35+
- Add badges to documentation
36+
37+
## v2.3.2 - 2019-10-20
38+
39+
- Set `:debug_requests` to false in `test.exs.example`
40+
- Run integration tests only local DDB instance found
41+
42+
## v2.3.1 - 2019-10-07
43+
44+
- Fix documentation
45+
46+
## v2.3.0 - 2019-09-27
47+
48+
- Add DynamoDb transaction API calls
49+
- Code formatting
50+
51+
## v2.2.2 - 2019-09-25
52+
53+
- Add instructions on running integration tests against local DDB
54+
55+
## v2.2.1 - 2019-08-27
56+
57+
- Properly handle Binary fields
58+
59+
## v2.2.0 - 2019-08-12
60+
61+
- Fix type `expression_attribute_values_vals`
62+
- Decode sets as MapSet
63+
64+
## v2.1.0 - 2019-07-19
65+
66+
- Add support for billing mode
67+
- Add ability to specify billing mode and TTL during table create and update
68+
- Add support for list of items while decoding
69+
- Add `Dynamo.update_time_to_live` and `Dynamo.describe_time_to_live`
70+
71+
## v2.0.0 - 2017-11-10
72+
73+
- Major Project Split. Please see the main [ExAws](https://github.com/ex-aws/ex_aws) repository for [previous changelogs](https://github.com/ex-aws/ex_aws/blob/master/CHANGELOG.md).

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
ExAws.Dynamo
2-
============
1+
# ExAws.Dynamo
2+
33
[![Hex.pm](https://img.shields.io/hexpm/v/ex_aws_dynamo.svg)](https://hex.pm/packages/ex_aws_dynamo)
44
[![Build Docs](https://img.shields.io/badge/hexdocs-release-blue.svg)](https://hexdocs.pm/ex_aws_dynamo/ExAws.Dynamo.html)
5+
[![Module Version](https://img.shields.io/hexpm/v/ex_aws_dynamo.svg)](https://hex.pm/packages/ex_aws_dynamo)
6+
[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/ex_aws_dynamo/)
7+
[![Total Download](https://img.shields.io/hexpm/dt/ex_aws_dynamo.svg)](https://hex.pm/packages/ex_aws_dynamo)
8+
[![License](https://img.shields.io/hexpm/l/ex_aws_dynamo.svg)](https://github.com/ex-aws/ex_aws_dynamo/blob/master/LICENSE)
9+
[![Last Updated](https://img.shields.io/github/last-commit/ex-aws/ex_aws_dynamo.svg)](https://github.com/ex-aws/ex_aws_dynamo/commits/master)
510

611
Service module for https://github.com/ex-aws/ex_aws
712

813
## Installation
914

10-
The package can be installed by adding `ex_aws_dynamo` to your list of dependencies in `mix.exs` along with your preferred JSON codec and HTTP client:
15+
The package can be installed by adding `:ex_aws_dynamo` to your list of dependencies in `mix.exs` along with your preferred JSON codec and HTTP client:
1116

1217
```elixir
1318
def deps do
@@ -83,7 +88,7 @@ Before setting the `:port` and running tests, be aware that `test/lib/dynamo/int
8388

8489
If DynamoDB is not running locally or the config file has not been provided, the integration tests will be skipped.
8590

86-
## License
91+
## Copyright and License
8792

8893
The MIT License (MIT)
8994

UPGRADE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Upgrading
2+
3+
## 3.X.X to 4.X.X
4+
5+
### Empty string/binary values allowed
6+
7+
In May, 2020, DynamoDB was updated to allow storage of empty strings and binaries in non-key fields - [documentation](https://aws.amazon.com/about-aws/whats-new/2020/05/amazon-dynamodb-now-supports-empty-values-for-non-key-string-and-binary-attributes-in-dynamodb-tables/). In earlier versions of this app, fields with empty string attributes were stripped off prior to writing to the DB by `ExAws.Dynamo.Encodable.do_encode/1`; however, in light of these developments, the default behavior of this app will now be to write empty string values.
8+
9+
Please check your application thoroughly and make sure you are prepared for dealing with the possibility of having empty strings in fields that may previously have been expected to return `nil` (since, in the past, they wouldn't have been written at all). To be clear, existing data is not going to be changed - but if, prior to upgrading to version 4, you wrote a record with the values `%{id: "1", optional_string: ""}`, that record will still be returned as `%{id: 1, optional_string: nil}`; if you write a record after upgrading, say `%{id: "2", optional_string: ""}`, that record will be returned exactly as written, `%{id: "2", optional_string: ""}`.
10+
11+
## 2.X.X to 3.X.X
12+
13+
### MapSet
14+
15+
Prior to version **2.2.0**, **ex_aws_dynamo** was encoding **MapSet** data into one of the three Dynamo set types (number, string, and binary), but was decoding those types into Elixir **List** data. In version **2.2.0**, a PR added a boolean configuration option, `:decode_sets`, that would allow the user to specify that these types should be decoded into **MapSet** as well.
16+
17+
In this major release, Dynamo set types decode to Elixir **MapSet** by default, so the `:decode_sets` configuration option can be removed if it was included. If it this option was not included or was explicitly set to `false`, you'll need to be prepared to handle any decoded Dynamo sets as **MapSet** instead of **List**.
18+
19+
### Jason
20+
21+
Several months ago, `ex_aws` switched its default JSON codec from **Poison** to **Jason** (see https://github.com/ex-aws/ex_aws/pull/658). In this major release, the encoder used for `dev` and `test` environments has been changed to **Jason**, and the README file has been updated to show **Jason** in use instead of **Poison**, and refers the user to the `ex_aws` docs for information about how to provide a custom JSON codec.

mix.exs

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,32 @@ defmodule ExAws.Dynamo.Mixfile do
1616
deps: deps(),
1717
name: @name,
1818
package: package(),
19-
docs: [main: @name, source_ref: "v#{@version}", source_url: @url]
19+
docs: docs()
2020
]
2121
end
2222

2323
defp package do
2424
[
2525
description: "#{@name} service package",
26-
files: ["lib", "config", "mix.exs", "README*"],
26+
files: ["lib", "config", "mix.exs", "README*", "CHANGELOG*"],
2727
maintainers: ["Darren Klein", "Franko Franicevich", "Gilad Barkan", "Ben Wilson"],
2828
licenses: ["MIT"],
29-
links: %{github: @url}
29+
links: %{
30+
Changelog: "https://hexdocs.pm/ex_aws_dynamo/changelog.html",
31+
GitHub: @url
32+
}
3033
]
3134
end
3235

3336
defp elixirc_paths(:test), do: ["lib", "test/support"]
3437
defp elixirc_paths(_), do: ["lib"]
3538

36-
# Run "mix help compile.app" to learn about applications.
3739
def application do
3840
[
3941
extra_applications: [:logger]
4042
]
4143
end
4244

43-
# Run "mix help deps" to learn about dependencies.
4445
defp deps do
4546
[
4647
{:credo, "~> 1.4", only: [:dev, :test], runtime: false},
@@ -58,4 +59,18 @@ defmodule ExAws.Dynamo.Mixfile do
5859
_ -> {:ex_aws, ">= 2.1.3"}
5960
end
6061
end
62+
63+
defp docs do
64+
[
65+
extras: [
66+
"CHANGELOG.md",
67+
"README.md",
68+
"UPGRADE.md"
69+
],
70+
main: "readme",
71+
source_url: @url,
72+
source_ref: "v#{@version}",
73+
formatters: ["html"]
74+
]
75+
end
6176
end

mix.lock

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33
"certifi": {:hex, :certifi, "2.5.2", "b7cfeae9d2ed395695dd8201c57a2d019c0c43ecaf8b8bcb9320b40d6662f340", [:rebar3], [{:parse_trans, "~>3.3", [hex: :parse_trans, repo: "hexpm", optional: false]}], "hexpm", "3b3b5f36493004ac3455966991eaf6e768ce9884693d9968055aeeeb1e575040"},
44
"credo": {:hex, :credo, "1.4.0", "92339d4cbadd1e88b5ee43d427b639b68a11071b6f73854e33638e30a0ea11f5", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "1fd3b70dce216574ce3c18bdf510b57e7c4c85c2ec9cad4bff854abaf7e58658"},
55
"earmark": {:hex, :earmark, "1.3.2", "b840562ea3d67795ffbb5bd88940b1bed0ed9fa32834915125ea7d02e35888a5", [:mix], [], "hexpm", "e3be2bc3ae67781db529b80aa7e7c49904a988596e2dbff897425b48b3581161"},
6+
"earmark_parser": {:hex, :earmark_parser, "1.4.12", "b245e875ec0a311a342320da0551da407d9d2b65d98f7a9597ae078615af3449", [:mix], [], "hexpm", "711e2cc4d64abb7d566d43f54b78f7dc129308a63bc103fbd88550d2174b3160"},
67
"ex_aws": {:hex, :ex_aws, "2.1.3", "26b6f036f0127548706aade4a509978fc7c26bd5334b004fba9bfe2687a525df", [:mix], [{:configparser_ex, "~> 4.0", [hex: :configparser_ex, repo: "hexpm", optional: true]}, {:hackney, "~> 1.9", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:jsx, "~> 2.8", [hex: :jsx, repo: "hexpm", optional: true]}, {:sweet_xml, "~> 0.6", [hex: :sweet_xml, repo: "hexpm", optional: true]}], "hexpm", "0bdbe2aed9f326922fc5a6a80417e32f0c895f4b3b2b0b9676ebf23dd16c5da4"},
7-
"ex_doc": {:hex, :ex_doc, "0.20.2", "1bd0dfb0304bade58beb77f20f21ee3558cc3c753743ae0ddbb0fd7ba2912331", [:mix], [{:earmark, "~> 1.3", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.10", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm", "8e24fc8ff9a50b9f557ff020d6c91a03cded7e59ac3e0eec8a27e771430c7d27"},
8+
"ex_doc": {:hex, :ex_doc, "0.23.0", "a069bc9b0bf8efe323ecde8c0d62afc13d308b1fa3d228b65bca5cf8703a529d", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm", "f5e2c4702468b2fd11b10d39416ddadd2fcdd173ba2a0285ebd92c39827a5a16"},
89
"hackney": {:hex, :hackney, "1.16.0", "5096ac8e823e3a441477b2d187e30dd3fff1a82991a806b2003845ce72ce2d84", [:rebar3], [{:certifi, "2.5.2", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "6.0.1", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.3.0", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.6", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "3bf0bebbd5d3092a3543b783bf065165fa5d3ad4b899b836810e513064134e18"},
910
"idna": {:hex, :idna, "6.0.1", "1d038fb2e7668ce41fbf681d2c45902e52b3cb9e9c77b55334353b222c2ee50c", [:rebar3], [{:unicode_util_compat, "0.5.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "a02c8a1c4fd601215bb0b0324c8a6986749f807ce35f25449ec9e69758708122"},
1011
"jason": {:hex, :jason, "1.2.1", "12b22825e22f468c02eb3e4b9985f3d0cb8dc40b9bd704730efa11abd2708c44", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "b659b8571deedf60f79c5a608e15414085fa141344e2716fbd6988a084b5f993"},
11-
"makeup": {:hex, :makeup, "1.0.0", "671df94cf5a594b739ce03b0d0316aa64312cee2574b6a44becb83cd90fb05dc", [:mix], [{:nimble_parsec, "~> 0.5.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "a10c6eb62cca416019663129699769f0c2ccf39428b3bb3c0cb38c718a0c186d"},
12-
"makeup_elixir": {:hex, :makeup_elixir, "0.14.0", "cf8b7c66ad1cff4c14679698d532f0b5d45a3968ffbcbfd590339cb57742f1ae", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "d4b316c7222a85bbaa2fd7c6e90e37e953257ad196dc229505137c5e505e9eff"},
12+
"makeup": {:hex, :makeup, "1.0.5", "d5a830bc42c9800ce07dd97fa94669dfb93d3bf5fcf6ea7a0c67b2e0e4a7f26c", [:mix], [{:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cfa158c02d3f5c0c665d0af11512fed3fba0144cf1aadee0f2ce17747fba2ca9"},
13+
"makeup_elixir": {:hex, :makeup_elixir, "0.15.1", "b5888c880d17d1cc3e598f05cdb5b5a91b7b17ac4eaf5f297cb697663a1094dd", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.1", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "db68c173234b07ab2a07f645a5acdc117b9f99d69ebf521821d89690ae6c6ec8"},
1314
"metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"},
1415
"mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm", "f278585650aa581986264638ebf698f8bb19df297f66ad91b18910dfc6e19323"},
15-
"nimble_parsec": {:hex, :nimble_parsec, "0.5.0", "90e2eca3d0266e5c53f8fbe0079694740b9c91b6747f2b7e3c5d21966bba8300", [:mix], [], "hexpm", "5c040b8469c1ff1b10093d3186e2e10dbe483cd73d79ec017993fb3985b8a9b3"},
16+
"nimble_parsec": {:hex, :nimble_parsec, "1.1.0", "3a6fca1550363552e54c216debb6a9e95bd8d32348938e13de5eda962c0d7f89", [:mix], [], "hexpm", "08eb32d66b706e913ff748f11694b17981c0b04a33ef470e33e11b3d3ac8f54b"},
1617
"parse_trans": {:hex, :parse_trans, "3.3.0", "09765507a3c7590a784615cfd421d101aec25098d50b89d7aa1d66646bc571c1", [:rebar3], [], "hexpm", "17ef63abde837ad30680ea7f857dd9e7ced9476cdd7b0394432af4bfc241b960"},
1718
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"},
1819
"sweet_xml": {:hex, :sweet_xml, "0.6.6", "fc3e91ec5dd7c787b6195757fbcf0abc670cee1e4172687b45183032221b66b8", [:mix], [], "hexpm", "2e1ec458f892ffa81f9f8386e3f35a1af6db7a7a37748a64478f13163a1f3573"},

upgrade_guides/v3.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

upgrade_guides/v4.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)