typelizer 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +3 -3
- data/lib/typelizer/generator.rb +1 -1
- 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: 65dd6e8b799965363d44992335ce8e1b5c2d0f18250baa64d4a5068e534cacc5
|
4
|
+
data.tar.gz: 6d1f61eaa776bf58de372516d10ac719e6788beec35fd42448a0f0888a2fc5df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a87108460c0326c5f6696207a083d1cf9b542da1c1c264f9a894af8297f0b8bae97e0e17b251e895a58c74c415576cc5224c8c6b76fa4465d65257bb081c3d0b
|
7
|
+
data.tar.gz: 87878d14c898d778a0e00d675d2658d6770295d992f96fcc20ec5efc933f8d4a5895ecc7aec97b369d0a51229a4cd06762bf283c0a085e28cb334210762c9236
|
data/CHANGELOG.md
CHANGED
@@ -7,13 +7,21 @@ and this project adheres to [Semantic Versioning].
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.1.1] - 2024-08-26
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
|
14
|
+
- Failing method inspection ([@skryukov], [@davidrunger])
|
15
|
+
|
10
16
|
## [0.1.0] - 2024-08-02
|
11
17
|
|
12
18
|
- Initial release ([@skryukov])
|
13
19
|
|
20
|
+
[@davidrunger]: https://github.com/davidrunger
|
14
21
|
[@skryukov]: https://github.com/skryukov
|
15
22
|
|
16
23
|
[Unreleased]: https://github.com/skryukov/typelizer/compare/v0.1.0...HEAD
|
24
|
+
[0.1.1]: https://github.com/skryukov/typelizer/compare/v0.1.0...v0.1.1
|
17
25
|
[0.1.0]: https://github.com/skryukov/typelizer/commits/v0.1.0
|
18
26
|
|
19
27
|
[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.1
|
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-08-
|
11
|
+
date: 2024-08-26 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.
|