rabl 0.14.5 → 0.15.0
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/CONTRIBUTING.md +1 -1
- data/README.md +1 -1
- data/lib/rabl/digestor/rails3.rb +2 -0
- data/lib/rabl/digestor/rails41.rb +2 -0
- data/lib/rabl/digestor/rails5.rb +2 -0
- data/lib/rabl/digestor.rb +2 -0
- data/lib/rabl/engine.rb +2 -2
- data/lib/rabl/railtie.rb +1 -1
- data/lib/rabl/template.rb +2 -2
- data/lib/rabl/version.rb +1 -1
- data/lib/rabl.rb +3 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fb8310726d92ea377d5be433f173207997ea6cc7e3a4a3faefe71b7de5b5df2
|
4
|
+
data.tar.gz: e75ceb99863c03bff3093983da87c83e79a02c8f1d74cc2ca6dd6c4755fd8404
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fc9988668325cc4dd12e75a774d14f6be984a83d2ed043712536d3753d6ae70b71d09d6784120f82b2c75809ed8d446c1965e56fcac1ddbc9c4bace259fc342
|
7
|
+
data.tar.gz: 58a0105a9fdf9e016ddee845ca3a4fde7fb0944a1792230f878ce380d2b9778e8d82da3722ba89d1702442e3d539c4db071ff56e201f596625d12f9ffaa90585
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 0.15.0 (December 30, 2021)
|
4
|
+
|
5
|
+
* Support for Rails 7 (@tagliala)
|
6
|
+
* Improvements to unit testing
|
7
|
+
* Miscellanious other bug fixes
|
8
|
+
|
3
9
|
## 0.14.5 (May 29th, 2021)
|
4
10
|
|
5
11
|
* Restrict and validate the `to_***` methods available within engine (Brian McFadden)
|
data/CONTRIBUTING.md
CHANGED
@@ -34,4 +34,4 @@ Syntax:
|
|
34
34
|
|
35
35
|
And in case we didn't emphasize it enough: we love tests!
|
36
36
|
|
37
|
-
NOTE: Adapted from https://raw.
|
37
|
+
NOTE: Adapted from https://raw.githubusercontent.com/thoughtbot/factory_bot_rails/main/CONTRIBUTING.md
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# RABL #
|
2
2
|
|
3
|
-
[![Continuous Integration status](https://
|
3
|
+
[![Continuous Integration status](https://github.com/nesquena/rabl/actions/workflows/ci.yml/badge.svg)](https://github.com/nesquena/rabl/actions)
|
4
4
|
[![Code Climate](https://codeclimate.com/github/nesquena/rabl.svg)](https://codeclimate.com/github/nesquena/rabl)
|
5
5
|
|
6
6
|
RABL (Ruby API Builder Language) is a Rails and [Padrino](http://padrinorb.com) ruby templating system for generating JSON, XML, MessagePack, PList and BSON.
|
data/lib/rabl/digestor/rails3.rb
CHANGED
data/lib/rabl/digestor/rails5.rb
CHANGED
data/lib/rabl/digestor.rb
CHANGED
data/lib/rabl/engine.rb
CHANGED
@@ -62,7 +62,7 @@ module Rabl
|
|
62
62
|
template = @_options[:template] || @virtual_path
|
63
63
|
|
64
64
|
digest =
|
65
|
-
if Rails.version.to_s =~ /^[
|
65
|
+
if Rails.version.to_s =~ /^[67]/
|
66
66
|
Digestor.digest(name: template, finder: lookup_context, format: :rabl)
|
67
67
|
elsif Gem::Version.new(Rails.version) >= Gem::Version.new('4.1')
|
68
68
|
Digestor.digest(:name => template, :finder => lookup_context)
|
@@ -393,7 +393,7 @@ module Rabl
|
|
393
393
|
end
|
394
394
|
|
395
395
|
def digestor_available?
|
396
|
-
defined?(Rails) && Rails.version =~ /^[
|
396
|
+
defined?(Rails) && Rails.version =~ /^[4567]/
|
397
397
|
end
|
398
398
|
|
399
399
|
def valid_format?(format)
|
data/lib/rabl/railtie.rb
CHANGED
@@ -22,7 +22,7 @@ module Rabl
|
|
22
22
|
Rabl.register!
|
23
23
|
|
24
24
|
# Inject dependency tracker for :rabl
|
25
|
-
if Rails.version =~ /^[
|
25
|
+
if Rails.version =~ /^[4567]/
|
26
26
|
require 'action_view/dependency_tracker'
|
27
27
|
ActionView::DependencyTracker.register_tracker :rabl, Rabl::Tracker
|
28
28
|
end
|
data/lib/rabl/template.rb
CHANGED
@@ -62,8 +62,8 @@ if defined?(ActionView) && defined?(Rails) && Rails.respond_to?(:version) && Rai
|
|
62
62
|
ActionView::Template.register_template_handler :rabl, ActionView::Template::Handlers::Rabl
|
63
63
|
end
|
64
64
|
|
65
|
-
# Rails 6.X Template
|
66
|
-
if defined?(ActionView) && defined?(Rails) && Rails.respond_to?(:version) && Rails.version.to_s =~ /^[
|
65
|
+
# Rails 6.X / 7.X Template
|
66
|
+
if defined?(ActionView) && defined?(Rails) && Rails.respond_to?(:version) && Rails.version.to_s =~ /^[67]/
|
67
67
|
module ActionView
|
68
68
|
module Template::Handlers
|
69
69
|
class Rabl
|
data/lib/rabl/version.rb
CHANGED
data/lib/rabl.rb
CHANGED
@@ -17,9 +17,9 @@ require 'rabl/renderer'
|
|
17
17
|
require 'rabl/cache_engine'
|
18
18
|
|
19
19
|
if defined?(Rails) && Rails.respond_to?(:version)
|
20
|
-
require 'rabl/tracker' if Rails.version =~ /^[
|
21
|
-
require 'rabl/digestor' if Rails.version =~ /^[
|
22
|
-
require 'rabl/railtie' if Rails.version =~ /^[
|
20
|
+
require 'rabl/tracker' if Rails.version =~ /^[4567]/
|
21
|
+
require 'rabl/digestor' if Rails.version =~ /^[4567]/
|
22
|
+
require 'rabl/railtie' if Rails.version =~ /^[34567]/
|
23
23
|
end
|
24
24
|
|
25
25
|
# Rabl.register!
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rabl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Esquenazi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: rr
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|