poke-your-api 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 013bffa8e1fd7cc08a67690af8a31338f81f625d21e2fdb768c414f1b5b50332
4
- data.tar.gz: 71372e8e4c8cce9846d264d4dd047f772d807b6a9f5f08d66d92c0ede5531211
3
+ metadata.gz: 81877f6f324360849440ea79c839c8581596586b479e18b18e615f7693d8954c
4
+ data.tar.gz: bd0c96547df1d62cde88632f41ddf481fd2e7218d775eef4eb96d370fb50f660
5
5
  SHA512:
6
- metadata.gz: da14a06ee7ced9ab757c6745ff669db496ff331f7cf5414186605db9d06196bc7be867a6bbf295556dceea27649d99de09953086365d60e63991b3a228c840c8
7
- data.tar.gz: 7287edb8ee100e11176ba9b66c71c57374b2c304e91d50787af79da43edb3a5d8b710527d6f1182fd626a37a08a5c6cf1a45ff4be4f1822ea1929acc00316b37
6
+ metadata.gz: ba0f1bfb9c5a732c64e31a303913ba1abfeb77ea4aeed643ed0f94cac1462e8da31f730d26a5ea0112cde6192646462836d69fa5f966b10b90de6e8e04e17688
7
+ data.tar.gz: 9e1f4371b95115de6af6be2dd406767b226728dec89dc70d544fa4df51a5d761dd1f9469ef6549d771bbf7a79106ca7719aff0b85722bd2e59e17ae88919753e
data/exe/poke CHANGED
@@ -13,7 +13,7 @@ end
13
13
  begin
14
14
  # run default command if the first command is not recognised
15
15
  Poke::CLI.start(ARGV)
16
- rescue Poke::CLI::Error => err
17
- puts "ERROR: #{err.message}"
16
+ rescue Poke::CLI::Error => e
17
+ puts "ERROR: #{e.message}"
18
18
  exit 1
19
19
  end
data/lib/poke/cli.rb CHANGED
@@ -15,6 +15,12 @@ module Poke
15
15
  end
16
16
  map %w[--version -v] => :version
17
17
 
18
+ desc 'init', 'Setup config directory and example API'
19
+ def init
20
+ require_relative 'commands/init'
21
+ Poke::Commands::Init.new.execute
22
+ end
23
+
18
24
  desc 'env', 'Display and edit environments'
19
25
  method_option :help, aliases: '-h', type: :boolean,
20
26
  desc: 'Display usage information'
@@ -53,18 +59,6 @@ module Poke
53
59
  end
54
60
  end
55
61
 
56
- desc 'config', 'Manage poke config'
57
- method_option :help, aliases: '-h', type: :boolean, desc: 'Display usage information'
58
- method_option :open, aliases: '-o', type: :string, desc: 'Open config in the editor'
59
- def config(*)
60
- if options[:help]
61
- invoke :help, ['response']
62
- else
63
- require_relative 'commands/config'
64
- Poke::Commands::Config.new(options).execute
65
- end
66
- end
67
-
68
62
  require_relative 'commands/lru'
69
63
  register Poke::Commands::Lru, 'lru', 'lru [SUBCOMMAND]', 'Manage usage statistics'
70
64
 
@@ -34,9 +34,9 @@ module Poke
34
34
  if (name = @options.fetch(:name, nil))
35
35
  request = Request.find_by_name(Config.find_request_name_by_alias(name))
36
36
  else
37
- choices = Request.all.sort_by(&:position).map(&:name)
38
- name = TTY::Prompt.new.select('Select the endpoint', choices, filter: true, quiet: true)
39
- request = Request.find_by_name(name)
37
+ choices = Request.all.sort_by(&:position).map(&:name_with_alias)
38
+ name = TTY::Prompt.new(interrupt: :exit).select('Select the endpoint', choices, filter: true, quiet: true)
39
+ request = Request.find_by_name_with_alias(name)
40
40
  end
41
41
 
42
42
  request.use!
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../command'
4
+ require_relative '../config'
5
+
6
+ module Poke
7
+ module Commands
8
+ class Init < Poke::Command
9
+ EXAMPLE_CONFIG = {
10
+ "envs": {
11
+ "development": {
12
+ "BASE_URL": 'https://httpbin.org'
13
+ },
14
+ "production": {
15
+ "BASE_URL": 'https://httpbin.org'
16
+ }
17
+ },
18
+ "default_env": 'development'
19
+ }.freeze
20
+
21
+ private
22
+
23
+ def run
24
+ return if ::Poke::Config.valid?
25
+
26
+ Dir.mkdir("#{Dir.home}/.poke")
27
+
28
+ create_config_files
29
+ create_example_api
30
+ end
31
+
32
+ def create_config_files
33
+ File.write(Config.aliases_path, {}.to_json)
34
+ File.write(Config.lru_path, {}.to_json)
35
+ File.write(Config.response_path, {}.to_json)
36
+ end
37
+
38
+ def create_example_api
39
+ Dir.mkdir("#{Dir.home}/.poke/example_api")
40
+ File.write("#{Dir.home}/.poke/example_api/config.json", EXAMPLE_CONFIG.to_json)
41
+ File.write("#{Dir.home}/.poke/example_api/example_get.curl", 'curl $BASE_URL/get -G -d foo=bar')
42
+ end
43
+ end
44
+ end
45
+ end
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative '../config'
4
-
5
3
  module Poke
6
4
  module Commands
7
5
  class Lru < Thor
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative '../command'
4
+ require_relative '../config'
4
5
 
5
6
  require 'tty-command'
6
7
 
@@ -10,7 +11,7 @@ module Poke
10
11
  private
11
12
 
12
13
  def run(output: $stdout)
13
- out, _err = TTY::Command.new(printer: :null).run("cat #{Poke::Config.root_path}/response.json")
14
+ out, _err = TTY::Command.new(printer: :null).run("cat #{Poke::Config.response_path}")
14
15
  output << "#{out}\n"
15
16
  end
16
17
  end
data/lib/poke/config.rb CHANGED
@@ -6,19 +6,17 @@ module Poke
6
6
  class Config
7
7
  class NotFound < StandardError; end
8
8
 
9
- PATH = "#{Dir.home}/.poke.json".freeze
10
- DEFAULT_ROOT_PATH = "#{Dir.home}/.poke".freeze
9
+ ROOT_PATH = "#{Dir.home}/.poke".freeze
11
10
 
12
- def self.all
13
- @all ||= begin
14
- config = File.exist?(PATH) ? JSON.parse(File.read(PATH)) : {}
15
- config['root_path'] ||= DEFAULT_ROOT_PATH
16
- config
17
- end
11
+ def self.root_path
12
+ ROOT_PATH
18
13
  end
19
14
 
20
- def self.root_path
21
- all['root_path']
15
+ def self.valid?
16
+ Dir.exist?("#{Dir.home}/.poke") &&
17
+ File.exist?("#{Dir.home}/.poke/aliases.json") &&
18
+ File.exist?("#{Dir.home}/.poke/lru.json") &&
19
+ File.exist?("#{Dir.home}/.poke/response.json")
22
20
  end
23
21
 
24
22
  def self.response_path
@@ -29,17 +27,29 @@ module Poke
29
27
  [root_path, 'lru.json'].join('/')
30
28
  end
31
29
 
30
+ def self.aliases_path
31
+ [root_path, 'aliases.json'].join('/')
32
+ end
33
+
34
+ def self.aliases
35
+ @aliases ||= JSON.parse(File.read(aliases_path))
36
+ end
37
+
32
38
  def self.find_request_name_by_alias(value)
33
- result = all.dig('aliases', value)
39
+ result = aliases[value]
40
+
34
41
  raise NotFound unless result
35
42
 
36
43
  result
37
44
  end
38
45
 
46
+ def self.find_alias_by_request_name(value)
47
+ aliases.find { |_k, v| v == value }&.first
48
+ end
49
+
39
50
  def self.set_alias!(value, path)
40
- all['aliases'] ||= {}
41
- all['aliases'][value] = path.to_s
42
- File.write(PATH, all.to_json)
51
+ aliases[value] = path.to_s
52
+ File.write(aliases_path, aliases.to_json)
43
53
  end
44
54
  end
45
55
  end
data/lib/poke/request.rb CHANGED
@@ -17,8 +17,9 @@ module Poke
17
17
 
18
18
  group_name = path.to_s.gsub(%r{#{Config.root_path}/([^\/]+)/.*}, '\1')
19
19
  name = path.to_s.gsub(%r{#{Config.root_path}/(.*)\.curl}, '\1')
20
+ alias_name = Config.find_alias_by_request_name(name)
20
21
 
21
- new(group_name:, name:, path:)
22
+ new(group_name:, name:, alias_name:, path:)
22
23
  end
23
24
  end
24
25
  end
@@ -27,14 +28,23 @@ module Poke
27
28
  all.find { |request| request.name == name }
28
29
  end
29
30
 
30
- attr_reader :path, :name, :group_name
31
+ def self.find_by_name_with_alias(name)
32
+ all.find { |request| request.name_with_alias == name }
33
+ end
34
+
35
+ attr_reader :path, :name, :alias_name, :group_name
31
36
 
32
- def initialize(path:, name:, group_name:)
37
+ def initialize(path:, name:, alias_name:, group_name:)
33
38
  @path = path
34
39
  @name = name
40
+ @alias_name = alias_name
35
41
  @group_name = group_name
36
42
  end
37
43
 
44
+ def name_with_alias
45
+ @name_with_alias ||= "#{name}#{alias_name ? " (#{alias_name})" : ''}"
46
+ end
47
+
38
48
  def position
39
49
  LastRecentlyUsed.position(namespace: 'requests', key: name.to_s)
40
50
  end
data/lib/poke/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Poke
4
- VERSION = '0.1.0'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poke-your-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Bator
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-06 00:00:00.000000000 Z
11
+ date: 2024-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pastel
@@ -117,27 +117,15 @@ extensions:
117
117
  - ext/poke/extconf.rb
118
118
  extra_rdoc_files: []
119
119
  files:
120
- - ".editorconfig"
121
- - ".rspec"
122
- - ".rubocop.yml"
123
- - ".ruby-version"
124
- - CODE_OF_CONDUCT.md
125
- - Gemfile
126
- - Gemfile.lock
127
- - LICENSE.txt
128
- - README.md
129
- - Rakefile
130
120
  - exe/poke
131
121
  - ext/poke/extconf.rb
132
- - ext/poke/poke.c
133
- - ext/poke/poke.h
134
122
  - lib/poke.rb
135
123
  - lib/poke/cli.rb
136
124
  - lib/poke/command.rb
137
125
  - lib/poke/commands/.gitkeep
138
- - lib/poke/commands/config.rb
139
126
  - lib/poke/commands/curl.rb
140
127
  - lib/poke/commands/env.rb
128
+ - lib/poke/commands/init.rb
141
129
  - lib/poke/commands/lru.rb
142
130
  - lib/poke/commands/lru/cat.rb
143
131
  - lib/poke/commands/lru/reset.rb
@@ -149,7 +137,6 @@ files:
149
137
  - lib/poke/paint.rb
150
138
  - lib/poke/request.rb
151
139
  - lib/poke/version.rb
152
- - sig/poke.rbs
153
140
  homepage: https://github.com/MrBananaLord/poke
154
141
  licenses:
155
142
  - MIT
data/.editorconfig DELETED
@@ -1,9 +0,0 @@
1
- root = true
2
-
3
- [*.rb]
4
- charset = utf-8
5
- end_of_line = lf
6
- insert_final_newline = true
7
- indent_style = space
8
- indent_size = 2
9
- trim_trailing_whitespace = true
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/.rubocop.yml DELETED
@@ -1,5 +0,0 @@
1
- Style/Documentation:
2
- Enabled: false
3
- Style/FrozenStringLiteralComment:
4
- Enabled: true
5
- SafeAutoCorrect: true
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 3.2.0
data/CODE_OF_CONDUCT.md DELETED
@@ -1,84 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
-
7
- We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
-
9
- ## Our Standards
10
-
11
- Examples of behavior that contributes to a positive environment for our community include:
12
-
13
- * Demonstrating empathy and kindness toward other people
14
- * Being respectful of differing opinions, viewpoints, and experiences
15
- * Giving and gracefully accepting constructive feedback
16
- * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
- * Focusing on what is best not just for us as individuals, but for the overall community
18
-
19
- Examples of unacceptable behavior include:
20
-
21
- * The use of sexualized language or imagery, and sexual attention or
22
- advances of any kind
23
- * Trolling, insulting or derogatory comments, and personal or political attacks
24
- * Public or private harassment
25
- * Publishing others' private information, such as a physical or email
26
- address, without their explicit permission
27
- * Other conduct which could reasonably be considered inappropriate in a
28
- professional setting
29
-
30
- ## Enforcement Responsibilities
31
-
32
- Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
-
34
- Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
-
36
- ## Scope
37
-
38
- This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
-
40
- ## Enforcement
41
-
42
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at jan@bloomandwild.com. All complaints will be reviewed and investigated promptly and fairly.
43
-
44
- All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
-
46
- ## Enforcement Guidelines
47
-
48
- Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
-
50
- ### 1. Correction
51
-
52
- **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
-
54
- **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
-
56
- ### 2. Warning
57
-
58
- **Community Impact**: A violation through a single incident or series of actions.
59
-
60
- **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
-
62
- ### 3. Temporary Ban
63
-
64
- **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
-
66
- **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
-
68
- ### 4. Permanent Ban
69
-
70
- **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
-
72
- **Consequence**: A permanent ban from any sort of public interaction within the community.
73
-
74
- ## Attribution
75
-
76
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
- available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
-
79
- Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
-
81
- [homepage]: https://www.contributor-covenant.org
82
-
83
- For answers to common questions about this code of conduct, see the FAQ at
84
- https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile DELETED
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- # Specify your gem's dependencies in poke.gemspec
6
- gemspec
7
-
8
- gem "rake"
9
- gem "rake-compiler"
10
- gem "rspec"
11
-
12
- gem "tty"#, path: "/Users/janbator/Projects/tty" # That's with some of my "fixes" :D
13
- gem "pry", require: true
14
- gem "pry-nav", require: true
data/Gemfile.lock DELETED
@@ -1,89 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- poke (0.1.0)
5
- pastel (~> 0.8)
6
- thor (~> 1.0)
7
- tty-box (~> 0.7)
8
- tty-command (~> 0.10)
9
- tty-cursor (~> 0.7)
10
- tty-editor (~> 0.6)
11
- tty-table (~> 0.12)
12
-
13
- GEM
14
- remote: https://rubygems.org/
15
- specs:
16
- coderay (1.1.3)
17
- diff-lcs (1.5.0)
18
- method_source (1.0.0)
19
- pastel (0.8.0)
20
- tty-color (~> 0.5)
21
- pry (0.14.2)
22
- coderay (~> 1.1)
23
- method_source (~> 1.0)
24
- pry-nav (1.0.0)
25
- pry (>= 0.9.10, < 0.15)
26
- rake (13.0.6)
27
- rake-compiler (1.2.1)
28
- rake
29
- rspec (3.12.0)
30
- rspec-core (~> 3.12.0)
31
- rspec-expectations (~> 3.12.0)
32
- rspec-mocks (~> 3.12.0)
33
- rspec-core (3.12.2)
34
- rspec-support (~> 3.12.0)
35
- rspec-expectations (3.12.3)
36
- diff-lcs (>= 1.2.0, < 2.0)
37
- rspec-support (~> 3.12.0)
38
- rspec-mocks (3.12.5)
39
- diff-lcs (>= 1.2.0, < 2.0)
40
- rspec-support (~> 3.12.0)
41
- rspec-support (3.12.0)
42
- strings (0.2.1)
43
- strings-ansi (~> 0.2)
44
- unicode-display_width (>= 1.5, < 3.0)
45
- unicode_utils (~> 1.4)
46
- strings-ansi (0.2.0)
47
- thor (1.2.2)
48
- tty (0.1.0)
49
- tty-box (0.7.0)
50
- pastel (~> 0.8)
51
- strings (~> 0.2.0)
52
- tty-cursor (~> 0.7)
53
- tty-color (0.6.0)
54
- tty-command (0.10.1)
55
- pastel (~> 0.8)
56
- tty-cursor (0.7.1)
57
- tty-editor (0.7.0)
58
- tty-prompt (~> 0.22)
59
- tty-prompt (0.23.1)
60
- pastel (~> 0.8)
61
- tty-reader (~> 0.8)
62
- tty-reader (0.9.0)
63
- tty-cursor (~> 0.7)
64
- tty-screen (~> 0.8)
65
- wisper (~> 2.0)
66
- tty-screen (0.8.1)
67
- tty-table (0.12.0)
68
- pastel (~> 0.8)
69
- strings (~> 0.2.0)
70
- tty-screen (~> 0.8)
71
- unicode-display_width (2.4.2)
72
- unicode_utils (1.4.0)
73
- wisper (2.0.1)
74
-
75
- PLATFORMS
76
- arm64-darwin-22
77
- x86_64-linux
78
-
79
- DEPENDENCIES
80
- poke!
81
- pry
82
- pry-nav
83
- rake
84
- rake-compiler
85
- rspec
86
- tty
87
-
88
- BUNDLED WITH
89
- 2.4.3
data/LICENSE.txt DELETED
@@ -1,20 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2023 MrBananaLord
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of
6
- this software and associated documentation files (the "Software"), to deal in
7
- the Software without restriction, including without limitation the rights to
8
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
- the Software, and to permit persons to whom the Software is furnished to do so,
10
- subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md DELETED
@@ -1,6 +0,0 @@
1
- # Poke
2
- Manage your curl requests with ease
3
-
4
- ## Copyright
5
-
6
- Copyright (c) 2023 MrBananaLord. See [MIT License](LICENSE.txt) for further details.
data/Rakefile DELETED
@@ -1,16 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require "rspec/core/rake_task"
5
-
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- require "rake/extensiontask"
9
-
10
- task build: :compile
11
-
12
- Rake::ExtensionTask.new("poke") do |ext|
13
- ext.lib_dir = "lib/poke"
14
- end
15
-
16
- task default: %i[clobber compile spec]
data/ext/poke/poke.c DELETED
@@ -1,9 +0,0 @@
1
- #include "poke.h"
2
-
3
- VALUE rb_mPoke;
4
-
5
- void
6
- Init_poke(void)
7
- {
8
- rb_mPoke = rb_define_module("Poke");
9
- }
data/ext/poke/poke.h DELETED
@@ -1,6 +0,0 @@
1
- #ifndef POKE_H
2
- #define POKE_H 1
3
-
4
- #include "ruby.h"
5
-
6
- #endif /* POKE_H */
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative '../command'
4
- require_relative '../config'
5
-
6
- require 'tty-command'
7
- require 'tty-editor'
8
-
9
- module Poke
10
- module Commands
11
- class Config < Poke::Command
12
- private
13
-
14
- def run(output: $stdout)
15
- return TTY::Editor.open(Poke::Config::PATH) if @options.fetch(:open, nil)
16
-
17
- out, _err = TTY::Command.new(printer: :null).run("cat #{Poke::Config::PATH}")
18
- output << "#{out}\n"
19
- end
20
- end
21
- end
22
- end
data/sig/poke.rbs DELETED
@@ -1,4 +0,0 @@
1
- module Poke
2
- VERSION: String
3
- # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
- end