enu 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +1 -1
- data/README.md +3 -3
- data/lib/enu/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 45d7a036696e96aa15c4fff007a32ef92d9604b2489c06b32ec494dbee96b572
|
|
4
|
+
data.tar.gz: a0b392a8af40bbeef0d01c60cb79a272878f4222b32fb82183aa106d8dc08956
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 18cd7cc7cce19bf4e4a62c907a9b2b20a72ad82951b9ffbf46210e2a6499906a7c40c440eaae98c7083b6b3438eb171d426a366c93855be19c9f146c112ad483
|
|
7
|
+
data.tar.gz: 1328ad4cbd3d2e5e54f0d597fa761c3930db36cbcdd2aec6d91d02ce618fe6e0c4a5853bd178a22a6c7d680d9d1e7b6ef2e71b19057ec1f0403e679a0ad5a2ea
|
data/CHANGELOG.md
CHANGED
|
@@ -3,3 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
[0.1.2] - 2019-08-09
|
|
8
|
+
|
|
9
|
+
- Add an ability to export enum type definitions to JavaScript. Supporting Webpack and Rails Asset Pipeline.
|
|
10
|
+
- Documentation improvements.
|
|
11
|
+
|
|
12
|
+
[0.1.0] - 2019-08-01
|
|
13
|
+
|
|
14
|
+
- First public release.
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Purpose and features:
|
|
|
7
7
|
- Unify enum types definition for Rails model attributes, compatible with ActiveRecord's [enum declarations](https://edgeapi.rubyonrails.org/classes/ActiveRecord/Enum.html).
|
|
8
8
|
- Use structured constants instead of magic strings or numbers to address enum values.
|
|
9
9
|
- Keep track on enum references to simplify refactoring and codebase navigation.
|
|
10
|
-
- Provide a standardized way to export enum definitions to client-side JavaScript modules, managed by either Webpack or Rails
|
|
10
|
+
- Provide a standardized way to export enum definitions to client-side JavaScript modules, managed by either Webpack or Rails Asset Pipeline.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
@@ -258,7 +258,7 @@ Spring stopped.
|
|
|
258
258
|
|
|
259
259
|
### Export enum definition to JavaScript
|
|
260
260
|
|
|
261
|
-
Sometimes it is necessary to use same enum values on the client
|
|
261
|
+
Sometimes it is necessary to use the same enum values on the client-side, for instance, when you receive data object serializations from API. In this case, it is possible to share your enum type definition with JavaScript code.
|
|
262
262
|
|
|
263
263
|
#### Webpack
|
|
264
264
|
|
|
@@ -293,7 +293,7 @@ postStatus.draft // => "draft"
|
|
|
293
293
|
|
|
294
294
|
`Object.freeze()` call in the example above will prevent accidental change of the `postStatus` values. It is optional, though.
|
|
295
295
|
|
|
296
|
-
#### Rails
|
|
296
|
+
#### Rails Asset Pipeline
|
|
297
297
|
|
|
298
298
|
Same idea:
|
|
299
299
|
|
data/lib/enu/version.rb
CHANGED