zdzolton-cambric 0.2.0 → 0.3.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/README.rdoc +51 -3
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/cambric.gemspec +54 -0
- metadata +3 -2
data/README.rdoc
CHANGED
@@ -4,13 +4,61 @@ Opinionated management and usage of CouchDB from your Ruby apps.
|
|
4
4
|
|
5
5
|
== Usage
|
6
6
|
|
7
|
-
|
7
|
+
1) Configure the Cambric instances:
|
8
|
+
|
9
|
+
@cambric = Cambric.new open('./config/cambric.yml'),
|
10
|
+
:environment => 'development',
|
11
|
+
:design_doc => 'twitter-clone'
|
12
|
+
|
13
|
+
# Optionally:
|
14
|
+
# @cambric.create_all_databases
|
15
|
+
|
16
|
+
2) Interact with CouchRest::Database instances:
|
17
|
+
|
18
|
+
@tweets_db = @cambric[:tweets]
|
19
|
+
@tweets_db.save_doc :author => 'marbles',
|
20
|
+
:message => 'Is this pork or beef, @Randy?',
|
21
|
+
:followers => ['randy','zdzolton','trevorturk'],
|
22
|
+
:created_at => Time.now
|
23
|
+
|
24
|
+
@tweets_db.view 'by_follower_and_created_at', :limit => 1
|
25
|
+
|
26
|
+
3) Push view changes to CouchDB:
|
27
|
+
|
28
|
+
$ ./script/console
|
29
|
+
irb> require 'require cambric.rb' # This needs to change when gem becomes available...! :^/
|
30
|
+
irb> @cambric = Cambric.new open('./config/cambric.yml'),
|
31
|
+
:environment => 'production',
|
32
|
+
:design_doc => 'twitter-clone'
|
33
|
+
irb> @cambric.push_all_design_docs
|
8
34
|
|
9
35
|
== Installation
|
10
36
|
|
11
|
-
|
37
|
+
* Install gems:
|
38
|
+
|
39
|
+
$ sudo gem install jchris-couchapp jchris-couchrest zdzolton-cambric
|
40
|
+
|
41
|
+
* Configure Rails:
|
42
|
+
|
43
|
+
Coming soon...
|
44
|
+
|
45
|
+
* create a couchdb directory within your project
|
46
|
+
$ cd /your/app/root
|
47
|
+
$ mkdir -p ./couchdb/your_db/views/some_view_name
|
48
|
+
|
49
|
+
* create a ./config/cambric.yml file
|
50
|
+
bar:
|
51
|
+
staging:
|
52
|
+
|
53
|
+
somewhere:
|
54
|
+
host: some.where
|
55
|
+
|
56
|
+
baz:
|
57
|
+
staging:
|
12
58
|
|
13
|
-
|
59
|
+
somewhere:
|
60
|
+
port: 5566
|
61
|
+
|
14
62
|
|
15
63
|
== Copyright
|
16
64
|
|
data/Rakefile
CHANGED
@@ -10,7 +10,7 @@ begin
|
|
10
10
|
gem.homepage = "http://github.com/zdzolton/cambric"
|
11
11
|
gem.authors = ["Zachary Zolton", "Geoff Buesing"]
|
12
12
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
13
|
-
gem.add_dependency('jchris-couchrest'
|
13
|
+
gem.add_dependency('jchris-couchrest')
|
14
14
|
end
|
15
15
|
|
16
16
|
rescue LoadError
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.1
|
data/cambric.gemspec
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{cambric}
|
5
|
+
s.version = "0.3.1"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Zachary Zolton", "Geoff Buesing"]
|
9
|
+
s.date = %q{2009-05-18}
|
10
|
+
s.email = %q{zachary.zolton@gmail.com}
|
11
|
+
s.extra_rdoc_files = [
|
12
|
+
"LICENSE",
|
13
|
+
"README.rdoc"
|
14
|
+
]
|
15
|
+
s.files = [
|
16
|
+
".document",
|
17
|
+
".gitignore",
|
18
|
+
"LICENSE",
|
19
|
+
"README.rdoc",
|
20
|
+
"Rakefile",
|
21
|
+
"VERSION",
|
22
|
+
"cambric.gemspec",
|
23
|
+
"lib/cambric.rb",
|
24
|
+
"spec/cambric_spec.rb",
|
25
|
+
"spec/fixtures/degenerate.yml",
|
26
|
+
"spec/fixtures/foo-bar-baz.yml",
|
27
|
+
"spec/fixtures/twitter-clone.yml",
|
28
|
+
"spec/fixtures/twitter-clone/tweets/views/by_follower_and_created_at/map.js",
|
29
|
+
"spec/spec_helper.rb"
|
30
|
+
]
|
31
|
+
s.has_rdoc = true
|
32
|
+
s.homepage = %q{http://github.com/zdzolton/cambric}
|
33
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
34
|
+
s.require_paths = ["lib"]
|
35
|
+
s.rubygems_version = %q{1.3.1}
|
36
|
+
s.summary = %q{Opinionated management and usage of CouchDB from your Ruby apps.}
|
37
|
+
s.test_files = [
|
38
|
+
"spec/cambric_spec.rb",
|
39
|
+
"spec/spec_helper.rb"
|
40
|
+
]
|
41
|
+
|
42
|
+
if s.respond_to? :specification_version then
|
43
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
44
|
+
s.specification_version = 2
|
45
|
+
|
46
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
47
|
+
s.add_runtime_dependency(%q<jchris-couchrest>, [">= 0"])
|
48
|
+
else
|
49
|
+
s.add_dependency(%q<jchris-couchrest>, [">= 0"])
|
50
|
+
end
|
51
|
+
else
|
52
|
+
s.add_dependency(%q<jchris-couchrest>, [">= 0"])
|
53
|
+
end
|
54
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zdzolton-cambric
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zachary Zolton
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
requirements:
|
22
22
|
- - ">="
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version:
|
24
|
+
version: "0"
|
25
25
|
version:
|
26
26
|
description:
|
27
27
|
email: zachary.zolton@gmail.com
|
@@ -39,6 +39,7 @@ files:
|
|
39
39
|
- README.rdoc
|
40
40
|
- Rakefile
|
41
41
|
- VERSION
|
42
|
+
- cambric.gemspec
|
42
43
|
- lib/cambric.rb
|
43
44
|
- spec/cambric_spec.rb
|
44
45
|
- spec/fixtures/degenerate.yml
|