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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41bbb0a6dd818d03cc48a2d3c6af65505b3f03c390cd652a1bb20c13204d0816
4
- data.tar.gz: d3de4fcd63755c9e7f1090f8b3a50e4649ed88b83e7714286724c05f3207adbd
3
+ metadata.gz: e509f77877fe3a2461fb05cd829b4f9c55cdd5bee8ce543b20b0613990c18a1a
4
+ data.tar.gz: a8bf41e65df0f5d400badc71a529374cf320a537f594d0bc02825f8e3e04e138
5
5
  SHA512:
6
- metadata.gz: 7b4e76138f86463abf1e70ecfc75da7848a1af62232cd732a4559befdf8b5fee1fb272cdcb491c833df9c0d0a4d8ce4aa84c1b7ec19eee9bbe36ef4f6a0b37c0
7
- data.tar.gz: 4a38b125981dd747fff0061393f3224a44a15f7c56783569393a21b0315034743ace8e36b6cd378dd958a0d0af3a037fdc65ce9809c044f76beea908639afc39
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("Done")
90
- Cli::Display.info_message("You can now run pear-on coding start")
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 = !!options[:auto]
112
+ auto = true #!!options[:auto]
96
113
 
97
114
  if options[:id]
98
115
  id = options[:id]
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.12"
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.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-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