Skip to content

Commit

Permalink
Merge pull request #35 from mitre/new_emasser
Browse files Browse the repository at this point in the history
Draft emasser structure
  • Loading branch information
georgedias authored Jun 17, 2022
2 parents 8da5e5e + 6f61eb9 commit 56da224
Show file tree
Hide file tree
Showing 441 changed files with 1,113 additions and 51,735 deletions.
2 changes: 2 additions & 0 deletions .env-example
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ export EMASSER_CLIENT_SIDE_VALIDATION=<client side validation - true or false>
export EMASSER_VERIFY_SSL=<verify SSL - true or false>
export EMASSER_VERIFY_SSL_HOST=<verify host SSL - true or false>
export EMASSER_DEBUGGING=<set debugging - true or false>
export EMASSER_CLI_DISPLAY_NULL=<display null value fields - true or false>
export EMASSER_EPOCH_TO_DATETIME=<convert epoch to data/time value - true or false>
33 changes: 0 additions & 33 deletions .github/workflows/generate_docs.yml

This file was deleted.

9 changes: 4 additions & 5 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Deploy to GitHub Pages
on:
push:
branches: [ main ]
# pull_request:
# branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build-deploy:
Expand All @@ -17,11 +17,10 @@ jobs:
run: |
sudo mkdir -p /publish
sudo mkdir -p /publish/docs
sudo mkdir -p /publish/images
sudo cp -R ./images /publish
sudo cp README.md /publish
sudo cp _config.yml /publish/_config.yml
sudo cp -R ./docs/redoc /publish/docs/redoc
sudo cp -R ./docs/swagger /publish/docs/swagger
sudo cp ./docs/developers.md /publish/docs/developers.md
sudo cp ./docs/features.md /publish/docs/features.md
- name: Deploy Markdown Files 🚀
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ jobs:
GPR_API_KEY: ${{secrets.GITHUB_TOKEN}}
- name: Build emasser
run: gem build *.gemspec
- name: Build emass_client
run: gem build -C emass_client/ruby_client/ emass_client.gemspec
# - name: Build emass_client
# run: gem build -C emass_client/ruby_client/ emass_client.gemspec
- name: Publish to RubyGems
run: |
gem push --KEY rubygems --host https://rubygems.org *.gem
gem push --KEY rubygems --host https://rubygems.org emass_client/ruby_client/*.gem
# gem push --KEY rubygems --host https://rubygems.org emass_client/ruby_client/*.gem
- name: Publish to GPR
run: |
gem push --KEY github --host https://rubygems.pkg.github.com/mitre *.gem
gem push --KEY github --host https://rubygems.pkg.github.com/mitre emass_client/ruby_client/*.gem
# gem push --KEY github --host https://rubygems.pkg.github.com/mitre emass_client/ruby_client/*.gem
env:
OWNER: mitre
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,23 @@ RUN gem install bundler -v '2.3.5'
RUN apt update && apt install -y build-essential
COPY . .
RUN bundle install
WORKDIR /emasser/emass_client/ruby_client
RUN gem build emass_client.gemspec
# WORKDIR /emasser/emass_client/ruby_client
# RUN gem build emass_client.gemspec
WORKDIR /emasser
RUN gem build emasser.gemspec
RUN mkdir gems
RUN mv emass_client/ruby_client/emass_client*.gem gems/emass_client.gem
# RUN mv emass_client/ruby_client/emass_client*.gem gems/emass_client.gem
RUN mv emasser*.gem gems/emasser.gem


FROM ruby:2-alpine

# Use the line below when testing creating the container locally
# RUN sed -i 's/https/http/g' /etc/apk/repositories
COPY --from=build /emasser/gems /emass-gems

RUN apk add build-base libcurl && gem install /emass-gems/emass_client.gem && gem install /emass-gems/emasser.gem
# RUN apk add build-base libcurl && gem install /emass-gems/emass_client.gem && gem install /emass-gems/emasser.gem
RUN apk add build-base libcurl && gem install /emass-gems/emasser.gem

VOLUME [ "/data" ]
WORKDIR /data
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ source 'https://rubygems.org'
# Specify your gem's dependencies in emasser.gemspec
gemspec

gem 'emass_client', path: './emass_client/ruby_client/'
#gem 'emass_client', path: './emass_client/ruby_client/'
53 changes: 23 additions & 30 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,80 +1,74 @@
PATH
remote: .
specs:
emasser (1.0.3)
emasser (1.0.6)
activesupport (~> 6.1.4)
colorize (~> 0.8.1)
dotenv (~> 2.7.6)
emass_client (~> 1.0)
emass_client (~> 1.0, != 1.0.3)
rubyzip (~> 2.3.2)
thor (~> 1.1.0)

PATH
remote: emass_client/ruby_client
specs:
emass_client (1.0.3)
json (~> 2.1, >= 2.1.0)
typhoeus (~> 1.0, >= 1.0.1)

GEM
remote: https://rubygems.org/
specs:
activesupport (6.1.4.4)
activesupport (6.1.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
ast (2.4.2)
bundler-audit (0.9.0.1)
bundler-audit (0.9.1)
bundler (>= 1.2.0, < 3)
thor (~> 1.0)
byebug (11.1.3)
colorize (0.8.1)
concurrent-ruby (1.1.9)
concurrent-ruby (1.1.10)
diff-lcs (1.5.0)
dotenv (2.7.6)
emass_client (1.0.6)
typhoeus (~> 1.0, >= 1.0.1)
ethon (0.15.0)
ffi (>= 1.15.0)
ffi (1.15.5-x64-mingw32)
i18n (1.8.11)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
json (2.6.1)
minitest (5.15.0)
parallel (1.21.0)
parser (3.1.0.0)
parallel (1.22.1)
parser (3.1.2.0)
ast (~> 2.4.1)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.2.0)
regexp_parser (2.5.0)
rexml (3.2.5)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.1)
rspec-core (3.10.2)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
rspec-expectations (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.2)
rspec-mocks (3.10.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.3)
rubocop (1.24.1)
rubocop (1.30.0)
parallel (~> 1.10)
parser (>= 3.0.0.0)
parser (>= 3.1.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.15.1, < 2.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.18.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.15.1)
parser (>= 3.0.1.1)
rubocop-minitest (0.17.0)
rubocop-ast (1.18.0)
parser (>= 3.1.1.0)
rubocop-minitest (0.20.0)
rubocop (>= 0.90, < 2.0)
rubocop-performance (1.13.1)
rubocop-performance (1.14.0)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rake (0.6.0)
Expand All @@ -88,7 +82,7 @@ GEM
concurrent-ruby (~> 1.0)
unicode-display_width (2.1.0)
yaml (0.2.0)
zeitwerk (2.5.3)
zeitwerk (2.5.4)

PLATFORMS
x64-mingw32
Expand All @@ -97,7 +91,6 @@ DEPENDENCIES
bundler (~> 2.3)
bundler-audit (~> 0.7)
byebug (~> 11.1.3)
emass_client!
emasser!
rake (~> 13.0)
rspec (~> 3.10.0)
Expand Down
Loading

0 comments on commit 56da224

Please sign in to comment.