tsks 0.0.10 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +32 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/bin/release +5 -0
- data/lib/tsks/cli.rb +22 -4
- data/lib/tsks/storage.rb +6 -0
- data/lib/tsks/version.rb +1 -1
- metadata +9 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b89efbe36c688675848e879587194b69db1f2fb21a60a2722186d71baced4056
|
4
|
+
data.tar.gz: a17fbbb16b65f0e1aa3d020596e71bdbab0c431e54b09365849d74d51121a981
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: affe2109c255dab16db5c93f955abcf4d3afd3aa1e46e8e392dee22681a5c3564773ca83195b10f9129e15721b9c0fe11495071bbcacce2419c4c9fe2ba1f2ff
|
7
|
+
data.tar.gz: 6a2c430ee08994a1d4ff8637b545ab2c27f60b645764b01e8b43793d474efec08afe25ab1d8bf9cacd9157547f83a11954ac8e0d9af91f85ad7302e0bb8cc368
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# Use the latest 2.1 version of CircleCI pipeline process engine.
|
2
|
+
# See: https://circleci.com/docs/2.0/configuration-reference
|
3
|
+
version: 2.1
|
4
|
+
|
5
|
+
# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.
|
6
|
+
# See: https://circleci.com/docs/2.0/orb-intro/
|
7
|
+
orbs:
|
8
|
+
ruby: circleci/ruby@1.4.0
|
9
|
+
|
10
|
+
# Define a job to be invoked later in a workflow.
|
11
|
+
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
|
12
|
+
jobs:
|
13
|
+
build:
|
14
|
+
docker:
|
15
|
+
- image: cimg/ruby:3.1.0
|
16
|
+
executor: ruby/default
|
17
|
+
steps:
|
18
|
+
- checkout
|
19
|
+
- run:
|
20
|
+
name: bundle install
|
21
|
+
command: bundle install
|
22
|
+
- run:
|
23
|
+
name: test
|
24
|
+
command: ./bin/test
|
25
|
+
|
26
|
+
# Invoke jobs via workflows
|
27
|
+
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
|
28
|
+
workflows:
|
29
|
+
sample: # This is the name of the workflow, feel free to change it to better match your workflow.
|
30
|
+
# Inside the workflow, you define the jobs you want to run.
|
31
|
+
jobs:
|
32
|
+
- build
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# tsks
|
2
2
|
|
3
|
-
[![build](https://
|
3
|
+
[![build](https://dl.circleci.com/status-badge/img/gh/luanrv/tsks-cli/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/luanrv/tsks-cli/tree/main)
|
4
4
|
|
5
5
|
A stateful command line interface to help you handle your daily tsks (with
|
6
6
|
synchronisation and contexts!).
|
data/bin/release
ADDED
data/lib/tsks/cli.rb
CHANGED
@@ -31,7 +31,7 @@ module Tsks
|
|
31
31
|
Tsks::Storage.init
|
32
32
|
end
|
33
33
|
|
34
|
-
desc "add TSK", "add a new tsk (Use --context to specify one e.g.
|
34
|
+
desc "add TSK", "add a new tsk (Use --context to specify one e.g. --context=work)"
|
35
35
|
option :context
|
36
36
|
def add tsk
|
37
37
|
if !File.directory? CLI.setup_folder
|
@@ -45,17 +45,21 @@ module Tsks
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
-
desc "done ID", "mark a tsk you have
|
48
|
+
desc "done ID", "mark a tsk you have done"
|
49
49
|
def done id
|
50
50
|
if !File.directory? CLI.setup_folder
|
51
51
|
return puts "tsks was not initialized yet."
|
52
52
|
end
|
53
53
|
|
54
|
-
Tsks::Storage.update id
|
54
|
+
op_status = Tsks::Storage.update id
|
55
|
+
if !op_status
|
56
|
+
puts "the specified tsk do not exist."
|
57
|
+
end
|
55
58
|
end
|
56
59
|
|
57
60
|
desc "list", "see all active tsks, filter by context or that are done"
|
58
61
|
option :done, type: :boolean
|
62
|
+
option :all, type: :boolean
|
59
63
|
option :context
|
60
64
|
def list
|
61
65
|
if !File.directory? CLI.setup_folder
|
@@ -70,8 +74,10 @@ module Tsks
|
|
70
74
|
tsks = Tsks::Storage.select_by({status: 'done'})
|
71
75
|
elsif options[:context]
|
72
76
|
tsks = Tsks::Storage.select_by({context: options[:context]})
|
77
|
+
elsif options[:all]
|
78
|
+
tsks = Tsks::Storage.select_all
|
73
79
|
else
|
74
|
-
tsks = Tsks::Storage.
|
80
|
+
tsks = Tsks::Storage.select_active
|
75
81
|
end
|
76
82
|
|
77
83
|
if tsks.count > 0
|
@@ -199,5 +205,17 @@ module Tsks
|
|
199
205
|
puts "the specified tsk do not exist."
|
200
206
|
end
|
201
207
|
end
|
208
|
+
|
209
|
+
desc "doing ID", "mark a tsk you started doing"
|
210
|
+
def doing id
|
211
|
+
if !File.directory? CLI.setup_folder
|
212
|
+
return puts "tsks was not initialized yet."
|
213
|
+
end
|
214
|
+
|
215
|
+
op_status = Tsks::Storage.update id, {status: 'doing'}
|
216
|
+
if !op_status
|
217
|
+
puts "the specified tsk do not exist."
|
218
|
+
end
|
219
|
+
end
|
202
220
|
end
|
203
221
|
end
|
data/lib/tsks/storage.rb
CHANGED
@@ -109,6 +109,12 @@ module Tsks
|
|
109
109
|
tsks = structure_tsks(raw_tsks, local_id=local_id)
|
110
110
|
end
|
111
111
|
|
112
|
+
def self.select_active
|
113
|
+
storage = get_storage_instance
|
114
|
+
raw_tsks = storage.execute("SELECT rowid, * FROM tsks WHERE status NOT LIKE 'done'")
|
115
|
+
tsks = structure_tsks raw_tsks
|
116
|
+
end
|
117
|
+
|
112
118
|
def self.delete local_id
|
113
119
|
storage = get_storage_instance
|
114
120
|
removed_tsks = storage
|
data/lib/tsks/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tsks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luan Ramos Vicente
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -80,7 +80,7 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
description:
|
83
|
+
description:
|
84
84
|
email:
|
85
85
|
- luanrvmood@gmail.com
|
86
86
|
executables:
|
@@ -88,6 +88,7 @@ executables:
|
|
88
88
|
extensions: []
|
89
89
|
extra_rdoc_files: []
|
90
90
|
files:
|
91
|
+
- ".circleci/config.yml"
|
91
92
|
- ".env.sample"
|
92
93
|
- ".gitignore"
|
93
94
|
- ".rspec"
|
@@ -98,6 +99,7 @@ files:
|
|
98
99
|
- Rakefile
|
99
100
|
- bin/console
|
100
101
|
- bin/install
|
102
|
+
- bin/release
|
101
103
|
- bin/setup
|
102
104
|
- bin/test
|
103
105
|
- exe/tsks
|
@@ -114,7 +116,7 @@ metadata:
|
|
114
116
|
allowed_push_host: https://rubygems.org
|
115
117
|
homepage_uri: https://github.com/luanrv/tsks
|
116
118
|
source_code_uri: https://github.com/luanrv/tsks
|
117
|
-
post_install_message:
|
119
|
+
post_install_message:
|
118
120
|
rdoc_options: []
|
119
121
|
require_paths:
|
120
122
|
- lib
|
@@ -129,8 +131,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
131
|
- !ruby/object:Gem::Version
|
130
132
|
version: '0'
|
131
133
|
requirements: []
|
132
|
-
rubygems_version: 3.
|
133
|
-
signing_key:
|
134
|
+
rubygems_version: 3.4.6
|
135
|
+
signing_key:
|
134
136
|
specification_version: 4
|
135
137
|
summary: A stateful command line interface to help you handle your daily tsks (with
|
136
138
|
synchronisation and contexts)
|