tlapse 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9163b393232a2f26b4e4baa3845d73fb7d0a3108
4
- data.tar.gz: 6287445067bc08eeaaab7233ab9533b019e3db9b
3
+ metadata.gz: 939a7540b5657bfd54ef7b114791b0565621fe49
4
+ data.tar.gz: b15cef8e776be3792d14bbff5bf3711b60d50e22
5
5
  SHA512:
6
- metadata.gz: bf908b9c050b4d98c91107a2ad9835be74d052f495ab5dd3abcb65cb20c9b4bef48068a7785e957a79f55fddccd31451449829b4ef168dfbc930a8d5a58d1f17
7
- data.tar.gz: e121dc923820ee1e6a0f54b430e4250288427cda745c1e08c13817ed2963788b4ae8b6cf51241e38a90610504caa2a4d307b3425bac34294e287b782cccd7cb0
6
+ metadata.gz: 9d2f7264d7fb1437b4b6afcb739a1088c84cd4497477f3d371a2975b4a847b4eb8a41b9791edbb9dafa3d2f327f9d7737144a51399b591f677929b55c7d051c5
7
+ data.tar.gz: 9f491fa7c62c2959fd0b57778e36cd350348b559401d874f276760bded4f4729c53b86bc8acdeb661944ee5d7dec72b093bad35a108785088f774c31fda9022b
data/bin/tlapse CHANGED
@@ -30,7 +30,7 @@ command :serve do |c|
30
30
 
31
31
  c.flag :h, :host,
32
32
  desc: "The hostname on which the server is run",
33
- default_value: `hostname`,
33
+ default_value: `hostname`.strip,
34
34
  arg_name: "host"
35
35
 
36
36
  c.flag :p, :port,
@@ -0,0 +1,30 @@
1
+ require "drb"
2
+
3
+ module Tlapse
4
+ class Server
5
+ attr_accessor :host, :port
6
+
7
+ def initialize(host: "localhost", port: 9000)
8
+ @host = host
9
+ @port = port
10
+ end
11
+
12
+ def serve
13
+ DRb.start_service full_host, drb_object
14
+ DRb.thread.join # wait for commands
15
+ end
16
+
17
+ def full_host
18
+ "druby://#{@host}:#{@port}"
19
+ end
20
+
21
+ private ###################################################################
22
+
23
+ def drb_object
24
+ obj = Object.new
25
+ obj.extend Tlapse::Doctor
26
+ obj.extend Tlapse::Capture
27
+ obj
28
+ end
29
+ end
30
+ end
@@ -1,3 +1,3 @@
1
1
  module Tlapse
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tlapse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Toniazzo
@@ -102,6 +102,7 @@ files:
102
102
  - lib/tlapse.rb
103
103
  - lib/tlapse/capture.rb
104
104
  - lib/tlapse/doctor.rb
105
+ - lib/tlapse/server.rb
105
106
  - lib/tlapse/version.rb
106
107
  - lib/tlapse/video.rb
107
108
  - tlapse.gemspec