effective_slugs 1.1.2 → 1.2.0

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
2
  SHA1:
3
- metadata.gz: bdada7ba62e00416f375f44f4c5fe494435055a6
4
- data.tar.gz: 2cd9e9827f0ec23486c620bfbd35a7dcbe966c08
3
+ metadata.gz: b37e7607960936f530c960d412f8bfa3220f011a
4
+ data.tar.gz: 6bf37caaeccb8b155282f5bbf79cee3058568540
5
5
  SHA512:
6
- metadata.gz: ee0d99edd08b84e9b02ea3d83c858e9202af6822b9297c2c36820367f5c82280e56afdd95103bb91ffc91c96e3f96a60e11ee9da5e56747209c1f924319f5a7f
7
- data.tar.gz: e06ef0288e8dfbdb896b35d04cd9ac6ffb39da08284f88fb42903a3b560203d47afb218f7b780b2c59f34c30dc24b23bdbf8856f338cb5d560c07f821aab7e65
6
+ metadata.gz: 61fe26a272e28864d2a83b74c9216afcfeee5ea77aec14b66ae397375c6da84acd12a0d1478c5aa7cbb9e1bd157ff77fdba13cb5814e03853b801a2ec589d310
7
+ data.tar.gz: 661b7f5ffb2b9142f93da55d3fab9a034bc5f9f98a45e81827229f1b6aab9f54c4c3cd0a9ca8ab082c5f9acbba2615a0065da326ecdeef98d69b1f49edbcef4a
@@ -68,6 +68,10 @@ module ActsAsSluggable
68
68
  else
69
69
  validates_uniqueness_of :slug
70
70
  end
71
+
72
+ if ::ActiveRecord::VERSION::MAJOR == 4 && ::ActiveRecord::VERSION::MINOR == 2
73
+ extend FinderMethods
74
+ end
71
75
  end
72
76
 
73
77
  def set_slug
@@ -105,8 +109,10 @@ module ActsAsSluggable
105
109
  end
106
110
 
107
111
  module ClassMethods
108
- def relation
109
- super.tap { |relation| relation.extend(FinderMethods) }
112
+ unless ::ActiveRecord::VERSION::MAJOR == 4 && ::ActiveRecord::VERSION::MINOR == 2
113
+ def relation
114
+ super.tap { |relation| relation.extend(FinderMethods) }
115
+ end
110
116
  end
111
117
  end
112
118
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveSlugs
2
- VERSION = '1.1.2'.freeze
2
+ VERSION = '1.2.0'.freeze
3
3
  end
@@ -1,3 +1,3 @@
1
1
  EffectiveSlugs.setup do |config|
2
- config.excluded_slugs = %w(home cart search sitemap robots)
2
+ config.excluded_slugs = []
3
3
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_slugs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-08 00:00:00.000000000 Z
11
+ date: 2016-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 3.2.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
26
  version: 3.2.0
27
27
  description: Automatically generate URL-appropriate slugs when saving a record.
@@ -84,17 +84,17 @@ require_paths:
84
84
  - lib
85
85
  required_ruby_version: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  requirements:
92
- - - ">="
92
+ - - '>='
93
93
  - !ruby/object:Gem::Version
94
94
  version: '0'
95
95
  requirements: []
96
96
  rubyforge_project:
97
- rubygems_version: 2.4.3
97
+ rubygems_version: 2.4.6
98
98
  signing_key:
99
99
  specification_version: 4
100
100
  summary: Automatically generate URL-appropriate slugs when saving a record.