-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
123 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# | ||
# MetaCall Distributable by Parra Studios | ||
# Distributable infrastructure for MetaCall. | ||
# | ||
# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia <[email protected]> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
FROM busybox:1.31.1 AS ruby_test | ||
|
||
# Image descriptor | ||
LABEL copyright.name="Vicente Eduardo Ferrer Garcia" \ | ||
copyright.address="[email protected]" \ | ||
maintainer.name="Vicente Eduardo Ferrer Garcia" \ | ||
maintainer.address="[email protected]" \ | ||
vendor="MetaCall Inc." \ | ||
version="0.1" | ||
|
||
COPY out/tarball.tar.gz / | ||
|
||
RUN cd / \ | ||
&& tar --no-same-owner --no-same-permissions -xzf tarball.tar.gz \ | ||
&& rm tarball.tar.gz | ||
|
||
COPY tests/ruby/script.rb /scripts/ | ||
COPY tests/ruby/Gemfile /scripts/ | ||
|
||
WORKDIR /scripts | ||
|
||
ARG CACHE_INVALIDATE | ||
|
||
RUN echo "Running tests ${CACHE_INVALIDATE}" \ | ||
&& source /gnu/etc/profile \ | ||
&& gem install open-uri \ | ||
&& bundle install --verbose \ | ||
&& bundle config path \ | ||
&& export LOADER_SCRIPT_PATH="/scripts/" \ | ||
&& metacallcli script.rb | ||
# \ | ||
# | grep \ | ||
# -e 'Hello World' | ||
|
||
ENTRYPOINT ["sh", "-c"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'xml-simple' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env ruby | ||
|
||
# | ||
# MetaCall Distributable by Parra Studios | ||
# Distributable infrastructure for MetaCall. | ||
# | ||
# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia <[email protected]> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the 'License'); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
require 'open-uri' | ||
|
||
URI.open('http://www.ruby-lang.org/') {|f| | ||
f.each_line {|line| p line} | ||
} | ||
|
||
# TODO: Ruby cannot find gems installed by bundle | ||
#require 'xmlsimple' | ||
#result = XmlSimple.xml_in(html) | ||
#p result |