From 116a315ed2015de84945b4f990e6a86a40c38e59 Mon Sep 17 00:00:00 2001 From: Alex Snaps Date: Tue, 10 Nov 2020 13:36:42 -0500 Subject: [PATCH 1/2] Added test --- circle.yml | 2 +- ext/enterprise_script_service/mruby | 2 +- spec/script_service_spec.rb | 13 +++++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index e330aa0..ff72945 100644 --- a/circle.yml +++ b/circle.yml @@ -6,4 +6,4 @@ dependencies: - git submodule sync - git submodule update --init --recursive || (rm -fr .git/config .git/modules && git submodule deinit -f . && git submodule update --init --recursive) post: - - bundle exec rake compile + - bundle exec rake diff --git a/ext/enterprise_script_service/mruby b/ext/enterprise_script_service/mruby index 8f6b22b..4c1494d 160000 --- a/ext/enterprise_script_service/mruby +++ b/ext/enterprise_script_service/mruby @@ -1 +1 @@ -Subproject commit 8f6b22b53d0a11f4f1146cbc6de372ed8126e1b8 +Subproject commit 4c1494d58fbccbd6363060cadfc8420480bf87e8 diff --git a/spec/script_service_spec.rb b/spec/script_service_spec.rb index a34deae..175a15e 100644 --- a/spec/script_service_spec.rb +++ b/spec/script_service_spec.rb @@ -11,11 +11,24 @@ ], timeout: 1000, ) + expect(result.errors).to eq([]) expect(result.success?).to be(true) expect(result.output).to eq([26803196617, 0.475]) expect(result.stdout).to eq("hello") end + it "breaks out of a proc just fine" do + result = EnterpriseScriptService.run( + input: {}, + sources: [ + ["proc", "[1, 2].each { |i| break }"], + ], + timeout: 1000, + ) + expect(result.errors).to eq([]) + expect(result.success?).to be(true) + end + it "round trips binary strings" do result = EnterpriseScriptService.run( input: "hello".force_encoding(Encoding::BINARY), From c836408b037ffc65f0931c3bd8406b43f5eecf60 Mon Sep 17 00:00:00 2001 From: Alex Snaps Date: Tue, 10 Nov 2020 14:05:31 -0500 Subject: [PATCH 2/2] wtf --- dev.yml | 1 - ext/enterprise_script_service/mruby | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dev.yml b/dev.yml index 6e3608e..1bd1398 100644 --- a/dev.yml +++ b/dev.yml @@ -1,7 +1,6 @@ name: enterprise-script-service up: - - xcode_clt - ruby: package: shopify/shopify/shopify-ruby version: 2.2.3p172-shopify diff --git a/ext/enterprise_script_service/mruby b/ext/enterprise_script_service/mruby index 4c1494d..8f6b22b 160000 --- a/ext/enterprise_script_service/mruby +++ b/ext/enterprise_script_service/mruby @@ -1 +1 @@ -Subproject commit 4c1494d58fbccbd6363060cadfc8420480bf87e8 +Subproject commit 8f6b22b53d0a11f4f1146cbc6de372ed8126e1b8