pear-programmer 0.1.10 → 0.1.11

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: 41bbb0a6dd818d03cc48a2d3c6af65505b3f03c390cd652a1bb20c13204d0816
4
- data.tar.gz: d3de4fcd63755c9e7f1090f8b3a50e4649ed88b83e7714286724c05f3207adbd
3
+ metadata.gz: 34ac3b10571708853a88b57e0b2c828e6ae3dcc72d9640003fe6d702a8a766f3
4
+ data.tar.gz: 41a342a7514aa53a43059691a603fb1f9e1b89e8cb6c3e5a8a4dd7544706aa14
5
5
  SHA512:
6
- metadata.gz: 7b4e76138f86463abf1e70ecfc75da7848a1af62232cd732a4559befdf8b5fee1fb272cdcb491c833df9c0d0a4d8ce4aa84c1b7ec19eee9bbe36ef4f6a0b37c0
7
- data.tar.gz: 4a38b125981dd747fff0061393f3224a44a15f7c56783569393a21b0315034743ace8e36b6cd378dd958a0d0af3a037fdc65ce9809c044f76beea908639afc39
6
+ metadata.gz: 89a51c5f77a5292443ad510cda1b3a5ec7676393d95f6c5127aa205e8aa0110b1be106fd92e6aa2a1a704ba22357c1bfd2f3b66608fe0c84fa083cb76acebdf5
7
+ data.tar.gz: 8b318fc5d9c84fd55637a36d3bb6d3e20fa61f666807cfc6d26fc5850c18da4159fde8a6b506a1a52b49c895cae241910c22bdd7d9b118187b26305526a43c41
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,7 +101,7 @@ module Cli
85
101
  end
86
102
  end
87
103
 
88
- id = PairProgrammer::Api::Coder.create(tasks, context, requirements)
104
+ id = PairProgrammer::Api::Coder.create(tasks, context, requirements, nil)
89
105
  Cli::Display.success_message("Done")
90
106
  Cli::Display.info_message("You can now run pear-on coding start")
91
107
  end
data/lib/cli/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Cli
2
2
  module Version
3
- VERSION = "0.1.10"
3
+ VERSION = "0.1.11"
4
4
  end
5
5
  end
data/lib/cli.rb CHANGED
@@ -28,6 +28,10 @@ begin
28
28
 
29
29
  options = {}
30
30
  case command
31
+ when 'remember'
32
+ Cli::Actions.create_and_run_remember(options)
33
+ when 'recall'
34
+ Cli::Actions.create_and_run_recall(options)
31
35
  when 'coding'
32
36
  subcommand = ARGV[1]
33
37
  case subcommand
@@ -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.10
4
+ version: 0.1.11
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-27 00:00:00.000000000 Z
11
+ date: 2023-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: open3