couchpop 0.1 → 0.1.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/VERSION +1 -1
- data/lib/couchpop.rb +6 -3
- metadata +4 -3
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1
|
|
1
|
+
0.1.1
|
data/lib/couchpop.rb
CHANGED
|
@@ -13,9 +13,7 @@ class Couchpop
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def database
|
|
16
|
-
|
|
17
16
|
@database ||= begin
|
|
18
|
-
server.database!(database_name).delete!
|
|
19
17
|
server.database!(database_name)
|
|
20
18
|
end
|
|
21
19
|
end
|
|
@@ -23,7 +21,12 @@ class Couchpop
|
|
|
23
21
|
def rock!
|
|
24
22
|
|
|
25
23
|
server.database!(app_name)
|
|
26
|
-
|
|
24
|
+
|
|
25
|
+
doc = begin
|
|
26
|
+
database.get(app_name)
|
|
27
|
+
rescue RestClient::ResourceNotFound
|
|
28
|
+
CouchRest::Document.new({'_id' => app_name})
|
|
29
|
+
end
|
|
27
30
|
doc.database = database
|
|
28
31
|
|
|
29
32
|
database.save_doc(doc)
|
metadata
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: couchpop
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 25
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 1
|
|
9
|
-
|
|
9
|
+
- 1
|
|
10
|
+
version: 0.1.1
|
|
10
11
|
platform: ruby
|
|
11
12
|
authors:
|
|
12
13
|
- Paul Campbell
|
|
@@ -14,7 +15,7 @@ autorequire:
|
|
|
14
15
|
bindir: bin
|
|
15
16
|
cert_chain: []
|
|
16
17
|
|
|
17
|
-
date: 2010-
|
|
18
|
+
date: 2010-11-03 00:00:00 +00:00
|
|
18
19
|
default_executable: couchpop
|
|
19
20
|
dependencies:
|
|
20
21
|
- !ruby/object:Gem::Dependency
|