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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f8f5c72fe30d17c5b7c2ae3aca6e6656d7ffe7328af4500a7bc05b768e4565e
4
- data.tar.gz: bc687948b0f47252b5bc1adb82e93de1799accc7cfd4ed7dbb553229f8e5a0d4
3
+ metadata.gz: 0fb8310726d92ea377d5be433f173207997ea6cc7e3a4a3faefe71b7de5b5df2
4
+ data.tar.gz: e75ceb99863c03bff3093983da87c83e79a02c8f1d74cc2ca6dd6c4755fd8404
5
5
  SHA512:
6
- metadata.gz: ae6541b60f172489bb74441ec17e2e47b8512793b3476b6dbcdd85db147437a23200817f8a78422a739043b3ebd824dfc8662bc5160058160579149bd1ffb840
7
- data.tar.gz: 7e09471906df9571caff5afb224d0231fa9b9fc177d0422fbaf2d81cd631958b8bfbb802ec221965140b0214152f561172614b37967b0ccc8742886e9ec16dc5
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.github.com/thoughtbot/factory_girl_rails/master/CONTRIBUTING.md
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://secure.travis-ci.org/nesquena/rabl.svg)](http://travis-ci.org/nesquena/rabl)
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.
@@ -1,3 +1,5 @@
1
+ require 'action_view'
2
+
1
3
  module Rabl
2
4
  class Digestor < ActionView::Digestor
3
5
  def self.digest(name, format, finder, options = {})
@@ -1,3 +1,5 @@
1
+ require 'action_view'
2
+
1
3
  module Rabl
2
4
  class Digestor < ActionView::Digestor
3
5
  def self.digest(options = {})
@@ -1,3 +1,5 @@
1
+ require 'action_view'
2
+
1
3
  module Rabl
2
4
  class Digestor < ActionView::Digestor
3
5
  end
data/lib/rabl/digestor.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'action_view'
2
+
1
3
  module Rabl
2
4
  class Digestor < ActionView::Digestor
3
5
  # Override the original digest function to ignore partial which
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 =~ /^[6]/
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 =~ /^[456]/
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 =~ /^[456]/
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 =~ /^[6]/
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
@@ -1,3 +1,3 @@
1
1
  module Rabl
2
- VERSION = "0.14.5"
2
+ VERSION = "0.15.0"
3
3
  end
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 =~ /^[456]/
21
- require 'rabl/digestor' if Rails.version =~ /^[456]/
22
- require 'rabl/railtie' if Rails.version =~ /^[3456]/
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.14.5
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-05-30 00:00:00.000000000 Z
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: 1.0.2
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: 1.0.2
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement