sluggi 1.0.0 → 1.0.1

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
- SHA1:
3
- metadata.gz: 4a906de5f60daffb61a57c0e8082ee2357b7260c
4
- data.tar.gz: 38284d68e3f3126f2a4883852fe0d314511ed2c2
2
+ SHA256:
3
+ metadata.gz: 60ac44d888a507fa9f691a41f0aa700e8c13d0f614ce1bc45e8618bf1b73044d
4
+ data.tar.gz: fb9d1123232d502843aa5acde2a0da544e2a6656c7a58219bc2a08b1d56173f6
5
5
  SHA512:
6
- metadata.gz: 02ea97e4b7b745a8c6d40929cbcc7165c5b01850dbb75f09d1ad4020abd0a68fc8a9592d48a281918feee09a5692f4db07dff8a9de3e0507328d88adbe2424ee
7
- data.tar.gz: 15f1e3cb0e54be7a363f3f916e55e197b1111e0f27fe88fa40c5a35b69f1b96418c5db3d80b95da508641b7fb920e1229e74205af31ab73bfc15ba4dd9430a50
6
+ metadata.gz: e41c7d5703aad3d86ec85f94c9c496d766037fa2a8638be3019b5b2dad8ca92de196775bf4a89687a2dd8fcb16a8a6c22aeda75f11fd7dfc5549272d4f1b32bf
7
+ data.tar.gz: 8088049bcd5242259a1b4c6031730a91926d72c6ab4ceb7fc1e974045faac2f974bfd614ddc773d1df33acf08ba62c865a21cad09b3f839d6e0d762ac62fd902
data/lib/sluggi.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "sluggi/version"
2
4
  require "sluggi/slug"
3
5
  require "sluggi/history"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rails/generators"
2
4
  require "rails/generators/active_record"
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sluggi
2
4
  module History
3
5
  extend ActiveSupport::Concern
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class CreateSlugs < ActiveRecord::Migration
2
4
  def change
3
5
  create_table :slugs do |t|
data/lib/sluggi/model.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sluggi
2
4
  module Model
3
5
  extend ActiveSupport::Concern
@@ -10,7 +12,7 @@ module Sluggi
10
12
  end
11
13
 
12
14
  def to_param
13
- slug_was
15
+ errors.any? ? slug_was : slug
14
16
  end
15
17
 
16
18
  private
data/lib/sluggi/slug.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sluggi
2
4
  class Slug < ActiveRecord::Base
3
5
  belongs_to :sluggable, polymorphic: true
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sluggi
2
4
  module Slugged
3
5
  extend ActiveSupport::Concern
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sluggi
2
4
  module ValidateExclusionOf
3
5
  extend ActiveSupport::Concern
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sluggi
2
4
  module ValidatePresence
3
5
  extend ActiveSupport::Concern
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sluggi
2
4
  module ValidateUniqueness
3
5
  extend ActiveSupport::Concern
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sluggi
2
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
3
5
  end
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: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tee Parham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-19 00:00:00.000000000 Z
11
+ date: 2018-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -39,47 +39,47 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '5.1'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rake
42
+ name: mocha
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '12.0'
47
+ version: '1.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: '12.0'
54
+ version: '1.0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: sqlite3
56
+ name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.3'
61
+ version: '12.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '1.3'
68
+ version: '12.0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: mocha
70
+ name: sqlite3
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.0'
75
+ version: '1.3'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.0'
82
+ version: '1.3'
83
83
  description: A Rails slug generator inspired by friendly_id
84
84
  email:
85
85
  - tee@neighborland.com
@@ -120,9 +120,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  version: '0'
121
121
  requirements: []
122
122
  rubyforge_project:
123
- rubygems_version: 2.6.12
123
+ rubygems_version: 2.7.4
124
124
  signing_key:
125
125
  specification_version: 4
126
126
  summary: Rails Slug Generator
127
127
  test_files: []
128
- has_rdoc: