pear-programmer 0.1.10 → 0.1.12
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/lib/cli/actions.rb +21 -4
- data/lib/cli/version.rb +1 -1
- data/lib/cli.rb +4 -0
- data/lib/pairprogrammer/api/coder.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e509f77877fe3a2461fb05cd829b4f9c55cdd5bee8ce543b20b0613990c18a1a
|
4
|
+
data.tar.gz: a8bf41e65df0f5d400badc71a529374cf320a537f594d0bc02825f8e3e04e138
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13becc873e41a17ef891cb0db33b81de91f64b0aef2e511272f26fcc5c7f864d485f49652173ad0b21e2651c8cd9a100560b96d3f91b4c56d04fdbd08fb9c919
|
7
|
+
data.tar.gz: b143980cbd00e85937873a5a0a9339fabbf4c20af797d7af45bf7bb4ddab4f6436cc105d5ac5641203ef4c38ba53079128d93eddaab8417e0c193cd44acb410e
|
data/lib/cli/actions.rb
CHANGED
@@ -65,6 +65,22 @@ module Cli
|
|
65
65
|
Cli::Display.info_message " pear-on coding list (list all requirements)"
|
66
66
|
end
|
67
67
|
|
68
|
+
def self.create_and_run_remember(options)
|
69
|
+
requirements = Cli::Display.get_input("what would you like to remember?: ")
|
70
|
+
config = Cli::Configuration.new
|
71
|
+
context = config.default_context
|
72
|
+
id = PairProgrammer::Api::Coder.create([], context, requirements, "remember")
|
73
|
+
run_coder({ id: id })
|
74
|
+
end
|
75
|
+
|
76
|
+
def self.create_and_run_recall(options)
|
77
|
+
requirements = Cli::Display.get_input("what would you like to recall?: ")
|
78
|
+
config = Cli::Configuration.new
|
79
|
+
context = config.default_context
|
80
|
+
id = PairProgrammer::Api::Coder.create([], context, requirements, "recall")
|
81
|
+
run_coder({ id: id })
|
82
|
+
end
|
83
|
+
|
68
84
|
# CODER
|
69
85
|
def self.create_coder(options)
|
70
86
|
config = Cli::Configuration.new
|
@@ -85,14 +101,15 @@ module Cli
|
|
85
101
|
end
|
86
102
|
end
|
87
103
|
|
88
|
-
id = PairProgrammer::Api::Coder.create(tasks, context, requirements)
|
89
|
-
Cli::Display.success_message("
|
90
|
-
|
104
|
+
id = PairProgrammer::Api::Coder.create(tasks, context, requirements, nil)
|
105
|
+
Cli::Display.success_message("created and running")
|
106
|
+
|
107
|
+
run_coder({ id: id })
|
91
108
|
end
|
92
109
|
|
93
110
|
def self.run_coder(options)
|
94
111
|
config = Cli::Configuration.new
|
95
|
-
auto =
|
112
|
+
auto = true #!!options[:auto]
|
96
113
|
|
97
114
|
if options[:id]
|
98
115
|
id = options[:id]
|
data/lib/cli/version.rb
CHANGED
data/lib/cli.rb
CHANGED
@@ -3,11 +3,12 @@ require_relative 'client'
|
|
3
3
|
module PairProgrammer
|
4
4
|
module Api
|
5
5
|
class Coder
|
6
|
-
def self.create(tasks, context, requirements)
|
6
|
+
def self.create(tasks, context, requirements, recipe=nil)
|
7
7
|
body = {
|
8
8
|
tasks: tasks,
|
9
9
|
context: context,
|
10
10
|
requirements: requirements,
|
11
|
+
recipe: recipe
|
11
12
|
}
|
12
13
|
response = Client.new.post('/api/v1/coder', body)
|
13
14
|
response["id"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pear-programmer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Edelstein
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: open3
|