Skip to content

Commit

Permalink
Intial Import
Browse files Browse the repository at this point in the history
  • Loading branch information
davglass committed Dec 16, 2008
0 parents commit 3ff2b3d
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 0 deletions.
1 change: 1 addition & 0 deletions README
@@ -0,0 +1 @@
TODO
49 changes: 49 additions & 0 deletions src/service/JSLint.rb
@@ -0,0 +1,49 @@
#require 'uri'
#require 'net/http'

#bp_require 'JSONRequestInstance'


#
#
class JSLint

def jslint(bp, args)
#
bp.complete(args)
end

end

rubyCoreletDefinition = {
'class' => "JSLint",
'name' => "JSLint",
'major_version' => 0,
'minor_version' => 0,
'micro_version' => 1,
'documentation' =>
'TODO',

'functions' =>
[
{
'name' => 'jslint',
'documentation' => "TODO",
'arguments' =>
[
{
'name' => 'scripts',
'type' => 'array',
'required' => true,
'documentation' => 'todo'
},
{
'name' => 'callback',
'type' => 'callback',
'required' => false,
'documentation' => 'the callback to send a hello message to'
}
]
}
]
}
8 changes: 8 additions & 0 deletions src/service/dav.rb
@@ -0,0 +1,8 @@
require 'uri'
require 'net/http'

bp_require 'json/json'

res = Net::HTTP.get_response(URI.parse('http://yui.yahooapis.com/2.5.2/build/editor/editor-beta.js'))


16 changes: 16 additions & 0 deletions src/service/manifest.json
@@ -0,0 +1,16 @@
{
"type": "dependent",
"uses": {
"corelet": "RubyInterpreter",
"version": "4"
},
"arguments": {
"ScriptFile": "JSLint.rb"
},
"strings": {
"en": {
"title": "JSLint",
"summary": "TODO."
}
}
}
50 changes: 50 additions & 0 deletions tests/one.html
@@ -0,0 +1,50 @@
<html>
<head>
<title>Using BrowserPlus Services</title>
<style type="text/css" media="screen">
#result {border:1px solid #999; background:#ccc; font-size:8pt;padding:5px;}
</style>
</head>
<body>

<p>
</p>

<pre id="result">Samples displayed here...</pre>

<script type="text/javascript" src="http://bp.yahooapis.com/2.1.11/browserplus.js"></script>
<script type="text/javascript">


var mycb = function(r) {
console.log(r);
};

var err = function(f, result) {
console.log(f + " Error: " + result.error + (result.verboseError ? (": " + result.verboseError) : ""));
};

BrowserPlus.init(function(res) {
if (res.success) {
BrowserPlus.require({
services: [
{
service: "JSLint",
version: "0",
minversion: "0.0.1"
}
]
}, function(r) {
if (r.success) {
BrowserPlus.JSLint.jslint({ callback: mycb, scripts: ['one', 'two'] }, function(x){});
} else {
err("REQUIRE", r);
}
});
} else {
err("INIT", res);
}
});
</script>
</body>
</html>

0 comments on commit 3ff2b3d

Please sign in to comment.