clockker 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: 60febb5ab25ebb2bbd8beb19013b4e54ac48755a9c7255b87bfa2c6ebdfad55b
4
- data.tar.gz: 770b3c91268b9d6ed4f4e6cbd855d6c7bd5acfb2588139992f64b7a098f08e7f
3
+ metadata.gz: 2773df72fffb38ba2cbdb0e3e062faf5098c316b9d16eb16915c48f0c784eff1
4
+ data.tar.gz: 02a0df1ea5d469eced33df0b0ce428e5566b2429b961a8f320d95e5de301578d
5
5
  SHA512:
6
- metadata.gz: 2a2d56cca5f1620347090554a82ff033398bf7765dec45150b22db04cec73f2bb689aa609f1a75f7d432959ce579aef521b4229d45a84d1bdf5e3708efbc93d5
7
- data.tar.gz: 5cdebc5439bd5bef35f9d4d9bc555fdfa76fcec32d94db78d08ba1e22a84501abebe5c74fe7ef5de7f43abf2828178b0c56fa553c244bb495a35735d0918ae39
6
+ metadata.gz: 3421379c8c67c0230500bf013722cd070e5e5a4826c88e023a16e60a718347c5273e3aed10e8e949b71f199f63162d4e25113327937201f4a3df4d725383b601
7
+ data.tar.gz: 4631245c86cdbb095218847fb2b3c25ebc31abfb6eaba7830a330729fb1ec572d5751a4f386a0ccfe0156b2262f95508f1ae75879c6f8f107274785a99fdfcfb
data/README.md CHANGED
@@ -21,6 +21,9 @@ Clockker takes several command-line options:
21
21
  `-t=x` / `--token=x`
22
22
  : sets the token for communication, as provided by Clockk. REQUIRED.
23
23
 
24
+ `-r=x` / `--region=x`
25
+ : sets the region for the Clockk server. Regions can be `ca-central`, `us-east`, `eu-frankfurt`, etc.
26
+
24
27
  `-v` / `--verbose`
25
28
  : sets verbosity. Default: `info`. Options (with `-v=` or `--verbose=`): `debug`, `info`, `warn`, `error`, `fatal`
26
29
 
@@ -31,21 +34,26 @@ Clockker takes several command-line options:
31
34
  : Space-separated list of absolute paths to watch. Defaults to your home directory (~).
32
35
 
33
36
  `-b=x y z` / `--blacklist=x y z`
34
- : Space-separated list of absolute paths to ignore that are undeneath your whitelisted paths. Defaults to ~/Library.
37
+ : Space-separated list of absolute paths to ignore that are undeneath your whitelisted paths. Defaults to ~/Library. The blacklist always includes dot-files (e.g. `.DS_Store`, `.bashrc`, etc.)
35
38
 
36
39
  Instead of using the command-line options, you can specify a default configuration in ~/.clockker, which is a JSON-formatted file. An example structure is:
37
40
 
38
41
  ```json
39
42
  {
40
43
  "version": "0.1.0",
41
- "token": "asdfasdf",
44
+ "token": "asdf1234",
45
+ "region": "ca-central",
42
46
  "whitelist": [
43
47
  "/Users/paul",
44
48
  "/web"
45
49
  ],
46
50
  "blacklist": [
47
51
  "/Users/paul/Library",
48
- "/web/nordia"
52
+ "/Users/paul/Pictures",
53
+ "/Users/paul/.dropbox",
54
+ "/tmp/",
55
+ "/log/",
56
+ "/logs/"
49
57
  ]
50
58
  }
51
59
  ```
@@ -1,5 +1,5 @@
1
1
  module Clockker
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
 
4
4
  def self.macos_version
5
5
  @mov ||= `sw_vers -productVersion`
@@ -8,12 +8,15 @@ module Clockker
8
8
  attr_accessor :whitelist, :blacklist
9
9
 
10
10
  def initialize(clockker_config)
11
- @whitelist = clockker_config.whitelist
12
- @blacklist = clockker_config.blacklist
11
+ @whitelist = clockker_config.whitelist.map{|wl| Regexp.new(wl)}
12
+ @blacklist = clockker_config.blacklist.map{|bl| Regexp.new(bl)}
13
+
14
+ # hide .* files
15
+ @blacklist << /\..+/
13
16
 
14
17
  # Now set defaults in the absence of a config file
15
- @whitelist ||= [ Pathname.new(Dir.home) ]
16
- @blacklist ||= [ Pathname.new(File.join(Dir.home, 'Library')) ]
18
+ @whitelist ||= [ Regexp.new(Pathname.new(Dir.home).to_s) ]
19
+ @blacklist ||= [ Regexp.new(Pathname.new(File.join(Dir.home, 'Library')).to_s) ]
17
20
  end
18
21
 
19
22
  def ignore?(filepath)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clockker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Doerwald
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-27 00:00:00.000000000 Z
11
+ date: 2018-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb-fsevent