typelizer 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -1
- data/README.md +3 -3
- data/lib/typelizer/generator.rb +1 -1
- data/lib/typelizer/serializer_plugins/alba.rb +2 -0
- data/lib/typelizer/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d728a2d15357f1cd3316c78dde5407a130c26e80cfc8e4e706cfa3836ef4d650
|
4
|
+
data.tar.gz: f3f4c3b3420da55c4c2a671a85b9a03d06cf02a09a1df63578c4df0f91a4ea75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1adc62cf80343300db84b62a34e13fb0f6bf5b6749a3940f34c56463054b0f4b50727ce946fcecff3fd05584ba3d45c0cd94ac77b733a6cdb676381b7163716
|
7
|
+
data.tar.gz: a7e6101a95798e1a1f5522b096fec15e966cfd3f354004c32d83702ea7cea230b06185df2180226d5b93325de51414f03d59cb05caba880dd9cd72ad87473b9e
|
data/CHANGELOG.md
CHANGED
@@ -7,13 +7,29 @@ and this project adheres to [Semantic Versioning].
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.1.2] - 2024-09-05
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
|
14
|
+
- Prevent Alba's `meta nil` raising an error ([@okuramasafumi])
|
15
|
+
|
16
|
+
## [0.1.1] - 2024-08-26
|
17
|
+
|
18
|
+
### Fixed
|
19
|
+
|
20
|
+
- Failing method inspection ([@skryukov], [@davidrunger])
|
21
|
+
|
10
22
|
## [0.1.0] - 2024-08-02
|
11
23
|
|
12
24
|
- Initial release ([@skryukov])
|
13
25
|
|
26
|
+
[@davidrunger]: https://github.com/davidrunger
|
27
|
+
[@okuramasafumi]: https://github.com/@okuramasafumi
|
14
28
|
[@skryukov]: https://github.com/skryukov
|
15
29
|
|
16
|
-
[Unreleased]: https://github.com/skryukov/typelizer/compare/v0.1.
|
30
|
+
[Unreleased]: https://github.com/skryukov/typelizer/compare/v0.1.2...HEAD
|
31
|
+
[0.1.2]: https://github.com/skryukov/typelizer/compare/v0.1.1...v0.1.2
|
32
|
+
[0.1.1]: https://github.com/skryukov/typelizer/compare/v0.1.0...v0.1.1
|
17
33
|
[0.1.0]: https://github.com/skryukov/typelizer/commits/v0.1.0
|
18
34
|
|
19
35
|
[Keep a Changelog]: https://keepachangelog.com/en/1.0.0/
|
data/README.md
CHANGED
@@ -47,20 +47,20 @@ Include the Typelizer DSL in your serializers:
|
|
47
47
|
|
48
48
|
```ruby
|
49
49
|
class ApplicationResource
|
50
|
-
include Alba::Resource
|
50
|
+
include Alba::Resource
|
51
51
|
include Typelizer::DSL
|
52
52
|
end
|
53
53
|
|
54
54
|
class PostResource < ApplicationResource
|
55
55
|
attributes :id, :title, :body
|
56
|
-
|
56
|
+
|
57
57
|
has_one :author, serializer: AuthorResource
|
58
58
|
end
|
59
59
|
|
60
60
|
class AuthorResource < ApplicationResource
|
61
61
|
# specify the model to infer types from (optional)
|
62
62
|
typelize_from User
|
63
|
-
|
63
|
+
|
64
64
|
attributes :id, :name
|
65
65
|
end
|
66
66
|
```
|
data/lib/typelizer/generator.rb
CHANGED
@@ -43,7 +43,7 @@ module Typelizer
|
|
43
43
|
files.each do |file|
|
44
44
|
trace = TracePoint.new(:call) do |tp|
|
45
45
|
begin
|
46
|
-
next unless tp.self.
|
46
|
+
next unless tp.self.methods.include?(:typelizer_interface)
|
47
47
|
rescue WeakRef::RefError
|
48
48
|
next
|
49
49
|
end
|
data/lib/typelizer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: typelizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Svyatoslav Kryukov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: '0'
|
80
80
|
requirements: []
|
81
|
-
rubygems_version: 3.5.
|
81
|
+
rubygems_version: 3.5.17
|
82
82
|
signing_key:
|
83
83
|
specification_version: 4
|
84
84
|
summary: A TypeScript type generator for Ruby serializers.
|