linear-cli 0.8.2 → 0.8.4

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: 837207569539a03287d8a08ad711c06698324a29b290d2fcc87c908157e4e555
4
- data.tar.gz: 0b28e78a18942b06790fce45c6a8e70aca03774cdd9b58dff3bf1a60bba6c3ec
3
+ metadata.gz: be7d89c8525d2e878c4b092b0e648fa2df2fd8e50fe2f9dbf4e8bc8fc485d01c
4
+ data.tar.gz: 2aae40e3bb4c38f98cbf96b555fa0168f6e3979edf0cd41e18bfc531880a4c21
5
5
  SHA512:
6
- metadata.gz: 0e891850b2717b08d514291f00cff3f78ce8855ea46d1abc7037810cdf6082d182b3a8ddfe8f61b38ff0cf9ea5046711673347c42318e37cbab7097a40f84905
7
- data.tar.gz: 4d733991e15f453ada7cfddbc4d0911fcb5703e928272db9944b083cab8c88739b7042d8991939bad636947f129387fa5f90887a65efb382e82066332a5c0f50
6
+ metadata.gz: af51a54a3c17787e21fbe31db483e13553bf0028ff1b518667b37f67f75b2898f42f88746ebf0b15081c21af79c605306307250f4b456f083b90e6e1c351c511
7
+ data.tar.gz: b5e99a0c3c2a004cd4ffb8060959ae84c429ed5b5b7f4756067d8af82d576667e8159b55df11c7a7519d8fe21a5c2a7c71b7b50130c11937865b6eda8af3e334
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.8.4] - 2024-02-06
6
+ ### Added
7
+ - Added version command (@bougyman)
8
+
5
9
  ## [0.8.1] - 2024-02-06
6
10
  ### Fixed
7
11
  - Fixed problem with setting verbosity (@bougyman)
@@ -59,8 +63,9 @@
59
63
  ### Added
60
64
  - Added new changelog management system (changelog-rb) (@bougyman)
61
65
 
62
- [Unreleased]: https://github.com/rubyists/linear-cli/compare/0.8.1...HEAD
63
- [0.8.1]: https://github.com/rubyists/linear-cli/compare/v0.8.0...0.8.1
66
+ [Unreleased]: https://github.com/rubyists/linear-cli/compare/0.8.4...HEAD
67
+ [0.8.4]: https://github.com/rubyists/linear-cli/compare/v0.8.1...0.8.4
68
+ [0.8.1]: https://github.com/rubyists/linear-cli/compare/v0.8.0...v0.8.1
64
69
  [0.8.0]: https://github.com/rubyists/linear-cli/compare/v0.7.7...v0.8.0
65
70
  [0.7.7]: https://github.com/rubyists/linear-cli/compare/v0.7.5...v0.7.7
66
71
  [0.7.5]: https://github.com/rubyists/linear-cli/compare/v0.7.3...v0.7.5
@@ -0,0 +1,4 @@
1
+ type: Added
2
+ title: >
3
+ Added version command
4
+ author: bougyman
@@ -0,0 +1 @@
1
+ date: 2024-02-06
data/exe/scripts/lc.sh CHANGED
@@ -3,6 +3,10 @@ if [ "$#" -eq 0 ]; then
3
3
  printf "No subcommand provided, defaulting to 'lc issue list'\nlc --help to see subcommands\n" >&2
4
4
  exec linear-cli issue list
5
5
  fi
6
+ if [[ "$*" =~ --version ]]
7
+ then
8
+ exec linear-cli version
9
+ fi
6
10
  if [[ "$*" =~ --help|-h ]]
7
11
  then
8
12
  printf "Each subcommand has its own help, use 'lc <subcommand> --help' to see it\n" >&2
@@ -26,15 +26,18 @@ module Rubyists
26
26
  logger.trace "Calling #{self.class} with #{method_args}"
27
27
  super(**method_args)
28
28
  rescue SmellsBad => e
29
- logger.error e.message
30
- exit 1
29
+ TTY::Prompt.new.error e.message
30
+ TTY::Prompt.new.error '** This smells bad! Bailing. **'
31
+ exit 22
31
32
  rescue NotFoundError => e
32
- logger.error e.message
33
+ TTY::Prompt.new.error e.message
34
+ TTY::Prompt.new.error '** Record not found, Cannot Continue **'
33
35
  exit 66
34
36
  rescue StandardError => e
35
- logger.error e.message
36
- logger.error e.backtrace.join("\n") if Rubyists::Linear.verbosity.positive?
37
- exit 5
37
+ TTY::Prompt.new.error "What the heck is this? #{e}"
38
+ TTY::Prompt.new.error '** WTH? Cannot Continue **'
39
+ logger.error e.backtrace.join("\n") if debug.positive?
40
+ exit 88
38
41
  end
39
42
  end
40
43
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rubyists
4
4
  module Linear
5
- VERSION = '0.8.2'
5
+ VERSION = '0.8.4'
6
6
  end
7
7
  end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'semantic_logger'
4
+
5
+ module Rubyists
6
+ # Namespace for Linear
7
+ module Linear
8
+ M :user
9
+ # Namespace for CLI
10
+ module CLI
11
+ Version = Class.new Dry::CLI::Command
12
+ # The Version command
13
+ class Version
14
+ include SemanticLogger::Loggable
15
+ include Rubyists::Linear::CLI::CommonOptions
16
+
17
+ desc 'Show version'
18
+
19
+ def call(**)
20
+ logger.debug 'Version called'
21
+ TTY::Prompt.new.say Rubyists::Linear::VERSION
22
+ end
23
+ end
24
+ register 'version', Version, aliases: %w[v]
25
+ end
26
+ end
27
+ end
data/lib/linear.rb CHANGED
@@ -1,6 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'pathname'
4
+ require 'semantic_logger'
5
+ SemanticLogger.default_level = :info
6
+ SemanticLogger.add_appender(io: $stderr, formatter: :color)
4
7
 
5
8
  # Add the / operator for path separation
6
9
  class Pathname
@@ -12,6 +15,7 @@ end
12
15
  module Rubyists
13
16
  # Namespace for Linear classes
14
17
  module Linear
18
+ include SemanticLogger::Loggable
15
19
  # rubocop:disable Layout/SpaceAroundOperators
16
20
  ROOT = (Pathname(__FILE__)/'../..').expand_path
17
21
  LIBROOT = ROOT/:lib/:linear
@@ -42,16 +46,6 @@ module Rubyists
42
46
  @verbosity ||= 0
43
47
  end
44
48
 
45
- def self.logger
46
- return @logger if @logger
47
-
48
- require 'semantic_logger'
49
-
50
- SemanticLogger.default_level = :info
51
- SemanticLogger.add_appender(io: $stderr, formatter: :color)
52
- @logger = SemanticLogger['Rubyists::Linear']
53
- end
54
-
55
49
  def self.verbosity=(debug)
56
50
  return verbosity unless debug
57
51
 
data/oci/Containerfile CHANGED
@@ -12,7 +12,7 @@ RUN apk --update add bash ruby-dev build-base git sqlite-dev
12
12
  WORKDIR $APP_ROOT
13
13
 
14
14
  COPY . $APP_ROOT
15
- RUN bundle install && bundle exec rake build
15
+ RUN gem i semantic_logger && bundle install && bundle exec rake build
16
16
 
17
17
  CMD %w[bundle exec lc]
18
18
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linear-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tj (bougyman) Vanderpoel
@@ -238,6 +238,8 @@ files:
238
238
  - changelog/0.8.0/tag.yml
239
239
  - changelog/0.8.1/fixed_problem_with_setting_verbosity.yml
240
240
  - changelog/0.8.1/tag.yml
241
+ - changelog/0.8.4/added_version_command.yml
242
+ - changelog/0.8.4/tag.yml
241
243
  - changelog/unreleased/.gitkeep
242
244
  - cinemas/listings.cinema
243
245
  - cinemas/listings.cinema.gif
@@ -270,6 +272,7 @@ files:
270
272
  - lib/linear/commands/issue/update.rb
271
273
  - lib/linear/commands/team.rb
272
274
  - lib/linear/commands/team/list.rb
275
+ - lib/linear/commands/version.rb
273
276
  - lib/linear/commands/whoami.rb
274
277
  - lib/linear/exceptions.rb
275
278
  - lib/linear/fragments.rb