couch 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. data/README.rdoc +6 -88
  2. data/Rakefile +3 -54
  3. data/bin/couch +1 -7
  4. data/couch.gemspec +6 -72
  5. data/lib/couch.rb +0 -41
  6. metadata +9 -127
  7. data/.gitmodules +0 -3
  8. data/LICENSE +0 -20
  9. data/lib/couch/actions/base.rb +0 -15
  10. data/lib/couch/actions/pull.rb +0 -28
  11. data/lib/couch/actions/push.rb +0 -53
  12. data/lib/couch/actions/routes.rb +0 -41
  13. data/lib/couch/commands.rb +0 -41
  14. data/lib/couch/commands/destroy.rb +0 -9
  15. data/lib/couch/commands/generate.rb +0 -9
  16. data/lib/couch/commands/pull.rb +0 -4
  17. data/lib/couch/commands/push.rb +0 -4
  18. data/lib/couch/commands/routes.rb +0 -4
  19. data/lib/couch/design_document.rb +0 -314
  20. data/lib/couch/generators.rb +0 -63
  21. data/lib/couch/generators/application/USAGE +0 -10
  22. data/lib/couch/generators/application/application_generator.rb +0 -51
  23. data/lib/couch/generators/application/templates/README +0 -1
  24. data/lib/couch/generators/application/templates/_attachments/index.html +0 -11
  25. data/lib/couch/generators/application/templates/_attachments/stylesheets/application.css +0 -25
  26. data/lib/couch/generators/application/templates/_id +0 -1
  27. data/lib/couch/generators/application/templates/couchrc +0 -1
  28. data/lib/couch/generators/application/templates/gitignore +0 -0
  29. data/lib/couch/generators/application/templates/lib/mustache.js +0 -305
  30. data/lib/couch/generators/application/templates/validate_doc_update.js +0 -3
  31. data/lib/couch/generators/base.rb +0 -66
  32. data/lib/couch/generators/list/USAGE +0 -8
  33. data/lib/couch/generators/list/list_generator.rb +0 -9
  34. data/lib/couch/generators/list/templates/list.js +0 -29
  35. data/lib/couch/generators/named_base.rb +0 -22
  36. data/lib/couch/generators/scaffold/USAGE +0 -10
  37. data/lib/couch/generators/scaffold/scaffold_generator.rb +0 -28
  38. data/lib/couch/generators/show/USAGE +0 -8
  39. data/lib/couch/generators/show/show_generator.rb +0 -9
  40. data/lib/couch/generators/show/templates/show.js +0 -20
  41. data/lib/couch/generators/validation/USAGE +0 -9
  42. data/lib/couch/generators/validation/templates/validate_doc_update.js +0 -3
  43. data/lib/couch/generators/validation/validation_generator.rb +0 -34
  44. data/lib/couch/generators/view/USAGE +0 -8
  45. data/lib/couch/generators/view/templates/map.js +0 -5
  46. data/lib/couch/generators/view/view_generator.rb +0 -17
  47. data/lib/couch/version.rb +0 -3
  48. data/spec/couch/design_document_spec.rb +0 -313
  49. data/spec/couch_spec.rb +0 -7
  50. data/spec/spec.opts +0 -1
  51. data/spec/spec_helper.rb +0 -9
@@ -1,92 +1,10 @@
1
- = Couch
1
+ = Couch => Rid
2
2
 
3
- Standalone CouchDB Application Development Suite
3
+ This project has been renamed and went to http://github.com/jo/rid.
4
4
 
5
- With Couch you can easy build a standalone CouchDB application. Couch aims to bring some of the Rails beauty to CouchDB.
6
- Currently Couch supports Rails style Generators you will love, using the same awesome Thor library used in Rails 3.
5
+ Please install it via
7
6
 
7
+ gem install rid
8
8
 
9
- == Why?
10
-
11
- Why do we need a new CouchDB Application Development Suite? We already have the powerful {CouchApp}[http://github.com/couchapp/couchapp].
12
-
13
- I miss some beauty. I miss some elegance on the command line.
14
-
15
- I know my attempt is almost a small little step towards the beauty I aspire.
16
- I try to pilfer the most of now: From CouchApp and Ruby on Rails.
17
- So here we go:
18
-
19
- <em>Couch is designed to structure standalone CouchDB application development for maximum application portability.</em>
20
-
21
- === Web development that doesn't hurt
22
-
23
- Couch is a set of open-source tools that's optimized for programmer happiness and sustainable productivity. It lets you write beautyful code by favoring convention over configuration.
24
-
25
- === Write apps using just JavaScript and HTML
26
-
27
- Render HTML documents using JavaScript templates run by CouchDB. You'll get parallelism and cacheability, *using only HTML and JavaScript*.
28
- Building standalone CouchDB applications according to correct principles affords you options not found on other platforms.
29
-
30
-
31
- == What comes next
32
-
33
- At the moment, Couch supports generating a scaffold application, pushing to a CouchDB server and pulling from a CouchDB.
34
- Couch injects the !code and !json makros introduced by CouchApp.
35
-
36
- The next big steps are:
37
-
38
- * make use of mustache.js in generators
39
- * build a lightweight JavaScript library to assist client side JavaScript work
40
- * enhance generators to build a full flavored scaffold with all CRUD operations
41
-
42
- == I need your help!
43
-
44
- The reason why I release that project in such an early state is that I beleave it's you, who invent that desired beauty!
45
-
46
-
47
- == Prerequisites
48
-
49
- All you need is Ruby and its packet manager RubyGems. If you do not have a Ruby environment,
50
-
51
- apt-get install ruby rubygems
52
-
53
- will probably install the required packages. If you run into any troubles, visit http://docs.rubygems.org/read/chapter/3 for in deapth installation notes for RubyGems, and http://www.ruby-lang.org/en/downloads/ for help on installing Ruby.
54
-
55
- Of course, Couch relies on CouchDB. You do not have to install your own CouchDB server if you have access to a CouchDB database over the internet, but I recommend it for development.
56
- If you are new to CouchDB, install it:
57
-
58
- apt-get install couchdb
59
-
60
- Take a look at the CouchDB Wiki, where the page http://wiki.apache.org/couchdb/Installation describes the installation for all common systems.
61
-
62
-
63
- == Installation
64
-
65
- Couch installation is easy.
66
- Couch is available as RubyGem, hosted on http://rubygems.org/ (aka Gemcutter) and Rubyforge (http://rubyforge.org).
67
- Install the gem with
68
-
69
- gem install couch
70
-
71
-
72
- == Gettings started
73
-
74
- Once installed, your system will have the brand new +couch+ command.
75
- So just type
76
-
77
- couch
78
-
79
- and relax.
80
-
81
-
82
- == Note on Patches/Pull Requests
83
-
84
- * Fork the project.
85
- * Make your feature addition or bug fix.
86
- * Commit, do not mess with rakefile, version, or history.
87
- * Send me a pull request. Bonus points for topic branches.
88
-
89
-
90
- == Copyright
91
-
92
- Copyright (c) 2010 Johannes Jörg Schmidt, TF. See LICENSE for details.
9
+ Greetings
10
+ Johannes
data/Rakefile CHANGED
@@ -1,72 +1,21 @@
1
1
  require 'rubygems'
2
2
  require 'rake'
3
- require File.join(File.dirname(__FILE__), 'lib', 'couch', 'version')
4
-
5
- namespace :vendor do
6
- desc "Update vendor"
7
- task :update do
8
- `git submodule update`
9
- end
10
-
11
- desc "vendor mustache"
12
- task :mustache do
13
- dir = File.expand_path('..', __FILE__)
14
- source = File.join(dir, 'vendor/mustache.js/mustache.js')
15
- target = File.join(dir, 'lib/couch/generators/application/templates/lib/')
16
- FileUtils.cp source, target
17
- end
18
- end
19
-
20
- desc "Vendor all"
21
- task :vendor => ["vendor:update", "vendor:mustache"]
22
-
23
3
 
24
4
  begin
25
5
  require 'jeweler'
26
6
  Jeweler::Tasks.new do |gem|
27
7
  gem.name = "couch"
28
- gem.version = Couch::VERSION
29
- gem.summary = %Q{Standalone CouchDB Application Development Suite}
30
- gem.description = %Q{With Couch you can easy build a standalone CouchDB application.}
8
+ gem.version = "0.2.1"
9
+ gem.summary = %Q{Depricated: this project went to rid}
10
+ gem.description = %Q{Depricated: this project went to rid.}
31
11
  gem.email = "schmidt@netzmerk.com"
32
12
  gem.homepage = "http://github.com/jo/couch"
33
13
  gem.authors = ["Johannes J. Schmidt"]
34
14
  gem.rubyforge_project = "couch"
35
- gem.add_dependency "thor", ">= 0.13.4"
36
- gem.add_dependency "rest-client", ">= 1.4.1"
37
- gem.add_dependency "json_pure", ">= 1.2.2"
38
- gem.add_dependency "activesupport", ">= 3.0.0.beta"
39
- gem.add_development_dependency "rspec", ">= 1.2.9"
40
15
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
41
16
  end
42
17
  Jeweler::GemcutterTasks.new
43
- Jeweler::RubyforgeTasks.new do |rubyforge|
44
- rubyforge.doc_task = "rdoc"
45
- end
46
18
  rescue LoadError
47
19
  puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
48
20
  end
49
21
 
50
- require 'spec/rake/spectask'
51
- Spec::Rake::SpecTask.new(:spec) do |spec|
52
- spec.libs << 'lib' << 'spec'
53
- spec.spec_files = FileList['spec/**/*_spec.rb']
54
- end
55
-
56
- Spec::Rake::SpecTask.new(:rcov) do |spec|
57
- spec.libs << 'lib' << 'spec'
58
- spec.pattern = 'spec/**/*_spec.rb'
59
- spec.rcov = true
60
- end
61
-
62
- task :spec => :check_dependencies
63
-
64
- task :default => :spec
65
-
66
- require 'rake/rdoctask'
67
- Rake::RDocTask.new do |rdoc|
68
- rdoc.rdoc_dir = 'rdoc'
69
- rdoc.title = "couch #{Couch::VERSION}"
70
- rdoc.rdoc_files.include('README*')
71
- rdoc.rdoc_files.include('lib/**/*.rb')
72
- end
data/bin/couch CHANGED
@@ -1,7 +1 @@
1
- #!/usr/bin/env ruby1.8
2
-
3
- couch_path = File.expand_path('../../lib', __FILE__)
4
- $:.unshift(couch_path) if File.directory?(couch_path) && !$:.include?(couch_path)
5
-
6
- require 'couch'
7
- require 'couch/commands'
1
+ puts File.read File.expand_path("../../README.rdoc", __FILE__)
@@ -5,107 +5,41 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{couch}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Johannes J. Schmidt"]
12
- s.date = %q{2010-03-10}
12
+ s.date = %q{2010-03-11}
13
13
  s.default_executable = %q{couch}
14
- s.description = %q{With Couch you can easy build a standalone CouchDB application.}
14
+ s.description = %q{Depricated: this project went to rid.}
15
15
  s.email = %q{schmidt@netzmerk.com}
16
16
  s.executables = ["couch"]
17
17
  s.extra_rdoc_files = [
18
- "LICENSE",
19
- "README.rdoc"
18
+ "README.rdoc"
20
19
  ]
21
20
  s.files = [
22
21
  ".gitignore",
23
- ".gitmodules",
24
- "LICENSE",
25
22
  "README.rdoc",
26
23
  "Rakefile",
27
24
  "bin/couch",
28
25
  "couch.gemspec",
29
- "lib/couch.rb",
30
- "lib/couch/actions/base.rb",
31
- "lib/couch/actions/pull.rb",
32
- "lib/couch/actions/push.rb",
33
- "lib/couch/actions/routes.rb",
34
- "lib/couch/commands.rb",
35
- "lib/couch/commands/destroy.rb",
36
- "lib/couch/commands/generate.rb",
37
- "lib/couch/commands/pull.rb",
38
- "lib/couch/commands/push.rb",
39
- "lib/couch/commands/routes.rb",
40
- "lib/couch/design_document.rb",
41
- "lib/couch/generators.rb",
42
- "lib/couch/generators/application/USAGE",
43
- "lib/couch/generators/application/application_generator.rb",
44
- "lib/couch/generators/application/templates/README",
45
- "lib/couch/generators/application/templates/_attachments/index.html",
46
- "lib/couch/generators/application/templates/_attachments/stylesheets/application.css",
47
- "lib/couch/generators/application/templates/_id",
48
- "lib/couch/generators/application/templates/couchrc",
49
- "lib/couch/generators/application/templates/gitignore",
50
- "lib/couch/generators/application/templates/lib/mustache.js",
51
- "lib/couch/generators/application/templates/validate_doc_update.js",
52
- "lib/couch/generators/base.rb",
53
- "lib/couch/generators/list/USAGE",
54
- "lib/couch/generators/list/list_generator.rb",
55
- "lib/couch/generators/list/templates/list.js",
56
- "lib/couch/generators/named_base.rb",
57
- "lib/couch/generators/scaffold/USAGE",
58
- "lib/couch/generators/scaffold/scaffold_generator.rb",
59
- "lib/couch/generators/show/USAGE",
60
- "lib/couch/generators/show/show_generator.rb",
61
- "lib/couch/generators/show/templates/show.js",
62
- "lib/couch/generators/validation/USAGE",
63
- "lib/couch/generators/validation/templates/validate_doc_update.js",
64
- "lib/couch/generators/validation/validation_generator.rb",
65
- "lib/couch/generators/view/USAGE",
66
- "lib/couch/generators/view/templates/map.js",
67
- "lib/couch/generators/view/view_generator.rb",
68
- "lib/couch/version.rb",
69
- "spec/couch/design_document_spec.rb",
70
- "spec/couch_spec.rb",
71
- "spec/spec.opts",
72
- "spec/spec_helper.rb"
26
+ "lib/couch.rb"
73
27
  ]
74
28
  s.homepage = %q{http://github.com/jo/couch}
75
29
  s.rdoc_options = ["--charset=UTF-8"]
76
30
  s.require_paths = ["lib"]
77
31
  s.rubyforge_project = %q{couch}
78
32
  s.rubygems_version = %q{1.3.6}
79
- s.summary = %q{Standalone CouchDB Application Development Suite}
80
- s.test_files = [
81
- "spec/spec_helper.rb",
82
- "spec/couch/design_document_spec.rb",
83
- "spec/couch_spec.rb"
84
- ]
33
+ s.summary = %q{Depricated: this project went to rid}
85
34
 
86
35
  if s.respond_to? :specification_version then
87
36
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
88
37
  s.specification_version = 3
89
38
 
90
39
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
91
- s.add_runtime_dependency(%q<thor>, [">= 0.13.4"])
92
- s.add_runtime_dependency(%q<rest-client>, [">= 1.4.1"])
93
- s.add_runtime_dependency(%q<json_pure>, [">= 1.2.2"])
94
- s.add_runtime_dependency(%q<activesupport>, [">= 3.0.0.beta"])
95
- s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
96
40
  else
97
- s.add_dependency(%q<thor>, [">= 0.13.4"])
98
- s.add_dependency(%q<rest-client>, [">= 1.4.1"])
99
- s.add_dependency(%q<json_pure>, [">= 1.2.2"])
100
- s.add_dependency(%q<activesupport>, [">= 3.0.0.beta"])
101
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
102
41
  end
103
42
  else
104
- s.add_dependency(%q<thor>, [">= 0.13.4"])
105
- s.add_dependency(%q<rest-client>, [">= 1.4.1"])
106
- s.add_dependency(%q<json_pure>, [">= 1.2.2"])
107
- s.add_dependency(%q<activesupport>, [">= 3.0.0.beta"])
108
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
109
43
  end
110
44
  end
111
45
 
@@ -1,43 +1,2 @@
1
- require 'rubygems'
2
- require 'yaml'
3
- require 'json'
4
-
5
1
  module Couch
6
- CONFIG_FILENAME = ".couchrc"
7
-
8
- def self.root
9
- @root ||= find_root
10
- end
11
-
12
- def self.database
13
- @database ||= config["database"]
14
- end
15
-
16
- def self.id
17
- @id ||= File.read(File.join(root, '_id')).strip
18
- end
19
-
20
- def self.rev
21
- @rev ||= File.read(File.join(root, '_rev')).strip rescue nil
22
- end
23
-
24
- private
25
-
26
- def self.config
27
- @config ||= YAML.load(File.open config_file)
28
- end
29
-
30
- def self.config_file
31
- File.join root, CONFIG_FILENAME
32
- end
33
-
34
- def self.find_root
35
- cwd = Dir.pwd
36
- return cwd if File.exists?(File.join(cwd, CONFIG_FILENAME))
37
- Dir.chdir("..") do
38
- find_root unless cwd == Dir.pwd
39
- end
40
- rescue SystemCallError
41
- # could not chdir, no problem just return
42
- end
43
2
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 0
9
- version: 0.2.0
8
+ - 1
9
+ version: 0.2.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Johannes J. Schmidt
@@ -14,141 +14,25 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-10 00:00:00 +01:00
17
+ date: 2010-03-11 00:00:00 +01:00
18
18
  default_executable: couch
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: thor
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- - 13
30
- - 4
31
- version: 0.13.4
32
- type: :runtime
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: rest-client
36
- prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- segments:
42
- - 1
43
- - 4
44
- - 1
45
- version: 1.4.1
46
- type: :runtime
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
49
- name: json_pure
50
- prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- segments:
56
- - 1
57
- - 2
58
- - 2
59
- version: 1.2.2
60
- type: :runtime
61
- version_requirements: *id003
62
- - !ruby/object:Gem::Dependency
63
- name: activesupport
64
- prerelease: false
65
- requirement: &id004 !ruby/object:Gem::Requirement
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- segments:
70
- - 3
71
- - 0
72
- - 0
73
- - beta
74
- version: 3.0.0.beta
75
- type: :runtime
76
- version_requirements: *id004
77
- - !ruby/object:Gem::Dependency
78
- name: rspec
79
- prerelease: false
80
- requirement: &id005 !ruby/object:Gem::Requirement
81
- requirements:
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- segments:
85
- - 1
86
- - 2
87
- - 9
88
- version: 1.2.9
89
- type: :development
90
- version_requirements: *id005
91
- description: With Couch you can easy build a standalone CouchDB application.
19
+ dependencies: []
20
+
21
+ description: "Depricated: this project went to rid."
92
22
  email: schmidt@netzmerk.com
93
23
  executables:
94
24
  - couch
95
25
  extensions: []
96
26
 
97
27
  extra_rdoc_files:
98
- - LICENSE
99
28
  - README.rdoc
100
29
  files:
101
30
  - .gitignore
102
- - .gitmodules
103
- - LICENSE
104
31
  - README.rdoc
105
32
  - Rakefile
106
33
  - bin/couch
107
34
  - couch.gemspec
108
35
  - lib/couch.rb
109
- - lib/couch/actions/base.rb
110
- - lib/couch/actions/pull.rb
111
- - lib/couch/actions/push.rb
112
- - lib/couch/actions/routes.rb
113
- - lib/couch/commands.rb
114
- - lib/couch/commands/destroy.rb
115
- - lib/couch/commands/generate.rb
116
- - lib/couch/commands/pull.rb
117
- - lib/couch/commands/push.rb
118
- - lib/couch/commands/routes.rb
119
- - lib/couch/design_document.rb
120
- - lib/couch/generators.rb
121
- - lib/couch/generators/application/USAGE
122
- - lib/couch/generators/application/application_generator.rb
123
- - lib/couch/generators/application/templates/README
124
- - lib/couch/generators/application/templates/_attachments/index.html
125
- - lib/couch/generators/application/templates/_attachments/stylesheets/application.css
126
- - lib/couch/generators/application/templates/_id
127
- - lib/couch/generators/application/templates/couchrc
128
- - lib/couch/generators/application/templates/gitignore
129
- - lib/couch/generators/application/templates/lib/mustache.js
130
- - lib/couch/generators/application/templates/validate_doc_update.js
131
- - lib/couch/generators/base.rb
132
- - lib/couch/generators/list/USAGE
133
- - lib/couch/generators/list/list_generator.rb
134
- - lib/couch/generators/list/templates/list.js
135
- - lib/couch/generators/named_base.rb
136
- - lib/couch/generators/scaffold/USAGE
137
- - lib/couch/generators/scaffold/scaffold_generator.rb
138
- - lib/couch/generators/show/USAGE
139
- - lib/couch/generators/show/show_generator.rb
140
- - lib/couch/generators/show/templates/show.js
141
- - lib/couch/generators/validation/USAGE
142
- - lib/couch/generators/validation/templates/validate_doc_update.js
143
- - lib/couch/generators/validation/validation_generator.rb
144
- - lib/couch/generators/view/USAGE
145
- - lib/couch/generators/view/templates/map.js
146
- - lib/couch/generators/view/view_generator.rb
147
- - lib/couch/version.rb
148
- - spec/couch/design_document_spec.rb
149
- - spec/couch_spec.rb
150
- - spec/spec.opts
151
- - spec/spec_helper.rb
152
36
  has_rdoc: true
153
37
  homepage: http://github.com/jo/couch
154
38
  licenses: []
@@ -178,8 +62,6 @@ rubyforge_project: couch
178
62
  rubygems_version: 1.3.6
179
63
  signing_key:
180
64
  specification_version: 3
181
- summary: Standalone CouchDB Application Development Suite
182
- test_files:
183
- - spec/spec_helper.rb
184
- - spec/couch/design_document_spec.rb
185
- - spec/couch_spec.rb
65
+ summary: "Depricated: this project went to rid"
66
+ test_files: []
67
+