myask 1.0.0 → 1.1.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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/myask/prompt_helper.rb +3 -0
- data/lib/myask/version.rb +1 -1
- data/pkg/myask-0.0.1/Gemfile.lock +1 -1
- data/pkg/myask-0.0.1/lib/myask/prompt_helper.rb +3 -0
- data/pkg/myask-0.0.1/lib/myask/version.rb +1 -1
- data/pkg/myask-1.0.0/Gemfile +10 -0
- data/pkg/myask-1.0.0/Gemfile.lock +70 -0
- data/pkg/myask-1.0.0/README.rdoc +6 -0
- data/pkg/myask-1.0.0/Rakefile +21 -0
- data/pkg/myask-1.0.0/bin/myask +101 -0
- data/pkg/myask-1.0.0/html/App.html +116 -0
- data/pkg/myask-1.0.0/html/MyAsk/Api/Helper.html +207 -0
- data/pkg/myask-1.0.0/html/MyAsk/Api/Invitation.html +212 -0
- data/pkg/myask-1.0.0/html/MyAsk/Api/Project.html +355 -0
- data/pkg/myask-1.0.0/html/MyAsk/Api/ProjectHelper.html +299 -0
- data/pkg/myask-1.0.0/html/MyAsk/Api/Question.html +261 -0
- data/pkg/myask-1.0.0/html/MyAsk/Api.html +120 -0
- data/pkg/myask-1.0.0/html/MyAsk/Config.html +195 -0
- data/pkg/myask-1.0.0/html/MyAsk/ConfigHelper.html +251 -0
- data/pkg/myask-1.0.0/html/MyAsk/Prompt.html +221 -0
- data/pkg/myask-1.0.0/html/MyAsk/PromptHelper.html +330 -0
- data/pkg/myask-1.0.0/html/MyAsk.html +114 -0
- data/pkg/myask-1.0.0/html/README_rdoc.html +394 -0
- data/pkg/myask-1.0.0/html/created.rid +14 -0
- data/pkg/myask-1.0.0/html/css/fonts.css +167 -0
- data/pkg/myask-1.0.0/html/css/rdoc.css +681 -0
- data/pkg/myask-1.0.0/html/fonts/Lato-Light.ttf +0 -0
- data/pkg/myask-1.0.0/html/fonts/Lato-LightItalic.ttf +0 -0
- data/pkg/myask-1.0.0/html/fonts/Lato-Regular.ttf +0 -0
- data/pkg/myask-1.0.0/html/fonts/Lato-RegularItalic.ttf +0 -0
- data/pkg/myask-1.0.0/html/fonts/SourceCodePro-Bold.ttf +0 -0
- data/pkg/myask-1.0.0/html/fonts/SourceCodePro-Regular.ttf +0 -0
- data/pkg/myask-1.0.0/html/images/add.png +0 -0
- data/pkg/myask-1.0.0/html/images/arrow_up.png +0 -0
- data/pkg/myask-1.0.0/html/images/brick.png +0 -0
- data/pkg/myask-1.0.0/html/images/brick_link.png +0 -0
- data/pkg/myask-1.0.0/html/images/bug.png +0 -0
- data/pkg/myask-1.0.0/html/images/bullet_black.png +0 -0
- data/pkg/myask-1.0.0/html/images/bullet_toggle_minus.png +0 -0
- data/pkg/myask-1.0.0/html/images/bullet_toggle_plus.png +0 -0
- data/pkg/myask-1.0.0/html/images/date.png +0 -0
- data/pkg/myask-1.0.0/html/images/delete.png +0 -0
- data/pkg/myask-1.0.0/html/images/find.png +0 -0
- data/pkg/myask-1.0.0/html/images/loadingAnimation.gif +0 -0
- data/pkg/myask-1.0.0/html/images/macFFBgHack.png +0 -0
- data/pkg/myask-1.0.0/html/images/package.png +0 -0
- data/pkg/myask-1.0.0/html/images/page_green.png +0 -0
- data/pkg/myask-1.0.0/html/images/page_white_text.png +0 -0
- data/pkg/myask-1.0.0/html/images/page_white_width.png +0 -0
- data/pkg/myask-1.0.0/html/images/plugin.png +0 -0
- data/pkg/myask-1.0.0/html/images/ruby.png +0 -0
- data/pkg/myask-1.0.0/html/images/tag_blue.png +0 -0
- data/pkg/myask-1.0.0/html/images/tag_green.png +0 -0
- data/pkg/myask-1.0.0/html/images/transparent.png +0 -0
- data/pkg/myask-1.0.0/html/images/wrench.png +0 -0
- data/pkg/myask-1.0.0/html/images/wrench_orange.png +0 -0
- data/pkg/myask-1.0.0/html/images/zoom.png +0 -0
- data/pkg/myask-1.0.0/html/index.html +403 -0
- data/pkg/myask-1.0.0/html/js/darkfish.js +120 -0
- data/pkg/myask-1.0.0/html/js/navigation.js +105 -0
- data/pkg/myask-1.0.0/html/js/navigation.js.gz +0 -0
- data/pkg/myask-1.0.0/html/js/search.js +110 -0
- data/pkg/myask-1.0.0/html/js/search_index.js +1 -0
- data/pkg/myask-1.0.0/html/js/search_index.js.gz +0 -0
- data/pkg/myask-1.0.0/html/js/searcher.js +229 -0
- data/pkg/myask-1.0.0/html/js/searcher.js.gz +0 -0
- data/pkg/myask-1.0.0/html/table_of_contents.html +257 -0
- data/pkg/myask-1.0.0/lib/myask/api/api_helper.rb +45 -0
- data/pkg/myask-1.0.0/lib/myask/api/invitation.rb +49 -0
- data/pkg/myask-1.0.0/lib/myask/api/project.rb +193 -0
- data/pkg/myask-1.0.0/lib/myask/api/project_helper.rb +46 -0
- data/pkg/myask-1.0.0/lib/myask/api/question.rb +99 -0
- data/pkg/myask-1.0.0/lib/myask/config.rb +37 -0
- data/pkg/myask-1.0.0/lib/myask/config_helper.rb +28 -0
- data/pkg/myask-1.0.0/lib/myask/prompt.rb +63 -0
- data/pkg/myask-1.0.0/lib/myask/prompt_helper.rb +83 -0
- data/pkg/myask-1.0.0/lib/myask/version.rb +3 -0
- data/pkg/myask-1.0.0/lib/myask.rb +28 -0
- data/pkg/myask-1.0.0/myask.gemspec +22 -0
- data/pkg/myask-1.0.0/myask.rdoc +138 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/Gemfile +10 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/Gemfile.lock +70 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/README.rdoc +6 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/Rakefile +21 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/bin/myask +101 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/api/api_helper.rb +45 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/api/invitation.rb +49 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/api/project.rb +193 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/api/project_helper.rb +46 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/api/question.rb +99 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/config.rb +37 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/config_helper.rb +28 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/prompt.rb +63 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/prompt_helper.rb +83 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/version.rb +3 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask.rb +28 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/myask.gemspec +22 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/myask.rdoc +138 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/test/default_test.rb +14 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/test/test_helper.rb +4 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1.gem +0 -0
- data/pkg/myask-1.0.0/test/default_test.rb +14 -0
- data/pkg/myask-1.0.0/test/test_helper.rb +4 -0
- data/pkg/myask-1.0.0.gem +0 -0
- metadata +101 -2
@@ -0,0 +1,99 @@
|
|
1
|
+
module MyAsk
|
2
|
+
module Api
|
3
|
+
class Question
|
4
|
+
|
5
|
+
def initialize(c)
|
6
|
+
c.desc "Show details for MyAsk question"
|
7
|
+
c.arg_name "question_id"
|
8
|
+
|
9
|
+
c.command :show do |c|
|
10
|
+
c.desc "List questions and select to view"
|
11
|
+
c.switch [:l, :list]
|
12
|
+
|
13
|
+
c.flag [:q, :question_id], desc: "ID of question to display"
|
14
|
+
c.switch [:skip_response], desc: "Do not include question response in output"
|
15
|
+
|
16
|
+
c.action do |global_options, options, args|
|
17
|
+
api_host = global_options[:api_host]
|
18
|
+
api_key = global_options[:api_key]
|
19
|
+
|
20
|
+
if options[:list]
|
21
|
+
response = MyAsk::Api::Helper.make_request("Get", URI("#{api_host}/api/questions"), api_key)
|
22
|
+
questions = JSON.parse(response.body).reverse
|
23
|
+
|
24
|
+
if questions.empty?
|
25
|
+
puts "No questions found."
|
26
|
+
exit
|
27
|
+
end
|
28
|
+
|
29
|
+
selected_question_id = TTY::Prompt.new.select("Select a question:", per_page: 10) do |menu|
|
30
|
+
questions.each do |q|
|
31
|
+
menu.choice "[#{q["id"]}] #{q["content"][0, 80]}", q["id"]
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
selected_question = selected_question_id
|
36
|
+
end
|
37
|
+
|
38
|
+
response = MyAsk::Api::Helper.make_request("Get", URI("#{api_host}/api/questions/#{selected_question || options[:question_id]}"), api_key)
|
39
|
+
response = JSON.parse(response.body)
|
40
|
+
response = response.except("response") if options[:skip_response]
|
41
|
+
|
42
|
+
puts "\n#{"\\" * 30} BEGIN Question (#{response["question"]["id"]}) #{"/" * 30}\n\n" unless global_options[:json]
|
43
|
+
puts global_options[:json] ? response.to_json : response["question"]["content"]
|
44
|
+
puts "\n#{"\\" * 35} END Question #{"/" * 35}\n" unless global_options[:json]
|
45
|
+
|
46
|
+
unless options[:skip_response] || global_options[:json] || response["response"].nil?
|
47
|
+
puts "\n\n#{"\\" * 30} BEGIN Response (#{response["response"]["id"]}) #{"/" * 30}\n\n" unless global_options[:json]
|
48
|
+
puts response["response"]["content"]
|
49
|
+
puts "\n#{"\\" * 35} END Response #{"/" * 35}\n" unless global_options[:json]
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
c.desc "Delete MyAsk question"
|
55
|
+
c.arg_name "question_id"
|
56
|
+
|
57
|
+
c.command :delete do |c|
|
58
|
+
c.desc "List questions and select to delete"
|
59
|
+
c.switch [:l, :list]
|
60
|
+
|
61
|
+
c.flag [:question_id], desc: "ID of question to delete"
|
62
|
+
|
63
|
+
c.action do |global_options, options, args|
|
64
|
+
api_host = global_options[:api_host]
|
65
|
+
api_key = global_options[:api_key]
|
66
|
+
|
67
|
+
if options[:list]
|
68
|
+
response = MyAsk::Api::Helper.make_request("Get", URI("#{api_host}/api/questions"), api_key)
|
69
|
+
questions = JSON.parse(response.body).reverse
|
70
|
+
|
71
|
+
if questions.empty?
|
72
|
+
puts "No questions found."
|
73
|
+
exit
|
74
|
+
end
|
75
|
+
|
76
|
+
selected_question_id = TTY::Prompt.new.select("Select a question:", per_page: 10) do |menu|
|
77
|
+
questions.each do |q|
|
78
|
+
menu.choice "[#{q["id"]}] #{q["content"][0, 80]}", q["id"]
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
selected_question = selected_question_id
|
83
|
+
end
|
84
|
+
|
85
|
+
response = MyAsk::Api::Helper.make_request("Delete", URI("#{api_host}/api/questions/#{selected_question || options[:question_id]}"), api_key)
|
86
|
+
response = JSON.parse(response.body)
|
87
|
+
|
88
|
+
puts JSON.pretty_generate(response["question"])
|
89
|
+
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
c.default_command :show
|
94
|
+
c
|
95
|
+
end
|
96
|
+
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module MyAsk
|
2
|
+
class Config
|
3
|
+
|
4
|
+
def initialize(c)
|
5
|
+
c.command :save do |c|
|
6
|
+
c.desc "Set MyAsk API URL"
|
7
|
+
c.flag [:api_host], type: String
|
8
|
+
|
9
|
+
c.desc "Set MyAsk API Key"
|
10
|
+
c.flag [:api_key], type: String
|
11
|
+
|
12
|
+
c.desc "Set MyAsk Project"
|
13
|
+
c.flag [:project], type: String
|
14
|
+
|
15
|
+
c.action do |global_options, options, args|
|
16
|
+
helper = MyAsk::ConfigHelper.new(global_options, options, args)
|
17
|
+
response = helper.save_config
|
18
|
+
puts response
|
19
|
+
response
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
c.command :show do |c|
|
24
|
+
c.action do |global_options, options, args|
|
25
|
+
helper = MyAsk::ConfigHelper.new(global_options, options, args)
|
26
|
+
response = helper.get_config
|
27
|
+
puts response
|
28
|
+
response
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
c.default_command :show
|
33
|
+
c
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module MyAsk
|
2
|
+
class ConfigHelper
|
3
|
+
|
4
|
+
def initialize(global_options, options, args)
|
5
|
+
@global_options = global_options
|
6
|
+
@options = options
|
7
|
+
@args = args
|
8
|
+
@rc_file_path = File.expand_path("~/.myask.rc")
|
9
|
+
@config_data = YAML.load_file(@rc_file_path)
|
10
|
+
end
|
11
|
+
|
12
|
+
def get_config
|
13
|
+
@config_data.reject { |key, _| ["commands", "version", "s", "help"].include?(key.to_s) }.to_json
|
14
|
+
end
|
15
|
+
|
16
|
+
def save_config
|
17
|
+
@config_data[:api_key] = @options[:api_key] if @options[:api_key]
|
18
|
+
@config_data[:api_host] = @options[:api_host] if @options[:api_host]
|
19
|
+
@config_data[:project] = @options[:project] if @options[:project]
|
20
|
+
|
21
|
+
File.open(@rc_file_path, "w") do |file|
|
22
|
+
file.write(@config_data.to_yaml)
|
23
|
+
end
|
24
|
+
@config_data.reject { |key, _| ["commands", "version", "s", "help"].include?(key.to_s) }.to_json
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
module MyAsk
|
2
|
+
class Prompt
|
3
|
+
|
4
|
+
def initialize(c)
|
5
|
+
c.desc "Skip Follow-Up Question"
|
6
|
+
c.switch [:no_followup]
|
7
|
+
|
8
|
+
c.desc "Project ID"
|
9
|
+
c.flag [:project]
|
10
|
+
|
11
|
+
c.desc "Prompt to send"
|
12
|
+
c.flag [:p, :prompt]
|
13
|
+
|
14
|
+
c.desc "Question IDs to include in prompt context"
|
15
|
+
c.flag [:c, :context_ids], multiple: true
|
16
|
+
|
17
|
+
c.desc "Path to source file(s)"
|
18
|
+
c.flag [:F, :input_file], multiple: true
|
19
|
+
|
20
|
+
c.action do |global_options, options, args|
|
21
|
+
helper = MyAsk::PromptHelper.new(global_options, options, args)
|
22
|
+
|
23
|
+
config = global_options
|
24
|
+
auth_token = config[:api_key]
|
25
|
+
project = options[:project] || config[:project]
|
26
|
+
|
27
|
+
content = helper.get_initial_question
|
28
|
+
context_ids = options[:"context_ids"]
|
29
|
+
|
30
|
+
loop do
|
31
|
+
begin
|
32
|
+
question_id = helper.submit_question(config[:api_host], auth_token, project, content, context_ids)
|
33
|
+
abort if question_id.nil?
|
34
|
+
|
35
|
+
context_ids << question_id
|
36
|
+
|
37
|
+
response = helper.poll_for_response(config[:api_host], auth_token, question_id)
|
38
|
+
|
39
|
+
if global_options[:json]
|
40
|
+
puts "\n\n#{JSON.dump({response: response})}\n\n"
|
41
|
+
else
|
42
|
+
puts "\n\n#{response}\n\n"
|
43
|
+
end
|
44
|
+
|
45
|
+
break if options[:no_followup]
|
46
|
+
|
47
|
+
prompt = TTY::Prompt.new
|
48
|
+
is_follow_up = prompt.yes?("Would you like to ask a follow-up question?", default: false)
|
49
|
+
|
50
|
+
break unless is_follow_up
|
51
|
+
|
52
|
+
follow_up_question = prompt.ask("Enter your follow-up question:").strip
|
53
|
+
content = follow_up_question
|
54
|
+
rescue => e
|
55
|
+
abort "Error: #{e}"
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
c
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
module MyAsk
|
2
|
+
class PromptHelper
|
3
|
+
def initialize(global_options, options, args)
|
4
|
+
@global_options = global_options
|
5
|
+
@options = options
|
6
|
+
@args = args
|
7
|
+
end
|
8
|
+
|
9
|
+
def submit_question(api_host, auth_token, project_id, content, context_ids)
|
10
|
+
uri = URI("#{api_host}/api/questions")
|
11
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
12
|
+
http.use_ssl = (uri.scheme == "https")
|
13
|
+
|
14
|
+
request = Net::HTTP::Post.new(uri.path)
|
15
|
+
request["Authorization"] = "Bearer #{auth_token}"
|
16
|
+
request["Content-Type"] = "application/json"
|
17
|
+
|
18
|
+
request.body = {
|
19
|
+
question: {
|
20
|
+
project_id: project_id,
|
21
|
+
content: content,
|
22
|
+
context_ids: context_ids
|
23
|
+
}
|
24
|
+
}.to_json
|
25
|
+
|
26
|
+
response = http.request(request)
|
27
|
+
parsed_response = JSON.parse(response.body)
|
28
|
+
|
29
|
+
parsed_response['id'] || nil
|
30
|
+
end
|
31
|
+
|
32
|
+
def poll_for_response(api_host, auth_token, question_id)
|
33
|
+
unless @global_options[:silent]
|
34
|
+
spinner = TTY::Spinner.new('🔄 Waiting for response from MyAsk API... [:spinner]', format: :dots)
|
35
|
+
spinner.auto_spin
|
36
|
+
end
|
37
|
+
|
38
|
+
max_retries = 50
|
39
|
+
attempt = 0
|
40
|
+
|
41
|
+
while attempt < max_retries
|
42
|
+
sleep 3
|
43
|
+
uri = URI("#{api_host}/api/responses/#{question_id}")
|
44
|
+
response = Net::HTTP.get(uri, { 'Authorization' => "Bearer #{auth_token}" })
|
45
|
+
parsed_response = JSON.parse(response)
|
46
|
+
|
47
|
+
if parsed_response.key?('content')
|
48
|
+
spinner.success('✅ Response received!') unless @global_options[:silent]
|
49
|
+
return parsed_response['content']
|
50
|
+
end
|
51
|
+
|
52
|
+
attempt += 1
|
53
|
+
end
|
54
|
+
|
55
|
+
spinner.error('❌ Timed out waiting for MyAsk API response.') unless @global_options[:silent]
|
56
|
+
raise 'No response received from MyAsk API after multiple attempts.'
|
57
|
+
end
|
58
|
+
|
59
|
+
def get_initial_question
|
60
|
+
file_contents = []
|
61
|
+
|
62
|
+
current_directory = Dir.pwd
|
63
|
+
|
64
|
+
if @options[:input_file]&.any?
|
65
|
+
@options[:input_file].each do |file_path|
|
66
|
+
begin
|
67
|
+
file_path = file_path[0] == "/" ? file_path : "#{current_directory}/#{file_path}"
|
68
|
+
content = File.read(file_path).strip
|
69
|
+
file_contents << "**File**: #{file_path}**\n#{content}"
|
70
|
+
rescue => e
|
71
|
+
raise "❌ Failed to read input file: #{file_path}"
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
combined_question = "#{@options[:prompt]}\n\n---\n#{file_contents.join("\n\n---\n")}" unless file_contents.empty?
|
77
|
+
combined_question ||= @options[:prompt] || TTY::Prompt.new.ask('Please enter a prompt:').strip
|
78
|
+
|
79
|
+
combined_question.empty? ? nil : combined_question
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'myask/version.rb'
|
2
|
+
|
3
|
+
require 'myask/config.rb'
|
4
|
+
require 'myask/config_helper.rb'
|
5
|
+
|
6
|
+
require 'myask/api/api_helper.rb'
|
7
|
+
|
8
|
+
require 'myask/api/question.rb'
|
9
|
+
require 'myask/api/invitation.rb'
|
10
|
+
|
11
|
+
require 'myask/api/project.rb'
|
12
|
+
require 'myask/api/project_helper.rb'
|
13
|
+
|
14
|
+
require 'myask/prompt.rb'
|
15
|
+
require 'myask/prompt_helper.rb'
|
16
|
+
|
17
|
+
# Add requires for other files you add to your project here, so
|
18
|
+
# you just need to require this one file in your bin file
|
19
|
+
|
20
|
+
require 'net/http'
|
21
|
+
require 'json'
|
22
|
+
|
23
|
+
require 'io/console'
|
24
|
+
require 'tty-spinner'
|
25
|
+
require 'tty-prompt'
|
26
|
+
require 'yaml'
|
27
|
+
|
28
|
+
require 'pry-byebug'
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Ensure we require the local version and not one we might have installed already
|
2
|
+
require File.join([File.dirname(__FILE__),'lib','myask','version.rb'])
|
3
|
+
spec = Gem::Specification.new do |s|
|
4
|
+
s.name = 'myask'
|
5
|
+
s.version = Myask::VERSION
|
6
|
+
s.author = 'Andrew Chaney (netuoso)'
|
7
|
+
s.email = 'netuoso@myask.io'
|
8
|
+
s.homepage = 'https://myask.io'
|
9
|
+
s.platform = Gem::Platform::RUBY
|
10
|
+
s.summary = 'MyAsk Command Line Tool Integrates with MyAsk AI API (https://myask.io).'
|
11
|
+
s.files = `git ls-files`.split("
|
12
|
+
")
|
13
|
+
s.require_paths << 'lib'
|
14
|
+
s.extra_rdoc_files = ['README.rdoc','myask.rdoc']
|
15
|
+
s.rdoc_options << '--title' << 'myask' << '--main' << 'README.rdoc' << '-ri'
|
16
|
+
s.bindir = 'bin'
|
17
|
+
s.executables << 'myask'
|
18
|
+
s.add_development_dependency('rake')
|
19
|
+
s.add_development_dependency('rdoc')
|
20
|
+
s.add_development_dependency('minitest')
|
21
|
+
s.add_runtime_dependency('gli','~> 2.22.2')
|
22
|
+
end
|
@@ -0,0 +1,138 @@
|
|
1
|
+
== myask - Describe your application here
|
2
|
+
|
3
|
+
v0.0.1
|
4
|
+
|
5
|
+
=== Global Options
|
6
|
+
=== --api_host arg
|
7
|
+
|
8
|
+
Host for MyAsk API
|
9
|
+
|
10
|
+
[Default Value] http://localhost:3000
|
11
|
+
|
12
|
+
|
13
|
+
=== --api_key arg
|
14
|
+
|
15
|
+
API Key for MyAsk API
|
16
|
+
|
17
|
+
[Default Value] A9qVFSgXFH8Ubclq4jVYn0PBsEGMSfQf
|
18
|
+
|
19
|
+
|
20
|
+
=== --project arg
|
21
|
+
|
22
|
+
Current MyAsk Project
|
23
|
+
|
24
|
+
[Default Value] 156891416
|
25
|
+
|
26
|
+
|
27
|
+
=== --help
|
28
|
+
Show this message
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
=== --[no-]json
|
33
|
+
Format Output as JSON
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
=== --[no-]silent
|
38
|
+
Silent Progress Spinner
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
=== --version
|
43
|
+
Display the program version
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
=== Commands
|
48
|
+
==== Command: <tt>config </tt>
|
49
|
+
View current or set new MyAsk configuration values
|
50
|
+
|
51
|
+
|
52
|
+
===== Commands
|
53
|
+
====== Command: <tt>save </tt>
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
====== Command: <tt>show </tt>
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
[Default Command] show
|
62
|
+
==== Command: <tt>help command</tt>
|
63
|
+
Shows a list of commands or help for one command
|
64
|
+
|
65
|
+
Gets help for the application or its commands. Can also list the commands in a way helpful to creating a bash-style completion function
|
66
|
+
===== Options
|
67
|
+
===== -c
|
68
|
+
List commands one per line, to assist with shell completion
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
==== Command: <tt>initconfig </tt>
|
73
|
+
Initialize the config file using current global options
|
74
|
+
|
75
|
+
Initializes a configuration file where you can set default options for command line flags, both globally and on a per-command basis. These defaults override the built-in defaults and allow you to omit commonly-used command line flags when invoking this program
|
76
|
+
===== Options
|
77
|
+
===== --[no-]force
|
78
|
+
force overwrite of existing config file
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
==== Command: <tt>invitation </tt>
|
83
|
+
Create/list MyAsk Invitations
|
84
|
+
|
85
|
+
|
86
|
+
===== Commands
|
87
|
+
====== Command: <tt>list </tt>
|
88
|
+
List MyAsk invitations.
|
89
|
+
|
90
|
+
|
91
|
+
====== Command: <tt>send </tt>
|
92
|
+
Send MyAsk invitation to a new user
|
93
|
+
|
94
|
+
|
95
|
+
[Default Command] list
|
96
|
+
==== Command: <tt>project </tt>
|
97
|
+
Create/show/list/delete MyAsk Project
|
98
|
+
|
99
|
+
|
100
|
+
===== Commands
|
101
|
+
====== Command: <tt>create </tt>
|
102
|
+
Create MyAsk Project
|
103
|
+
|
104
|
+
|
105
|
+
====== Command: <tt>delete </tt>
|
106
|
+
Delete MyAsk Project
|
107
|
+
|
108
|
+
|
109
|
+
====== Command: <tt>edit project</tt>
|
110
|
+
Edit MyAsk Project
|
111
|
+
|
112
|
+
|
113
|
+
====== Command: <tt>set project</tt>
|
114
|
+
Set MyAsk Project
|
115
|
+
|
116
|
+
|
117
|
+
====== Command: <tt>show project</tt>
|
118
|
+
Show MyAsk Project Details
|
119
|
+
|
120
|
+
|
121
|
+
==== Command: <tt>prompt </tt>
|
122
|
+
Send a prompt to MyAsk API
|
123
|
+
|
124
|
+
|
125
|
+
==== Command: <tt>question </tt>
|
126
|
+
Show/delete MyAsk Question
|
127
|
+
|
128
|
+
|
129
|
+
===== Commands
|
130
|
+
====== Command: <tt>delete question_id</tt>
|
131
|
+
Delete MyAsk question
|
132
|
+
|
133
|
+
|
134
|
+
====== Command: <tt>show question_id</tt>
|
135
|
+
Show details for MyAsk question
|
136
|
+
|
137
|
+
|
138
|
+
[Default Command] show
|
Binary file
|
data/pkg/myask-1.0.0.gem
ADDED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: myask
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Chaney (netuoso)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-03-
|
11
|
+
date: 2025-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -171,6 +171,105 @@ files:
|
|
171
171
|
- pkg/myask-0.0.1/myask.rdoc
|
172
172
|
- pkg/myask-0.0.1/test/default_test.rb
|
173
173
|
- pkg/myask-0.0.1/test/test_helper.rb
|
174
|
+
- pkg/myask-1.0.0.gem
|
175
|
+
- pkg/myask-1.0.0/Gemfile
|
176
|
+
- pkg/myask-1.0.0/Gemfile.lock
|
177
|
+
- pkg/myask-1.0.0/README.rdoc
|
178
|
+
- pkg/myask-1.0.0/Rakefile
|
179
|
+
- pkg/myask-1.0.0/bin/myask
|
180
|
+
- pkg/myask-1.0.0/html/App.html
|
181
|
+
- pkg/myask-1.0.0/html/MyAsk.html
|
182
|
+
- pkg/myask-1.0.0/html/MyAsk/Api.html
|
183
|
+
- pkg/myask-1.0.0/html/MyAsk/Api/Helper.html
|
184
|
+
- pkg/myask-1.0.0/html/MyAsk/Api/Invitation.html
|
185
|
+
- pkg/myask-1.0.0/html/MyAsk/Api/Project.html
|
186
|
+
- pkg/myask-1.0.0/html/MyAsk/Api/ProjectHelper.html
|
187
|
+
- pkg/myask-1.0.0/html/MyAsk/Api/Question.html
|
188
|
+
- pkg/myask-1.0.0/html/MyAsk/Config.html
|
189
|
+
- pkg/myask-1.0.0/html/MyAsk/ConfigHelper.html
|
190
|
+
- pkg/myask-1.0.0/html/MyAsk/Prompt.html
|
191
|
+
- pkg/myask-1.0.0/html/MyAsk/PromptHelper.html
|
192
|
+
- pkg/myask-1.0.0/html/README_rdoc.html
|
193
|
+
- pkg/myask-1.0.0/html/created.rid
|
194
|
+
- pkg/myask-1.0.0/html/css/fonts.css
|
195
|
+
- pkg/myask-1.0.0/html/css/rdoc.css
|
196
|
+
- pkg/myask-1.0.0/html/fonts/Lato-Light.ttf
|
197
|
+
- pkg/myask-1.0.0/html/fonts/Lato-LightItalic.ttf
|
198
|
+
- pkg/myask-1.0.0/html/fonts/Lato-Regular.ttf
|
199
|
+
- pkg/myask-1.0.0/html/fonts/Lato-RegularItalic.ttf
|
200
|
+
- pkg/myask-1.0.0/html/fonts/SourceCodePro-Bold.ttf
|
201
|
+
- pkg/myask-1.0.0/html/fonts/SourceCodePro-Regular.ttf
|
202
|
+
- pkg/myask-1.0.0/html/images/add.png
|
203
|
+
- pkg/myask-1.0.0/html/images/arrow_up.png
|
204
|
+
- pkg/myask-1.0.0/html/images/brick.png
|
205
|
+
- pkg/myask-1.0.0/html/images/brick_link.png
|
206
|
+
- pkg/myask-1.0.0/html/images/bug.png
|
207
|
+
- pkg/myask-1.0.0/html/images/bullet_black.png
|
208
|
+
- pkg/myask-1.0.0/html/images/bullet_toggle_minus.png
|
209
|
+
- pkg/myask-1.0.0/html/images/bullet_toggle_plus.png
|
210
|
+
- pkg/myask-1.0.0/html/images/date.png
|
211
|
+
- pkg/myask-1.0.0/html/images/delete.png
|
212
|
+
- pkg/myask-1.0.0/html/images/find.png
|
213
|
+
- pkg/myask-1.0.0/html/images/loadingAnimation.gif
|
214
|
+
- pkg/myask-1.0.0/html/images/macFFBgHack.png
|
215
|
+
- pkg/myask-1.0.0/html/images/package.png
|
216
|
+
- pkg/myask-1.0.0/html/images/page_green.png
|
217
|
+
- pkg/myask-1.0.0/html/images/page_white_text.png
|
218
|
+
- pkg/myask-1.0.0/html/images/page_white_width.png
|
219
|
+
- pkg/myask-1.0.0/html/images/plugin.png
|
220
|
+
- pkg/myask-1.0.0/html/images/ruby.png
|
221
|
+
- pkg/myask-1.0.0/html/images/tag_blue.png
|
222
|
+
- pkg/myask-1.0.0/html/images/tag_green.png
|
223
|
+
- pkg/myask-1.0.0/html/images/transparent.png
|
224
|
+
- pkg/myask-1.0.0/html/images/wrench.png
|
225
|
+
- pkg/myask-1.0.0/html/images/wrench_orange.png
|
226
|
+
- pkg/myask-1.0.0/html/images/zoom.png
|
227
|
+
- pkg/myask-1.0.0/html/index.html
|
228
|
+
- pkg/myask-1.0.0/html/js/darkfish.js
|
229
|
+
- pkg/myask-1.0.0/html/js/navigation.js
|
230
|
+
- pkg/myask-1.0.0/html/js/navigation.js.gz
|
231
|
+
- pkg/myask-1.0.0/html/js/search.js
|
232
|
+
- pkg/myask-1.0.0/html/js/search_index.js
|
233
|
+
- pkg/myask-1.0.0/html/js/search_index.js.gz
|
234
|
+
- pkg/myask-1.0.0/html/js/searcher.js
|
235
|
+
- pkg/myask-1.0.0/html/js/searcher.js.gz
|
236
|
+
- pkg/myask-1.0.0/html/table_of_contents.html
|
237
|
+
- pkg/myask-1.0.0/lib/myask.rb
|
238
|
+
- pkg/myask-1.0.0/lib/myask/api/api_helper.rb
|
239
|
+
- pkg/myask-1.0.0/lib/myask/api/invitation.rb
|
240
|
+
- pkg/myask-1.0.0/lib/myask/api/project.rb
|
241
|
+
- pkg/myask-1.0.0/lib/myask/api/project_helper.rb
|
242
|
+
- pkg/myask-1.0.0/lib/myask/api/question.rb
|
243
|
+
- pkg/myask-1.0.0/lib/myask/config.rb
|
244
|
+
- pkg/myask-1.0.0/lib/myask/config_helper.rb
|
245
|
+
- pkg/myask-1.0.0/lib/myask/prompt.rb
|
246
|
+
- pkg/myask-1.0.0/lib/myask/prompt_helper.rb
|
247
|
+
- pkg/myask-1.0.0/lib/myask/version.rb
|
248
|
+
- pkg/myask-1.0.0/myask.gemspec
|
249
|
+
- pkg/myask-1.0.0/myask.rdoc
|
250
|
+
- pkg/myask-1.0.0/pkg/myask-0.0.1.gem
|
251
|
+
- pkg/myask-1.0.0/pkg/myask-0.0.1/Gemfile
|
252
|
+
- pkg/myask-1.0.0/pkg/myask-0.0.1/Gemfile.lock
|
253
|
+
- pkg/myask-1.0.0/pkg/myask-0.0.1/README.rdoc
|
254
|
+
- pkg/myask-1.0.0/pkg/myask-0.0.1/Rakefile
|
255
|
+
- pkg/myask-1.0.0/pkg/myask-0.0.1/bin/myask
|
256
|
+
- pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask.rb
|
257
|
+
- pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/api/api_helper.rb
|
258
|
+
- pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/api/invitation.rb
|
259
|
+
- pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/api/project.rb
|
260
|
+
- pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/api/project_helper.rb
|
261
|
+
- pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/api/question.rb
|
262
|
+
- pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/config.rb
|
263
|
+
- pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/config_helper.rb
|
264
|
+
- pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/prompt.rb
|
265
|
+
- pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/prompt_helper.rb
|
266
|
+
- pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/version.rb
|
267
|
+
- pkg/myask-1.0.0/pkg/myask-0.0.1/myask.gemspec
|
268
|
+
- pkg/myask-1.0.0/pkg/myask-0.0.1/myask.rdoc
|
269
|
+
- pkg/myask-1.0.0/pkg/myask-0.0.1/test/default_test.rb
|
270
|
+
- pkg/myask-1.0.0/pkg/myask-0.0.1/test/test_helper.rb
|
271
|
+
- pkg/myask-1.0.0/test/default_test.rb
|
272
|
+
- pkg/myask-1.0.0/test/test_helper.rb
|
174
273
|
- test/default_test.rb
|
175
274
|
- test/test_helper.rb
|
176
275
|
homepage: https://myask.io
|