clearsight 1.2.0.rc1 → 1.2.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: de3573529520fb7b7c356724719787126f18bc70
4
- data.tar.gz: 820f49cdc0aa97852ab3ef69847b2c3f1fe6b92f
3
+ metadata.gz: a64e9fd746a8f6b5722548589048845597dc98df
4
+ data.tar.gz: cdbd88c334d38e4a07ca9a909ebb8b3329d0c1a7
5
5
  SHA512:
6
- metadata.gz: 0426d3ccc5ff6270dc5e131f345a5c41e019886092d069b3545b26ff43f9014b0670fe6f0b704ff39eec3431dc82084260cde387cd6dbdf2544fc79b38d2ee14
7
- data.tar.gz: f1818c11d3042f109ac42520538601b31fa23bbfbb86e8fa0f74160912ca86a5d323aeeaabc3ff26efd7618af2091736c745f1d5d2261cc13183615b4e5928fb
6
+ metadata.gz: 828da4790d34f21ca1fcf8bf3c1ad7c1880809066b15ee86cef0ea6a23e4d80c6036e0696019c1e43ece0e9ffb8ac32409d3e5e4cb20cd5eb337a8ca0b457d66
7
+ data.tar.gz: 1bae486397f4e4cc6894d2d90b4e6ffe80db7348ef0b0db9484cd22654d6e124934d40a067f77b9b693dcc80fe227d60a8711b39f59624d7a4420eb0bb7a66d8
@@ -0,0 +1,15 @@
1
+ module Clearsight
2
+ class SSH
3
+
4
+ def initialize(host)
5
+ @host = host
6
+ end
7
+
8
+ def sshify(keyname)
9
+ # sh "cat ~/.ssh/#{keyname} | ssh #{host} 'cat >> ~/.ssh/authorized_keys'"
10
+ sh "ssh-copy-id -i ~/.ssh/#{keyname} #{@host}"
11
+ end
12
+
13
+ end
14
+ end
15
+ Clearsight::Ssh = Clearsight::SSH
@@ -0,0 +1,33 @@
1
+ require 'thread'
2
+
3
+ module Clearsight
4
+ class Timer
5
+ def initialize(interval, &handler)
6
+ @run = true
7
+ @semaphore = Mutex.new
8
+
9
+ @th = Thread.new do
10
+ t = Time.now
11
+ while run?
12
+ t += interval
13
+ (sleep(t - Time.now) rescue nil) and handler.call rescue nil
14
+ end
15
+ end
16
+ end
17
+
18
+ def stop
19
+ @semaphore.synchronize do
20
+ @run = false
21
+ end
22
+ @th.join
23
+ end
24
+
25
+ private
26
+
27
+ def run?
28
+ @semaphore.synchronize do
29
+ @run
30
+ end
31
+ end
32
+ end
33
+ end
@@ -1,3 +1,3 @@
1
1
  module Clearsight
2
- VERSION = "1.2.0.rc1"
2
+ VERSION = "1.2.0.rc2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clearsight
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0.rc1
4
+ version: 1.2.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamon Holmgren
@@ -130,6 +130,8 @@ files:
130
130
  - lib/clearsight.rb
131
131
  - lib/clearsight/deploy.rb
132
132
  - lib/clearsight/middleman.rb
133
+ - lib/clearsight/ssh.rb
134
+ - lib/clearsight/timer.rb
133
135
  - lib/clearsight/version.rb
134
136
  - lib/clearsight/xcode.rb
135
137
  - test/tc_something.rb