liquidize 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7588d0c8fa7b57e0147975dd777589b3b4902b04
4
- data.tar.gz: 7231948f6a368e575bcd45fcfeb73e82e8244bde
3
+ metadata.gz: fb3f0c969abfa195f84ae174743a95e18a36b09f
4
+ data.tar.gz: 6c55ceeb07e71fa0dc664e34168a12fb5df71d36
5
5
  SHA512:
6
- metadata.gz: d6eb61967fbe68a16086b4f28ac55b72f23d5d7d791005b43b323890135c0ab231530abda1172fb7fdf0b958572141e5de27cb31120ddbf39c90228908c31edb
7
- data.tar.gz: d1d9ab17e0885be471b8faaa94995092f78077e0b20b03e59877beaf647603c939cd663d5dfde496bedefb4141f8713fddc632cee3766c3fcc01bdadb6bf83f7
6
+ metadata.gz: 5460dbf33d9c11bc97f373ff55d7a79117e68d72c21f31e0e9e6b84f0a511a6fdf972943d7282671f9e3328409b63c9f850e43f95b70523dd14927f225eb46dd
7
+ data.tar.gz: ef8ace4178c83c7f17baf530241fce658781f8be6f0f68b2bc500852d27aa87f6702caabe4db18a2bddac24563e51651c50d0ed0dfe8d2ba10b57e9918c569f9
@@ -11,6 +11,10 @@ Metrics/LineLength:
11
11
  - liquidize.gemspec
12
12
  - spec/**/*
13
13
 
14
+ Metrics/BlockLength:
15
+ Exclude:
16
+ - spec/**/*
17
+
14
18
  Metrics/MethodLength:
15
19
  Exclude:
16
20
  - lib/liquidize/model.rb
@@ -1 +1 @@
1
- 2.3.1
1
+ 2.4.0
@@ -4,7 +4,8 @@ rvm:
4
4
  - 2.0.0
5
5
  - 2.1.0
6
6
  - 2.2.2
7
- - 2.3.0
7
+ - 2.3.5
8
+ - 2.4.0
8
9
  - ruby-head
9
10
 
10
11
  gemfile:
data/Appraisals CHANGED
@@ -1,7 +1,7 @@
1
1
  appraise '4.2' do
2
- gem 'rails', '~> 4.2.0'
2
+ gem 'rails', '~> 4.2.10'
3
3
  end
4
4
 
5
5
  appraise '5.0' do
6
- gem 'rails', '~> 5.0.0'
6
+ gem 'rails', '~> 5.0.6'
7
7
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 4.2.0"
5
+ gem "rails", "~> 4.2.10"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 5.0.0"
5
+ gem "rails", "~> 5.0.6"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -6,7 +6,7 @@ module Liquidize
6
6
  def self.recursive_stringify_keys(options)
7
7
  if options.is_a?(Hash)
8
8
  options.stringify_keys!
9
- options.each { |_k, v| recursive_stringify_keys(v) }
9
+ options.each_value { |v| recursive_stringify_keys(v) }
10
10
  elsif options.is_a?(Array)
11
11
  options.map! { |a| recursive_stringify_keys(a) }
12
12
  end
@@ -23,9 +23,12 @@ module Liquidize
23
23
  # Decodes dump into the Ruby object
24
24
  # @param dump [String] encoded dump
25
25
  # @return [Object] decoded object
26
+ # @todo Find better alternative to Marshal.load
27
+ # rubocop:disable Security/MarshalLoad
26
28
  def self.decode(dump)
27
29
  Marshal.load(Base64.strict_decode64(dump))
28
30
  end
31
+ # rubocop:enable
29
32
 
30
33
  # Analogue of the ActiveSupport #present? method
31
34
  # @param value [Object] value that should be checked
@@ -16,7 +16,7 @@ module Liquidize
16
16
  override_setter(attribute)
17
17
  return unless Liquidize::Helper.activerecord?(self)
18
18
  define_validator(attribute)
19
- validate "validate_#{attribute}_liquid_syntax"
19
+ validate :"validate_#{attribute}_liquid_syntax"
20
20
  end
21
21
 
22
22
  private
@@ -1,3 +1,3 @@
1
1
  module Liquidize
2
- VERSION = '0.0.3'.freeze
2
+ VERSION = '0.0.4'.freeze
3
3
  end
@@ -1,4 +1,3 @@
1
- # coding: utf-8
2
1
  lib = File.expand_path('../lib', __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'liquidize/version'
@@ -83,7 +83,7 @@ RSpec.describe Liquidize::Model do
83
83
 
84
84
  it 'does not set @*_syntax_error instance variable with valid body' do
85
85
  page.instance_variable_set(:@body_syntax_error, nil) # prevent warning
86
- expect { page.body = valid_body }.not_to change { page.instance_variable_get(:@body_syntax_error) }
86
+ expect { page.body = valid_body }.not_to(change { page.instance_variable_get(:@body_syntax_error) })
87
87
  end
88
88
 
89
89
  it 'sets @*_syntax_error instance variable with invalid body' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liquidize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Borovykh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-28 00:00:00.000000000 Z
11
+ date: 2017-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: liquid
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
214
214
  version: '0'
215
215
  requirements: []
216
216
  rubyforge_project:
217
- rubygems_version: 2.6.4
217
+ rubygems_version: 2.6.14
218
218
  signing_key:
219
219
  specification_version: 4
220
220
  summary: Ruby library that adds Liquid template language support to your project.