alba 3.3.1 → 3.3.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 +6 -0
- data/Gemfile +1 -1
- data/lib/alba/railtie.rb +2 -2
- data/lib/alba/version.rb +1 -1
- data/lib/alba.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61d5619d6222aee091fc2401da8a274a2d8aa5beebf3d8626f2bc82c6c24e89f
|
4
|
+
data.tar.gz: c6368081ef1701ec0d7444c9e544071d03ab5ae706fc344c9d52b027833efa4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d303cd41e825e8c9bbdfd9213d9e76b99969b348e1943ebee1deb2d9ee469338dcfcab5e5fb3661915f602e1e9bed532ac96add4a387e843e1e74f356e4aae1b
|
7
|
+
data.tar.gz: 73cc7d1b8236c33c4f3a24f633e7029ec59f288b57fe5668da1363c926ea0d87062170440b2aef3332ada59515b8c11c9548f195137ea63507ca06705ec9547a
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -11,7 +11,7 @@ gem 'ffaker', require: false # For testing
|
|
11
11
|
gem 'minitest', '~> 5.14' # For test
|
12
12
|
gem 'railties', require: false # For Rails integration testing
|
13
13
|
gem 'rake', '~> 13.0' # For test and automation
|
14
|
-
gem 'rubocop', '~> 1.
|
14
|
+
gem 'rubocop', '~> 1.67.0', require: false # For lint
|
15
15
|
gem 'rubocop-gem_dev', '>= 0.3.0', require: false # For lint
|
16
16
|
gem 'rubocop-md', '~> 1.0', require: false # For lint
|
17
17
|
gem 'rubocop-minitest', '~> 0.36.0', require: false # For lint
|
data/lib/alba/railtie.rb
CHANGED
@@ -7,11 +7,11 @@ module Alba
|
|
7
7
|
Alba.inflector = :active_support
|
8
8
|
|
9
9
|
ActiveSupport.on_load(:action_controller) do
|
10
|
-
|
10
|
+
define_method(:serialize) do |obj, with: nil, &block|
|
11
11
|
with.nil? ? Alba.resource_with(obj, &block) : with.new(obj)
|
12
12
|
end
|
13
13
|
|
14
|
-
|
14
|
+
define_method(:render_serialized_json) do |obj, with: nil, &block|
|
15
15
|
json = with.nil? ? Alba.resource_with(obj, &block) : with.new(obj)
|
16
16
|
render json: json
|
17
17
|
end
|
data/lib/alba/version.rb
CHANGED
data/lib/alba.rb
CHANGED
@@ -261,7 +261,7 @@ module Alba
|
|
261
261
|
inflector
|
262
262
|
end
|
263
263
|
|
264
|
-
def register_default_types # rubocop:disable
|
264
|
+
def register_default_types # rubocop:disable Metrics/AbcSize
|
265
265
|
[String, :String].each do |t|
|
266
266
|
register_type(t, check: ->(obj) { obj.is_a?(String) }, converter: lambda(&:to_s))
|
267
267
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alba
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OKURA Masafumi
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2024-10-
|
10
|
+
date: 2024-10-30 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: ostruct
|