Class: Legion::CLI::CodegenCommand
- Inherits:
-
Thor
- Object
- Thor
- Legion::CLI::CodegenCommand
- Defined in:
- lib/legion/cli/codegen_command.rb
Instance Method Summary collapse
- #approve(id) ⇒ Object
- #cycle ⇒ Object
- #gaps ⇒ Object
- #list ⇒ Object
- #reject(id) ⇒ Object
- #retry_generation(id) ⇒ Object
- #show(id) ⇒ Object
- #status ⇒ Object
Instance Method Details
#approve(id) ⇒ Object
35 36 37 38 |
# File 'lib/legion/cli/codegen_command.rb', line 35 def approve(id) data = api_post("/api/codegen/generated/#{id}/approve") formatter.json(data) end |
#cycle ⇒ Object
60 61 62 63 |
# File 'lib/legion/cli/codegen_command.rb', line 60 def cycle data = api_post('/api/codegen/cycle') formatter.json(data) end |
#gaps ⇒ Object
54 55 56 57 |
# File 'lib/legion/cli/codegen_command.rb', line 54 def gaps data = api_get('/api/codegen/gaps') formatter.json(data) end |
#list ⇒ Object
21 22 23 24 25 26 |
# File 'lib/legion/cli/codegen_command.rb', line 21 def list path = '/api/codegen/generated' path += "?status=#{[:status]}" if [:status] data = api_get(path) formatter.json(data) end |
#reject(id) ⇒ Object
41 42 43 44 |
# File 'lib/legion/cli/codegen_command.rb', line 41 def reject(id) data = api_post("/api/codegen/generated/#{id}/reject") formatter.json(data) end |
#retry_generation(id) ⇒ Object
47 48 49 50 |
# File 'lib/legion/cli/codegen_command.rb', line 47 def retry_generation(id) data = api_post("/api/codegen/generated/#{id}/retry") formatter.json(data) end |
#show(id) ⇒ Object
29 30 31 32 |
# File 'lib/legion/cli/codegen_command.rb', line 29 def show(id) data = api_get("/api/codegen/generated/#{id}") formatter.json(data) end |
#status ⇒ Object
14 15 16 17 |
# File 'lib/legion/cli/codegen_command.rb', line 14 def status data = api_get('/api/codegen/status') formatter.json(data) end |