Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update to work with ruby 1.8.7

  • Loading branch information...
commit a9de28c6d792b91194dce5b60d89d97b7a4c6e50 1 parent d336039
@lancejpollard authored
View
2  lib/design.io/connection.js
@@ -10,7 +10,9 @@
io.set('log level', 1);
designer = io.of("/design.io");
designer.on("connection", function(socket) {
+ console.log("CONNECTION")
socket.on("userAgent", function(data) {
+ console.log("USER AGENT")
console.log(data);
return socket.set("userAgent", data, function() {
socket.emit("ready");
View
2  lib/design.io/process.js
@@ -17,4 +17,6 @@
return console.log(data.toString().trim());
});
+ _console.info("Design.io started on port " + command.program.port);
+
}).call(this);
View
4 lib/design.io/watcher.js
@@ -191,6 +191,10 @@
Watcher.broadcast = function(action, data, callback) {
var params, replacer, self;
+ if (data.action === "initialize") {
+ if (callback) callback.call(self, null, null);
+ return;
+ }
self = this;
replacer = this.replacer;
params = {
View
BIN  spec/app/images/delete.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  spec/app/images/ok.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  spec/app/images/stickynote-large.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  spec/app/images/stickynote-medium.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
69 spec/app/stylesheets/style.css
@@ -0,0 +1,69 @@
+.jSticky-large{
+ background:transparent url(../images/stickynote-large.png) no-repeat top left;
+ width:225px;
+ height:228px;
+ position: absolute;
+ z-index:999999;
+}
+.jSticky-medium{
+ background:transparent url(../images/stickynote-medium.png) no-repeat top left;
+ width:160px;
+ height:162px;
+ position: absolute;
+ z-index:999999;
+}
+.jSticky-delete{
+ background:transparent url(../images/delete.png) no-repeat top left;
+ height:14px;
+ width:14px;
+ position:absolute;
+ cursor:pointer;
+}
+.jSticky-medium .jStickyNote textarea, .jSticky-medium .jStickyNote p{
+ font-size: 14px;
+ font-weight:bold;
+ height:115px;
+}
+.jSticky-large .jStickyNote textarea, .jSticky-large .jStickyNote p{
+ height:160px;
+ font-size: 16px;
+}
+.jStickyNote textarea{
+ width:75%;
+ background-color:transparent;
+ border:none;
+ font-family: 'Comic Sans MS',Textile,cursive;
+ font-size:16px;
+ overflow:hidden;
+ color:#999;
+ padding:0px;
+ margin:15px 0px 0px 24px;
+ float:left;
+ resize:none;
+}
+.jStickyNote p{
+ font-family: 'Comic Sans MS',Textile,cursive;
+ color:#444;
+ margin:15px 0px 0px 24px;
+ overflow:hidden;
+ width:75%;
+ float:left;
+}
+.jSticky-large .jSticky-create{
+ float:right;
+ width:14px;
+ height:14px;
+ background:transparent url(../images/ok.png) no-repeat top left;
+ margin-right:1px;
+ margin-top:185px;
+ cursor:pointer;
+}
+.jSticky-medium .jSticky-create{
+ float:right;
+ width:14px;
+ height:14px;
+ background:transparent url(../images/ok.png) no-repeat top left;
+ margin-right:1px;
+ margin-top:80%;
+ cursor:pointer;
+}
View
11 src/design.io/listener/mac.coffee
@@ -10,10 +10,13 @@ class Mac extends (require('../listener'))
command = spawn 'ruby', ["#{__dirname}/mac.rb"]
command.stdout.setEncoding('utf8')
command.stdout.on 'data', (data) ->
- data = JSON.parse("[" + data.replace(/\]\[/g, ",").replace(/[\[\]]/g, "") + "]")
- # console.log(data.toString().trim())
- for path in data
- self.changed(path[0..-2], callback)
+ try
+ data = JSON.parse("[" + data.replace(/\]\[/g, ",").replace(/[\[\]]/g, "") + "]")
+ # console.log(data.toString().trim())
+ for path in data
+ self.changed(path[0..-2], callback)
+ catch error
+
command.stdout.setEncoding('utf8')
command.stderr.on 'data', (data) ->
_console.error data.toString().trim()
View
3  src/design.io/listener/mac.rb
@@ -1,3 +1,4 @@
+require 'rubygems'
require 'rb-fsevent'
fsevent = FSEvent.new
@@ -5,6 +6,6 @@
io = STDOUT
directory = STDIN.read
fsevent.watch directory do |directories|
- io.write directories
+ io.write directories #.inspect?
end
fsevent.run
View
2  src/design.io/process.coffee
@@ -15,3 +15,5 @@ server.stdout.on 'data', (data) ->
# console.log data.toString().trim()
server.stderr.on 'data', (data) ->
console.log data.toString().trim()
+
+_console.info("Design.io started on port #{command.program.port}")
View
6 src/design.io/watcher.coffee
@@ -117,7 +117,7 @@ class Watcher
try
switch watcher[action].length
when 0, 1
- watcher[action].call watcher
+ watcher[action].call watcher, path
watcherCallback()
when 2
watcher[action].call watcher, path, watcherCallback
@@ -161,6 +161,10 @@ class Watcher
@broadcast: (action, data, callback) ->
+ if data.action == "initialize"
+ callback.call(self, null, null) if callback
+ return
+
self = @
replacer = @replacer
params =
Please sign in to comment.
Something went wrong with that request. Please try again.