ifocustt 0.0.2 → 0.0.3

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: 48a9561f4f3ef80308150ae90ac3074f4305cf1a
4
- data.tar.gz: 6caf8899c30264b633fecbc6d096bc827bbe7ab7
3
+ metadata.gz: 2bd3f3e307098164e09d05812cf24434f68d5e92
4
+ data.tar.gz: d978c002f1d7749c19adcaa2e125310540127b0e
5
5
  SHA512:
6
- metadata.gz: c506628ad05ad0827e08f6ce37b8b96496d6a481504d25f3675217329241f435cea87c915416749123df574ea35766b8c0ab83370d38c7f8661ecd36403e02bf
7
- data.tar.gz: c9c9a05f4856473806d7c34976ed26ef5e6515f3885d0011d11f528680f97cd90a77ae6789bd036c81bf41ac6925b885b10e852ece6a0f201084061f2c4c109a
6
+ metadata.gz: 28adf588ebdc02237f7ce06495e96c36e30ff009987f50b306699f7af9ae6697310a09be47c8ee3a6b07b36a82d4782d584ed8281e154632a8351fb0490cf9fa
7
+ data.tar.gz: 80d221e8b0bdf32f793fcca8bf2f95e5b500e406ff5a6c67da230c4620f07da890303f3d89e869479eb368fb62f4a9174341ab59810ae3f7cf1d53faf873a4bd
data/assets/focus.jpg ADDED
Binary file
data/config/default.yml CHANGED
@@ -1,13 +1,11 @@
1
1
  ---
2
- SecretsFile: "~/.secrets"
2
+ actions:
3
+ - OnFocus:
4
+ - ToggleMacNotificationCenter:
5
+ enabled: false
3
6
 
4
- OnFocus:
5
- ToggleMacNotificationCenter:
6
- Enabled: false
7
- LogFocusTime:
7
+ - OnBreak:
8
8
 
9
- OnBreak:
10
-
11
- OnCompletion:
12
- ToggleMacNotificationCenter:
13
- Enabled: true
9
+ - OnCompletion:
10
+ - ToggleMacNotificationCenter:
11
+ enabled: true
data/lib/focus.rb CHANGED
@@ -1,3 +1,11 @@
1
+ module Focus
2
+ class << self
3
+ def root
4
+ File.expand_path("../..", __FILE__)
5
+ end
6
+ end
7
+ end
8
+
1
9
  require "focus/action"
2
10
  require "focus/actions"
3
11
  require "focus/cli"
@@ -9,11 +17,3 @@ require "focus/string"
9
17
  require "focus/util"
10
18
  require "focus/utils"
11
19
  require "focus/version"
12
-
13
- module Focus
14
- class << self
15
- def root
16
- File.expand_path("../..", __FILE__)
17
- end
18
- end
19
- end
data/lib/focus/actions.rb CHANGED
@@ -1,4 +1,4 @@
1
- actions = Dir.glob("../focus/lib/focus/actions/*").map do |file|
1
+ actions = Dir.glob("#{Focus.root}/lib/focus/actions/*").map do |file|
2
2
  File.expand_path file
3
3
  end
4
4
 
@@ -1,7 +1,7 @@
1
1
  module Focus
2
2
  class RunShellCommand < Action
3
3
  def call
4
- system(context.cmd)
4
+ system(context.command.to_s)
5
5
  end
6
6
  end
7
7
  end
data/lib/focus/cli.rb CHANGED
@@ -21,7 +21,7 @@ module Focus
21
21
 
22
22
  def build_parser(args) # rubocop:disable MethodLength
23
23
  OptionParser.new do |opts|
24
- opts.banner = "Usage: example.rb [options]"
24
+ opts.banner = "Usage: focus [options]"
25
25
 
26
26
  opts.on("-v", "--verbose", "Run focus with more verbose STDOUT") do
27
27
  args.quiet = false
@@ -31,8 +31,8 @@ module Focus
31
31
  args.daemonize = true
32
32
  end
33
33
 
34
- opts.on("-tTIME", "--time=TIME", "Alias to minutes") do |t|
35
- args.minutes = t
34
+ opts.on("-t", "--target=TARGET", "Specify what you are focusing on") do |t|
35
+ args.target = t
36
36
  end
37
37
 
38
38
  opts.on("-mMINUTES", "--minutes=MINUTES", "How many minutes to focus.") do |m|
data/lib/focus/utils.rb CHANGED
@@ -1,4 +1,4 @@
1
- utils = Dir.glob("../focus/lib/focus/utils/*").map do |file|
1
+ utils = Dir.glob("#{Focus.root}/lib/focus/utils/*").map do |file|
2
2
  File.expand_path file
3
3
  end
4
4
 
@@ -11,7 +11,7 @@ module Focus
11
11
 
12
12
  def jira_ticket
13
13
  git_branch = parse_git_branch
14
- git_branch.scan(JIRA_TICKET_RGX).first
14
+ git_branch.to_s.scan(JIRA_TICKET_RGX).first
15
15
  end
16
16
 
17
17
  def parse_git_branch
data/lib/focus/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Focus
2
- VERSION = "0.0.2".freeze
2
+ VERSION = "0.0.3".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ifocustt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mason
@@ -90,7 +90,7 @@ extensions: []
90
90
  extra_rdoc_files: []
91
91
  files:
92
92
  - LICENSE.txt
93
- - assets/example.png
93
+ - assets/focus.jpg
94
94
  - bin/focus
95
95
  - bin/focus.sh
96
96
  - config/default.yml
data/assets/example.png DELETED
Binary file