mongomapper_ext 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ source :gemcutter
2
+
3
+ gem 'mongo_mapper', '~> 0.8'
4
+ gem 'uuidtools', '~> 2.0.0'
5
+ gem 'i18n', '~> 0.4.1'
6
+ gem 'tzinfo', '~> 0.3'
7
+
8
+ group :test do
9
+ gem 'shoulda', '~> 2.10.2'
10
+ gem 'jnunemaker-matchy', '~> 0.4.0'
11
+ gem 'mocha', '~> 0.9.4'
12
+ gem 'timecop'
13
+ end
data/Rakefile CHANGED
@@ -17,6 +17,7 @@ begin
17
17
  gem.add_development_dependency("shoulda", ">= 2.10.2")
18
18
  gem.add_development_dependency('jnunemaker-matchy', '0.4.0')
19
19
  gem.add_development_dependency('mocha', '>= 0.9.4')
20
+ gem.add_development_dependency('timecop')
20
21
  end
21
22
  rescue LoadError
22
23
  puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.1
@@ -45,6 +45,10 @@ module MongoMapperExt
45
45
  @io ||= gridfs.get(grid_filename)
46
46
  end
47
47
 
48
+ def reset
49
+ @io = nil
50
+ end
51
+
48
52
  def grid_filename
49
53
  @grid_filename ||= "#{_root_document.collection.name}/#{self.id}"
50
54
  end
@@ -10,7 +10,7 @@ module MongoMapperExt
10
10
  end
11
11
 
12
12
  def to_param
13
- self.slug.blank? ? self.id : self.slug
13
+ self.slug.blank? ? self.id.to_s : self.slug
14
14
  end
15
15
 
16
16
  protected
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mongomapper_ext}
8
- s.version = "0.5.0"
8
+ s.version = "0.5.1"
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-09-28}
12
+ s.date = %q{2010-10-16}
13
13
  s.description = %q{MongoMapper extensions}
14
14
  s.email = %q{krawek@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.files = [
21
21
  ".document",
22
22
  ".gitignore",
23
+ "Gemfile",
23
24
  "LICENSE",
24
25
  "README.rdoc",
25
26
  "Rakefile",
@@ -67,25 +68,25 @@ Gem::Specification.new do |s|
67
68
  s.rubygems_version = %q{1.3.7}
68
69
  s.summary = %q{MongoMapper extensions}
69
70
  s.test_files = [
70
- "test/test_slugizer.rb",
71
- "test/test_filter.rb",
72
- "test/test_tags.rb",
71
+ "test/test_tags.rb",
73
72
  "test/test_storage.rb",
74
- "test/test_update.rb",
73
+ "test/test_filter.rb",
75
74
  "test/support/custom_matchers.rb",
76
75
  "test/models.rb",
77
- "test/helper.rb",
78
76
  "test/types/test_open_struct.rb",
79
77
  "test/types/test_timestamp.rb",
80
78
  "test/types/test_set.rb",
81
- "examples/types.rb",
82
- "examples/filter.rb",
79
+ "test/test_update.rb",
80
+ "test/test_slugizer.rb",
81
+ "test/helper.rb",
83
82
  "examples/update.rb",
83
+ "examples/filter.rb",
84
+ "examples/i18n.rb",
85
+ "examples/types.rb",
84
86
  "examples/tags.rb",
85
- "examples/storage.rb",
87
+ "examples/slugizer.rb",
86
88
  "examples/helper.rb",
87
- "examples/i18n.rb",
88
- "examples/slugizer.rb"
89
+ "examples/storage.rb"
89
90
  ]
90
91
 
91
92
  if s.respond_to? :specification_version then
@@ -98,12 +99,14 @@ Gem::Specification.new do |s|
98
99
  s.add_development_dependency(%q<shoulda>, [">= 2.10.2"])
99
100
  s.add_development_dependency(%q<jnunemaker-matchy>, ["= 0.4.0"])
100
101
  s.add_development_dependency(%q<mocha>, [">= 0.9.4"])
102
+ s.add_development_dependency(%q<timecop>, [">= 0"])
101
103
  else
102
104
  s.add_dependency(%q<mongo_mapper>, ["~> 0.8"])
103
105
  s.add_dependency(%q<uuidtools>, [">= 2.0.0"])
104
106
  s.add_dependency(%q<shoulda>, [">= 2.10.2"])
105
107
  s.add_dependency(%q<jnunemaker-matchy>, ["= 0.4.0"])
106
108
  s.add_dependency(%q<mocha>, [">= 0.9.4"])
109
+ s.add_dependency(%q<timecop>, [">= 0"])
107
110
  end
108
111
  else
109
112
  s.add_dependency(%q<mongo_mapper>, ["~> 0.8"])
@@ -111,6 +114,7 @@ Gem::Specification.new do |s|
111
114
  s.add_dependency(%q<shoulda>, [">= 2.10.2"])
112
115
  s.add_dependency(%q<jnunemaker-matchy>, ["= 0.4.0"])
113
116
  s.add_dependency(%q<mocha>, [">= 0.9.4"])
117
+ s.add_dependency(%q<timecop>, [">= 0"])
114
118
  end
115
119
  end
116
120
 
@@ -23,7 +23,7 @@ class TestSlugizer < Test::Unit::TestCase
23
23
 
24
24
  should "return the id if slug was not generated" do
25
25
  @blogpost.slug = nil
26
- @blogpost.to_param.should == @blogpost.id
26
+ @blogpost.to_param.should == @blogpost.id.to_s
27
27
  end
28
28
 
29
29
  should "respect the max length option" do
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongomapper_ext
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
5
4
  prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 5
9
- - 0
10
- version: 0.5.0
8
+ - 1
9
+ version: 0.5.1
11
10
  platform: ruby
12
11
  authors:
13
12
  - David A. Cuadrado
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-09-28 00:00:00 -05:00
17
+ date: 2010-10-16 00:00:00 -05:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
@@ -26,7 +25,6 @@ dependencies:
26
25
  requirements:
27
26
  - - ~>
28
27
  - !ruby/object:Gem::Version
29
- hash: 27
30
28
  segments:
31
29
  - 0
32
30
  - 8
@@ -41,7 +39,6 @@ dependencies:
41
39
  requirements:
42
40
  - - ">="
43
41
  - !ruby/object:Gem::Version
44
- hash: 15
45
42
  segments:
46
43
  - 2
47
44
  - 0
@@ -57,7 +54,6 @@ dependencies:
57
54
  requirements:
58
55
  - - ">="
59
56
  - !ruby/object:Gem::Version
60
- hash: 35
61
57
  segments:
62
58
  - 2
63
59
  - 10
@@ -73,7 +69,6 @@ dependencies:
73
69
  requirements:
74
70
  - - "="
75
71
  - !ruby/object:Gem::Version
76
- hash: 15
77
72
  segments:
78
73
  - 0
79
74
  - 4
@@ -89,7 +84,6 @@ dependencies:
89
84
  requirements:
90
85
  - - ">="
91
86
  - !ruby/object:Gem::Version
92
- hash: 51
93
87
  segments:
94
88
  - 0
95
89
  - 9
@@ -97,6 +91,19 @@ dependencies:
97
91
  version: 0.9.4
98
92
  type: :development
99
93
  version_requirements: *id005
94
+ - !ruby/object:Gem::Dependency
95
+ name: timecop
96
+ prerelease: false
97
+ requirement: &id006 !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ segments:
103
+ - 0
104
+ version: "0"
105
+ type: :development
106
+ version_requirements: *id006
100
107
  description: MongoMapper extensions
101
108
  email: krawek@gmail.com
102
109
  executables: []
@@ -110,6 +117,7 @@ extra_rdoc_files:
110
117
  files:
111
118
  - .document
112
119
  - .gitignore
120
+ - Gemfile
113
121
  - LICENSE
114
122
  - README.rdoc
115
123
  - Rakefile
@@ -165,7 +173,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
165
173
  requirements:
166
174
  - - ">="
167
175
  - !ruby/object:Gem::Version
168
- hash: 3
169
176
  segments:
170
177
  - 0
171
178
  version: "0"
@@ -174,7 +181,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
181
  requirements:
175
182
  - - ">="
176
183
  - !ruby/object:Gem::Version
177
- hash: 3
178
184
  segments:
179
185
  - 0
180
186
  version: "0"
@@ -186,22 +192,22 @@ signing_key:
186
192
  specification_version: 3
187
193
  summary: MongoMapper extensions
188
194
  test_files:
189
- - test/test_slugizer.rb
190
- - test/test_filter.rb
191
195
  - test/test_tags.rb
192
196
  - test/test_storage.rb
193
- - test/test_update.rb
197
+ - test/test_filter.rb
194
198
  - test/support/custom_matchers.rb
195
199
  - test/models.rb
196
- - test/helper.rb
197
200
  - test/types/test_open_struct.rb
198
201
  - test/types/test_timestamp.rb
199
202
  - test/types/test_set.rb
200
- - examples/types.rb
201
- - examples/filter.rb
203
+ - test/test_update.rb
204
+ - test/test_slugizer.rb
205
+ - test/helper.rb
202
206
  - examples/update.rb
203
- - examples/tags.rb
204
- - examples/storage.rb
205
- - examples/helper.rb
207
+ - examples/filter.rb
206
208
  - examples/i18n.rb
209
+ - examples/types.rb
210
+ - examples/tags.rb
207
211
  - examples/slugizer.rb
212
+ - examples/helper.rb
213
+ - examples/storage.rb