locomotivecms_common 0.4.0 → 0.5.0

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
  SHA256:
3
- metadata.gz: e60e8fe99a67160258097c71ffdc854d008287c3766e6309147d0ca7363f072b
4
- data.tar.gz: 5f393e6984bc44d3c09a67c2161fdd232d68ce6f191b41a18aaa2d06837a4408
3
+ metadata.gz: ce0bf374953b9a32cb70be9b2a8960f07f5a8fda1ca03371d0f783a2f0526aab
4
+ data.tar.gz: f96763cc09155116c603f3ee4fc0e39cef3da5aca29a256e511fb127d0aca13a
5
5
  SHA512:
6
- metadata.gz: 553446bd8ffbb790f78ede298b02f2d1b4dbd96b5c55ac86986b1b319c1f41b11075abc0072b33ee595f5719ed076594b10de057ac0dae5174ac1b265e50b0a6
7
- data.tar.gz: 7b23faececa7fcccd280cad83dd2ab427f7ac974fd6d29726890b408bd2849b443009c2d8d5abbea4843b0b5dca24f303893611297243605a9dea177a783a9f5
6
+ metadata.gz: f7d809a104c5bca0266e8dcd692608beb8152506e03df95f92fc48c8cdc79e45eb9fc1ffce053a337be86ed9be437b3498ea247acae72c861cd3acfea0909349
7
+ data.tar.gz: c7d9e9862da7984a30fc0761c60282658746345280edfb0d805c2c71e24323c3f1cea824ff00c1c2c78f4f3976fb23a5d8d557833f84eefe132f311e629479be
data/Gemfile CHANGED
@@ -1,10 +1,17 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
5
+ platform :ruby do
6
+ ruby File.read('.ruby-version').strip
7
+ end
8
+
3
9
  # Specify your gem's dependencies in locomotivecms_common.gemspec
4
10
  gemspec
5
11
 
6
- group :test do
7
- gem 'rspec', '~> 3.7.0'
12
+ gem 'rubocop'
8
13
 
9
- gem 'coveralls', '~> 0.8.21', require: false
14
+ group :test do
15
+ gem 'coveralls', '~> 0.8.21', require: false
16
+ gem 'rspec', '~> 3.12.0'
10
17
  end
data/Gemfile.lock CHANGED
@@ -1,71 +1,99 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- locomotivecms_common (0.4.0)
5
- activesupport (>= 5.1.5, < 6.0)
6
- attr_extras (~> 5.2.0)
4
+ locomotivecms_common (0.5.0)
5
+ activesupport (>= 5)
6
+ attr_extras (~> 7.1.0)
7
7
  colorize
8
- stringex (~> 2.8.2)
8
+ stringex (~> 2.8.5)
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- activesupport (5.2.3)
13
+ activesupport (7.0.4.2)
14
14
  concurrent-ruby (~> 1.0, >= 1.0.2)
15
- i18n (>= 0.7, < 2)
16
- minitest (~> 5.1)
17
- tzinfo (~> 1.1)
18
- attr_extras (5.2.0)
15
+ i18n (>= 1.6, < 2)
16
+ minitest (>= 5.1)
17
+ tzinfo (~> 2.0)
18
+ ast (2.4.2)
19
+ attr_extras (7.1.0)
19
20
  colorize (0.8.1)
20
- concurrent-ruby (1.1.5)
21
+ concurrent-ruby (1.2.2)
21
22
  coveralls (0.8.23)
22
23
  json (>= 1.8, < 3)
23
24
  simplecov (~> 0.16.1)
24
25
  term-ansicolor (~> 1.3)
25
26
  thor (>= 0.19.4, < 2.0)
26
27
  tins (~> 1.6)
27
- diff-lcs (1.3)
28
- docile (1.3.2)
29
- i18n (1.7.0)
28
+ diff-lcs (1.5.0)
29
+ docile (1.4.0)
30
+ i18n (1.12.0)
30
31
  concurrent-ruby (~> 1.0)
31
- json (2.2.0)
32
- minitest (5.13.0)
33
- rake (13.0.1)
34
- rspec (3.7.0)
35
- rspec-core (~> 3.7.0)
36
- rspec-expectations (~> 3.7.0)
37
- rspec-mocks (~> 3.7.0)
38
- rspec-core (3.7.1)
39
- rspec-support (~> 3.7.0)
40
- rspec-expectations (3.7.0)
32
+ json (2.6.3)
33
+ minitest (5.17.0)
34
+ parallel (1.22.1)
35
+ parser (3.2.1.0)
36
+ ast (~> 2.4.1)
37
+ rainbow (3.1.1)
38
+ rake (13.0.6)
39
+ regexp_parser (2.7.0)
40
+ rexml (3.2.5)
41
+ rspec (3.12.0)
42
+ rspec-core (~> 3.12.0)
43
+ rspec-expectations (~> 3.12.0)
44
+ rspec-mocks (~> 3.12.0)
45
+ rspec-core (3.12.1)
46
+ rspec-support (~> 3.12.0)
47
+ rspec-expectations (3.12.2)
41
48
  diff-lcs (>= 1.2.0, < 2.0)
42
- rspec-support (~> 3.7.0)
43
- rspec-mocks (3.7.0)
49
+ rspec-support (~> 3.12.0)
50
+ rspec-mocks (3.12.3)
44
51
  diff-lcs (>= 1.2.0, < 2.0)
45
- rspec-support (~> 3.7.0)
46
- rspec-support (3.7.1)
52
+ rspec-support (~> 3.12.0)
53
+ rspec-support (3.12.0)
54
+ rubocop (1.46.0)
55
+ json (~> 2.3)
56
+ parallel (~> 1.10)
57
+ parser (>= 3.2.0.0)
58
+ rainbow (>= 2.2.2, < 4.0)
59
+ regexp_parser (>= 1.8, < 3.0)
60
+ rexml (>= 3.2.5, < 4.0)
61
+ rubocop-ast (>= 1.26.0, < 2.0)
62
+ ruby-progressbar (~> 1.7)
63
+ unicode-display_width (>= 2.4.0, < 3.0)
64
+ rubocop-ast (1.26.0)
65
+ parser (>= 3.2.1.0)
66
+ ruby-progressbar (1.11.0)
47
67
  simplecov (0.16.1)
48
68
  docile (~> 1.1)
49
69
  json (>= 1.8, < 3)
50
70
  simplecov-html (~> 0.10.0)
51
71
  simplecov-html (0.10.2)
52
72
  stringex (2.8.5)
73
+ sync (0.5.0)
53
74
  term-ansicolor (1.7.1)
54
75
  tins (~> 1.0)
55
- thor (0.20.3)
56
- thread_safe (0.3.6)
57
- tins (1.22.2)
58
- tzinfo (1.2.5)
59
- thread_safe (~> 0.1)
76
+ thor (1.2.1)
77
+ tins (1.32.1)
78
+ sync
79
+ tzinfo (2.0.6)
80
+ concurrent-ruby (~> 1.0)
81
+ unicode-display_width (2.4.2)
60
82
 
61
83
  PLATFORMS
62
84
  ruby
85
+ x86_64-darwin-21
86
+ x86_64-darwin-22
63
87
 
64
88
  DEPENDENCIES
65
89
  coveralls (~> 0.8.21)
66
90
  locomotivecms_common!
67
91
  rake (~> 13.0.1)
68
- rspec (~> 3.7.0)
92
+ rspec (~> 3.12.0)
93
+ rubocop
94
+
95
+ RUBY VERSION
96
+ ruby 2.7.4p191
69
97
 
70
98
  BUNDLED WITH
71
- 2.0.2
99
+ 2.3.10
data/MIT-LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2018 Joel AZEMAR, Arnaud Sellenet, NoCoffee
3
+ Copyright (c) 2023 Joel AZEMAR, Arnaud Sellenet, NoCoffee
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the "Software"), to deal in
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rubygems'
2
4
  require 'bundler/setup'
3
5
  require 'bundler/gem_tasks'
@@ -1,21 +1,19 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'attr_extras'
2
4
 
3
5
  # https://github.com/barsoom/attr_extras/issues/18
4
6
  module AttrExtrasExt
5
-
6
7
  def self.mixin
7
8
  self::Mixin
8
9
  end
9
10
 
10
11
  module Mixin
11
-
12
12
  def attr_accessor_initialize(*names, &block)
13
13
  attr_initialize(*names, &block)
14
14
  attr_accessor(*AttrExtras::Utils.flat_names(names))
15
15
  end
16
-
17
16
  end
18
-
19
17
  end
20
18
 
21
19
  class Module
@@ -1,6 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Locomotive
2
4
  module Common
3
-
4
5
  class Configuration
5
6
  attr_accessor :notifier
6
7
 
@@ -8,6 +9,5 @@ module Locomotive
8
9
  @notifier = Locomotive::Common::Notifier.new
9
10
  end
10
11
  end
11
-
12
12
  end
13
13
  end
@@ -1,3 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class FalseClass
2
- def to_bool() self ; end
4
+ def to_bool
5
+ self
6
+ end
3
7
  end
@@ -1,3 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class TrueClass
2
- def to_bool() self ; end
4
+ def to_bool
5
+ self
6
+ end
3
7
  end
@@ -1,8 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Big thanks to Tim Ruffles (https://github.com/timruffles)
2
4
  # https://gist.github.com/timruffles/2780508
3
5
  module HashConverter
4
6
  class << self
5
-
6
7
  def to_underscore(hash)
7
8
  convert(hash, :underscore)
8
9
  end
@@ -23,10 +24,9 @@ module HashConverter
23
24
  def convert(obj, *method)
24
25
  case obj
25
26
  when Hash
26
- obj.inject({}) do |h, (k,v)|
27
+ obj.each_with_object({}) do |(k, v), h|
27
28
  v = convert(v, *method)
28
29
  h[k.send(*method)] = v
29
- h
30
30
  end
31
31
  when Array
32
32
  obj.map { |m| convert(m, *method) }
@@ -34,6 +34,5 @@ module HashConverter
34
34
  obj
35
35
  end
36
36
  end
37
-
38
37
  end
39
38
  end
@@ -1,5 +1,6 @@
1
- module Kernel
1
+ # frozen_string_literal: true
2
2
 
3
+ module Kernel
3
4
  def require_relative_all(paths, sub = nil)
4
5
  main_path = File.dirname(caller.first.sub(/:\d+$/, ''))
5
6
  main_path = File.join(main_path, sub) if sub
@@ -8,7 +9,4 @@ module Kernel
8
9
  Dir[File.join(main_path, path, '*.rb')].each { |file| require file }
9
10
  end
10
11
  end
11
-
12
12
  end
13
-
14
-
@@ -1,13 +1,13 @@
1
+ # frozen_string_literal: true
2
+
1
3
  unless String.public_instance_methods.include?(:to_bool)
2
4
  class String
3
-
4
5
  def to_bool
5
6
  return true if self == true || self =~ (/(true|t|yes|y|1)$/i)
6
- return false if self == false || self.blank? || self =~ (/(false|f|no|n|0)$/i)
7
+ return false if self == false || blank? || self =~ (/(false|f|no|n|0)$/i)
7
8
 
8
- raise ArgumentError.new("invalid value for Boolean: \"#{self}\"")
9
+ raise ArgumentError, "invalid value for Boolean: \"#{self}\""
9
10
  end
10
-
11
11
  end
12
12
  end
13
13
 
@@ -15,23 +15,21 @@ unless String.public_instance_methods.include?(:permalink)
15
15
  require 'stringex'
16
16
 
17
17
  class String
18
-
19
18
  def permalink(underscore = false)
20
19
  # if the slug includes one "_" at least, we consider that the "_" is used instead of "-".
21
- _permalink = if !self.index('_').nil?
22
- self.to_url(replace_whitespace_with: '_')
23
- else
24
- self.to_url
25
- end
20
+ _permalink = if !index('_').nil?
21
+ to_url(replace_whitespace_with: '_')
22
+ else
23
+ to_url
24
+ end
26
25
 
27
26
  underscore ? _permalink.underscore : _permalink
28
27
  end
29
28
 
30
29
  def permalink!(underscore = false)
31
- replace(self.permalink(underscore))
30
+ replace(permalink(underscore))
32
31
  end
33
32
 
34
- alias :parameterize! :permalink!
35
-
33
+ alias parameterize! permalink!
36
34
  end
37
35
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'core_ext/hash'
2
4
  require_relative 'core_ext/string'
3
5
  require_relative 'core_ext/boolean/true'
@@ -1,24 +1,23 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Locomotive
2
4
  module Common
3
-
4
- class DefaultException < ::Exception
5
+ class DefaultException < StandardError
5
6
  attr_accessor :notifier
6
7
 
7
8
  def initialize(message = nil, parent_exception = nil)
8
9
  self.notifier = Locomotive::Common.configuration.notifier
9
- self.log_backtrace(parent_exception) if parent_exception
10
+ log_backtrace(parent_exception) if parent_exception
10
11
  super(message)
11
12
  init_plugins
12
13
  end
13
14
 
14
15
  def init_plugins
15
- begin
16
- @plugins = []
17
- ::Plugins.constants.each do |name|
18
- @plugins << ::Plugins.const_get(name).new(self)
19
- end
20
- rescue NameError
16
+ @plugins = []
17
+ ::Plugins.constants.each do |name|
18
+ @plugins << ::Plugins.const_get(name).new(self)
21
19
  end
20
+ rescue NameError
22
21
  end
23
22
 
24
23
  protected
@@ -36,20 +35,21 @@ module Locomotive
36
35
  attr_accessor :name, :template, :liquid_context
37
36
 
38
37
  def initialize(exception, name, template, liquid_context)
39
- self.name, self.template, self.liquid_context = name, template, liquid_context
40
- self.log_page_into_backtrace(exception)
38
+ self.name = name
39
+ self.template = template
40
+ self.liquid_context = liquid_context
41
+ log_page_into_backtrace(exception)
41
42
  super(exception.message)
42
- self.set_backtrace(exception.backtrace)
43
+ set_backtrace(exception.backtrace)
43
44
  end
44
45
 
45
46
  def log_page_into_backtrace(exception)
46
- line = self.template.line_offset
47
+ line = template.line_offset
47
48
  line += (exception.respond_to?(:line) ? exception.line || 0 : 0) + 1
48
- message = "#{self.template.filepath}:#{line}:in `#{self.name}'"
49
+ message = "#{template.filepath}:#{line}:in `#{name}'"
49
50
  notifier.fatal "[ERROR] #{exception.message} - #{message}\n".red
50
51
  exception.backtrace.unshift message
51
52
  end
52
53
  end
53
-
54
54
  end
55
55
  end
@@ -1,10 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'colorize'
2
4
 
3
5
  module Locomotive
4
6
  module Common
5
-
6
7
  class Logger
7
-
8
8
  attr_accessor :logger
9
9
 
10
10
  def initialize
@@ -19,45 +19,41 @@ module Locomotive
19
19
  def setup(log_file_full_path = nil)
20
20
  require 'logger'
21
21
 
22
- output = begin
23
- if log_file_full_path
24
- log_file_path log_file_full_path
25
- else
26
- STDOUT
27
- end
28
- end
22
+ output = if log_file_full_path
23
+ log_file_path log_file_full_path
24
+ else
25
+ $stdout
26
+ end
29
27
 
30
28
  self.logger = ::Logger.new(output).tap do |log|
31
29
  log.level = ::Logger::DEBUG
32
- log.formatter = proc do |severity, datetime, progname, msg|
30
+ log.formatter = proc do |_severity, _datetime, _progname, msg|
33
31
  "#{msg}\n"
34
32
  end
35
33
  end
36
34
  end
37
35
 
38
36
  def self.instance
39
- @@instance ||= self.new
37
+ @@instance ||= new
40
38
  end
41
39
 
42
40
  def self.setup(*args)
43
41
  if args.size > 1
44
- puts "[DEPRECATION] Logger.setup(path, stdout=false) is deprecated. " \
45
- "Please use Logger.setup(log_file_full_path) instead, " \
46
- "like: /home/locomotivecms/log/server.log"
42
+ puts '[DEPRECATION] Logger.setup(path, stdout=false) is deprecated. ' \
43
+ 'Please use Logger.setup(log_file_full_path) instead, ' \
44
+ 'like: /home/locomotivecms/log/server.log'
47
45
  end
48
- self.instance.setup args.first
46
+ instance.setup args.first
49
47
  end
50
48
 
51
49
  def self.close
52
- self.instance.logger.close
50
+ instance.logger.close
53
51
  end
54
52
 
55
53
  class << self
56
- %w(debug info warn error fatal unknown).each do |name|
54
+ %w[debug info warn error fatal unknown].each do |name|
57
55
  define_method(name) do |message|
58
- if self.instance.logger
59
- self.instance.logger.send(name.to_sym, message)
60
- end
56
+ instance.logger&.send(name.to_sym, message)
61
57
  end
62
58
  end
63
59
  end
@@ -66,7 +62,7 @@ module Locomotive
66
62
 
67
63
  def log_file_path(log_file_full_path)
68
64
  if File.directory? log_file_full_path
69
- puts "[DEPRECATION] Please use fully log file path like: /home/locomotivecms/log/server.log"
65
+ puts '[DEPRECATION] Please use fully log file path like: /home/locomotivecms/log/server.log'
70
66
  File.expand_path(File.join(log_file_full_path, 'log', 'locomotivecms.log'))
71
67
  else
72
68
  log_file_full_path
@@ -1,11 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Locomotive
2
4
  module Common
3
-
4
5
  class Notifier
5
- def method_missing method, *args
6
+ def method_missing _method, *_args
6
7
  nil
7
8
  end
8
9
  end
9
-
10
10
  end
11
- end
11
+ end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # # Sample
2
3
  #
3
4
  # module Plugins
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Locomotive
2
4
  module Common
3
- VERSION = '0.4.0'
5
+ VERSION = '0.5.0'
4
6
  end
5
7
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'common/version'
2
4
  require_relative 'common/core_ext'
3
5
  require_relative 'common/attr_extras_ext'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'lib/locomotive/common/version'
2
4
 
3
5
  Gem::Specification.new do |spec|
@@ -5,23 +7,23 @@ Gem::Specification.new do |spec|
5
7
  spec.version = Locomotive::Common::VERSION
6
8
  spec.authors = ['Didier Lafforgue', 'Arnaud Sellenet', 'Joel Azemar']
7
9
  spec.email = ['didier@nocoffee.fr', 'arnaud@sellenet.fr', 'joel.azemar@gmail.com']
8
- spec.description = %q{The LocomotiveCMS Common is a shared libraries package}
9
- spec.summary = %q{The LocomotiveCMS Common is a shared libraries package for all LocomotiveCMS dependencies}
10
+ spec.description = 'The LocomotiveCMS Common is a shared libraries package'
11
+ spec.summary = 'The LocomotiveCMS Common is a shared libraries package for all LocomotiveCMS dependencies'
10
12
  spec.homepage = 'http://www.locomotivecms.com'
11
13
  spec.homepage = 'https://github.com/locomotivecms/common'
12
14
  spec.license = 'MIT'
13
15
 
14
- spec.files = `git ls-files`.split($/)
16
+ spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
15
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
16
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
19
  spec.require_paths = ['lib']
18
20
 
19
21
  spec.add_development_dependency 'rake', '~> 13.0.1'
20
22
 
21
- spec.add_dependency 'activesupport', '>= 5.1.5', '< 6.0'
22
- spec.add_dependency 'stringex', '~> 2.8.2'
23
- spec.add_dependency 'attr_extras', '~> 5.2.0'
23
+ spec.add_dependency 'activesupport', '>= 5'
24
+ spec.add_dependency 'attr_extras', '~> 7.1.0'
24
25
  spec.add_dependency 'colorize'
26
+ spec.add_dependency 'stringex', '~> 2.8.5'
25
27
 
26
- spec.required_ruby_version = '~> 2.0'
28
+ spec.required_ruby_version = ['>= 2.7']
27
29
  end
@@ -1,11 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Locomotive::Common::DefaultException do
4
-
5
6
  specify do
6
7
  expect do
7
- raise Locomotive::Common::DefaultException.new
8
+ raise Locomotive::Common::DefaultException
8
9
  end.to raise_error(Locomotive::Common::DefaultException)
9
10
  end
10
-
11
- end
11
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'simplecov'
2
4
  require 'coveralls'
3
5
 
@@ -1,25 +1,21 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe AttrExtrasExt do
4
-
5
6
  subject { Person.new('Hank', 'Moody') }
6
7
 
7
8
  describe 'reader' do
8
-
9
9
  it { expect(subject.first_name).to eq 'Hank' }
10
10
  it { expect(subject.last_name).to eq 'Moody' }
11
-
12
11
  end
13
12
 
14
13
  describe 'writer' do
15
-
16
14
  before { subject.first_name = 'Karen' }
17
15
 
18
16
  it { expect(subject.first_name).to eq 'Karen' }
19
-
20
17
  end
21
18
 
22
-
23
19
  class Person
24
20
  attr_accessor_initialize :first_name, :last_name
25
21
  end
@@ -1,44 +1,36 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe String do
4
-
5
6
  describe '#permalink!' do
6
-
7
- let(:string) { 'foo bar' }
7
+ let(:string) { 'foo bar'.dup }
8
8
 
9
9
  before { string.permalink! }
10
10
 
11
11
  it { expect(string).to eq 'foo-bar' }
12
-
13
12
  end
14
13
 
15
14
  describe '#to_bool' do
16
-
17
15
  subject { string.to_bool }
18
16
 
19
17
  describe 'true values' do
20
-
21
- %w(true t yes y 1).each do |val|
18
+ %w[true t yes y 1].each do |val|
22
19
  let(:string) { val }
23
20
  it { is_expected.to eq true }
24
21
  end
25
-
26
22
  end
27
23
 
28
24
  describe 'false values' do
29
-
30
- (%w(false f no n 0) + ['']).each do |val|
25
+ (%w[false f no n 0] + ['']).each do |val|
31
26
  let(:string) { val }
32
27
  it { is_expected.to eq false }
33
28
  end
34
-
35
29
  end
36
30
 
37
31
  describe 'no truthy or falsy' do
38
32
  let(:string) { 'foo' }
39
33
  it { expect { subject }.to raise_error(%(invalid value for Boolean: "foo")) }
40
34
  end
41
-
42
35
  end
43
-
44
36
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locomotivecms_common
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Didier Lafforgue
8
8
  - Arnaud Sellenet
9
9
  - Joel Azemar
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-11-20 00:00:00.000000000 Z
13
+ date: 2023-03-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake
@@ -32,62 +32,56 @@ dependencies:
32
32
  requirements:
33
33
  - - ">="
34
34
  - !ruby/object:Gem::Version
35
- version: 5.1.5
36
- - - "<"
37
- - !ruby/object:Gem::Version
38
- version: '6.0'
35
+ version: '5'
39
36
  type: :runtime
40
37
  prerelease: false
41
38
  version_requirements: !ruby/object:Gem::Requirement
42
39
  requirements:
43
40
  - - ">="
44
41
  - !ruby/object:Gem::Version
45
- version: 5.1.5
46
- - - "<"
47
- - !ruby/object:Gem::Version
48
- version: '6.0'
42
+ version: '5'
49
43
  - !ruby/object:Gem::Dependency
50
- name: stringex
44
+ name: attr_extras
51
45
  requirement: !ruby/object:Gem::Requirement
52
46
  requirements:
53
47
  - - "~>"
54
48
  - !ruby/object:Gem::Version
55
- version: 2.8.2
49
+ version: 7.1.0
56
50
  type: :runtime
57
51
  prerelease: false
58
52
  version_requirements: !ruby/object:Gem::Requirement
59
53
  requirements:
60
54
  - - "~>"
61
55
  - !ruby/object:Gem::Version
62
- version: 2.8.2
56
+ version: 7.1.0
63
57
  - !ruby/object:Gem::Dependency
64
- name: attr_extras
58
+ name: colorize
65
59
  requirement: !ruby/object:Gem::Requirement
66
60
  requirements:
67
- - - "~>"
61
+ - - ">="
68
62
  - !ruby/object:Gem::Version
69
- version: 5.2.0
63
+ version: '0'
70
64
  type: :runtime
71
65
  prerelease: false
72
66
  version_requirements: !ruby/object:Gem::Requirement
73
67
  requirements:
74
- - - "~>"
68
+ - - ">="
75
69
  - !ruby/object:Gem::Version
76
- version: 5.2.0
70
+ version: '0'
77
71
  - !ruby/object:Gem::Dependency
78
- name: colorize
72
+ name: stringex
79
73
  requirement: !ruby/object:Gem::Requirement
80
74
  requirements:
81
- - - ">="
75
+ - - "~>"
82
76
  - !ruby/object:Gem::Version
83
- version: '0'
77
+ version: 2.8.5
84
78
  type: :runtime
85
79
  prerelease: false
86
80
  version_requirements: !ruby/object:Gem::Requirement
87
81
  requirements:
88
- - - ">="
82
+ - - "~>"
89
83
  - !ruby/object:Gem::Version
90
- version: '0'
84
+ version: 2.8.5
91
85
  description: The LocomotiveCMS Common is a shared libraries package
92
86
  email:
93
87
  - didier@nocoffee.fr
@@ -128,24 +122,23 @@ homepage: https://github.com/locomotivecms/common
128
122
  licenses:
129
123
  - MIT
130
124
  metadata: {}
131
- post_install_message:
125
+ post_install_message:
132
126
  rdoc_options: []
133
127
  require_paths:
134
128
  - lib
135
129
  required_ruby_version: !ruby/object:Gem::Requirement
136
130
  requirements:
137
- - - "~>"
131
+ - - ">="
138
132
  - !ruby/object:Gem::Version
139
- version: '2.0'
133
+ version: '2.7'
140
134
  required_rubygems_version: !ruby/object:Gem::Requirement
141
135
  requirements:
142
136
  - - ">="
143
137
  - !ruby/object:Gem::Version
144
138
  version: '0'
145
139
  requirements: []
146
- rubyforge_project:
147
- rubygems_version: 2.7.3
148
- signing_key:
140
+ rubygems_version: 3.1.6
141
+ signing_key:
149
142
  specification_version: 4
150
143
  summary: The LocomotiveCMS Common is a shared libraries package for all LocomotiveCMS
151
144
  dependencies