motion-pixate-observer 0.5 → 0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/pixate_server +30 -3
- data/lib/Socket/libSocket.a +0 -0
- data/lib/project/pixate_style_watch.rb +1 -0
- metadata +33 -5
- data/lib/motion-pixate-server.rb +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4bdbb11ad0d60ca618831d43a490ac0250e60a5
|
4
|
+
data.tar.gz: 645e0a851841cbb32a0cee2d384d4af18270115a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb6cecfa145265ba57ea8e96ab646c283591c84840db39f37c28026a23bb8752d632b72d4b9aa81a49b5ab37de5335beb6158e53f5118499bef50ddc425f8971
|
7
|
+
data.tar.gz: d514a83d85791f641b7c4b4b2cbbf90d26929ca1c6ffb1cee0a7947b993ea12a43a7681c80038f85c8fa7a46c8fabf34bdf3bbc27104c29f21ef16ecc8cebeca
|
data/bin/pixate_server
CHANGED
@@ -1,4 +1,31 @@
|
|
1
|
-
#!/usr/bin/ruby
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require "socket"
|
3
|
+
require "rubygems"
|
4
|
+
require "dnssd"
|
5
|
+
require "fssm"
|
2
6
|
|
3
|
-
|
4
|
-
|
7
|
+
SERVER_PORT = 54321
|
8
|
+
SERVER_NAME = "Pixate CSS Notifier"
|
9
|
+
|
10
|
+
cssfile = ARGV[0] || ""
|
11
|
+
cssfile = File.expand_path(cssfile)
|
12
|
+
unless File.exists?(cssfile)
|
13
|
+
warn "USAGE : #{$0} css_file_path"
|
14
|
+
exit
|
15
|
+
end
|
16
|
+
|
17
|
+
serv = TCPServer.open("", SERVER_PORT)
|
18
|
+
DNSSD.announce(serv, SERVER_NAME, "pixate-observer",)
|
19
|
+
|
20
|
+
$sock = serv.accept
|
21
|
+
puts "Connected"
|
22
|
+
|
23
|
+
FSSM.monitor(File.dirname(cssfile), File.basename(cssfile)) do
|
24
|
+
update do |basedir, filename|
|
25
|
+
File.open("#{basedir}/#{filename}") { |f|
|
26
|
+
data = f.read
|
27
|
+
$sock.write(data)
|
28
|
+
puts "SENT : #{data.bytesize} bytes"
|
29
|
+
}
|
30
|
+
end
|
31
|
+
end
|
data/lib/Socket/libSocket.a
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,15 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-pixate-observer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.6'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Watson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
12
|
-
dependencies:
|
11
|
+
date: 2013-07-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: dnssd
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: fssm
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
13
41
|
description: This gem provides a function that you changes css files, apply changes
|
14
42
|
into your application that uses Pixate Framework immediately.
|
15
43
|
email:
|
@@ -21,7 +49,6 @@ extra_rdoc_files: []
|
|
21
49
|
files:
|
22
50
|
- README.md
|
23
51
|
- lib/motion-pixate-observer.rb
|
24
|
-
- lib/motion-pixate-server.rb
|
25
52
|
- lib/project/pixate_style_watch.rb
|
26
53
|
- lib/Socket/libSocket.a
|
27
54
|
- lib/Socket/Socket-Prefix.pch
|
@@ -46,9 +73,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
46
73
|
version: '0'
|
47
74
|
requirements: []
|
48
75
|
rubyforge_project:
|
49
|
-
rubygems_version: 2.0.
|
76
|
+
rubygems_version: 2.0.3
|
50
77
|
signing_key:
|
51
78
|
specification_version: 4
|
52
79
|
summary: This gem provides a function that you changes css files, apply changes into
|
53
80
|
your application that uses Pixate Framework immediately.
|
54
81
|
test_files: []
|
82
|
+
has_rdoc:
|
data/lib/motion-pixate-server.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
framework "Cocoa"
|
2
|
-
require "socket"
|
3
|
-
|
4
|
-
cssfile = ARGV[0] || ""
|
5
|
-
unless File.exists?(cssfile)
|
6
|
-
warn "USAGE : #{$0} css_file_path"
|
7
|
-
exit
|
8
|
-
end
|
9
|
-
|
10
|
-
SERVER_PORT = 54321
|
11
|
-
SERVER_NAME = "Pixate CSS Notifier"
|
12
|
-
|
13
|
-
netservice = NSNetService.alloc.initWithDomain("", type: "_pixate-observer._tcp", name: SERVER_NAME, port: SERVER_PORT)
|
14
|
-
netservice.publish
|
15
|
-
|
16
|
-
serv = TCPServer.open("", SERVER_PORT)
|
17
|
-
fd = open(cssfile, "r")
|
18
|
-
gcdq = Dispatch::Queue.new('pixate')
|
19
|
-
mask = Dispatch::Source::VNODE_WRITE | Dispatch::Source::VNODE_EXTEND
|
20
|
-
|
21
|
-
while true
|
22
|
-
conn = serv.accept
|
23
|
-
NSLog "Connected : #{conn.addr[2]}"
|
24
|
-
|
25
|
-
@sock.close if @sock
|
26
|
-
@sock = conn
|
27
|
-
|
28
|
-
Dispatch::Source.new(Dispatch::Source::VNODE, fd, mask, gcdq) do
|
29
|
-
begin
|
30
|
-
fd.rewind
|
31
|
-
@sock.write(fd.read)
|
32
|
-
rescue
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|