rid-export 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +21 -0
- data/LICENSE +20 -0
- data/README +8 -0
- data/Rakefile +34 -0
- data/VERSION +1 -0
- data/lib/rid-export.rb +32 -0
- data/rid-export.gemspec +50 -0
- metadata +105 -0
data/.gitignore
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 Johannes J. Schmidt
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "rid-export"
|
8
|
+
gem.summary = %Q{Rest in development. This is the rid export command.}
|
9
|
+
gem.description = %Q{Rid is a toolkit to relax in web development. Based on CouchDB you get a distributed, high scaling web application infrastructure with Rid. This is the rid export command to export rid applications as JSON.}
|
10
|
+
gem.email = "schmidt@netzmerk.com"
|
11
|
+
gem.homepage = "http://github.com/jo/rid-export"
|
12
|
+
gem.authors = ["Johannes J. Schmidt"]
|
13
|
+
|
14
|
+
gem.add_dependency "rid", ">= 1.0.1"
|
15
|
+
|
16
|
+
gem.add_development_dependency "rspec", ">= 1.2.9"
|
17
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
18
|
+
end
|
19
|
+
Jeweler::GemcutterTasks.new
|
20
|
+
rescue LoadError
|
21
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
22
|
+
end
|
23
|
+
|
24
|
+
task :spec => :check_dependencies
|
25
|
+
|
26
|
+
require 'rake/rdoctask'
|
27
|
+
Rake::RDocTask.new do |rdoc|
|
28
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
29
|
+
|
30
|
+
rdoc.rdoc_dir = 'rdoc'
|
31
|
+
rdoc.title = "rid-export #{version}"
|
32
|
+
rdoc.rdoc_files.include('README*')
|
33
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
34
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.0
|
data/lib/rid-export.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
module Rid
|
2
|
+
module Commands
|
3
|
+
# Rid Export command.
|
4
|
+
# Deploy Rid applications to CouchDB server.
|
5
|
+
#
|
6
|
+
module Export
|
7
|
+
command :export do |c|
|
8
|
+
c.syntax = 'rid export'
|
9
|
+
c.description = 'Export project as JSON.'
|
10
|
+
|
11
|
+
c.option '-r ROOT', '--root ROOT', String, 'Setup application root'
|
12
|
+
c.option '--exclude-attachments', 'Exclude attachments (default is false)'
|
13
|
+
|
14
|
+
c.example 'Export a Rid application', 'rid export'
|
15
|
+
c.example 'Export from ~/rid/myapp', 'rid export -d ~/rid/myapp'
|
16
|
+
c.example 'Export application without attachments', 'rid export --exclude-attachments'
|
17
|
+
|
18
|
+
c.action do |args, options|
|
19
|
+
app = Rid::App.new(options)
|
20
|
+
docs = []
|
21
|
+
app.documents.each do |doc|
|
22
|
+
doc.read!
|
23
|
+
doc.hash.delete('_attachments') if options.exclude_attachments
|
24
|
+
docs << doc.hash
|
25
|
+
end
|
26
|
+
|
27
|
+
puts JSON.pretty_generate(docs)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/rid-export.gemspec
ADDED
@@ -0,0 +1,50 @@
|
|
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{rid-export}
|
8
|
+
s.version = "0.1.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Johannes J. Schmidt"]
|
12
|
+
s.date = %q{2010-08-19}
|
13
|
+
s.description = %q{Rid is a toolkit to relax in web development. Based on CouchDB you get a distributed, high scaling web application infrastructure with Rid. This is the rid export command to export rid applications as JSON.}
|
14
|
+
s.email = %q{schmidt@netzmerk.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".gitignore",
|
21
|
+
"LICENSE",
|
22
|
+
"README",
|
23
|
+
"Rakefile",
|
24
|
+
"VERSION",
|
25
|
+
"lib/rid-export.rb",
|
26
|
+
"rid-export.gemspec"
|
27
|
+
]
|
28
|
+
s.homepage = %q{http://github.com/jo/rid-export}
|
29
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
30
|
+
s.require_paths = ["lib"]
|
31
|
+
s.rubygems_version = %q{1.3.7}
|
32
|
+
s.summary = %q{Rest in development. This is the rid export command.}
|
33
|
+
|
34
|
+
if s.respond_to? :specification_version then
|
35
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
36
|
+
s.specification_version = 3
|
37
|
+
|
38
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
39
|
+
s.add_runtime_dependency(%q<rid>, [">= 1.0.1"])
|
40
|
+
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
41
|
+
else
|
42
|
+
s.add_dependency(%q<rid>, [">= 1.0.1"])
|
43
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
44
|
+
end
|
45
|
+
else
|
46
|
+
s.add_dependency(%q<rid>, [">= 1.0.1"])
|
47
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
metadata
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rid-export
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 27
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
- 0
|
10
|
+
version: 0.1.0
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Johannes J. Schmidt
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2010-08-19 00:00:00 +02:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: rid
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 21
|
30
|
+
segments:
|
31
|
+
- 1
|
32
|
+
- 0
|
33
|
+
- 1
|
34
|
+
version: 1.0.1
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: rspec
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 13
|
46
|
+
segments:
|
47
|
+
- 1
|
48
|
+
- 2
|
49
|
+
- 9
|
50
|
+
version: 1.2.9
|
51
|
+
type: :development
|
52
|
+
version_requirements: *id002
|
53
|
+
description: Rid is a toolkit to relax in web development. Based on CouchDB you get a distributed, high scaling web application infrastructure with Rid. This is the rid export command to export rid applications as JSON.
|
54
|
+
email: schmidt@netzmerk.com
|
55
|
+
executables: []
|
56
|
+
|
57
|
+
extensions: []
|
58
|
+
|
59
|
+
extra_rdoc_files:
|
60
|
+
- LICENSE
|
61
|
+
- README
|
62
|
+
files:
|
63
|
+
- .gitignore
|
64
|
+
- LICENSE
|
65
|
+
- README
|
66
|
+
- Rakefile
|
67
|
+
- VERSION
|
68
|
+
- lib/rid-export.rb
|
69
|
+
- rid-export.gemspec
|
70
|
+
has_rdoc: true
|
71
|
+
homepage: http://github.com/jo/rid-export
|
72
|
+
licenses: []
|
73
|
+
|
74
|
+
post_install_message:
|
75
|
+
rdoc_options:
|
76
|
+
- --charset=UTF-8
|
77
|
+
require_paths:
|
78
|
+
- lib
|
79
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
none: false
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
hash: 3
|
85
|
+
segments:
|
86
|
+
- 0
|
87
|
+
version: "0"
|
88
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
hash: 3
|
94
|
+
segments:
|
95
|
+
- 0
|
96
|
+
version: "0"
|
97
|
+
requirements: []
|
98
|
+
|
99
|
+
rubyforge_project:
|
100
|
+
rubygems_version: 1.3.7
|
101
|
+
signing_key:
|
102
|
+
specification_version: 3
|
103
|
+
summary: Rest in development. This is the rid export command.
|
104
|
+
test_files: []
|
105
|
+
|