emasser 1.0.6 → 3.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.dockerignore +8 -8
- data/.env-example +12 -12
- data/.github/release-drafter.yml +15 -15
- data/.github/workflows/codeql-analysis.yml +70 -70
- data/.github/workflows/draft-release.yml +15 -15
- data/.github/workflows/gh-pages.yml +32 -32
- data/.github/workflows/push-to-docker-mail.yml +28 -28
- data/.github/workflows/push-to-docker.yml +35 -35
- data/.github/workflows/release.yml +42 -42
- data/.github/workflows/rubocop.yml +23 -23
- data/.github/workflows/test-cli.yml +72 -72
- data/.gitignore +19 -19
- data/.mergify.yml +25 -25
- data/.rubocop.yml +80 -80
- data/.rubocop_todo.yml +27 -27
- data/CHANGELOG.md +16 -16
- data/Dockerfile +44 -44
- data/Gemfile +8 -8
- data/Gemfile.lock +104 -104
- data/LICENSE.md +15 -15
- data/README.md +178 -178
- data/Rakefile +18 -18
- data/_config.yml +1 -1
- data/docs/features.md +1436 -1330
- data/docs/redoc/index.html +1230 -1230
- data/emasser.gemspec +44 -44
- data/exe/emasser +5 -5
- data/lib/emasser/cli.rb +37 -37
- data/lib/emasser/configuration.rb +49 -49
- data/lib/emasser/constants.rb +26 -26
- data/lib/emasser/delete.rb +148 -148
- data/lib/emasser/errors.rb +14 -14
- data/lib/emasser/get.rb +949 -670
- data/lib/emasser/help/approvalCac_post_mapper.md +20 -20
- data/lib/emasser/help/approvalPac_post_mapper.md +20 -20
- data/lib/emasser/help/artifacts_del_mapper.md +9 -9
- data/lib/emasser/help/artifacts_post_mapper.md +59 -59
- data/lib/emasser/help/artifacts_put_mapper.md +34 -34
- data/lib/emasser/help/cloudresource_post_mapper.md +62 -62
- data/lib/emasser/help/cmmc_get_mapper.md +4 -4
- data/lib/emasser/help/container_post_mapper.md +44 -44
- data/lib/emasser/help/controls_put_mapper.md +74 -74
- data/lib/emasser/help/milestone_del_mapper.md +11 -11
- data/lib/emasser/help/milestone_post_mapper.md +14 -14
- data/lib/emasser/help/milestone_put_mapper.md +23 -23
- data/lib/emasser/help/poam_del_mapper.md +5 -5
- data/lib/emasser/help/poam_post_mapper.md +93 -93
- data/lib/emasser/help/poam_put_mapper.md +107 -107
- data/lib/emasser/help/staticcode_clear_mapper.md +16 -16
- data/lib/emasser/help/staticcode_post_mapper.md +21 -21
- data/lib/emasser/help/testresults_post_mapper.md +21 -21
- data/lib/emasser/help.rb +11 -11
- data/lib/emasser/input_converters.rb +21 -21
- data/lib/emasser/options_parser.rb +20 -20
- data/lib/emasser/output_converters.rb +111 -111
- data/lib/emasser/post.rb +830 -802
- data/lib/emasser/put.rb +588 -588
- data/lib/emasser/version.rb +5 -5
- data/lib/emasser.rb +19 -19
- metadata +10 -16
@@ -1,72 +1,72 @@
|
|
1
|
-
# name: Test emasser CLI
|
2
|
-
|
3
|
-
# on:
|
4
|
-
# push:
|
5
|
-
# branches: [ main ]
|
6
|
-
# pull_request:
|
7
|
-
# branches: [ main ]
|
8
|
-
|
9
|
-
# jobs:
|
10
|
-
# test:
|
11
|
-
# strategy:
|
12
|
-
# fail-fast: false
|
13
|
-
# matrix:
|
14
|
-
# platform: [ ubuntu-latest, macos-latest, windows-latest ]
|
15
|
-
# ruby-version: ['2.6', '2.7']
|
16
|
-
# runs-on: ${{ matrix.platform }}
|
17
|
-
# steps:
|
18
|
-
# - name: Setup Ruby ${{matrix.ruby}}
|
19
|
-
# uses: ruby/setup-ruby@v1
|
20
|
-
# with:
|
21
|
-
# ruby-version: ${{ matrix.ruby-version }}
|
22
|
-
# - uses: actions/checkout@v2
|
23
|
-
# - name: Testing on ${{ matrix.platform }} for Ruby ${{ matrix.ruby }}
|
24
|
-
# if: matrix.platform == 'windows-latest'
|
25
|
-
# run: |
|
26
|
-
# echo "need to install libcurl.dll"
|
27
|
-
# - name: Testing on ${{ matrix.platform }} for Ruby ${{ matrix.ruby }}
|
28
|
-
# if: matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-latest'
|
29
|
-
# run: |
|
30
|
-
# bundle install
|
31
|
-
# bundle info swagger_client
|
32
|
-
# rspec spec --format documentation
|
33
|
-
|
34
|
-
name: Test emasser CLI
|
35
|
-
|
36
|
-
on:
|
37
|
-
push:
|
38
|
-
branches: [ main ]
|
39
|
-
pull_request:
|
40
|
-
branches: [ main ]
|
41
|
-
|
42
|
-
jobs:
|
43
|
-
test:
|
44
|
-
strategy:
|
45
|
-
fail-fast: false
|
46
|
-
matrix:
|
47
|
-
platform: [ ubuntu-latest, macos-latest, windows-latest ]
|
48
|
-
ruby-version: ['2.6', '2.7']
|
49
|
-
runs-on: ${{ matrix.platform }}
|
50
|
-
steps:
|
51
|
-
- name: Setup Ruby ${{matrix.ruby}}
|
52
|
-
uses: ruby/setup-ruby@v1
|
53
|
-
with:
|
54
|
-
ruby-version: ${{ matrix.ruby-version }}
|
55
|
-
- uses: actions/checkout@v2
|
56
|
-
- uses: crazy-max/ghaction-chocolatey@v1
|
57
|
-
with:
|
58
|
-
args: install curl -y
|
59
|
-
if: matrix.platform == 'windows-latest'
|
60
|
-
- name: Testing on ${{ matrix.platform }} for Ruby ${{ matrix.ruby }}
|
61
|
-
if: matrix.platform == 'windows-latest'
|
62
|
-
run: |
|
63
|
-
# bundle install
|
64
|
-
# bundle info emass_client
|
65
|
-
# rspec spec --format documentation
|
66
|
-
echo "need to fix path to libcurl.dll"
|
67
|
-
- name: Testing on ${{ matrix.platform }} for Ruby ${{ matrix.ruby }}
|
68
|
-
if: matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-latest'
|
69
|
-
run: |
|
70
|
-
bundle install
|
71
|
-
bundle info emass_client
|
72
|
-
rspec spec --format documentation
|
1
|
+
# name: Test emasser CLI
|
2
|
+
|
3
|
+
# on:
|
4
|
+
# push:
|
5
|
+
# branches: [ main ]
|
6
|
+
# pull_request:
|
7
|
+
# branches: [ main ]
|
8
|
+
|
9
|
+
# jobs:
|
10
|
+
# test:
|
11
|
+
# strategy:
|
12
|
+
# fail-fast: false
|
13
|
+
# matrix:
|
14
|
+
# platform: [ ubuntu-latest, macos-latest, windows-latest ]
|
15
|
+
# ruby-version: ['2.6', '2.7']
|
16
|
+
# runs-on: ${{ matrix.platform }}
|
17
|
+
# steps:
|
18
|
+
# - name: Setup Ruby ${{matrix.ruby}}
|
19
|
+
# uses: ruby/setup-ruby@v1
|
20
|
+
# with:
|
21
|
+
# ruby-version: ${{ matrix.ruby-version }}
|
22
|
+
# - uses: actions/checkout@v2
|
23
|
+
# - name: Testing on ${{ matrix.platform }} for Ruby ${{ matrix.ruby }}
|
24
|
+
# if: matrix.platform == 'windows-latest'
|
25
|
+
# run: |
|
26
|
+
# echo "need to install libcurl.dll"
|
27
|
+
# - name: Testing on ${{ matrix.platform }} for Ruby ${{ matrix.ruby }}
|
28
|
+
# if: matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-latest'
|
29
|
+
# run: |
|
30
|
+
# bundle install
|
31
|
+
# bundle info swagger_client
|
32
|
+
# rspec spec --format documentation
|
33
|
+
|
34
|
+
name: Test emasser CLI
|
35
|
+
|
36
|
+
on:
|
37
|
+
push:
|
38
|
+
branches: [ main ]
|
39
|
+
pull_request:
|
40
|
+
branches: [ main ]
|
41
|
+
|
42
|
+
jobs:
|
43
|
+
test:
|
44
|
+
strategy:
|
45
|
+
fail-fast: false
|
46
|
+
matrix:
|
47
|
+
platform: [ ubuntu-latest, macos-latest, windows-latest ]
|
48
|
+
ruby-version: ['2.6', '2.7']
|
49
|
+
runs-on: ${{ matrix.platform }}
|
50
|
+
steps:
|
51
|
+
- name: Setup Ruby ${{matrix.ruby}}
|
52
|
+
uses: ruby/setup-ruby@v1
|
53
|
+
with:
|
54
|
+
ruby-version: ${{ matrix.ruby-version }}
|
55
|
+
- uses: actions/checkout@v2
|
56
|
+
- uses: crazy-max/ghaction-chocolatey@v1
|
57
|
+
with:
|
58
|
+
args: install curl -y
|
59
|
+
if: matrix.platform == 'windows-latest'
|
60
|
+
- name: Testing on ${{ matrix.platform }} for Ruby ${{ matrix.ruby }}
|
61
|
+
if: matrix.platform == 'windows-latest'
|
62
|
+
run: |
|
63
|
+
# bundle install
|
64
|
+
# bundle info emass_client
|
65
|
+
# rspec spec --format documentation
|
66
|
+
echo "need to fix path to libcurl.dll"
|
67
|
+
- name: Testing on ${{ matrix.platform }} for Ruby ${{ matrix.ruby }}
|
68
|
+
if: matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-latest'
|
69
|
+
run: |
|
70
|
+
bundle install
|
71
|
+
bundle info emass_client
|
72
|
+
rspec spec --format documentation
|
data/.gitignore
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
/.bundle/
|
2
|
-
/.yardoc
|
3
|
-
/_yardoc/
|
4
|
-
/coverage/
|
5
|
-
/doc/
|
6
|
-
/pkg/
|
7
|
-
/spec/reports/
|
8
|
-
/tmp/
|
9
|
-
/emasser_secrets
|
10
|
-
/.vscode
|
11
|
-
|
12
|
-
**/*.un~
|
13
|
-
|
14
|
-
.DS_Store
|
15
|
-
.byebug_history
|
16
|
-
.env
|
17
|
-
key.pem
|
18
|
-
client.pem
|
19
|
-
*.gem
|
1
|
+
/.bundle/
|
2
|
+
/.yardoc
|
3
|
+
/_yardoc/
|
4
|
+
/coverage/
|
5
|
+
/doc/
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/tmp/
|
9
|
+
/emasser_secrets
|
10
|
+
/.vscode
|
11
|
+
|
12
|
+
**/*.un~
|
13
|
+
|
14
|
+
.DS_Store
|
15
|
+
.byebug_history
|
16
|
+
.env
|
17
|
+
key.pem
|
18
|
+
client.pem
|
19
|
+
*.gem
|
data/.mergify.yml
CHANGED
@@ -1,25 +1,25 @@
|
|
1
|
-
queue_rules:
|
2
|
-
- name: default
|
3
|
-
conditions:
|
4
|
-
- "#approved-reviews-by>=1"
|
5
|
-
- base=main
|
6
|
-
|
7
|
-
pull_request_rules:
|
8
|
-
- name: automatic merge for master when reviewed and CI passes
|
9
|
-
conditions:
|
10
|
-
- label=ready-to-merge
|
11
|
-
actions:
|
12
|
-
queue:
|
13
|
-
name: default
|
14
|
-
method: squash
|
15
|
-
- name: delete head branch after merge
|
16
|
-
conditions:
|
17
|
-
- merged
|
18
|
-
actions:
|
19
|
-
delete_head_branch: {}
|
20
|
-
- name: ask developers to resolve conflict
|
21
|
-
conditions:
|
22
|
-
- conflict
|
23
|
-
actions:
|
24
|
-
comment:
|
25
|
-
message: This pull request has a conflict. Could you fix it @{{author}}?
|
1
|
+
queue_rules:
|
2
|
+
- name: default
|
3
|
+
conditions:
|
4
|
+
- "#approved-reviews-by>=1"
|
5
|
+
- base=main
|
6
|
+
|
7
|
+
pull_request_rules:
|
8
|
+
- name: automatic merge for master when reviewed and CI passes
|
9
|
+
conditions:
|
10
|
+
- label=ready-to-merge
|
11
|
+
actions:
|
12
|
+
queue:
|
13
|
+
name: default
|
14
|
+
method: squash
|
15
|
+
- name: delete head branch after merge
|
16
|
+
conditions:
|
17
|
+
- merged
|
18
|
+
actions:
|
19
|
+
delete_head_branch: {}
|
20
|
+
- name: ask developers to resolve conflict
|
21
|
+
conditions:
|
22
|
+
- conflict
|
23
|
+
actions:
|
24
|
+
comment:
|
25
|
+
message: This pull request has a conflict. Could you fix it @{{author}}?
|
data/.rubocop.yml
CHANGED
@@ -1,80 +1,80 @@
|
|
1
|
-
---
|
2
|
-
inherit_from: .rubocop_todo.yml
|
3
|
-
|
4
|
-
require:
|
5
|
-
- rubocop-minitest
|
6
|
-
- rubocop-performance
|
7
|
-
- rubocop-rake
|
8
|
-
|
9
|
-
AllCops:
|
10
|
-
TargetRubyVersion: 2.5
|
11
|
-
NewCops: enable
|
12
|
-
Exclude:
|
13
|
-
- 'emass_client/ruby_client/**/*'
|
14
|
-
- Gemfile
|
15
|
-
- Rakefile
|
16
|
-
- 'test/**/*'
|
17
|
-
- '*.gemspec'
|
18
|
-
|
19
|
-
#Cops in Metrics might need to be adjusted to past their defaults depending on how restrictive the requirements feel
|
20
|
-
Style/Documentation:
|
21
|
-
Enabled: false
|
22
|
-
Layout/ParameterAlignment:
|
23
|
-
Enabled: true
|
24
|
-
Style/Encoding:
|
25
|
-
Enabled: false
|
26
|
-
Style/HashSyntax:
|
27
|
-
Enabled: true
|
28
|
-
Layout/LineLength:
|
29
|
-
Enabled: false
|
30
|
-
Layout/EmptyLinesAroundBlockBody:
|
31
|
-
Enabled: false
|
32
|
-
Style/NumericLiterals:
|
33
|
-
MinDigits: 10
|
34
|
-
Metrics/ModuleLength:
|
35
|
-
Enabled: false
|
36
|
-
Metrics/ClassLength:
|
37
|
-
Enabled: false
|
38
|
-
Style/PercentLiteralDelimiters:
|
39
|
-
PreferredDelimiters:
|
40
|
-
'%': '{}'
|
41
|
-
'%i': ()
|
42
|
-
'%q': '{}'
|
43
|
-
'%Q': ()
|
44
|
-
'%r': '{}'
|
45
|
-
'%s': ()
|
46
|
-
'%w': '{}'
|
47
|
-
'%W': ()
|
48
|
-
'%x': ()
|
49
|
-
Layout/HashAlignment:
|
50
|
-
Enabled: false
|
51
|
-
Naming/PredicateName:
|
52
|
-
Enabled: false
|
53
|
-
Style/ClassAndModuleChildren:
|
54
|
-
Enabled: false
|
55
|
-
Style/ConditionalAssignment:
|
56
|
-
Enabled: false
|
57
|
-
Style/AndOr:
|
58
|
-
Enabled: false
|
59
|
-
Style/Not:
|
60
|
-
Enabled: false
|
61
|
-
Naming/FileName:
|
62
|
-
Enabled: false
|
63
|
-
Style/TrailingCommaInArrayLiteral:
|
64
|
-
EnforcedStyleForMultiline: comma
|
65
|
-
Style/TrailingCommaInArguments:
|
66
|
-
EnforcedStyleForMultiline: comma
|
67
|
-
Style/NegatedIf:
|
68
|
-
Enabled: false
|
69
|
-
Style/UnlessElse:
|
70
|
-
Enabled: false
|
71
|
-
Style/BlockDelimiters:
|
72
|
-
Enabled: false
|
73
|
-
Layout/SpaceAroundOperators:
|
74
|
-
Enabled: false
|
75
|
-
Style/IfUnlessModifier:
|
76
|
-
Enabled: false
|
77
|
-
Style/FrozenStringLiteralComment:
|
78
|
-
Enabled: false
|
79
|
-
Style/SignalException:
|
80
|
-
Enabled: false
|
1
|
+
---
|
2
|
+
inherit_from: .rubocop_todo.yml
|
3
|
+
|
4
|
+
require:
|
5
|
+
- rubocop-minitest
|
6
|
+
- rubocop-performance
|
7
|
+
- rubocop-rake
|
8
|
+
|
9
|
+
AllCops:
|
10
|
+
TargetRubyVersion: 2.5
|
11
|
+
NewCops: enable
|
12
|
+
Exclude:
|
13
|
+
- 'emass_client/ruby_client/**/*'
|
14
|
+
- Gemfile
|
15
|
+
- Rakefile
|
16
|
+
- 'test/**/*'
|
17
|
+
- '*.gemspec'
|
18
|
+
|
19
|
+
#Cops in Metrics might need to be adjusted to past their defaults depending on how restrictive the requirements feel
|
20
|
+
Style/Documentation:
|
21
|
+
Enabled: false
|
22
|
+
Layout/ParameterAlignment:
|
23
|
+
Enabled: true
|
24
|
+
Style/Encoding:
|
25
|
+
Enabled: false
|
26
|
+
Style/HashSyntax:
|
27
|
+
Enabled: true
|
28
|
+
Layout/LineLength:
|
29
|
+
Enabled: false
|
30
|
+
Layout/EmptyLinesAroundBlockBody:
|
31
|
+
Enabled: false
|
32
|
+
Style/NumericLiterals:
|
33
|
+
MinDigits: 10
|
34
|
+
Metrics/ModuleLength:
|
35
|
+
Enabled: false
|
36
|
+
Metrics/ClassLength:
|
37
|
+
Enabled: false
|
38
|
+
Style/PercentLiteralDelimiters:
|
39
|
+
PreferredDelimiters:
|
40
|
+
'%': '{}'
|
41
|
+
'%i': ()
|
42
|
+
'%q': '{}'
|
43
|
+
'%Q': ()
|
44
|
+
'%r': '{}'
|
45
|
+
'%s': ()
|
46
|
+
'%w': '{}'
|
47
|
+
'%W': ()
|
48
|
+
'%x': ()
|
49
|
+
Layout/HashAlignment:
|
50
|
+
Enabled: false
|
51
|
+
Naming/PredicateName:
|
52
|
+
Enabled: false
|
53
|
+
Style/ClassAndModuleChildren:
|
54
|
+
Enabled: false
|
55
|
+
Style/ConditionalAssignment:
|
56
|
+
Enabled: false
|
57
|
+
Style/AndOr:
|
58
|
+
Enabled: false
|
59
|
+
Style/Not:
|
60
|
+
Enabled: false
|
61
|
+
Naming/FileName:
|
62
|
+
Enabled: false
|
63
|
+
Style/TrailingCommaInArrayLiteral:
|
64
|
+
EnforcedStyleForMultiline: comma
|
65
|
+
Style/TrailingCommaInArguments:
|
66
|
+
EnforcedStyleForMultiline: comma
|
67
|
+
Style/NegatedIf:
|
68
|
+
Enabled: false
|
69
|
+
Style/UnlessElse:
|
70
|
+
Enabled: false
|
71
|
+
Style/BlockDelimiters:
|
72
|
+
Enabled: false
|
73
|
+
Layout/SpaceAroundOperators:
|
74
|
+
Enabled: false
|
75
|
+
Style/IfUnlessModifier:
|
76
|
+
Enabled: false
|
77
|
+
Style/FrozenStringLiteralComment:
|
78
|
+
Enabled: false
|
79
|
+
Style/SignalException:
|
80
|
+
Enabled: false
|
data/.rubocop_todo.yml
CHANGED
@@ -1,27 +1,27 @@
|
|
1
|
-
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
# on 2021-12-22 16:48:47 UTC using RuboCop version 1.23.0.
|
4
|
-
# The point is for the user to remove these configuration records
|
5
|
-
# one by one as the offenses are removed from the code base.
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
8
|
-
|
9
|
-
# Offense count: 21
|
10
|
-
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
|
11
|
-
Metrics/AbcSize:
|
12
|
-
Max: 190
|
13
|
-
|
14
|
-
# Offense count: 17
|
15
|
-
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
16
|
-
Metrics/MethodLength:
|
17
|
-
Max: 78
|
18
|
-
|
19
|
-
# Offense count: 11
|
20
|
-
# Cop supports --auto-correct.
|
21
|
-
# Configuration parameters: PreferredDelimiters.
|
22
|
-
Style/PercentLiteralDelimiters:
|
23
|
-
Exclude:
|
24
|
-
- 'lib/emasser/get.rb'
|
25
|
-
- 'lib/emasser/options_parser.rb'
|
26
|
-
- 'lib/emasser/post.rb'
|
27
|
-
- 'lib/emasser/put.rb'
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2021-12-22 16:48:47 UTC using RuboCop version 1.23.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 21
|
10
|
+
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
|
11
|
+
Metrics/AbcSize:
|
12
|
+
Max: 190
|
13
|
+
|
14
|
+
# Offense count: 17
|
15
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
16
|
+
Metrics/MethodLength:
|
17
|
+
Max: 78
|
18
|
+
|
19
|
+
# Offense count: 11
|
20
|
+
# Cop supports --auto-correct.
|
21
|
+
# Configuration parameters: PreferredDelimiters.
|
22
|
+
Style/PercentLiteralDelimiters:
|
23
|
+
Exclude:
|
24
|
+
- 'lib/emasser/get.rb'
|
25
|
+
- 'lib/emasser/options_parser.rb'
|
26
|
+
- 'lib/emasser/post.rb'
|
27
|
+
- 'lib/emasser/put.rb'
|
data/CHANGELOG.md
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
# Changelog
|
2
|
-
All notable changes to this project will be documented in this file.
|
3
|
-
|
4
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
|
-
|
7
|
-
## [Unreleased]
|
8
|
-
- Harden the docker container (ex. non root user, etc).
|
9
|
-
|
10
|
-
## [0.2.0] - 2020-12-14
|
11
|
-
### Added
|
12
|
-
- Scaffolding for the emasser project including such things as a Dockerfile, a .gitlab-ci.yml, some repository dependencies such as `standard` and `minitest`, and some gem dependencies such as `thor`.
|
13
|
-
|
14
|
-
## [0.1.0] - 2020-12-10
|
15
|
-
### Added
|
16
|
-
- Put in MITRE's particular license modifications and notices.
|
1
|
+
# Changelog
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
|
+
|
7
|
+
## [Unreleased]
|
8
|
+
- Harden the docker container (ex. non root user, etc).
|
9
|
+
|
10
|
+
## [0.2.0] - 2020-12-14
|
11
|
+
### Added
|
12
|
+
- Scaffolding for the emasser project including such things as a Dockerfile, a .gitlab-ci.yml, some repository dependencies such as `standard` and `minitest`, and some gem dependencies such as `thor`.
|
13
|
+
|
14
|
+
## [0.1.0] - 2020-12-10
|
15
|
+
### Added
|
16
|
+
- Put in MITRE's particular license modifications and notices.
|
data/Dockerfile
CHANGED
@@ -1,44 +1,44 @@
|
|
1
|
-
# Buld from ruby 2.7.5 image
|
2
|
-
FROM ruby:2.7.5 as build
|
3
|
-
|
4
|
-
LABEL name="emasser" \
|
5
|
-
vendor="MITRE" \
|
6
|
-
version="${EMASSER_VERSION}" \
|
7
|
-
release="1" \
|
8
|
-
url="https://github.com/mitre/emasser" \
|
9
|
-
description="Emasser is a command-line interface (CLI) that aims to automate routine business use-cases and provide utility surrounding the Enterprise Mission Assurance Support Service (eMASS) by leveraging its representational state transfer (REST) application programming interface (API)." \
|
10
|
-
docs="https://mitre.github.io/emasser/" \
|
11
|
-
run="docker run -d --name ${NAME} ${IMAGE} <args>"
|
12
|
-
|
13
|
-
# Set the base directory that will be used from now on
|
14
|
-
WORKDIR /emasser
|
15
|
-
|
16
|
-
# Install dependency
|
17
|
-
RUN gem install bundler -v '2.3.5'
|
18
|
-
RUN apt update && apt install -y build-essential
|
19
|
-
COPY . .
|
20
|
-
RUN bundle install
|
21
|
-
# WORKDIR /emasser/emass_client/ruby_client
|
22
|
-
# RUN gem build emass_client.gemspec
|
23
|
-
WORKDIR /emasser
|
24
|
-
RUN gem build emasser.gemspec
|
25
|
-
RUN mkdir gems
|
26
|
-
# RUN mv emass_client/ruby_client/emass_client*.gem gems/emass_client.gem
|
27
|
-
RUN mv emasser*.gem gems/emasser.gem
|
28
|
-
|
29
|
-
|
30
|
-
FROM ruby:2-alpine
|
31
|
-
|
32
|
-
# Use the line below when testing creating the container locally
|
33
|
-
# RUN sed -i 's/https/http/g' /etc/apk/repositories
|
34
|
-
COPY --from=build /emasser/gems /emass-gems
|
35
|
-
|
36
|
-
# RUN apk add build-base libcurl && gem install /emass-gems/emass_client.gem && gem install /emass-gems/emasser.gem
|
37
|
-
RUN apk add build-base libcurl && gem install /emass-gems/emasser.gem
|
38
|
-
|
39
|
-
VOLUME [ "/data" ]
|
40
|
-
WORKDIR /data
|
41
|
-
|
42
|
-
ENTRYPOINT ["emasser"]
|
43
|
-
|
44
|
-
CMD ["-h"]
|
1
|
+
# Buld from ruby 2.7.5 image
|
2
|
+
FROM ruby:2.7.5 as build
|
3
|
+
|
4
|
+
LABEL name="emasser" \
|
5
|
+
vendor="MITRE" \
|
6
|
+
version="${EMASSER_VERSION}" \
|
7
|
+
release="1" \
|
8
|
+
url="https://github.com/mitre/emasser" \
|
9
|
+
description="Emasser is a command-line interface (CLI) that aims to automate routine business use-cases and provide utility surrounding the Enterprise Mission Assurance Support Service (eMASS) by leveraging its representational state transfer (REST) application programming interface (API)." \
|
10
|
+
docs="https://mitre.github.io/emasser/" \
|
11
|
+
run="docker run -d --name ${NAME} ${IMAGE} <args>"
|
12
|
+
|
13
|
+
# Set the base directory that will be used from now on
|
14
|
+
WORKDIR /emasser
|
15
|
+
|
16
|
+
# Install dependency
|
17
|
+
RUN gem install bundler -v '2.3.5'
|
18
|
+
RUN apt update && apt install -y build-essential
|
19
|
+
COPY . .
|
20
|
+
RUN bundle install
|
21
|
+
# WORKDIR /emasser/emass_client/ruby_client
|
22
|
+
# RUN gem build emass_client.gemspec
|
23
|
+
WORKDIR /emasser
|
24
|
+
RUN gem build emasser.gemspec
|
25
|
+
RUN mkdir gems
|
26
|
+
# RUN mv emass_client/ruby_client/emass_client*.gem gems/emass_client.gem
|
27
|
+
RUN mv emasser*.gem gems/emasser.gem
|
28
|
+
|
29
|
+
|
30
|
+
FROM ruby:2-alpine
|
31
|
+
|
32
|
+
# Use the line below when testing creating the container locally
|
33
|
+
# RUN sed -i 's/https/http/g' /etc/apk/repositories
|
34
|
+
COPY --from=build /emasser/gems /emass-gems
|
35
|
+
|
36
|
+
# RUN apk add build-base libcurl && gem install /emass-gems/emass_client.gem && gem install /emass-gems/emasser.gem
|
37
|
+
RUN apk add build-base libcurl && gem install /emass-gems/emasser.gem
|
38
|
+
|
39
|
+
VOLUME [ "/data" ]
|
40
|
+
WORKDIR /data
|
41
|
+
|
42
|
+
ENTRYPOINT ["emasser"]
|
43
|
+
|
44
|
+
CMD ["-h"]
|
data/Gemfile
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source 'https://rubygems.org'
|
4
|
-
|
5
|
-
# Specify your gem's dependencies in emasser.gemspec
|
6
|
-
gemspec
|
7
|
-
|
8
|
-
#gem 'emass_client', path: './emass_client/ruby_client/'
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in emasser.gemspec
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
#gem 'emass_client', path: './emass_client/ruby_client/'
|