controlio 0.0.3 → 0.0.4

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: 66da730afcbcb36506a5371d5306f24635b34bce
4
- data.tar.gz: d2318325e89ba3c363e925c0342ac170ad16932d
3
+ metadata.gz: 42dc809390afa8ea998e067d29f37a56a92fa5cd
4
+ data.tar.gz: 1f7e771f416f9284b41d186c02bb9c8e316efb21
5
5
  SHA512:
6
- metadata.gz: 9addcaf9b61cf6d2301dea98a688410f819b7afead4de08e6e683d956830e317cfee9ffcc15e7b954282bbb588c2dcd74cd9501719fa242234eb5d750a2bef12
7
- data.tar.gz: 8be945ea90569eb4146ba148121393eb1d6072ab501a85482b216241190c59663151d21f43605083e112f75eba8c959dd129bd4219bff197fe006ad8c316b329
6
+ metadata.gz: 9df43e94609a5b25e7bbb0c23aece663580e2007e9bc40a459905b0ab913eb0dc3b90b58f42f3f5a595834a81a7b2c29d62a66f130719239318903c555961e43
7
+ data.tar.gz: 370e86903c21170a500e5743e9c54bb12fc109ee03449511ac63b9cb60846b59c7c21ed9296c95d0e9bdfc973c4f149a0feee59f67cad3876c0a7187a4865dc3
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- controlio (0.0.3)
4
+ controlio (0.0.4)
5
5
  activesupport (~> 4.1.6)
6
6
  daemons (~> 1.1.9)
7
7
  rest_client (~> 1.7.3)
data/README.md CHANGED
@@ -4,7 +4,7 @@ Controlio is a simple service which allows you to control your computer via SMS
4
4
 
5
5
  ## Setup
6
6
 
7
- Install the gem with `gem install controlio`. Run the setup with `controlio-setup`. Once you're set up, you can launch the client at any point with `controlio start`, which will also automatically background it.
7
+ Install the gem with `gem install controlio`. Run the setup with `controlio-setup`. Once you're set up, you can launch the client at any point with `controlio`, or `controlio-daemon` to automatically background it.
8
8
 
9
9
  ## Screenshots
10
10
 
@@ -1,8 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'daemons'
4
3
  require 'controlio'
5
4
 
6
- Daemons.run_proc('controlio') do
7
- Controlio.start
8
- end
5
+ Controlio.start
@@ -1,5 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ require 'daemons'
3
4
  require 'controlio'
4
5
 
6
+ Controlio.setup
7
+ Daemons.daemonize
5
8
  Controlio.start
@@ -2,4 +2,4 @@
2
2
 
3
3
  require 'controlio'
4
4
 
5
- Controlio.setup
5
+ Controlio.setup(true)
@@ -7,9 +7,9 @@ module Controlio
7
7
  client.go
8
8
  end
9
9
 
10
- def self.setup
10
+ def self.setup(force=false)
11
11
  begin
12
- File.delete File.expand_path("~/.controlio.json")
12
+ File.delete File.expand_path("~/.controlio.json") if force
13
13
  rescue
14
14
  end
15
15
  settings = Settings.new
@@ -6,6 +6,8 @@ require "controlio/settings"
6
6
  module Controlio
7
7
  class Client
8
8
 
9
+ POLL_DELAY = 10
10
+
9
11
  def initialize
10
12
  authorize
11
13
  generate_command_mappings!
@@ -25,7 +27,7 @@ module Controlio
25
27
  end
26
28
  destroy c['_id']
27
29
  end
28
- sleep 1
30
+ sleep POLL_DELAY
29
31
  end
30
32
  end
31
33
 
@@ -1,3 +1,3 @@
1
1
  module Controlio
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: controlio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yasyf Mohamedali
@@ -85,7 +85,7 @@ email:
85
85
  - yasyfm@gmail.com
86
86
  executables:
87
87
  - controlio
88
- - controlio-client
88
+ - controlio-daemon
89
89
  - controlio-setup
90
90
  extensions: []
91
91
  extra_rdoc_files: []
@@ -96,7 +96,7 @@ files:
96
96
  - README.md
97
97
  - Rakefile
98
98
  - bin/controlio
99
- - bin/controlio-client
99
+ - bin/controlio-daemon
100
100
  - bin/controlio-setup
101
101
  - controlio.gemspec
102
102
  - lib/commands/cat.rb