mongomapper_ext 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.1
1
+ 0.5.2
@@ -114,7 +114,9 @@ module MongoMapperExt
114
114
  stem = stemmer.stem(word)
115
115
  end
116
116
 
117
- normalized=word.mb_chars.normalize(:kd).gsub(/[^\x00-\x7F]/n, '').to_s
117
+ normalize_string = lambda {|str| ActiveSupport::Multibyte::Chars.new(str).normalize(:kd).gsub(/[^\x00-\x7F]/n, '').to_s }
118
+
119
+ normalized = normalize_string.call(word)
118
120
 
119
121
  if word != normalized
120
122
  words << normalized
@@ -122,7 +124,7 @@ module MongoMapperExt
122
124
 
123
125
  words << word
124
126
  if stem
125
- normalized=stem.mb_chars.normalize(:kd).gsub(/[^\x00-\x7F]/n, '').to_s
127
+ normalized=normalize_string.call(stem)
126
128
 
127
129
  words << normalized if stem != normalized
128
130
  words << stem if stem != word
@@ -1,99 +1,100 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mongomapper_ext}
8
- s.version = "0.5.1"
8
+ s.version = "0.5.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["David A. Cuadrado"]
12
- s.date = %q{2010-10-16}
12
+ s.date = %q{2011-02-14}
13
13
  s.description = %q{MongoMapper extensions}
14
14
  s.email = %q{krawek@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README.rdoc",
18
- "TODO"
17
+ "README.rdoc",
18
+ "TODO"
19
19
  ]
20
20
  s.files = [
21
21
  ".document",
22
- ".gitignore",
23
- "Gemfile",
24
- "LICENSE",
25
- "README.rdoc",
26
- "Rakefile",
27
- "VERSION",
28
- "examples/filter.rb",
29
- "examples/helper.rb",
30
- "examples/i18n.rb",
31
- "examples/slugizer.rb",
32
- "examples/storage.rb",
33
- "examples/tags.rb",
34
- "examples/types.rb",
35
- "examples/update.rb",
36
- "lib/mongomapper_ext.rb",
37
- "lib/mongomapper_ext/file.rb",
38
- "lib/mongomapper_ext/file_list.rb",
39
- "lib/mongomapper_ext/file_server.rb",
40
- "lib/mongomapper_ext/filter.rb",
41
- "lib/mongomapper_ext/js/filter.js",
42
- "lib/mongomapper_ext/js/find_tags.js",
43
- "lib/mongomapper_ext/js/tag_cloud.js",
44
- "lib/mongomapper_ext/paginator.rb",
45
- "lib/mongomapper_ext/slugizer.rb",
46
- "lib/mongomapper_ext/storage.rb",
47
- "lib/mongomapper_ext/tags.rb",
48
- "lib/mongomapper_ext/types/open_struct.rb",
49
- "lib/mongomapper_ext/types/timestamp.rb",
50
- "lib/mongomapper_ext/types/translation.rb",
51
- "lib/mongomapper_ext/update.rb",
52
- "mongomapper_ext.gemspec",
53
- "test/helper.rb",
54
- "test/models.rb",
55
- "test/support/custom_matchers.rb",
56
- "test/test_filter.rb",
57
- "test/test_slugizer.rb",
58
- "test/test_storage.rb",
59
- "test/test_tags.rb",
60
- "test/test_update.rb",
61
- "test/types/test_open_struct.rb",
62
- "test/types/test_set.rb",
63
- "test/types/test_timestamp.rb"
22
+ "Gemfile",
23
+ "LICENSE",
24
+ "README.rdoc",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "examples/filter.rb",
28
+ "examples/helper.rb",
29
+ "examples/i18n.rb",
30
+ "examples/slugizer.rb",
31
+ "examples/storage.rb",
32
+ "examples/tags.rb",
33
+ "examples/types.rb",
34
+ "examples/update.rb",
35
+ "lib/mongomapper_ext.rb",
36
+ "lib/mongomapper_ext/file.rb",
37
+ "lib/mongomapper_ext/file_list.rb",
38
+ "lib/mongomapper_ext/file_server.rb",
39
+ "lib/mongomapper_ext/filter.rb",
40
+ "lib/mongomapper_ext/js/filter.js",
41
+ "lib/mongomapper_ext/js/find_tags.js",
42
+ "lib/mongomapper_ext/js/tag_cloud.js",
43
+ "lib/mongomapper_ext/paginator.rb",
44
+ "lib/mongomapper_ext/slugizer.rb",
45
+ "lib/mongomapper_ext/storage.rb",
46
+ "lib/mongomapper_ext/tags.rb",
47
+ "lib/mongomapper_ext/types/open_struct.rb",
48
+ "lib/mongomapper_ext/types/timestamp.rb",
49
+ "lib/mongomapper_ext/types/translation.rb",
50
+ "lib/mongomapper_ext/update.rb",
51
+ "mongomapper_ext.gemspec",
52
+ "test/helper.rb",
53
+ "test/models.rb",
54
+ "test/support/custom_matchers.rb",
55
+ "test/test_filter.rb",
56
+ "test/test_slugizer.rb",
57
+ "test/test_storage.rb",
58
+ "test/test_tags.rb",
59
+ "test/test_update.rb",
60
+ "test/types/test_open_struct.rb",
61
+ "test/types/test_set.rb",
62
+ "test/types/test_timestamp.rb"
64
63
  ]
65
64
  s.homepage = %q{http://github.com/dcu/mongomapper_ext}
66
- s.rdoc_options = ["--charset=UTF-8"]
67
65
  s.require_paths = ["lib"]
68
- s.rubygems_version = %q{1.3.7}
66
+ s.rubygems_version = %q{1.5.2}
69
67
  s.summary = %q{MongoMapper extensions}
70
68
  s.test_files = [
69
+ "examples/filter.rb",
70
+ "examples/helper.rb",
71
+ "examples/i18n.rb",
72
+ "examples/slugizer.rb",
73
+ "examples/storage.rb",
74
+ "examples/tags.rb",
75
+ "examples/types.rb",
76
+ "examples/update.rb",
77
+ "test/helper.rb",
78
+ "test/models.rb",
79
+ "test/support/custom_matchers.rb",
80
+ "test/test_filter.rb",
81
+ "test/test_slugizer.rb",
82
+ "test/test_storage.rb",
71
83
  "test/test_tags.rb",
72
- "test/test_storage.rb",
73
- "test/test_filter.rb",
74
- "test/support/custom_matchers.rb",
75
- "test/models.rb",
76
- "test/types/test_open_struct.rb",
77
- "test/types/test_timestamp.rb",
78
- "test/types/test_set.rb",
79
- "test/test_update.rb",
80
- "test/test_slugizer.rb",
81
- "test/helper.rb",
82
- "examples/update.rb",
83
- "examples/filter.rb",
84
- "examples/i18n.rb",
85
- "examples/types.rb",
86
- "examples/tags.rb",
87
- "examples/slugizer.rb",
88
- "examples/helper.rb",
89
- "examples/storage.rb"
84
+ "test/test_update.rb",
85
+ "test/types/test_open_struct.rb",
86
+ "test/types/test_set.rb",
87
+ "test/types/test_timestamp.rb"
90
88
  ]
91
89
 
92
90
  if s.respond_to? :specification_version then
93
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
94
91
  s.specification_version = 3
95
92
 
96
93
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
94
+ s.add_runtime_dependency(%q<mongo_mapper>, ["~> 0.8"])
95
+ s.add_runtime_dependency(%q<uuidtools>, ["~> 2.0.0"])
96
+ s.add_runtime_dependency(%q<i18n>, ["~> 0.4.1"])
97
+ s.add_runtime_dependency(%q<tzinfo>, ["~> 0.3"])
97
98
  s.add_runtime_dependency(%q<mongo_mapper>, ["~> 0.8"])
98
99
  s.add_runtime_dependency(%q<uuidtools>, [">= 2.0.0"])
99
100
  s.add_development_dependency(%q<shoulda>, [">= 2.10.2"])
@@ -101,6 +102,10 @@ Gem::Specification.new do |s|
101
102
  s.add_development_dependency(%q<mocha>, [">= 0.9.4"])
102
103
  s.add_development_dependency(%q<timecop>, [">= 0"])
103
104
  else
105
+ s.add_dependency(%q<mongo_mapper>, ["~> 0.8"])
106
+ s.add_dependency(%q<uuidtools>, ["~> 2.0.0"])
107
+ s.add_dependency(%q<i18n>, ["~> 0.4.1"])
108
+ s.add_dependency(%q<tzinfo>, ["~> 0.3"])
104
109
  s.add_dependency(%q<mongo_mapper>, ["~> 0.8"])
105
110
  s.add_dependency(%q<uuidtools>, [">= 2.0.0"])
106
111
  s.add_dependency(%q<shoulda>, [">= 2.10.2"])
@@ -109,6 +114,10 @@ Gem::Specification.new do |s|
109
114
  s.add_dependency(%q<timecop>, [">= 0"])
110
115
  end
111
116
  else
117
+ s.add_dependency(%q<mongo_mapper>, ["~> 0.8"])
118
+ s.add_dependency(%q<uuidtools>, ["~> 2.0.0"])
119
+ s.add_dependency(%q<i18n>, ["~> 0.4.1"])
120
+ s.add_dependency(%q<tzinfo>, ["~> 0.3"])
112
121
  s.add_dependency(%q<mongo_mapper>, ["~> 0.8"])
113
122
  s.add_dependency(%q<uuidtools>, [">= 2.0.0"])
114
123
  s.add_dependency(%q<shoulda>, [">= 2.10.2"])
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongomapper_ext
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 5
8
- - 1
9
- version: 0.5.1
4
+ prerelease:
5
+ version: 0.5.2
10
6
  platform: ruby
11
7
  authors:
12
8
  - David A. Cuadrado
@@ -14,96 +10,119 @@ autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2010-10-16 00:00:00 -05:00
13
+ date: 2011-02-14 00:00:00 -05:00
18
14
  default_executable:
19
15
  dependencies:
20
16
  - !ruby/object:Gem::Dependency
21
17
  name: mongo_mapper
22
- prerelease: false
23
18
  requirement: &id001 !ruby/object:Gem::Requirement
24
19
  none: false
25
20
  requirements:
26
21
  - - ~>
27
22
  - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- - 8
31
23
  version: "0.8"
32
24
  type: :runtime
25
+ prerelease: false
33
26
  version_requirements: *id001
34
27
  - !ruby/object:Gem::Dependency
35
28
  name: uuidtools
36
- prerelease: false
37
29
  requirement: &id002 !ruby/object:Gem::Requirement
38
30
  none: false
39
31
  requirements:
40
- - - ">="
32
+ - - ~>
41
33
  - !ruby/object:Gem::Version
42
- segments:
43
- - 2
44
- - 0
45
- - 0
46
34
  version: 2.0.0
47
35
  type: :runtime
36
+ prerelease: false
48
37
  version_requirements: *id002
49
38
  - !ruby/object:Gem::Dependency
50
- name: shoulda
51
- prerelease: false
39
+ name: i18n
52
40
  requirement: &id003 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 0.4.1
46
+ type: :runtime
47
+ prerelease: false
48
+ version_requirements: *id003
49
+ - !ruby/object:Gem::Dependency
50
+ name: tzinfo
51
+ requirement: &id004 !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ~>
55
+ - !ruby/object:Gem::Version
56
+ version: "0.3"
57
+ type: :runtime
58
+ prerelease: false
59
+ version_requirements: *id004
60
+ - !ruby/object:Gem::Dependency
61
+ name: mongo_mapper
62
+ requirement: &id005 !ruby/object:Gem::Requirement
63
+ none: false
64
+ requirements:
65
+ - - ~>
66
+ - !ruby/object:Gem::Version
67
+ version: "0.8"
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: *id005
71
+ - !ruby/object:Gem::Dependency
72
+ name: uuidtools
73
+ requirement: &id006 !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: 2.0.0
79
+ type: :runtime
80
+ prerelease: false
81
+ version_requirements: *id006
82
+ - !ruby/object:Gem::Dependency
83
+ name: shoulda
84
+ requirement: &id007 !ruby/object:Gem::Requirement
53
85
  none: false
54
86
  requirements:
55
87
  - - ">="
56
88
  - !ruby/object:Gem::Version
57
- segments:
58
- - 2
59
- - 10
60
- - 2
61
89
  version: 2.10.2
62
90
  type: :development
63
- version_requirements: *id003
91
+ prerelease: false
92
+ version_requirements: *id007
64
93
  - !ruby/object:Gem::Dependency
65
94
  name: jnunemaker-matchy
66
- prerelease: false
67
- requirement: &id004 !ruby/object:Gem::Requirement
95
+ requirement: &id008 !ruby/object:Gem::Requirement
68
96
  none: false
69
97
  requirements:
70
98
  - - "="
71
99
  - !ruby/object:Gem::Version
72
- segments:
73
- - 0
74
- - 4
75
- - 0
76
100
  version: 0.4.0
77
101
  type: :development
78
- version_requirements: *id004
102
+ prerelease: false
103
+ version_requirements: *id008
79
104
  - !ruby/object:Gem::Dependency
80
105
  name: mocha
81
- prerelease: false
82
- requirement: &id005 !ruby/object:Gem::Requirement
106
+ requirement: &id009 !ruby/object:Gem::Requirement
83
107
  none: false
84
108
  requirements:
85
109
  - - ">="
86
110
  - !ruby/object:Gem::Version
87
- segments:
88
- - 0
89
- - 9
90
- - 4
91
111
  version: 0.9.4
92
112
  type: :development
93
- version_requirements: *id005
113
+ prerelease: false
114
+ version_requirements: *id009
94
115
  - !ruby/object:Gem::Dependency
95
116
  name: timecop
96
- prerelease: false
97
- requirement: &id006 !ruby/object:Gem::Requirement
117
+ requirement: &id010 !ruby/object:Gem::Requirement
98
118
  none: false
99
119
  requirements:
100
120
  - - ">="
101
121
  - !ruby/object:Gem::Version
102
- segments:
103
- - 0
104
122
  version: "0"
105
123
  type: :development
106
- version_requirements: *id006
124
+ prerelease: false
125
+ version_requirements: *id010
107
126
  description: MongoMapper extensions
108
127
  email: krawek@gmail.com
109
128
  executables: []
@@ -116,7 +135,6 @@ extra_rdoc_files:
116
135
  - TODO
117
136
  files:
118
137
  - .document
119
- - .gitignore
120
138
  - Gemfile
121
139
  - LICENSE
122
140
  - README.rdoc
@@ -164,8 +182,8 @@ homepage: http://github.com/dcu/mongomapper_ext
164
182
  licenses: []
165
183
 
166
184
  post_install_message:
167
- rdoc_options:
168
- - --charset=UTF-8
185
+ rdoc_options: []
186
+
169
187
  require_paths:
170
188
  - lib
171
189
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -173,41 +191,37 @@ required_ruby_version: !ruby/object:Gem::Requirement
173
191
  requirements:
174
192
  - - ">="
175
193
  - !ruby/object:Gem::Version
176
- segments:
177
- - 0
178
194
  version: "0"
179
195
  required_rubygems_version: !ruby/object:Gem::Requirement
180
196
  none: false
181
197
  requirements:
182
198
  - - ">="
183
199
  - !ruby/object:Gem::Version
184
- segments:
185
- - 0
186
200
  version: "0"
187
201
  requirements: []
188
202
 
189
203
  rubyforge_project:
190
- rubygems_version: 1.3.7
204
+ rubygems_version: 1.5.2
191
205
  signing_key:
192
206
  specification_version: 3
193
207
  summary: MongoMapper extensions
194
208
  test_files:
195
- - test/test_tags.rb
196
- - test/test_storage.rb
197
- - test/test_filter.rb
198
- - test/support/custom_matchers.rb
199
- - test/models.rb
200
- - test/types/test_open_struct.rb
201
- - test/types/test_timestamp.rb
202
- - test/types/test_set.rb
203
- - test/test_update.rb
204
- - test/test_slugizer.rb
205
- - test/helper.rb
206
- - examples/update.rb
207
209
  - examples/filter.rb
210
+ - examples/helper.rb
208
211
  - examples/i18n.rb
209
- - examples/types.rb
210
- - examples/tags.rb
211
212
  - examples/slugizer.rb
212
- - examples/helper.rb
213
213
  - examples/storage.rb
214
+ - examples/tags.rb
215
+ - examples/types.rb
216
+ - examples/update.rb
217
+ - test/helper.rb
218
+ - test/models.rb
219
+ - test/support/custom_matchers.rb
220
+ - test/test_filter.rb
221
+ - test/test_slugizer.rb
222
+ - test/test_storage.rb
223
+ - test/test_tags.rb
224
+ - test/test_update.rb
225
+ - test/types/test_open_struct.rb
226
+ - test/types/test_set.rb
227
+ - test/types/test_timestamp.rb
data/.gitignore DELETED
@@ -1,21 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
-
21
- ## PROJECT::SPECIFIC