tsks 0.0.10 → 0.0.11

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: 8dcfc253377c9a3e088a512b8e471f8192656e09e4f4974ebe36f1a4fe1ecf59
4
- data.tar.gz: 1abb7fc7bc71670be855cbcf50670db59003e3eee4835d4ac02ca73f6b39fe5e
3
+ metadata.gz: 5642476a95ebd615e61b0461eb61f2ea9a3408d249b3a85ba1ea2e028427badc
4
+ data.tar.gz: 65e8fea2affb40c031b86aed5db037426eacf8d953deaf8f13a7a3b2d0d633bf
5
5
  SHA512:
6
- metadata.gz: 5dfd37445ab1a61c066489b43d68ffece47083de6f1a13c12308240bf0b5eec429409bdab7ef9e0d097109f01df7ab6c9eb1687a1a28d29ae3aee3d7e16cf72d
7
- data.tar.gz: ac8be97dbc67159ebcdd01b272ab9ae38a03b2bd67a9132e37b1f7968c673ed8fc1d9860c1f5a8969bffce11ac41c8158374c49fcdb929546c142c7bedcbc098
6
+ metadata.gz: 1f6093f9d0a12c050e0384d316dfbf388ef39c4eb2b02cb3677e5b468f9ff71f8cafb85b937aed67c3cabbf9bb026931b5d84fe762759fd0bb3f798d8a643beb
7
+ data.tar.gz: 1287812074eab7b75d580be496b52d34c915505b45a8b7c6254e3135939a02e89295893b34a625a62cde190ab48d685fbb3e52ae0da807ba4b8838b76f3b3db5
@@ -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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tsks (0.0.10)
4
+ tsks (0.0.11)
5
5
  httparty
6
6
  sqlite3
7
7
  thor
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # tsks
2
2
 
3
- [![build](https://app.travis-ci.com/luanrv/tsks-cli.svg?branch=main)](https://app.travis-ci.com/luanrv/tsks-cli)
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
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ bundle exec rake build
4
+ git commit -am 'feat: new release'
5
+ bundle exec rake release
data/lib/tsks/cli.rb CHANGED
@@ -51,7 +51,10 @@ module Tsks
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"
@@ -71,7 +74,7 @@ module Tsks
71
74
  elsif options[:context]
72
75
  tsks = Tsks::Storage.select_by({context: options[:context]})
73
76
  else
74
- tsks = Tsks::Storage.select_by({status: 'todo'})
77
+ tsks = Tsks::Storage.select_active
75
78
  end
76
79
 
77
80
  if tsks.count > 0
@@ -199,5 +202,17 @@ module Tsks
199
202
  puts "the specified tsk do not exist."
200
203
  end
201
204
  end
205
+
206
+ desc "doing ID", "mark a tsk you started doing"
207
+ def doing id
208
+ if !File.directory? CLI.setup_folder
209
+ return puts "tsks was not initialized yet."
210
+ end
211
+
212
+ op_status = Tsks::Storage.update id, {status: 'doing'}
213
+ if !op_status
214
+ puts "the specified tsk do not exist."
215
+ end
216
+ end
202
217
  end
203
218
  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
@@ -1,3 +1,3 @@
1
1
  module Tsks
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
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.10
4
+ version: 0.0.11
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-14 00:00:00.000000000 Z
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.3.7
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)