sluggi 1.3.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/sluggi/history.rb +4 -4
- data/lib/sluggi/model.rb +2 -2
- data/lib/sluggi/version.rb +1 -1
- metadata +14 -56
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1e05dc6da17b7af7ac48f24f1ceeb086da1151da44327d724e76f694ef02b2b
|
4
|
+
data.tar.gz: 1fe64d38ba6211a4438eb283c89a778b234f977d8cbac76954be1b6ccb929800
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5783c24559ec5c4a88ed7f766f396531fc75da37f78a3f599bf7a56c509b844beae44128bfdabe4b3df06669a1f35affc8c11dc7d5ceba2ce19838ef303b1c1
|
7
|
+
data.tar.gz: 836191eeac4d3118d92cc21a1c766c3647041af4430354bec39214d0345228a16946ddc886641cfccd57db514861a3ab04934cf24461378a1d446f75ebe9b0d6
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Sluggi
|
2
2
|
|
3
|
-
[![Gem Version](
|
4
|
-
[![Build Status](
|
3
|
+
[![Gem Version](https://img.shields.io/gem/v/sluggi.svg)](https://rubygems.org/gems/sluggi)
|
4
|
+
[![Build Status](https://github.com/neighborland/sluggi/actions/workflows/ruby.yml/badge.svg)](https://github.com/neighborland/sluggi/actions/workflows/ruby.yml)
|
5
5
|
|
6
6
|
Sluggi is a simple [friendly_id](https://github.com/norman/friendly_id)-inspired slugging library for ActiveRecord models. It is faster than `friendly_id` (see below for benchmarks).
|
7
7
|
|
data/lib/sluggi/history.rb
CHANGED
@@ -6,10 +6,10 @@ module Sluggi
|
|
6
6
|
|
7
7
|
included do
|
8
8
|
has_many :slugs,
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
-> { order("slugs.id DESC") },
|
10
|
+
class_name: "Sluggi::Slug",
|
11
|
+
as: :sluggable,
|
12
|
+
dependent: :destroy
|
13
13
|
|
14
14
|
after_save :create_slug, if: :saved_change_to_slug_value?
|
15
15
|
end
|
data/lib/sluggi/model.rb
CHANGED
@@ -4,8 +4,8 @@ module Sluggi
|
|
4
4
|
module Model
|
5
5
|
extend ActiveSupport::Concern
|
6
6
|
|
7
|
-
NOT_IMPLEMENTED_MESSAGE = "You must implement #slug_value_changed? "\
|
8
|
-
|
7
|
+
NOT_IMPLEMENTED_MESSAGE = "You must implement #slug_value_changed? " \
|
8
|
+
"and either #slug_value or #slug_candidates"
|
9
9
|
|
10
10
|
included do
|
11
11
|
before_validation :set_slug
|
data/lib/sluggi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sluggi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tee Parham
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,73 +16,31 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '7.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '7.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: railties
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '7.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: appraisal
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '2.0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '2.0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rake
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '12.0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '12.0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: sqlite3
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '1.3'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '1.3'
|
40
|
+
version: '7.0'
|
83
41
|
description: A Rails slug generator inspired by friendly_id
|
84
42
|
email:
|
85
|
-
-
|
43
|
+
- parhameter@gmail.com
|
86
44
|
executables: []
|
87
45
|
extensions: []
|
88
46
|
extra_rdoc_files: []
|
@@ -103,8 +61,9 @@ files:
|
|
103
61
|
homepage: https://github.com/neighborland/sluggi
|
104
62
|
licenses:
|
105
63
|
- MIT
|
106
|
-
metadata:
|
107
|
-
|
64
|
+
metadata:
|
65
|
+
rubygems_mfa_required: 'true'
|
66
|
+
post_install_message:
|
108
67
|
rdoc_options: []
|
109
68
|
require_paths:
|
110
69
|
- lib
|
@@ -112,16 +71,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
112
71
|
requirements:
|
113
72
|
- - ">="
|
114
73
|
- !ruby/object:Gem::Version
|
115
|
-
version:
|
74
|
+
version: 3.0.0
|
116
75
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
76
|
requirements:
|
118
77
|
- - ">="
|
119
78
|
- !ruby/object:Gem::Version
|
120
79
|
version: '0'
|
121
80
|
requirements: []
|
122
|
-
|
123
|
-
|
124
|
-
signing_key:
|
81
|
+
rubygems_version: 3.5.23
|
82
|
+
signing_key:
|
125
83
|
specification_version: 4
|
126
84
|
summary: Rails Slug Generator
|
127
85
|
test_files: []
|