couchrest 0.36 → 0.37

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/Rakefile CHANGED
@@ -22,7 +22,7 @@ begin
22
22
  gemspec.homepage = "http://github.com/couchrest/couchrest"
23
23
  gemspec.authors = ["J. Chris Anderson", "Matt Aimonetti", "Marcos Tapajos", "Will Leinweber"]
24
24
  gemspec.extra_rdoc_files = %w( README.md LICENSE THANKS.md )
25
- gemspec.files = %w( LICENSE README.md Rakefile THANKS.md history.txt) + Dir["{examples,lib,spec,utils}/**/*"] - Dir["spec/tmp"]
25
+ gemspec.files = %w( LICENSE README.md Rakefile THANKS.md history.txt couchrest.gemspec) + Dir["{examples,lib,spec,utils}/**/*"] - Dir["spec/tmp"]
26
26
  gemspec.has_rdoc = true
27
27
  gemspec.add_dependency("rest-client", ">= 0.5")
28
28
  gemspec.add_dependency("mime-types", ">= 1.15")
@@ -0,0 +1,182 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{couchrest}
8
+ s.version = "0.37"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["J. Chris Anderson", "Matt Aimonetti", "Marcos Tapajos", "Will Leinweber"]
12
+ s.date = %q{2010-03-30}
13
+ s.description = %q{CouchRest provides a simple interface on top of CouchDB's RESTful HTTP API, as well as including some utility scripts for managing views and attachments.}
14
+ s.email = %q{jchris@apache.org}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.md",
18
+ "THANKS.md"
19
+ ]
20
+ s.files = [
21
+ "LICENSE",
22
+ "README.md",
23
+ "Rakefile",
24
+ "THANKS.md",
25
+ "couchrest.gemspec",
26
+ "examples/model/example.rb",
27
+ "examples/word_count/markov",
28
+ "examples/word_count/views/books/chunked-map.js",
29
+ "examples/word_count/views/books/united-map.js",
30
+ "examples/word_count/views/markov/chain-map.js",
31
+ "examples/word_count/views/markov/chain-reduce.js",
32
+ "examples/word_count/views/word_count/count-map.js",
33
+ "examples/word_count/views/word_count/count-reduce.js",
34
+ "examples/word_count/word_count.rb",
35
+ "examples/word_count/word_count_query.rb",
36
+ "examples/word_count/word_count_views.rb",
37
+ "history.txt",
38
+ "lib/couchrest.rb",
39
+ "lib/couchrest/commands/generate.rb",
40
+ "lib/couchrest/commands/push.rb",
41
+ "lib/couchrest/core/adapters/restclient.rb",
42
+ "lib/couchrest/core/database.rb",
43
+ "lib/couchrest/core/design.rb",
44
+ "lib/couchrest/core/document.rb",
45
+ "lib/couchrest/core/http_abstraction.rb",
46
+ "lib/couchrest/core/response.rb",
47
+ "lib/couchrest/core/rest_api.rb",
48
+ "lib/couchrest/core/server.rb",
49
+ "lib/couchrest/core/view.rb",
50
+ "lib/couchrest/helper/pager.rb",
51
+ "lib/couchrest/helper/streamer.rb",
52
+ "lib/couchrest/helper/upgrade.rb",
53
+ "lib/couchrest/middlewares/logger.rb",
54
+ "lib/couchrest/mixins.rb",
55
+ "lib/couchrest/mixins/attachments.rb",
56
+ "lib/couchrest/mixins/attribute_protection.rb",
57
+ "lib/couchrest/mixins/callbacks.rb",
58
+ "lib/couchrest/mixins/class_proxy.rb",
59
+ "lib/couchrest/mixins/collection.rb",
60
+ "lib/couchrest/mixins/design_doc.rb",
61
+ "lib/couchrest/mixins/document_queries.rb",
62
+ "lib/couchrest/mixins/extended_attachments.rb",
63
+ "lib/couchrest/mixins/extended_document_mixins.rb",
64
+ "lib/couchrest/mixins/properties.rb",
65
+ "lib/couchrest/mixins/validation.rb",
66
+ "lib/couchrest/mixins/views.rb",
67
+ "lib/couchrest/monkeypatches.rb",
68
+ "lib/couchrest/more/casted_model.rb",
69
+ "lib/couchrest/more/extended_document.rb",
70
+ "lib/couchrest/more/property.rb",
71
+ "lib/couchrest/more/typecast.rb",
72
+ "lib/couchrest/support/blank.rb",
73
+ "lib/couchrest/support/class.rb",
74
+ "lib/couchrest/support/rails.rb",
75
+ "lib/couchrest/validation/auto_validate.rb",
76
+ "lib/couchrest/validation/contextual_validators.rb",
77
+ "lib/couchrest/validation/validation_errors.rb",
78
+ "lib/couchrest/validation/validators/absent_field_validator.rb",
79
+ "lib/couchrest/validation/validators/confirmation_validator.rb",
80
+ "lib/couchrest/validation/validators/format_validator.rb",
81
+ "lib/couchrest/validation/validators/formats/email.rb",
82
+ "lib/couchrest/validation/validators/formats/url.rb",
83
+ "lib/couchrest/validation/validators/generic_validator.rb",
84
+ "lib/couchrest/validation/validators/length_validator.rb",
85
+ "lib/couchrest/validation/validators/method_validator.rb",
86
+ "lib/couchrest/validation/validators/numeric_validator.rb",
87
+ "lib/couchrest/validation/validators/required_field_validator.rb",
88
+ "spec/couchrest/core/couchrest_spec.rb",
89
+ "spec/couchrest/core/database_spec.rb",
90
+ "spec/couchrest/core/design_spec.rb",
91
+ "spec/couchrest/core/document_spec.rb",
92
+ "spec/couchrest/core/server_spec.rb",
93
+ "spec/couchrest/helpers/pager_spec.rb",
94
+ "spec/couchrest/helpers/streamer_spec.rb",
95
+ "spec/couchrest/more/attribute_protection_spec.rb",
96
+ "spec/couchrest/more/casted_extended_doc_spec.rb",
97
+ "spec/couchrest/more/casted_model_spec.rb",
98
+ "spec/couchrest/more/extended_doc_attachment_spec.rb",
99
+ "spec/couchrest/more/extended_doc_inherited_spec.rb",
100
+ "spec/couchrest/more/extended_doc_spec.rb",
101
+ "spec/couchrest/more/extended_doc_subclass_spec.rb",
102
+ "spec/couchrest/more/extended_doc_view_spec.rb",
103
+ "spec/couchrest/more/property_spec.rb",
104
+ "spec/fixtures/attachments/README",
105
+ "spec/fixtures/attachments/couchdb.png",
106
+ "spec/fixtures/attachments/test.html",
107
+ "spec/fixtures/more/article.rb",
108
+ "spec/fixtures/more/card.rb",
109
+ "spec/fixtures/more/cat.rb",
110
+ "spec/fixtures/more/course.rb",
111
+ "spec/fixtures/more/event.rb",
112
+ "spec/fixtures/more/invoice.rb",
113
+ "spec/fixtures/more/person.rb",
114
+ "spec/fixtures/more/question.rb",
115
+ "spec/fixtures/more/service.rb",
116
+ "spec/fixtures/more/user.rb",
117
+ "spec/fixtures/views/lib.js",
118
+ "spec/fixtures/views/test_view/lib.js",
119
+ "spec/fixtures/views/test_view/only-map.js",
120
+ "spec/fixtures/views/test_view/test-map.js",
121
+ "spec/fixtures/views/test_view/test-reduce.js",
122
+ "spec/spec.opts",
123
+ "spec/spec_helper.rb",
124
+ "utils/remap.rb",
125
+ "utils/subset.rb"
126
+ ]
127
+ s.homepage = %q{http://github.com/couchrest/couchrest}
128
+ s.rdoc_options = ["--charset=UTF-8"]
129
+ s.require_paths = ["lib"]
130
+ s.rubygems_version = %q{1.3.6}
131
+ s.summary = %q{Lean and RESTful interface to CouchDB.}
132
+ s.test_files = [
133
+ "spec/couchrest/core/couchrest_spec.rb",
134
+ "spec/couchrest/core/database_spec.rb",
135
+ "spec/couchrest/core/design_spec.rb",
136
+ "spec/couchrest/core/document_spec.rb",
137
+ "spec/couchrest/core/server_spec.rb",
138
+ "spec/couchrest/helpers/pager_spec.rb",
139
+ "spec/couchrest/helpers/streamer_spec.rb",
140
+ "spec/couchrest/more/attribute_protection_spec.rb",
141
+ "spec/couchrest/more/casted_extended_doc_spec.rb",
142
+ "spec/couchrest/more/casted_model_spec.rb",
143
+ "spec/couchrest/more/extended_doc_attachment_spec.rb",
144
+ "spec/couchrest/more/extended_doc_inherited_spec.rb",
145
+ "spec/couchrest/more/extended_doc_spec.rb",
146
+ "spec/couchrest/more/extended_doc_subclass_spec.rb",
147
+ "spec/couchrest/more/extended_doc_view_spec.rb",
148
+ "spec/couchrest/more/property_spec.rb",
149
+ "spec/fixtures/more/article.rb",
150
+ "spec/fixtures/more/card.rb",
151
+ "spec/fixtures/more/cat.rb",
152
+ "spec/fixtures/more/course.rb",
153
+ "spec/fixtures/more/event.rb",
154
+ "spec/fixtures/more/invoice.rb",
155
+ "spec/fixtures/more/person.rb",
156
+ "spec/fixtures/more/question.rb",
157
+ "spec/fixtures/more/service.rb",
158
+ "spec/fixtures/more/user.rb",
159
+ "spec/spec_helper.rb",
160
+ "examples/model/example.rb",
161
+ "examples/word_count/word_count.rb",
162
+ "examples/word_count/word_count_query.rb",
163
+ "examples/word_count/word_count_views.rb"
164
+ ]
165
+
166
+ if s.respond_to? :specification_version then
167
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
168
+ s.specification_version = 3
169
+
170
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
171
+ s.add_runtime_dependency(%q<rest-client>, [">= 0.5"])
172
+ s.add_runtime_dependency(%q<mime-types>, [">= 1.15"])
173
+ else
174
+ s.add_dependency(%q<rest-client>, [">= 0.5"])
175
+ s.add_dependency(%q<mime-types>, [">= 1.15"])
176
+ end
177
+ else
178
+ s.add_dependency(%q<rest-client>, [">= 0.5"])
179
+ s.add_dependency(%q<mime-types>, [">= 1.15"])
180
+ end
181
+ end
182
+
@@ -4,6 +4,11 @@
4
4
 
5
5
  * Minor enhancements
6
6
 
7
+ == 0.37
8
+
9
+ * Minor enhancements
10
+ * Added gemspec (needed for Bundler install) (Tapajós)
11
+
7
12
  == 0.36
8
13
 
9
14
  * Major enhancements
@@ -28,7 +28,7 @@ require 'couchrest/monkeypatches'
28
28
 
29
29
  # = CouchDB, close to the metal
30
30
  module CouchRest
31
- VERSION = '0.36' unless self.const_defined?("VERSION")
31
+ VERSION = '0.37' unless self.const_defined?("VERSION")
32
32
 
33
33
  autoload :Server, 'couchrest/core/server'
34
34
  autoload :Database, 'couchrest/core/database'
@@ -3,6 +3,7 @@
3
3
  require File.expand_path("../../../spec_helper", __FILE__)
4
4
  require File.join(FIXTURE_PATH, 'more', 'article')
5
5
  require File.join(FIXTURE_PATH, 'more', 'course')
6
+ require File.join(FIXTURE_PATH, 'more', 'card')
6
7
  require File.join(FIXTURE_PATH, 'more', 'cat')
7
8
 
8
9
  describe "ExtendedDocument" do
@@ -426,7 +427,16 @@ describe "ExtendedDocument" do
426
427
  obj.created_at.should be_an_instance_of(Time)
427
428
  obj.updated_at.should be_an_instance_of(Time)
428
429
  obj.created_at.to_s.should == @obj.updated_at.to_s
429
- end
430
+ end
431
+
432
+ it "should not change created_at on update" do
433
+ 2.times do
434
+ lambda do
435
+ @art.save
436
+ end.should_not change(@art, :created_at)
437
+ end
438
+ end
439
+
430
440
  it "should set the time on create" do
431
441
  (Time.now - @art.created_at).should < 2
432
442
  foundart = Article.get @art.id
metadata CHANGED
@@ -4,8 +4,8 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 36
8
- version: "0.36"
7
+ - 37
8
+ version: "0.37"
9
9
  platform: ruby
10
10
  authors:
11
11
  - J. Chris Anderson
@@ -60,6 +60,7 @@ files:
60
60
  - README.md
61
61
  - Rakefile
62
62
  - THANKS.md
63
+ - couchrest.gemspec
63
64
  - examples/model/example.rb
64
65
  - examples/word_count/markov
65
66
  - examples/word_count/views/books/chunked-map.js