mongoid-slug 7.0.0 → 7.1.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.
data/lib/mongoid_slug.rb CHANGED
@@ -1,4 +1,4 @@
1
- # frozen_string_literal: true
2
-
3
- # To be removed
4
- require 'mongoid/slug'
1
+ # frozen_string_literal: true
2
+
3
+ # To be removed
4
+ require 'mongoid/slug'
@@ -1,17 +1,17 @@
1
- # frozen_string_literal: true
2
-
3
- namespace :mongoid_slug do
4
- desc 'Goes though all documents and sets slug if not already set'
5
- task set: :environment do |_, args|
6
- Rails.application.eager_load! if defined?(Rails)
7
- klasses = Mongoid::Config.models.find_all { |c| c.ancestors.include?(Mongoid::Slug) }
8
- unless klasses.blank?
9
- models = args.extras
10
- klasses = (klasses.map(&:to_s) & models.map(&:classify)).map(&:constantize) if models.any?
11
- klasses.each do |klass|
12
- # set slug for objects having blank slug
13
- klass.each { |object| object.set_slug! unless object.slugs? && object.slugs.any? }
14
- end
15
- end
16
- end
17
- end
1
+ # frozen_string_literal: true
2
+
3
+ namespace :mongoid_slug do
4
+ desc 'Goes though all documents and sets slug if not already set'
5
+ task set: :environment do |_, args|
6
+ Rails.application.eager_load! if defined?(Rails)
7
+ klasses = Mongoid::Config.models.find_all { |c| c.ancestors.include?(Mongoid::Slug) }
8
+ unless klasses.blank?
9
+ models = args.extras
10
+ klasses = (klasses.map(&:to_s) & models.map(&:classify)).map(&:constantize) if models.any?
11
+ klasses.each do |klass|
12
+ # set slug for objects having blank slug
13
+ klass.each { |object| object.set_slug! unless object.slugs? && object.slugs.any? }
14
+ end
15
+ end
16
+ end
17
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-slug
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.0
4
+ version: 7.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Saebjoernsen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-18 00:00:00.000000000 Z
11
+ date: 2026-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
78
  requirements: []
79
- rubygems_version: 3.4.4
79
+ rubygems_version: 3.5.16
80
80
  signing_key:
81
81
  specification_version: 4
82
82
  summary: Mongoid URL slugs