code_snippet_manager 0.1.1 → 0.1.2

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: b205c39884940619838c148bde4136bdaea5640d516ef7abbb732c4a2bc94d06
4
- data.tar.gz: 4e9e40a1fab8cba51d7cdffba34ccc58de6d1b95a92378feaf445ffbb8de6c2a
3
+ metadata.gz: 4a33f76263c6d72ed24be1c658f3977c2a89a75d231cc4325f43340338872481
4
+ data.tar.gz: d33cbe74a68674551d53eb2f54fe295251e60aaa9a6e21672296e0b6e7c79fae
5
5
  SHA512:
6
- metadata.gz: e88293a742b4e3d55317075e94200d98e634f519d9ba52e2a1cb803565bff31b7b3fb1348c3305a140e767393f2d7f3e896598fb245249e48722dcade4d6253c
7
- data.tar.gz: e07a988128bfecfd07d1e891a9a4775776ebfdfddc5f51954a824dfe207ffc6658b0d024ef276ee1c8a7594c4f999c2dd023edb38128897175045bb1ee3563e0
6
+ metadata.gz: 59b2569f1bc72ceeda444225f90f512af9cac8728ac8ff63c6e44bb31a1d3d810ca1aaab9877506cfe12bc7a16ed254be214c64c0b9403949acccfbcbcb2b58d
7
+ data.tar.gz: 1269b35424521736c3b2e942eb46d45c88140768fcd88805c783a0519de4d2255aeb9b93df1305c44a97c5536ac1a44c8321c7ca9549151973e4bd301e993db2
data/.rubocop.yml CHANGED
@@ -1,5 +1,10 @@
1
1
  AllCops:
2
2
  TargetRubyVersion: 3.0
3
+ Include:
4
+ - 'lib/**/*.rb'
5
+ - spec/**/*.rb'
6
+ Exlude:
7
+ - 'bin'
3
8
 
4
9
  Style/StringLiterals:
5
10
  EnforcedStyle: double_quotes
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CodeSnippetManager
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
@@ -1,25 +1,27 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "code_snippet_manager/version"
4
- require "tty-prompt"
5
4
 
5
+ # Main module for the lib
6
6
  module CodeSnippetManager
7
7
  def self.run
8
- prompt = TTY::Prompt.new
9
- choice = prompt.select("Choose your action:") do |menu|
10
- menu.choice name: "Add a new snippet", value: :add
11
- menu.choice name: "List all snippets", value: :list
12
- # Add more options here
13
- end
8
+ choice = generate_prompt_choice
14
9
 
15
10
  case choice
16
11
  when :add
17
- puts 'add'
18
- # Implementation for adding a new snippet
12
+ puts "add"
19
13
  when :list
20
- puts 'list'
21
- # Implementation for listing all snippets
22
- # More cases as necessary
14
+ puts "list"
15
+ end
16
+ end
17
+
18
+ private
19
+
20
+ def generate_prompt_choice
21
+ prompt = TTY::Prompt.new
22
+ prompt.select("Choose your action:") do |menu|
23
+ menu.choice name: "Add a new snippet", value: :add
24
+ menu.choice name: "List all snippets", value: :list
23
25
  end
24
26
  end
25
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: code_snippet_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - jovan-sremacki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-04 00:00:00.000000000 Z
11
+ date: 2024-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tty-prompt