couch_potato 0.7.0 → 0.7.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/CHANGES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## Changes
2
2
 
3
+ ### 0.7.1
4
+
5
+ * fixes a bug when trying to bulk-load non-existant documents
6
+
3
7
  ### 0.7.0
4
8
 
5
9
  * ActiveSupport/Rails 3.2 compatibility (Alexander Lang)
data/Gemfile.lock CHANGED
@@ -1,46 +1,46 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- couch_potato (0.7.0.pre.1)
4
+ couch_potato (0.7.0)
5
5
  activemodel
6
6
  couchrest (>= 1.0.1)
7
- json (~> 1.6.0)
7
+ json (~> 1.6)
8
8
 
9
9
  GEM
10
10
  remote: http://rubygems.org/
11
11
  specs:
12
- activemodel (3.2.1)
13
- activesupport (= 3.2.1)
12
+ activemodel (3.2.8)
13
+ activesupport (= 3.2.8)
14
14
  builder (~> 3.0.0)
15
- activesupport (3.2.1)
15
+ activesupport (3.2.8)
16
16
  i18n (~> 0.6)
17
17
  multi_json (~> 1.0)
18
18
  builder (3.0.0)
19
- couchrest (1.1.2)
19
+ couchrest (1.1.3)
20
20
  mime-types (~> 1.15)
21
- multi_json (~> 1.0.0)
21
+ multi_json (~> 1.0)
22
22
  rest-client (~> 1.6.1)
23
23
  diff-lcs (1.1.3)
24
24
  i18n (0.6.0)
25
- json (1.6.5)
25
+ json (1.7.5)
26
26
  libv8 (3.3.10.4)
27
- mime-types (1.17.2)
28
- multi_json (1.0.4)
29
- rake (0.9.2)
27
+ mime-types (1.19)
28
+ multi_json (1.3.6)
29
+ rake (0.9.2.2)
30
30
  rest-client (1.6.7)
31
31
  mime-types (>= 1.16)
32
- rspec (2.6.0)
33
- rspec-core (~> 2.6.0)
34
- rspec-expectations (~> 2.6.0)
35
- rspec-mocks (~> 2.6.0)
36
- rspec-core (2.6.4)
37
- rspec-expectations (2.6.0)
38
- diff-lcs (~> 1.1.2)
39
- rspec-mocks (2.6.0)
40
- therubyracer (0.10.1)
32
+ rspec (2.11.0)
33
+ rspec-core (~> 2.11.0)
34
+ rspec-expectations (~> 2.11.0)
35
+ rspec-mocks (~> 2.11.0)
36
+ rspec-core (2.11.1)
37
+ rspec-expectations (2.11.2)
38
+ diff-lcs (~> 1.1.3)
39
+ rspec-mocks (2.11.2)
40
+ therubyracer (0.10.2)
41
41
  libv8 (~> 3.3.10)
42
- timecop (0.3.5)
43
- tzinfo (0.3.30)
42
+ timecop (0.4.5)
43
+ tzinfo (0.3.33)
44
44
 
45
45
  PLATFORMS
46
46
  ruby
data/README.md CHANGED
@@ -4,6 +4,11 @@
4
4
 
5
5
  [![Build Status](https://secure.travis-ci.org/langalex/couch_potato.png?branch=master)](http://travis-ci.org/langalex/couch_potato)
6
6
 
7
+ [![Dependencies](https://gemnasium.com/langalex/couch_potato.png)](https://gemnasium.com/langalex/couch_potato)
8
+
9
+ [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/langalex/couch_potato)
10
+
11
+
7
12
  ### Mission
8
13
 
9
14
  The goal of Couch Potato is to create a minimal framework in order to store and retrieve Ruby objects to/from CouchDB and create and query views.
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- couch_potato (0.7.0.pre.1)
4
+ couch_potato (0.7.0)
5
5
  activemodel
6
6
  couchrest (>= 1.0.1)
7
- json (~> 1.6.0)
7
+ json (~> 1.6)
8
8
 
9
9
  GEM
10
10
  remote: http://rubygems.org/
@@ -15,16 +15,16 @@ GEM
15
15
  i18n (~> 0.5.0)
16
16
  activesupport (3.0.6)
17
17
  builder (2.1.2)
18
- couchrest (1.1.2)
18
+ couchrest (1.1.3)
19
19
  mime-types (~> 1.15)
20
- multi_json (~> 1.0.0)
20
+ multi_json (~> 1.0)
21
21
  rest-client (~> 1.6.1)
22
22
  diff-lcs (1.1.2)
23
23
  i18n (0.5.0)
24
- json (1.6.5)
24
+ json (1.7.5)
25
25
  libv8 (3.3.10.4)
26
- mime-types (1.17.2)
27
- multi_json (1.0.4)
26
+ mime-types (1.19)
27
+ multi_json (1.3.6)
28
28
  rake (0.8.7)
29
29
  rest-client (1.6.7)
30
30
  mime-types (>= 1.16)
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- couch_potato (0.7.0.pre.1)
4
+ couch_potato (0.7.0)
5
5
  activemodel
6
6
  couchrest (>= 1.0.1)
7
- json (~> 1.6.0)
7
+ json (~> 1.6)
8
8
 
9
9
  GEM
10
10
  remote: http://rubygems.org/
@@ -18,15 +18,15 @@ GEM
18
18
  multi_json (~> 1.0)
19
19
  bcrypt-ruby (3.0.1)
20
20
  builder (3.0.0)
21
- couchrest (1.1.2)
21
+ couchrest (1.1.3)
22
22
  mime-types (~> 1.15)
23
- multi_json (~> 1.0.0)
23
+ multi_json (~> 1.0)
24
24
  rest-client (~> 1.6.1)
25
25
  diff-lcs (1.1.2)
26
26
  i18n (0.6.0)
27
- json (1.6.5)
27
+ json (1.7.5)
28
28
  libv8 (3.3.10.4)
29
- mime-types (1.17.2)
29
+ mime-types (1.19)
30
30
  multi_json (1.0.3)
31
31
  rake (0.9.2)
32
32
  rest-client (1.6.7)
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- couch_potato (0.7.0.pre.1)
4
+ couch_potato (0.7.0)
5
5
  activemodel
6
6
  couchrest (>= 1.0.1)
7
- json (~> 1.6.0)
7
+ json (~> 1.6)
8
8
 
9
9
  GEM
10
10
  remote: http://rubygems.org/
@@ -16,15 +16,15 @@ GEM
16
16
  i18n (~> 0.6)
17
17
  multi_json (~> 1.0)
18
18
  builder (3.0.0)
19
- couchrest (1.1.2)
19
+ couchrest (1.1.3)
20
20
  mime-types (~> 1.15)
21
- multi_json (~> 1.0.0)
21
+ multi_json (~> 1.0)
22
22
  rest-client (~> 1.6.1)
23
23
  diff-lcs (1.1.3)
24
24
  i18n (0.6.0)
25
- json (1.6.5)
25
+ json (1.7.5)
26
26
  libv8 (3.3.10.4)
27
- mime-types (1.17.2)
27
+ mime-types (1.19)
28
28
  multi_json (1.0.4)
29
29
  rake (0.9.2.2)
30
30
  rest-client (1.6.7)
data/couch_potato.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.version = CouchPotato::VERSION
13
13
  s.platform = Gem::Platform::RUBY
14
14
 
15
- s.add_dependency 'json', '~> 1.6.0'
15
+ s.add_dependency 'json', '~> 1.6'
16
16
  s.add_dependency 'couchrest', '>=1.0.1'
17
17
  s.add_dependency 'activemodel'
18
18
 
@@ -146,8 +146,7 @@ module CouchPotato
146
146
 
147
147
  def bulk_load(ids)
148
148
  response = couchrest_database.bulk_load ids
149
- existing_rows = response['rows'].select{|row| row.key? 'doc'}
150
- docs = existing_rows.map{|row| row["doc"]}
149
+ docs = response['rows'].map{|row| row["doc"]}.compact
151
150
  docs.each{|doc| doc.database = self}
152
151
  end
153
152
 
@@ -1,3 +1,3 @@
1
1
  module CouchPotato
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  end
@@ -73,7 +73,7 @@ describe CouchPotato::Database, 'load' do
73
73
  let(:doc1) { DbTestUser.new }
74
74
  let(:doc2) { DbTestUser.new }
75
75
  let(:response) do
76
- {"rows" => [{}, {"doc" => doc1}, {"doc" => doc2}]}
76
+ {"rows" => [{'doc' => nil}, {"doc" => doc1}, {"doc" => doc2}]}
77
77
  end
78
78
 
79
79
  before(:each) do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: couch_potato
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,22 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-06 00:00:00.000000000 Z
12
+ date: 2012-08-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
- requirement: &70254093121880 !ruby/object:Gem::Requirement
16
+ requirement: &70144114426360 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 1.6.0
21
+ version: '1.6'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70254093121880
24
+ version_requirements: *70144114426360
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: couchrest
27
- requirement: &70254093121340 !ruby/object:Gem::Requirement
27
+ requirement: &70144114425700 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.1
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70254093121340
35
+ version_requirements: *70144114425700
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: activemodel
38
- requirement: &70254093120940 !ruby/object:Gem::Requirement
38
+ requirement: &70144114425020 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70254093120940
46
+ version_requirements: *70144114425020
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &70254093120100 !ruby/object:Gem::Requirement
49
+ requirement: &70144114423960 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '2.0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70254093120100
57
+ version_requirements: *70144114423960
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: timecop
60
- requirement: &70254093119400 !ruby/object:Gem::Requirement
60
+ requirement: &70144114423380 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70254093119400
68
+ version_requirements: *70144114423380
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: tzinfo
71
- requirement: &70254093134340 !ruby/object:Gem::Requirement
71
+ requirement: &70144114422720 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70254093134340
79
+ version_requirements: *70144114422720
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rake
82
- requirement: &70254093133340 !ruby/object:Gem::Requirement
82
+ requirement: &70144114422160 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70254093133340
90
+ version_requirements: *70144114422160
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: therubyracer
93
- requirement: &70254093132300 !ruby/object:Gem::Requirement
93
+ requirement: &70144114421380 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,7 +98,7 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *70254093132300
101
+ version_requirements: *70144114421380
102
102
  description: Ruby persistence layer for CouchDB
103
103
  email: alex@upstre.am
104
104
  executables: []