svxbox 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +63 -0
- data/VERSION +1 -0
- data/lib/svxbox/amazoni.rb +7 -0
- data/lib/svxbox/markupguppy.rb +24 -0
- data/lib/svxbox/mongobongo.rb +19 -0
- data/lib/svxbox/sinatricus.rb +16 -0
- data/lib/svxbox/supabali.rb +1 -1
- data/lib/svxbox.rb +6 -0
- metadata +7 -2
data/Rakefile
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "svxbox"
|
8
|
+
gem.summary = %Q{Miscellaneous Utilities.}
|
9
|
+
gem.description = %Q{View the code.}
|
10
|
+
gem.email = 'albert.lash@docunext.com'
|
11
|
+
gem.homepage = 'http://www.savonix.com'
|
12
|
+
gem.authors = ['Albert Lash']
|
13
|
+
gem.rubyforge_project = ''
|
14
|
+
gem.add_development_dependency 'shoulda'
|
15
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
16
|
+
end
|
17
|
+
Jeweler::GemcutterTasks.new
|
18
|
+
Jeweler::RubyforgeTasks.new do |rubyforge|
|
19
|
+
rubyforge.doc_task = 'rdoc'
|
20
|
+
end
|
21
|
+
rescue LoadError
|
22
|
+
puts 'Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler'
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
require 'rake/testtask'
|
27
|
+
Rake::TestTask.new(:test) do |test|
|
28
|
+
test.libs << 'lib' << 'test'
|
29
|
+
test.pattern = 'test/**/*_test.rb'
|
30
|
+
test.verbose = true
|
31
|
+
end
|
32
|
+
|
33
|
+
begin
|
34
|
+
require 'rcov/rcovtask'
|
35
|
+
Rcov::RcovTask.new do |test|
|
36
|
+
test.libs << 'test'
|
37
|
+
test.pattern = 'test/**/*_test.rb'
|
38
|
+
test.verbose = true
|
39
|
+
end
|
40
|
+
rescue LoadError
|
41
|
+
task :rcov do
|
42
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
task :test => :check_dependencies
|
47
|
+
|
48
|
+
task :default => :test
|
49
|
+
task :spec => :test
|
50
|
+
|
51
|
+
require 'rake/rdoctask'
|
52
|
+
Rake::RDocTask.new do |rdoc|
|
53
|
+
if File.exist?('VERSION')
|
54
|
+
version = File.read('VERSION')
|
55
|
+
else
|
56
|
+
version = ""
|
57
|
+
end
|
58
|
+
|
59
|
+
rdoc.rdoc_dir = 'rdoc'
|
60
|
+
rdoc.title = "rack-xslview #{version}"
|
61
|
+
rdoc.rdoc_files.include('README*')
|
62
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
63
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.3
|
data/lib/svxbox/amazoni.rb
CHANGED
@@ -7,6 +7,13 @@
|
|
7
7
|
module SvxBox
|
8
8
|
module Amazoni
|
9
9
|
|
10
|
+
# From Rack::Utils / Camping
|
11
|
+
def url_unescape(string)
|
12
|
+
string.tr('+', ' ').gsub(/((?:%[0-9a-fA-F]{2})+)/n) do
|
13
|
+
[$1.delete('%')].pack('H*')
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
10
17
|
def search_aaws(cat, search)
|
11
18
|
require 'amazon/aws'
|
12
19
|
require 'amazon/aws/search'
|
@@ -0,0 +1,24 @@
|
|
1
|
+
###
|
2
|
+
# Copyright: Savonix Corporation
|
3
|
+
# Author: Albert Lash
|
4
|
+
# License: Affero General Public License v3 or later
|
5
|
+
##
|
6
|
+
|
7
|
+
module SvxBox
|
8
|
+
module MarkupGuppy
|
9
|
+
|
10
|
+
def goback
|
11
|
+
'<input type="button" onclick="history.go(-1);" value="Go Back" />'
|
12
|
+
end
|
13
|
+
|
14
|
+
def pagetitle(string)
|
15
|
+
'<h3 id="page-title">' << string << '</h3>' << "\n\n"
|
16
|
+
end
|
17
|
+
|
18
|
+
def mdlistlink(label,href)
|
19
|
+
"* [#{label}](#{href})"
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
###
|
2
|
+
# Copyright: Savonix Corporation
|
3
|
+
# Author: Albert Lash
|
4
|
+
# License: Affero General Public License v3 or later
|
5
|
+
##
|
6
|
+
|
7
|
+
module SvxBox
|
8
|
+
module MongoBongo
|
9
|
+
|
10
|
+
def make_oid(oid)
|
11
|
+
begin
|
12
|
+
obj = Mongo::ObjectID.from_string(oid)
|
13
|
+
rescue Mongo::InvalidObjectID
|
14
|
+
halt 404
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
###
|
2
|
+
# Copyright: Savonix Corporation
|
3
|
+
# Author: Albert Lash
|
4
|
+
# License: Affero General Public License v3 or later
|
5
|
+
##
|
6
|
+
|
7
|
+
module SvxBox
|
8
|
+
module Sinatricus
|
9
|
+
|
10
|
+
# Just the usual Sinatra redirect with App prefix
|
11
|
+
def mredirect(uri)
|
12
|
+
redirect settings.uripfx+uri, 301
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
data/lib/svxbox/supabali.rb
CHANGED
data/lib/svxbox.rb
CHANGED
@@ -1,3 +1,9 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/svxbox/lexicali'
|
2
2
|
require File.dirname(__FILE__) + '/svxbox/amazoni'
|
3
|
+
require File.dirname(__FILE__) + '/svxbox/markupguppy'
|
4
|
+
|
5
|
+
# Not included by default
|
6
|
+
require File.dirname(__FILE__) + '/svxbox/sinatricus'
|
7
|
+
|
8
|
+
# Must come last
|
3
9
|
require File.dirname(__FILE__) + '/svxbox/supabali'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: svxbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Albert Lash
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-03-
|
12
|
+
date: 2010-03-30 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -32,9 +32,14 @@ extra_rdoc_files:
|
|
32
32
|
- LICENSE
|
33
33
|
files:
|
34
34
|
- LICENSE
|
35
|
+
- Rakefile
|
36
|
+
- VERSION
|
35
37
|
- lib/svxbox.rb
|
36
38
|
- lib/svxbox/amazoni.rb
|
37
39
|
- lib/svxbox/lexicali.rb
|
40
|
+
- lib/svxbox/markupguppy.rb
|
41
|
+
- lib/svxbox/mongobongo.rb
|
42
|
+
- lib/svxbox/sinatricus.rb
|
38
43
|
- lib/svxbox/supabali.rb
|
39
44
|
has_rdoc: true
|
40
45
|
homepage: http://www.savonix.com
|