friendly_id 3.3.0.rc2 → 3.3.0.1

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/Changelog.md CHANGED
@@ -6,7 +6,7 @@ suggestions, ideas and improvements to FriendlyId.
6
6
  * Table of Contents
7
7
  {:toc}
8
8
 
9
- ## 3.3.0 (NOT_RELEASED_YET)
9
+ ## 3.3.0 (2011-08-31)
10
10
 
11
11
  * Support for Active Record 2.3 dropped
12
12
  * Convert blank slugs to nil automatically ([Gabe da Silveira ](https://github.com/dasil003))
data/README.md CHANGED
@@ -38,7 +38,6 @@ released by September, 2011.
38
38
 
39
39
  * [FriendlyId Guide](http://norman.github.com/friendly_id/file.Guide.html)
40
40
  * [API Docs](http://norman.github.com/friendly_id)
41
- * [Google Group](http://groups.google.com/group/friendly_id)
42
41
  * [Source Code](http://github.com/norman/friendly_id/)
43
42
  * [Issue Tracker](http://github.com/norman/friendly_id/issues)
44
43
 
@@ -124,8 +124,8 @@ module FriendlyId
124
124
  if result.size == expected_size
125
125
  result
126
126
  else
127
- conditions = arel.send(:where_clauses).join(', ')
128
- conditions = " [WHERE #{conditions}]" if conditions.present?
127
+ conditions = arel.where_sql
128
+ conditions = " [#{conditions}]" if conditions
129
129
  error = "Couldn't find all #{klass.name.pluralize} with IDs "
130
130
  error << "(#{ids.join(", ")})#{conditions} (found #{result.size} results, but was looking for #{expected_size})"
131
131
  raise ActiveRecord::RecordNotFound, error
@@ -141,14 +141,6 @@ module FriendlyId
141
141
  end
142
142
  end
143
143
 
144
- def apply_finder_options(options)
145
- if options[:scope]
146
- raise "The :scope finder option has been removed from FriendlyId 3.2.0 " +
147
- "https://github.com/norman/friendly_id/issues#issue/88"
148
- end
149
- super
150
- end
151
-
152
144
  protected
153
145
 
154
146
  def find_one(id)
@@ -98,7 +98,7 @@ module FriendlyId
98
98
  end
99
99
 
100
100
  # This method was removed in ActiveRecord 3.0.
101
- if !ActiveRecord::Base.private_method_defined? :update_without_callbacks
101
+ if !::ActiveRecord::Base.private_method_defined? :update_without_callbacks
102
102
  def update_without_callbacks
103
103
  attributes_with_values = arel_attributes_values(false, false, attribute_names)
104
104
  return false if attributes_with_values.empty?
@@ -3,7 +3,7 @@ module FriendlyId
3
3
  MAJOR = 3
4
4
  MINOR = 3
5
5
  TINY = 0
6
- BUILD = 'rc2'
6
+ BUILD = 1
7
7
  STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.')
8
8
  end
9
9
  end
@@ -26,12 +26,6 @@ module FriendlyId
26
26
  Tourist.delete_all
27
27
  end
28
28
 
29
- test "As of 3.2.0, should raise error if :scope option is passed" do
30
- assert_raise(RuntimeError) do
31
- Tourist.find("hello", :scope => "usa")
32
- end
33
- end
34
-
35
29
  test "should not use cached slug column with scopes" do
36
30
  @tourist = Tourist.create!(:name => "John Smith", :country => @usa)
37
31
  @tourist2 = Tourist.create!(:name => "John Smith", :country => @canada)
@@ -0,0 +1,34 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ activemodel (3.0.10)
5
+ activesupport (= 3.0.10)
6
+ builder (~> 2.1.2)
7
+ i18n (~> 0.5.0)
8
+ activerecord (3.0.10)
9
+ activemodel (= 3.0.10)
10
+ activesupport (= 3.0.10)
11
+ arel (~> 2.0.10)
12
+ tzinfo (~> 0.3.23)
13
+ activesupport (3.0.10)
14
+ ancestry (1.2.4)
15
+ activerecord (>= 2.2.2)
16
+ arel (2.0.10)
17
+ builder (2.1.2)
18
+ i18n (0.5.0)
19
+ minitest (2.4.0)
20
+ mocha (0.9.12)
21
+ rake (0.9.2)
22
+ sqlite3 (1.3.4)
23
+ tzinfo (0.3.29)
24
+
25
+ PLATFORMS
26
+ ruby
27
+
28
+ DEPENDENCIES
29
+ activerecord (= 3.0.10)
30
+ ancestry
31
+ minitest (~> 2.4.0)
32
+ mocha (~> 0.9.12)
33
+ rake
34
+ sqlite3 (~> 1.3.4)
metadata CHANGED
@@ -1,75 +1,85 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: friendly_id
3
- version: !ruby/object:Gem::Version
4
- prerelease: 6
5
- version: 3.3.0.rc2
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.3.0.1
5
+ prerelease:
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Norman Clarke
9
9
  - Adrian Mugnolo
10
10
  - Emilio Tagua
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
-
15
- date: 2011-07-14 00:00:00 Z
16
- dependencies:
17
- - !ruby/object:Gem::Dependency
14
+ date: 2011-08-31 00:00:00.000000000 -03:00
15
+ default_executable:
16
+ dependencies:
17
+ - !ruby/object:Gem::Dependency
18
18
  name: babosa
19
- requirement: &id001 !ruby/object:Gem::Requirement
19
+ requirement: &70155981374180 !ruby/object:Gem::Requirement
20
20
  none: false
21
- requirements:
21
+ requirements:
22
22
  - - ~>
23
- - !ruby/object:Gem::Version
23
+ - !ruby/object:Gem::Version
24
24
  version: 0.3.0
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *id001
28
- - !ruby/object:Gem::Dependency
27
+ version_requirements: *70155981374180
28
+ - !ruby/object:Gem::Dependency
29
29
  name: activerecord
30
- requirement: &id002 !ruby/object:Gem::Requirement
30
+ requirement: &70155981373480 !ruby/object:Gem::Requirement
31
31
  none: false
32
- requirements:
32
+ requirements:
33
33
  - - ~>
34
- - !ruby/object:Gem::Version
35
- version: "3.0"
34
+ - !ruby/object:Gem::Version
35
+ version: '3.0'
36
36
  type: :development
37
37
  prerelease: false
38
- version_requirements: *id002
39
- - !ruby/object:Gem::Dependency
38
+ version_requirements: *70155981373480
39
+ - !ruby/object:Gem::Dependency
40
40
  name: mocha
41
- requirement: &id003 !ruby/object:Gem::Requirement
41
+ requirement: &70155981372860 !ruby/object:Gem::Requirement
42
42
  none: false
43
- requirements:
43
+ requirements:
44
44
  - - ~>
45
- - !ruby/object:Gem::Version
46
- version: "0.9"
45
+ - !ruby/object:Gem::Version
46
+ version: '0.9'
47
47
  type: :development
48
48
  prerelease: false
49
- version_requirements: *id003
50
- - !ruby/object:Gem::Dependency
49
+ version_requirements: *70155981372860
50
+ - !ruby/object:Gem::Dependency
51
51
  name: sqlite3
52
- requirement: &id004 !ruby/object:Gem::Requirement
52
+ requirement: &70155981372000 !ruby/object:Gem::Requirement
53
53
  none: false
54
- requirements:
54
+ requirements:
55
55
  - - ~>
56
- - !ruby/object:Gem::Version
57
- version: "1.3"
56
+ - !ruby/object:Gem::Version
57
+ version: '1.3'
58
58
  type: :development
59
59
  prerelease: false
60
- version_requirements: *id004
61
- description: " FriendlyId is the \"Swiss Army bulldozer\" of slugging and permalink plugins\n for Ruby on Rails. It allows you to create pretty URL's and work with\n human-friendly strings as if they were numeric ids for ActiveRecord models.\n"
62
- email:
60
+ version_requirements: *70155981372000
61
+ - !ruby/object:Gem::Dependency
62
+ name: rake
63
+ requirement: &70155981371220 !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: 0.9.2
69
+ type: :development
70
+ prerelease: false
71
+ version_requirements: *70155981371220
72
+ description: ! " FriendlyId is the \"Swiss Army bulldozer\" of slugging and permalink
73
+ plugins\n for Ruby on Rails. It allows you to create pretty URL's and work with\n
74
+ \ human-friendly strings as if they were numeric ids for ActiveRecord models.\n"
75
+ email:
63
76
  - norman@njclarke.com
64
77
  - adrian@mugnolo.com
65
78
  - miloops@gmail.com
66
79
  executables: []
67
-
68
80
  extensions: []
69
-
70
81
  extra_rdoc_files: []
71
-
72
- files:
82
+ files:
73
83
  - lib/friendly_id/active_record.rb
74
84
  - lib/friendly_id/active_record_adapter/configuration.rb
75
85
  - lib/friendly_id/active_record_adapter/relation.rb
@@ -119,6 +129,7 @@ files:
119
129
  - test/active_record_adapter/support/database.sqlite3.yml
120
130
  - test/active_record_adapter/support/models.rb
121
131
  - test/active_record_adapter/tasks_test.rb
132
+ - test/compatibility/ancestry/Gemfile.lock
122
133
  - test/friendly_id_test.rb
123
134
  - test/test_helper.rb
124
135
  - extras/bench.rb
@@ -128,37 +139,37 @@ files:
128
139
  - extras/template-gem.rb
129
140
  - extras/template-plugin.rb
130
141
  - .gemtest
142
+ has_rdoc: true
131
143
  homepage: http://norman.github.com/friendly_id
132
144
  licenses: []
133
-
134
- post_install_message: " FriendlyId 3.3.x is now in long-term maintanence. For new projects with\n Rails 3.1.x please consider using 4.0, which is under active development:\n\n https://github.com/norman/friendly_id/tree/4.0.0\n"
145
+ post_install_message: ! " FriendlyId 3.3.x is now in long-term maintanence. For
146
+ new projects with\n Rails 3.1.x please consider using 4.0, which is under active
147
+ development:\n\n https://github.com/norman/friendly_id\n"
135
148
  rdoc_options: []
136
-
137
- require_paths:
149
+ require_paths:
138
150
  - lib
139
- required_ruby_version: !ruby/object:Gem::Requirement
151
+ required_ruby_version: !ruby/object:Gem::Requirement
140
152
  none: false
141
- requirements:
142
- - - ">="
143
- - !ruby/object:Gem::Version
144
- hash: -1068692454411674602
145
- segments:
153
+ requirements:
154
+ - - ! '>='
155
+ - !ruby/object:Gem::Version
156
+ version: '0'
157
+ segments:
146
158
  - 0
147
- version: "0"
148
- required_rubygems_version: !ruby/object:Gem::Requirement
159
+ hash: -124065484793691993
160
+ required_rubygems_version: !ruby/object:Gem::Requirement
149
161
  none: false
150
- requirements:
151
- - - ">"
152
- - !ruby/object:Gem::Version
153
- version: 1.3.1
162
+ requirements:
163
+ - - ! '>='
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
154
166
  requirements: []
155
-
156
167
  rubyforge_project: friendly-id
157
- rubygems_version: 1.8.5
168
+ rubygems_version: 1.6.2
158
169
  signing_key:
159
170
  specification_version: 3
160
171
  summary: A comprehensive slugging and pretty-URL plugin.
161
- test_files:
172
+ test_files:
162
173
  - test/active_record_adapter/basic_slugged_model_test.rb
163
174
  - test/active_record_adapter/cached_slug_test.rb
164
175
  - test/active_record_adapter/custom_normalizer_test.rb