pear-programmer 0.1.12 → 0.1.13

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: e509f77877fe3a2461fb05cd829b4f9c55cdd5bee8ce543b20b0613990c18a1a
4
- data.tar.gz: a8bf41e65df0f5d400badc71a529374cf320a537f594d0bc02825f8e3e04e138
3
+ metadata.gz: e339ae38461231bf1b36cd196b7f7415e6b393d82693161fb6b9b5b4ba299b44
4
+ data.tar.gz: d222b8aca774ecf7a3b06a4d63948470dc3c10d2dde055c8098b1cf954d848f1
5
5
  SHA512:
6
- metadata.gz: 13becc873e41a17ef891cb0db33b81de91f64b0aef2e511272f26fcc5c7f864d485f49652173ad0b21e2651c8cd9a100560b96d3f91b4c56d04fdbd08fb9c919
7
- data.tar.gz: b143980cbd00e85937873a5a0a9339fabbf4c20af797d7af45bf7bb4ddab4f6436cc105d5ac5641203ef4c38ba53079128d93eddaab8417e0c193cd44acb410e
6
+ metadata.gz: a86e54057967fb9a9cc9f25767482cd0798043cce2bc98d82ac810945010ef116d119282e85549f924b50fd5fc2a3bd1f8d24eb5a64758a33fb8d4adc509d907
7
+ data.tar.gz: adee8460185f9fb154deec49668e0f72a7f4bd9d239be0a5eeabb1f511091776cb64f993e7295feef71266c783377c5d385b50edf8416d1bb2f0c30343ece01b
data/lib/cli/actions.rb CHANGED
@@ -70,6 +70,7 @@ module Cli
70
70
  config = Cli::Configuration.new
71
71
  context = config.default_context
72
72
  id = PairProgrammer::Api::Coder.create([], context, requirements, "remember")
73
+
73
74
  run_coder({ id: id })
74
75
  end
75
76
 
@@ -78,6 +79,19 @@ module Cli
78
79
  config = Cli::Configuration.new
79
80
  context = config.default_context
80
81
  id = PairProgrammer::Api::Coder.create([], context, requirements, "recall")
82
+
83
+ run_coder({ id: id })
84
+ end
85
+
86
+ def self.create_and_run_recipe(options)
87
+ recipe = options[:recipe]
88
+ raise "Recipe cannot be blank" if recipe.nil? || recipe.empty?
89
+
90
+ requirements = Cli::Display.get_input("requirements: ")
91
+ config = Cli::Configuration.new
92
+ context = config.default_context
93
+ id = PairProgrammer::Api::Coder.create([], context, requirements, recipe)
94
+
81
95
  run_coder({ id: id })
82
96
  end
83
97
 
@@ -102,7 +116,7 @@ module Cli
102
116
  end
103
117
 
104
118
  id = PairProgrammer::Api::Coder.create(tasks, context, requirements, nil)
105
- Cli::Display.success_message("created and running")
119
+ Cli::Display.success_message("Created and run starting")
106
120
 
107
121
  run_coder({ id: id })
108
122
  end
data/lib/cli/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Cli
2
2
  module Version
3
- VERSION = "0.1.12"
3
+ VERSION = "0.1.13"
4
4
  end
5
5
  end
data/lib/cli.rb CHANGED
@@ -28,6 +28,9 @@ begin
28
28
 
29
29
  options = {}
30
30
  case command
31
+ when 'recipe'
32
+ options[:recipe] = ARGV[1]
33
+ Cli::Actions.create_and_run_recipe(options)
31
34
  when 'remember'
32
35
  Cli::Actions.create_and_run_remember(options)
33
36
  when 'recall'
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.12
4
+ version: 0.1.13
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-28 00:00:00.000000000 Z
11
+ date: 2023-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: open3