lucasalary 0.1.28 → 0.5.0

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: 13c3b82fd0dbc0628ded542e7e41034b61c72b70d2b95c6db395e802a5d1a868
4
- data.tar.gz: 2c9867511fc9db6f1f1855bac932eed3ea52b89f5a64646200348b05139f01a8
3
+ metadata.gz: f3d46b29fc75775cfd085328382e37a0ab39dc7b3894e6dc522e5432066528c6
4
+ data.tar.gz: 79b01908f796138a7b9a12f2db808602091c160aadb55d76951d1d0173bd1dc2
5
5
  SHA512:
6
- metadata.gz: 0ff1f112099e366cb6b6950a37eaed47d632d338cd3c497fd293b4a8ca2bba50c734032208ef4e7f43c963a990b63d890dc9cc34fc458ae5efc414db6146088b
7
- data.tar.gz: 73b50ab1845ed285aaf131056de8c05a0d3e6f4c0ca293b542675418fda8ec3a904216ff116ad920cbca6b77e9b7503d891692a31d7cf368973dfac924cf2b1a
6
+ metadata.gz: 037ae90e0072d75746b3a3f0a063ff8c6fc1532eae086e247fedc7a985872134643dad43738e5cc674b5f2e1ab1d0d8e1ddb678cbf34f4c2e425005bfbc7023e
7
+ data.tar.gz: bbdc6a4a67c4e9bead499016efd3d5076ee1f8a09d99d9faa9218bde77d2b6120cdf083044090f7673ca29ee50056a3409443200abfd71e75286ab5aa2316021
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## LucaSalary 0.5.0
2
+
3
+ * `luca-salary` command now searches valid sub directory.
4
+
5
+ ## LucaSalary 0.1.29
6
+
7
+ * `luca-salary payment list` supports interactive `--explore` w/nushell.
8
+
1
9
  ## LucaSalary 0.1.28
2
10
 
3
11
  * BREAKING: `luca-salary payments total` directory structure changed. Upsert 1 record per 1 profile.
data/exe/luca-salary CHANGED
@@ -1,6 +1,16 @@
1
1
  #!/usr/bin/ruby
2
2
  # frozen_string_literal: true
3
3
 
4
+ unless Dir.exist?('data') || ARGV[0] == 'new'
5
+ target = 'profiles'
6
+ Dir.glob('*').reject { |f| File.symlink?(f) }
7
+ .find { |f| File.directory?("#{f}/data/#{target}") }.tap do |d|
8
+ abort "No valid data directory, exit..." if d.nil?
9
+
10
+ Dir.chdir(d)
11
+ end
12
+ end
13
+
4
14
  require 'json'
5
15
  require 'optparse'
6
16
  require 'luca_salary'
@@ -60,6 +70,8 @@ module LucaCmd
60
70
  puts JSON.dump(dat)
61
71
  when 'nu'
62
72
  LucaSupport::View.nushell(dat)
73
+ when 'explore'
74
+ LucaSupport::View.nushell(dat, :explore)
63
75
  else
64
76
  puts YAML.dump(dat)
65
77
  end
@@ -114,9 +126,10 @@ when 'pay', /payments?/
114
126
  end
115
127
  when 'list'
116
128
  OptionParser.new do |opt|
117
- opt.banner = 'Usage: luca-salary payments list [--mail|--nu] year month [date]'
129
+ opt.banner = 'Usage: luca-salary payments list [--mail|--nu|--explore] year month [date]'
118
130
  opt.on('--mail', 'send to managers') { |_v| params['mode'] = 'mail' }
119
131
  opt.on('--nu', 'show table in nushell') { |_v| params[:output] = 'nu' }
132
+ opt.on('--explore', 'explore table in nushell') { |_v| params[:output] = 'explore' }
120
133
  args = opt.parse(ARGV)
121
134
  LucaCmd::Payment.list(args, params)
122
135
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LucaSalary
4
- VERSION = '0.1.28'
4
+ VERSION = '0.5.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lucasalary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.28
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chuma Takahiro
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-11 00:00:00.000000000 Z
11
+ date: 2023-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lucarecord
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.5.4
19
+ version: 0.6.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.5.4
26
+ version: 0.6.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -104,14 +104,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
104
104
  requirements:
105
105
  - - ">="
106
106
  - !ruby/object:Gem::Version
107
- version: 2.6.0
107
+ version: 3.0.0
108
108
  required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - ">="
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
113
  requirements: []
114
- rubygems_version: 3.3.5
114
+ rubygems_version: 3.4.10
115
115
  signing_key:
116
116
  specification_version: 4
117
117
  summary: Salary calculation framework