stoobly-agent 1.6.4__py3-none-any.whl → 1.6.6__py3-none-any.whl

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.
stoobly_agent/__init__.py CHANGED
@@ -1,2 +1,2 @@
1
1
  COMMAND = 'stoobly-agent'
2
- VERSION = '1.6.4'
2
+ VERSION = '1.6.6'
@@ -6,6 +6,12 @@
6
6
  # STOOBLY_CONTEXT_DIR: path to the folder containing the .stoobly folder
7
7
  # STOOBLY_WORKFLOW_SERVICE_OPTIONS: extra --service options to pass 'stoobly-agent scaffold workflow' commands
8
8
 
9
+ # Overridable Options
10
+ #
11
+ # workflow_down_extra_options: e.g. $(eval workflow_down_extra_options=<OPTIONS>)
12
+ # workflow_log_extra_options: e.g. $(eval workflow_log_extra_options=<OPTIONS>)
13
+ # workflow_up_extra_options: e.g. $(eval workflow_up_extra_options=<OPTIONS>)
14
+
9
15
  # Constants
10
16
  DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
11
17
  EXEC_WORKFLOW_NAME := exec
@@ -19,20 +25,26 @@ app_dir=$$(realpath "$${STOOBLY_APP_DIR:-$(CONTEXT_DIR_DEFAULT)}")
19
25
  ca_certs_dir=$$(realpath "$${STOOBLY_CA_CERTS_DIR:-$(app_data_dir)/ca_certs}")
20
26
  certs_dir=$$(realpath "$${STOOBLY_CERTS_DIR:-$(app_data_dir)/certs}")
21
27
  context_dir=$$(realpath "$${STOOBLY_CONTEXT_DIR:-$(CONTEXT_DIR_DEFAULT)}")
28
+ workflow=record
22
29
  workflow_service_options=$(shell echo $$STOOBLY_WORKFLOW_SERVICE_OPTIONS)
23
30
 
24
- exec_namespace=$(shell echo $(context_dir) | (md5 2>/dev/null || md5sum 2>/dev/null || shasum 2>/dev/null) | awk '{print $$1}')
25
- user_id_option=--user-id $(USER_ID)
26
- stoobly_exec_options=--profile $(EXEC_WORKFLOW_NAME) -p $(exec_namespace)
27
- workflow_run_options=--script-path $(workflow_script) $(workflow_service_options)
28
- workflow_up_options=--app-dir-path $(app_dir) --context-dir-path $(context_dir) --ca-certs-dir-path $(ca_certs_dir) --certs-dir-path $(certs_dir) $(user_id_option)
29
-
30
31
  app_data_dir=$(app_dir)/.stoobly
31
32
  app_namespace_dir=$(app_data_dir)/docker
32
33
  app_tmp_dir=$(app_data_dir)/tmp
33
34
  dockerfile_path=$(app_namespace_dir)/.Dockerfile.context
34
35
  exec_docker_compose_file_path=$(app_namespace_dir)/stoobly-ui/exec/.docker-compose.exec.yml
35
- workflow_script=.stoobly/tmp/$(WORKFLOW).sh
36
+ exec_namespace=$(shell echo $(context_dir) | (md5 2>/dev/null || md5sum 2>/dev/null || shasum 2>/dev/null) | awk '{print $$1}')
37
+ workflow_script=.stoobly/tmp/$(workflow).sh
38
+
39
+ # Options
40
+ certs_dir_options=--ca-certs-dir-path $(ca_certs_dir) --certs-dir-path $(certs_dir)
41
+ stoobly_exec_options=--profile $(EXEC_WORKFLOW_NAME) -p $(exec_namespace)
42
+ working_dir_options=--app-dir-path $(app_dir) --context-dir-path $(context_dir)
43
+
44
+ workflow_down_options=--user-id $(USER_ID) $(workflow_down_extra_options)
45
+ workflow_log_options=$(workflow_log_extra_options)
46
+ workflow_run_options=--script-path $(workflow_script) $(workflow_service_options)
47
+ workflow_up_options=$(working_dir_options) $(certs_dir_options) --user-id $(USER_ID) $(workflow_up_extra_options)
36
48
 
37
49
  # Commands
38
50
  docker_command=docker
@@ -51,7 +63,7 @@ stoobly_exec=$(stoobly_exec_build) && $(stoobly_exec_env) $(exec_up)
51
63
  stoobly_exec_env=$(source_env) && $(exec_env) CONTEXT_DIR="$(context_dir)"
52
64
 
53
65
  # Exec workflow run
54
- # Because scaffold is stored in the application source code directory,
66
+ # Scaffold is stored in the application source code directory,
55
67
  # when running a scaffold command from within a container, it needs access to $(app_dir) rather than $(context_dir)
56
68
  stoobly_exec_run=$(stoobly_exec_build) && $(stoobly_exec_run_env) $(exec_up)
57
69
  stoobly_exec_run_env=$(source_env) && $(exec_env) CONTEXT_DIR="$(app_dir)"
@@ -61,7 +73,7 @@ workflow_run=$(source_env) && bash "$(app_dir)/$(workflow_script)"
61
73
 
62
74
  ca-cert/install: stoobly/install
63
75
  @if [ -z "$$(ls $(ca_certs_dir) 2> /dev/null)" ]; then \
64
- read -p "Installing CA certificate is required for $(WORKFLOW)ing requests, continue? (y/N) " confirm && \
76
+ read -p "Installing CA certificate is required for $(workflow)ing requests, continue? (y/N) " confirm && \
65
77
  if [ "$$confirm" = "y" ] || [ "$$confirm" = "Y" ]; then \
66
78
  echo "Running stoobly-agent ca-cert install..."; \
67
79
  stoobly-agent ca-cert install --ca-certs-dir-path $(ca_certs_dir); \
@@ -156,8 +168,8 @@ tmpdir:
156
168
  @mkdir -p $(app_tmp_dir)
157
169
  workflow/down:
158
170
  @export EXEC_COMMAND=.down && \
159
- export EXEC_OPTIONS="$(user_id_option) $(workflow_run_options) $(options)" && \
160
- export EXEC_ARGS="$(WORKFLOW)" && \
171
+ export EXEC_OPTIONS="$(workflow_down_options) $(workflow_run_options) $(options)" && \
172
+ export EXEC_ARGS="$(workflow)" && \
161
173
  $(stoobly_exec_run) && \
162
174
  $(workflow_run)
163
175
  workflow/hostname: stoobly/install
@@ -170,30 +182,30 @@ workflow/hostname: stoobly/install
170
182
  exit 1; \
171
183
  fi; \
172
184
  echo "Running stoobly-agent scaffold hostname $(COMMAND) $(workflow_service_options)"; \
173
- stoobly-agent scaffold hostname $(COMMAND) --app-dir-path $(app_dir) --workflow $(WORKFLOW) $(workflow_service_options); \
185
+ stoobly-agent scaffold hostname $(COMMAND) --app-dir-path $(app_dir) --workflow $(workflow) $(workflow_service_options); \
174
186
  fi
175
187
  workflow/hostname/install: command/install workflow/hostname
176
188
  workflow/hostname/uninstall: command/uninstall workflow/hostname
177
189
  workflow/logs:
178
190
  @export EXEC_COMMAND=.logs && \
179
- export EXEC_OPTIONS="$(workflow_run_options) $(options)" && \
180
- export EXEC_ARGS="$(WORKFLOW)" && \
191
+ export EXEC_OPTIONS="$(workflow_log_options) $(workflow_run_options) $(options)" && \
192
+ export EXEC_ARGS="$(workflow)" && \
181
193
  $(stoobly_exec_run) && \
182
194
  $(workflow_run)
183
195
  workflow/mock:
184
- $(eval WORKFLOW=mock)
196
+ $(eval workflow=mock)
185
197
  workflow/record:
186
- $(eval WORKFLOW=record)
198
+ $(eval workflow=record)
187
199
  workflow/services:
188
200
  @export EXEC_COMMAND=.services && \
189
201
  export EXEC_OPTIONS="$(workflow_service_options) $(options)" && \
190
- export EXEC_ARGS="$(WORKFLOW)" && \
202
+ export EXEC_ARGS="$(workflow)" && \
191
203
  $(stoobly_exec_run)
192
204
  workflow/test:
193
- $(eval WORKFLOW=test) $(eval options=$(options) --no-publish)
205
+ $(eval workflow=test) $(eval workflow_up_extra_options=$(workflow_up_extra_options) --no-publish)
194
206
  workflow/up:
195
207
  @export EXEC_COMMAND=.up && \
196
- export EXEC_OPTIONS="$(user_id_option) $(workflow_up_options) $(workflow_run_options) $(options)" && \
197
- export EXEC_ARGS="$(WORKFLOW)" && \
208
+ export EXEC_OPTIONS="$(workflow_up_options) $(workflow_run_options) $(options)" && \
209
+ export EXEC_ARGS="$(workflow)" && \
198
210
  $(stoobly_exec_run) && \
199
- $(workflow_run)
211
+ $(workflow_run)
@@ -1 +1 @@
1
- 1.6.4
1
+ 1.6.6
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: stoobly-agent
3
- Version: 1.6.4
3
+ Version: 1.6.6
4
4
  Summary: Record, mock, and test HTTP(s) requests. CLI agent for Stoobly
5
5
  License: Apache-2.0
6
6
  Author: Matt Le
@@ -1,4 +1,4 @@
1
- stoobly_agent/__init__.py,sha256=ftbaOUQT2yhRxLPO2HWJBT3dcSrAFLEftXLYmnaHuBg,44
1
+ stoobly_agent/__init__.py,sha256=ryopjMmwo0h1WRzdE5l_rrULPanQfcjHdwKg8dojjdQ,44
2
2
  stoobly_agent/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  stoobly_agent/app/api/__init__.py,sha256=ctkB8KR-eXO0SFhj602huHiyvQ3PslFWd8fkcufgrAI,1000
4
4
  stoobly_agent/app/api/application_http_request_handler.py,sha256=Vvz53yB0bR7J-QqMAkLlhcZrA4P64ZEN7w8cMbgl6o0,5261
@@ -104,7 +104,7 @@ stoobly_agent/app/cli/scaffold/service_workflow.py,sha256=sQ_Edy_wGHKMXpD0DmhnOW
104
104
  stoobly_agent/app/cli/scaffold/service_workflow_validate_command.py,sha256=M5fc9RiCgN9ReCXsb3KIVJIKo0aSIOv28Q3izLkEQTo,10036
105
105
  stoobly_agent/app/cli/scaffold/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
106
106
  stoobly_agent/app/cli/scaffold/templates/app/.Dockerfile.context,sha256=xnUFSlP8YvEs04lTh1Jj_ggNcwyVjyzZjzF0Vh9pris,158
107
- stoobly_agent/app/cli/scaffold/templates/app/.Makefile,sha256=_krOdKu4LX9C_UvWuJeyD7VhWVs0aZtuDNxwlzvvsBY,8418
107
+ stoobly_agent/app/cli/scaffold/templates/app/.Makefile,sha256=hree9QL8xl7v_Yzv40bcO4-ZDlyA4Qnm-VWU2dnMuXQ,8955
108
108
  stoobly_agent/app/cli/scaffold/templates/app/.docker-compose.base.yml,sha256=6tFqXh3ine8vaD0FCL5TMoY5NjKx2wLUR8XpW3tJtew,245
109
109
  stoobly_agent/app/cli/scaffold/templates/app/.docker-compose.networks.yml,sha256=I4PbJpQjFHb5IbAUWNvYM6okDEtmwtKFDQg-yog05WM,141
110
110
  stoobly_agent/app/cli/scaffold/templates/app/Makefile,sha256=TEmPG7Bf0KZOnmfsgdzza3UdwcVMmM5Lj1YdLc4cgjA,79
@@ -699,7 +699,7 @@ stoobly_agent/test/app/models/factories/resource/local_db/helpers/log_test.py,sh
699
699
  stoobly_agent/test/app/models/factories/resource/local_db/helpers/tiebreak_scenario_request_test.py,sha256=a1SFLyEyRRLuADvAw6ckQQKORFXvyK1lyrbkaLWx8oU,3399
700
700
  stoobly_agent/test/app/models/factories/resource/local_db/request_adapter_test.py,sha256=Pzq1cBPnP9oSWG-p0c-VoymoHxgp483QmNwmV1b78RA,8453
701
701
  stoobly_agent/test/app/models/factories/resource/local_db/response_adapter_test.py,sha256=9P95EKH5rZGOrmRkRIDlQZqtiLJHk9735og18Ffwpfw,2204
702
- stoobly_agent/test/app/models/schemas/.stoobly/db/VERSION,sha256=1-dHLCYhhLoNpJuXwyP9qKDsvu4z17NNtIQF76_WVd4,6
702
+ stoobly_agent/test/app/models/schemas/.stoobly/db/VERSION,sha256=uGiTynl24ZAartFJQ0TJAZFa3EBS21MnE-XvhATnY64,5
703
703
  stoobly_agent/test/app/models/schemas/.stoobly/db/stoobly_agent.sqlite3,sha256=ch8gNx6zIelLKQx65gwFx_LRNqUD3EC5xcHZ0ukIQiU,188416
704
704
  stoobly_agent/test/app/models/schemas/.stoobly/settings.yml,sha256=vLwMjweKOdod6tSLtIlyBefPQuNXq9wio4kBaODKtAU,726
705
705
  stoobly_agent/test/app/models/schemas/.stoobly/tmp/options.json,sha256=OTRzarwus48CTrItedXCrgQttJHSEZonEYc7R_knvYg,2212
@@ -740,8 +740,8 @@ stoobly_agent/test/mock_data/scaffold/docker-compose-local-service.yml,sha256=1W
740
740
  stoobly_agent/test/mock_data/scaffold/index.html,sha256=qJwuYajKZ4ihWZrJQ3BNObV5kf1VGnnm_vqlPJzdqLE,258
741
741
  stoobly_agent/test/mock_data/uspto.yaml,sha256=6U5se7C3o-86J4m9xpOk9Npias399f5CbfWzR87WKwE,7835
742
742
  stoobly_agent/test/test_helper.py,sha256=m_oAI7tmRYCNZdKfNqISWhMv3e44tjeYViQ3nTUfnos,1007
743
- stoobly_agent-1.6.4.dist-info/LICENSE,sha256=o93sj12cdoEOsTCjPaPFsw3Xq0SXs3pPcY-9reE2sEw,548
744
- stoobly_agent-1.6.4.dist-info/METADATA,sha256=Yx-Gc2cFV8iqjcfH8XeqLd3dc1IRPhKkJ5hYKbtVUCU,3087
745
- stoobly_agent-1.6.4.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
746
- stoobly_agent-1.6.4.dist-info/entry_points.txt,sha256=aq5wix5oC8MDQtmyPGU0xaFrsjJg7WH28NmXh2sc3Z8,56
747
- stoobly_agent-1.6.4.dist-info/RECORD,,
743
+ stoobly_agent-1.6.6.dist-info/LICENSE,sha256=o93sj12cdoEOsTCjPaPFsw3Xq0SXs3pPcY-9reE2sEw,548
744
+ stoobly_agent-1.6.6.dist-info/METADATA,sha256=Pq3u98yhvcG83VsoM5ng6YTI28e457gUWjKl3B1Nu0s,3087
745
+ stoobly_agent-1.6.6.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
746
+ stoobly_agent-1.6.6.dist-info/entry_points.txt,sha256=aq5wix5oC8MDQtmyPGU0xaFrsjJg7WH28NmXh2sc3Z8,56
747
+ stoobly_agent-1.6.6.dist-info/RECORD,,