intent 0.5.4 → 0.5.5

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: 36c7857edbff4ff919975615f842ce29d69dd6e3470b2137c7d47066ed7976ac
4
- data.tar.gz: 2841861e0e1e0e885cdec1fa0b7e60fe5a028af8c2546a27cea4e22a38961899
3
+ metadata.gz: 63f5433d3a5bff8c95271194b5bc5df740274ae9d42f405f16a1bf11a5f11cc3
4
+ data.tar.gz: a7fc46a07d03ce70c2339d3cc535038a040fb60847ad224997e57316642e1ec8
5
5
  SHA512:
6
- metadata.gz: 52c13b3b65f30a9ad9fc735539b600d3cca524b76c81b98c44ebcf74315b0442902a59efeefc02ab6087becc534981726ba27ee6b4fb79ffa97cded7afaf6d3a
7
- data.tar.gz: a901b78eb15856c3ea432d4297ad21e981ef50adb2c9ee3b393b6f6f82a6f3609cfeace44b5f252a6d897739f7511a84207e412af0ea18add0f5570ac786d7b0
6
+ metadata.gz: a314b0917a17bce8e386964fcdfaa4c791f2ed36168428fd9412ddace6c4e847efc1a831519c8d095ee1721bd4e60e4c2a5265a895ef202d2cbdc8d8ec507247
7
+ data.tar.gz: 82607a04b4d1d3f8a91f78a3dc1cba8e2c0dd4e82348fb1dc98b1270e76d32de543d9977a88643495c019529b2fed317cd6e68481009bd9376fbeef1e956390a
@@ -1,10 +1,16 @@
1
1
  # Monkeypatch `todo-txt-gem` to create ANSI decorated terminal output.
2
2
  class Todo::Task
3
3
  def to_s_highlighted
4
+ # If stdout is not a tty, then return the raw string as the output is
5
+ # probably being piped to a file and the color codes will make a mess.
6
+ return to_s unless STDOUT.tty?
7
+
4
8
  pastel = Pastel.new
5
9
  if done?
10
+ # Completed tasks are rendered with a strikethrough
6
11
  pastel.strikethrough(to_s)
7
12
  else
13
+ # Open tasks delegate to the custom formatting function
8
14
  print_open_task(pastel)
9
15
  end
10
16
  end
@@ -1,3 +1,3 @@
1
1
  module Intent
2
- VERSION = '0.5.4'
2
+ VERSION = '0.5.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: intent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Rickerby
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-29 00:00:00.000000000 Z
11
+ date: 2018-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: todo-txt