aia 0.5.1 → 0.5.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: be8cb1e68dc5f180c5a75b87ff6519ccda00a7e82a5da524577648d83f2de56a
4
- data.tar.gz: b16fc5cf5e15ee1942da68b832f82308a2cd037d3374d8a55bdbe2289be1b030
3
+ metadata.gz: 35bff72b31591194079e96f6e1dfab9dc76db90fda1f635e962377aeb77b5662
4
+ data.tar.gz: 60704012ba00cca73bdb6bb344a4207df189b97b5dc2d686a53215836c5d27d5
5
5
  SHA512:
6
- metadata.gz: fa3136515303b071abe2866a48af9702047d117d004b6666150445133ebfa0ebb4c0aa1e86ebc3ea7e023ab6eed255a6a98938c7bf9bbb8c01a9f524130a87f4
7
- data.tar.gz: 33d4e8aa6df5e3b3a3b7e5e5811af67e01be18498ce3818dbdd4a863b495132f07fec1333d6273953132931b82852c6a435654fdac6d4aef57e14cd7f2f3ff81
6
+ metadata.gz: a7b3f5bb0bee380f3863bfe80599e8898e16143587d374db27f99d27a718433d9e6869da1a8f44207016185c0b28935b5c5edbaf45d939992ad58ecd65a68fa9
7
+ data.tar.gz: 3f4fd8f0707e55cfc2147090d55ff4c865eba8c14bb22bb07831b3e46653530c9800a8d69f148e978bcb763a91d47ac3b58c1f2ab19e387019d6537b9446059e
data/.semver CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 5
4
- :patch: 1
4
+ :patch: 2
5
5
  :special: ''
6
6
  :metadata: ''
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.5.2] 2024-01-13
4
+ - wrap response when its going to the terminal
5
+
3
6
  ## [0.5.1] 2024-01-12
4
7
  - removed a wicked puts "loaded" statement
5
8
  - fixed missed code when the options were changed to --out_file and --log_file
data/justfile CHANGED
@@ -112,6 +112,7 @@ mods_delete_all:
112
112
  module_repo := "/Users/dewayne/sandbox/git_repos/repo.just"
113
113
  module_gem := "/Users/dewayne/sandbox/git_repos/gem.just"
114
114
  module_version := "/Users/dewayne/just_modules/version.just"
115
+ module_git := "/Users/dewayne/just_modules/git.just"
115
116
 
116
117
 
117
118
  # Install Locally
@@ -185,3 +186,9 @@ alias inc := bump
185
186
  @version what='' args='':
186
187
  just -d . -f {{module_version}} {{what}} {{args}}
187
188
 
189
+
190
+
191
+ # Module git
192
+ @git what='' args='':
193
+ just -d . -f {{module_git}} {{what}} {{args}}
194
+
data/lib/aia/main.rb CHANGED
@@ -56,6 +56,11 @@ class AIA::Main
56
56
 
57
57
  # Function to prompt the user with a question using reline
58
58
  def ask_question_with_reline(prompt)
59
+ if prompt.start_with?("\n")
60
+ puts
61
+ prompt = prompt[1..]
62
+ end
63
+
59
64
  answer = Reline.readline(prompt)
60
65
  Reline::HISTORY.push(answer) unless answer.nil? || Reline::HISTORY.to_a.include?(answer)
61
66
  answer
@@ -109,6 +114,12 @@ class AIA::Main
109
114
 
110
115
  result = backend.run
111
116
 
117
+ if STDOUT == AIA.config.out_file
118
+ result = result.wrap(indent: 2)
119
+ end
120
+
121
+ # TODO: consider using glow to render markdown to
122
+ # terminal `brew install glow`
112
123
  AIA.config.out_file.write result
113
124
 
114
125
  logger.prompt_result(@prompt, result)
@@ -139,7 +150,7 @@ class AIA::Main
139
150
 
140
151
  speak response
141
152
 
142
- puts "\nResponse: #{response}"
153
+ puts "\nResponse:\n#{response.wrap(indent: 2)}"
143
154
  logger.info "Response: #{backend.run}"
144
155
 
145
156
  # TODO: Allow user to enter a directive; loop
data/lib/aia/prompt.rb CHANGED
@@ -150,6 +150,11 @@ class AIA::Prompt
150
150
 
151
151
  # Function to prompt the user with a question using reline
152
152
  def ask_question_with_reline(prompt)
153
+ if prompt.start_with?("\n")
154
+ puts
155
+ prompt = prompt[1..]
156
+ end
157
+
153
158
  answer = Reline.readline(prompt)
154
159
  Reline::HISTORY.push(answer) unless answer.nil? || Reline::HISTORY.to_a.include?(answer)
155
160
  answer
@@ -178,7 +183,7 @@ class AIA::Prompt
178
183
  if default&.empty?
179
184
  user_prompt = "\n-=> "
180
185
  else
181
- user_prompt = "\n(#{default}) -=>"
186
+ user_prompt = "\n(#{default}) -=> "
182
187
  end
183
188
 
184
189
  a_string = ask_question_with_reline(user_prompt)
data/main.just CHANGED
@@ -14,6 +14,7 @@ with ~/.justfile
14
14
  module repo /Users/dewayne/sandbox/git_repos/repo.just
15
15
  module gem /Users/dewayne/sandbox/git_repos/gem.just
16
16
  module version /Users/dewayne/just_modules/version.just
17
+ module git /Users/dewayne/just_modules/git.just
17
18
 
18
19
 
19
20
  # Install Locally
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dewayne VanHoozer