sinatra_resource 0.4.20 → 0.4.21

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -11,14 +11,12 @@ begin
11
11
  gem.homepage = "http://github.com/djsun/sinatra_resource"
12
12
  gem.authors = ["David James"]
13
13
 
14
- gem.add_dependency 'mongo_mapper', '>= 0.7'
15
- gem.add_dependency 'mongo', '>= 0.18.3'
16
- gem.add_dependency 'mongo_ext', '>= 0.18.3'
14
+ gem.add_dependency 'mongo_mapper', '= 0.8.2'
17
15
  gem.add_dependency 'sinatra', '>= 1.0'
18
16
  gem.add_dependency 'query_string_filter', '>= 0.1.4'
19
17
 
20
18
  gem.add_development_dependency 'crack', '>= 0.1.4'
21
- gem.add_development_dependency 'djsun-context', '>= 0.5.6'
19
+ gem.add_development_dependency 'tu-context', '>= 0.5.8'
22
20
  gem.add_development_dependency 'pending', '>= 0.1.1'
23
21
  gem.add_development_dependency 'rspec', '>= 1.2.9'
24
22
  gem.add_development_dependency 'yard', '>= 0.2.3.5'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.20
1
+ 0.4.21
@@ -1,16 +1,6 @@
1
1
  require 'rubygems'
2
- gem 'activesupport', '= 2.3.5'
3
- require 'active_support'
4
2
 
5
- # Note: mongo_mapper-0.7.0 requires 0.18.3 specifically.
6
- # However, there is a more recent mongo and mongo_ext (0.19).
7
- # Unless we specifically require mongo-0.18.3 and mongo_ext-0.18.3,
8
- # there will be a "Notice: C extension not loaded" warning.
9
- gem 'mongo', "= 0.18.3", '< 1.0'
10
- gem 'mongo_ext', "= 0.18.3", '< 1.0'
11
- require 'mongo'
12
-
13
- gem 'mongo_mapper', '= 0.7.0'
3
+ gem 'mongo_mapper', '= 0.8.2'
14
4
  require 'mongo_mapper'
15
5
 
16
6
  module Config
@@ -2,4 +2,4 @@ require File.dirname(__FILE__) + '/test_helper'
2
2
  require File.expand_path(File.dirname(__FILE__) + '/../../app')
3
3
 
4
4
  BAD_API_KEY = "123400005678"
5
- FAKE_ID = Mongo::ObjectID.new.to_s
5
+ FAKE_ID = BSON::ObjectID.new.to_s
@@ -22,7 +22,8 @@ class ResourceTestCase
22
22
 
23
23
  shared "category unchanged" do
24
24
  test "should not change category in database" do
25
- assert_equal @category_copy, DataCatalog::Category.find_by_id(@category.id)
25
+ original = DataCatalog::Category.find_by_id(@category.id)
26
+ assert_equal @category_copy.name, original.name
26
27
  end
27
28
  end
28
29
 
@@ -48,7 +49,9 @@ class ResourceTestCase
48
49
 
49
50
  shared "note unchanged" do
50
51
  test "should not change note in database" do
51
- assert_equal @note_copy, DataCatalog::Note.find_by_id(@note.id)
52
+ original = DataCatalog::Note.find_by_id(@note.id)
53
+ assert_equal @note_copy.text, original.text
54
+ assert_equal @note_copy.user_id, original.user_id
52
55
  end
53
56
  end
54
57
 
@@ -74,7 +77,10 @@ class ResourceTestCase
74
77
 
75
78
  shared "source unchanged" do
76
79
  test "should not change source in database" do
77
- assert_equal @source_copy, DataCatalog::Source.find_by_id(@source.id)
80
+ original = DataCatalog::Source.find_by_id(@source.id)
81
+ assert_equal @source_copy.title, original.title
82
+ assert_equal @source_copy.description, original.description
83
+ assert_equal @source_copy.url, original.url
78
84
  end
79
85
  end
80
86
 
@@ -132,7 +138,10 @@ class ResourceTestCase
132
138
 
133
139
  shared "user unchanged" do
134
140
  test "should not change user in database" do
135
- assert_equal @user_copy, DataCatalog::User.find_by_id(@user.id)
141
+ original = DataCatalog::User.find_by_id(@user.id)
142
+ assert_equal @user_copy.name, original.name
143
+ assert_equal @user_copy.email, original.email
144
+ assert_equal @user_copy.role, original.role
136
145
  end
137
146
  end
138
147
 
@@ -8,8 +8,8 @@ require 'rr'
8
8
  gem 'crack', '>= 0.1.4'
9
9
  require 'crack/json'
10
10
 
11
- gem 'djsun-context', '>= 0.5.6'
12
- require 'context'
11
+ gem 'tu-context', '>= 0.5.8'
12
+ require 'tu-context'
13
13
 
14
14
  gem 'pending', '>= 0.1.1'
15
15
  require 'pending'
@@ -61,16 +61,16 @@ class CategoryTest < ModelTestCase
61
61
  test "#sources should have 3 categorizations" do
62
62
  categorizations = @category.categorizations
63
63
  assert_equal 3, categorizations.length
64
- 3.times do |i|
65
- assert_include @categorizations[i], categorizations
64
+ categorizations.each do |categorization|
65
+ assert_include categorization, @categorizations
66
66
  end
67
67
  end
68
68
 
69
69
  test "#sources should have 3 sources" do
70
70
  sources = @category.sources
71
71
  assert_equal 3, sources.length
72
- 3.times do |i|
73
- assert_include @sources[i], sources
72
+ sources.each do |source|
73
+ assert_include source, @sources
74
74
  end
75
75
  end
76
76
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sinatra_resource}
8
- s.version = "0.4.20"
8
+ s.version = "0.4.21"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["David James"]
12
- s.date = %q{2010-04-26}
12
+ s.date = %q{2010-07-15}
13
13
  s.description = %q{A DSL for creating RESTful actions with Sinatra and MongoMapper. It embraces the Resource Oriented Architecture as explained by Leonard Richardson and Sam Ruby.}
14
14
  s.email = %q{djames@sunlightfoundation.com}
15
15
  s.extra_rdoc_files = [
@@ -205,36 +205,30 @@ Gem::Specification.new do |s|
205
205
  s.specification_version = 3
206
206
 
207
207
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
208
- s.add_runtime_dependency(%q<mongo_mapper>, [">= 0.7"])
209
- s.add_runtime_dependency(%q<mongo>, [">= 0.18.3"])
210
- s.add_runtime_dependency(%q<mongo_ext>, [">= 0.18.3"])
208
+ s.add_runtime_dependency(%q<mongo_mapper>, ["= 0.8.2"])
211
209
  s.add_runtime_dependency(%q<sinatra>, [">= 1.0"])
212
210
  s.add_runtime_dependency(%q<query_string_filter>, [">= 0.1.4"])
213
211
  s.add_development_dependency(%q<crack>, [">= 0.1.4"])
214
- s.add_development_dependency(%q<djsun-context>, [">= 0.5.6"])
212
+ s.add_development_dependency(%q<tu-context>, [">= 0.5.8"])
215
213
  s.add_development_dependency(%q<pending>, [">= 0.1.1"])
216
214
  s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
217
215
  s.add_development_dependency(%q<yard>, [">= 0.2.3.5"])
218
216
  else
219
- s.add_dependency(%q<mongo_mapper>, [">= 0.7"])
220
- s.add_dependency(%q<mongo>, [">= 0.18.3"])
221
- s.add_dependency(%q<mongo_ext>, [">= 0.18.3"])
217
+ s.add_dependency(%q<mongo_mapper>, ["= 0.8.2"])
222
218
  s.add_dependency(%q<sinatra>, [">= 1.0"])
223
219
  s.add_dependency(%q<query_string_filter>, [">= 0.1.4"])
224
220
  s.add_dependency(%q<crack>, [">= 0.1.4"])
225
- s.add_dependency(%q<djsun-context>, [">= 0.5.6"])
221
+ s.add_dependency(%q<tu-context>, [">= 0.5.8"])
226
222
  s.add_dependency(%q<pending>, [">= 0.1.1"])
227
223
  s.add_dependency(%q<rspec>, [">= 1.2.9"])
228
224
  s.add_dependency(%q<yard>, [">= 0.2.3.5"])
229
225
  end
230
226
  else
231
- s.add_dependency(%q<mongo_mapper>, [">= 0.7"])
232
- s.add_dependency(%q<mongo>, [">= 0.18.3"])
233
- s.add_dependency(%q<mongo_ext>, [">= 0.18.3"])
227
+ s.add_dependency(%q<mongo_mapper>, ["= 0.8.2"])
234
228
  s.add_dependency(%q<sinatra>, [">= 1.0"])
235
229
  s.add_dependency(%q<query_string_filter>, [">= 0.1.4"])
236
230
  s.add_dependency(%q<crack>, [">= 0.1.4"])
237
- s.add_dependency(%q<djsun-context>, [">= 0.5.6"])
231
+ s.add_dependency(%q<tu-context>, [">= 0.5.8"])
238
232
  s.add_dependency(%q<pending>, [">= 0.1.1"])
239
233
  s.add_dependency(%q<rspec>, [">= 1.2.9"])
240
234
  s.add_dependency(%q<yard>, [">= 0.2.3.5"])
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 20
9
- version: 0.4.20
8
+ - 21
9
+ version: 0.4.21
10
10
  platform: ruby
11
11
  authors:
12
12
  - David James
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-26 00:00:00 -04:00
17
+ date: 2010-07-15 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -22,46 +22,19 @@ dependencies:
22
22
  prerelease: false
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ">="
25
+ - - "="
26
26
  - !ruby/object:Gem::Version
27
27
  segments:
28
28
  - 0
29
- - 7
30
- version: "0.7"
29
+ - 8
30
+ - 2
31
+ version: 0.8.2
31
32
  type: :runtime
32
33
  version_requirements: *id001
33
- - !ruby/object:Gem::Dependency
34
- name: mongo
35
- prerelease: false
36
- requirement: &id002 !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- segments:
41
- - 0
42
- - 18
43
- - 3
44
- version: 0.18.3
45
- type: :runtime
46
- version_requirements: *id002
47
- - !ruby/object:Gem::Dependency
48
- name: mongo_ext
49
- prerelease: false
50
- requirement: &id003 !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- segments:
55
- - 0
56
- - 18
57
- - 3
58
- version: 0.18.3
59
- type: :runtime
60
- version_requirements: *id003
61
34
  - !ruby/object:Gem::Dependency
62
35
  name: sinatra
63
36
  prerelease: false
64
- requirement: &id004 !ruby/object:Gem::Requirement
37
+ requirement: &id002 !ruby/object:Gem::Requirement
65
38
  requirements:
66
39
  - - ">="
67
40
  - !ruby/object:Gem::Version
@@ -70,11 +43,11 @@ dependencies:
70
43
  - 0
71
44
  version: "1.0"
72
45
  type: :runtime
73
- version_requirements: *id004
46
+ version_requirements: *id002
74
47
  - !ruby/object:Gem::Dependency
75
48
  name: query_string_filter
76
49
  prerelease: false
77
- requirement: &id005 !ruby/object:Gem::Requirement
50
+ requirement: &id003 !ruby/object:Gem::Requirement
78
51
  requirements:
79
52
  - - ">="
80
53
  - !ruby/object:Gem::Version
@@ -84,11 +57,11 @@ dependencies:
84
57
  - 4
85
58
  version: 0.1.4
86
59
  type: :runtime
87
- version_requirements: *id005
60
+ version_requirements: *id003
88
61
  - !ruby/object:Gem::Dependency
89
62
  name: crack
90
63
  prerelease: false
91
- requirement: &id006 !ruby/object:Gem::Requirement
64
+ requirement: &id004 !ruby/object:Gem::Requirement
92
65
  requirements:
93
66
  - - ">="
94
67
  - !ruby/object:Gem::Version
@@ -98,25 +71,25 @@ dependencies:
98
71
  - 4
99
72
  version: 0.1.4
100
73
  type: :development
101
- version_requirements: *id006
74
+ version_requirements: *id004
102
75
  - !ruby/object:Gem::Dependency
103
- name: djsun-context
76
+ name: tu-context
104
77
  prerelease: false
105
- requirement: &id007 !ruby/object:Gem::Requirement
78
+ requirement: &id005 !ruby/object:Gem::Requirement
106
79
  requirements:
107
80
  - - ">="
108
81
  - !ruby/object:Gem::Version
109
82
  segments:
110
83
  - 0
111
84
  - 5
112
- - 6
113
- version: 0.5.6
85
+ - 8
86
+ version: 0.5.8
114
87
  type: :development
115
- version_requirements: *id007
88
+ version_requirements: *id005
116
89
  - !ruby/object:Gem::Dependency
117
90
  name: pending
118
91
  prerelease: false
119
- requirement: &id008 !ruby/object:Gem::Requirement
92
+ requirement: &id006 !ruby/object:Gem::Requirement
120
93
  requirements:
121
94
  - - ">="
122
95
  - !ruby/object:Gem::Version
@@ -126,11 +99,11 @@ dependencies:
126
99
  - 1
127
100
  version: 0.1.1
128
101
  type: :development
129
- version_requirements: *id008
102
+ version_requirements: *id006
130
103
  - !ruby/object:Gem::Dependency
131
104
  name: rspec
132
105
  prerelease: false
133
- requirement: &id009 !ruby/object:Gem::Requirement
106
+ requirement: &id007 !ruby/object:Gem::Requirement
134
107
  requirements:
135
108
  - - ">="
136
109
  - !ruby/object:Gem::Version
@@ -140,11 +113,11 @@ dependencies:
140
113
  - 9
141
114
  version: 1.2.9
142
115
  type: :development
143
- version_requirements: *id009
116
+ version_requirements: *id007
144
117
  - !ruby/object:Gem::Dependency
145
118
  name: yard
146
119
  prerelease: false
147
- requirement: &id010 !ruby/object:Gem::Requirement
120
+ requirement: &id008 !ruby/object:Gem::Requirement
148
121
  requirements:
149
122
  - - ">="
150
123
  - !ruby/object:Gem::Version
@@ -155,7 +128,7 @@ dependencies:
155
128
  - 5
156
129
  version: 0.2.3.5
157
130
  type: :development
158
- version_requirements: *id010
131
+ version_requirements: *id008
159
132
  description: A DSL for creating RESTful actions with Sinatra and MongoMapper. It embraces the Resource Oriented Architecture as explained by Leonard Richardson and Sam Ruby.
160
133
  email: djames@sunlightfoundation.com
161
134
  executables: []