work-md 0.4.0 → 0.4.1

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
  SHA256:
3
- metadata.gz: 6b2365dee8d1e62694565724b031df8975b11a9eafab0eb2290956915fdfcc89
4
- data.tar.gz: d1ef9938b25eb53b38535374872c9d567759c1ddddcee9ad3c54030277453d61
3
+ metadata.gz: 785ba0c00e62f155b5d1f0bd99e8aabe1f2e2a21ab969ee2d2a537cacdea905a
4
+ data.tar.gz: 1b0e7d575c2cc1dfa12286ae3a81f7e6407c23bc7e7779cacf04f88fccc3bede
5
5
  SHA512:
6
- metadata.gz: 7e2a875215334876bc1bd28be738fe2ce8500c8186604e87797439b0f654d0dfce7049ba44f6d6d78a4f5962d72a86674d4d9b5920f1a91d56f40bcff06cc574
7
- data.tar.gz: 6b2696a31327292c75b1b62e8f17e1cb9b0cc483cd04f44f416412a73767a20f7f9ebf7baa95117d36382bb81a1e212825cb59a8060034a2f682dc0d959cc946
6
+ metadata.gz: 2f29dee5202dbda4cac2ba534b4fec472188153db6f0aeda0dff409fcb0b20a0dc3a9fbb8d67b0e4ef43c492bdbf5a0aabd0ad6d1e356d4cea0d7aa5b572aa31
7
+ data.tar.gz: 7908a13d8c2515a0d149f63aa896aad7c476efde33664a66f08da9178e979f8f761a25ad5ed6b41fc6a44fa2898d3ca934ad9021575ccd6ca1079233b9a10219
@@ -10,8 +10,7 @@ module Work
10
10
  current_day = Date.today.prev_day
11
11
  work_dir = Work::Md::Config.work_dir
12
12
 
13
- (1..90).each do
14
-
13
+ (1..160).each do
15
14
  file_name = "#{current_day.strftime('%Y/%m/%d')}.md"
16
15
 
17
16
  if ::File.exist?("#{work_dir}/#{file_name}")
@@ -26,7 +25,7 @@ module Work
26
25
  unless found_file
27
26
  Work::Md::Cli.help(
28
27
  ::TTY::Box.frame(
29
- "message: No file found in last 90 days",
28
+ "message: No file found in last 5 months",
30
29
  **Work::Md::Cli.error_frame_style
31
30
  )
32
31
  )
@@ -10,7 +10,7 @@ module Work
10
10
  work_dir = Work::Md::Config.work_dir
11
11
  last_file_name = nil
12
12
 
13
- (1..90).each do
13
+ (1..160).each do
14
14
  last_file_name = "#{last_date.strftime('%Y/%m/%d')}.md"
15
15
  break if ::File.exist?("#{work_dir}/#{last_file_name}")
16
16
 
@@ -54,7 +54,12 @@ module Work
54
54
  end
55
55
 
56
56
  def self.work_dir
57
- ENV['WORK_MD_DIR'] || DEFAULT_WORK_DIR
57
+ dir =
58
+ ENV['WORK_MD_DIR'] || DEFAULT_WORK_DIR
59
+
60
+ return "#{dir}/#{ENV['WORK_MD_TAG']}" if ENV['WORK_MD_TAG']
61
+
62
+ dir
58
63
  end
59
64
 
60
65
  def self.translations
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Work
4
4
  module Md
5
- VERSION = '0.4.0'
5
+ VERSION = '0.4.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: work-md
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrique Fernandez Teixeira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-21 00:00:00.000000000 Z
11
+ date: 2021-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tty-box