Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Enable gem package listing #661

Closed
wants to merge 1 commit into from
Closed

WIP: Enable gem package listing #661

wants to merge 1 commit into from

Conversation

abhaykatheria
Copy link
Contributor

@abhaykatheria abhaykatheria commented Apr 24, 2020

This commit adds changes to snippets.yml and base.yml to
collect the metadata of gem modules. Scripts are added
to base.yml to list the version, license, proj_url.

This PR is work towards #609.

Signed-off-by: abhaykatheria [email protected]

Thi commit adds changes to snippets.yml and base.yml to
collect the metadata of gem modules.Scripts are added
to base.yml to list the version, license, proj_url.

This PR is work towards #609.

Signed-off-by: abhaykatheria <[email protected]>
@abhaykatheria
Copy link
Contributor Author

I have tested these changes on rails:latest image from docker hub. Here the result from the last layer


	Layer: 07032e5274:
		info: Instruction Line: RUN gem install rails --version "$RAILS_VERSION"
		info: Layer created by commands: /bin/sh -c gem install rails --version "$RAILS_VERSION"
		info: Retrieved by invoking listing in command_lib/base.yml
licenses:
	in container:
	pkgs=`gem list 2> /dev/null | awk '{print $1}'`
	for pkg in $pkgs;do gem info $pkg 2>/dev/null |grep -n 'License:'| awk '{print $3}'; done

proj_urls:
	in container:
	pkgs=`gem list 2> /dev/null | awk '{print $1}'`
	for pkg in $pkgs;do gem info $pkg 2>/dev/null |grep -n 'Homepage:'| awk '{print $3}'; done

versions:
	in container:
	gem list 2> /dev/null | awk '{print $2}' | awk -F'[()]' '{print $2}'

names:
	in container:
	gem list 2> /dev/null | awk '{print $1}'



	Invoking commands from command_lib/base.yml:
		warning: No listing for key srcs. Consider adding this listing to command_lib/base.yml.
No listing for key copyrights. Consider adding this listing to command_lib/base.yml.

	File licenses found in Layer:  None
	Packages found in Layer:  bigdecimal-default:, bundler-1.13.7, did_you_mean-1.0.0, io-console-default:, json-default:, minitest-5.8.5, net-telnet-0.1.1, power_assert-0.2.6, psych-default:, rake-10.4.2, rdoc-default:, rubygems-update-2.6.8, test-unit-3.1.5
	Licenses found in Layer:  None
------------------------------------------------

@rnjudge
Copy link
Contributor

rnjudge commented Apr 24, 2020

Thanks for opening this @abhaykatheria! I took this commit and modified some of it to display the proper package version, license and proj_url information. I opened a new PR here: #663

Thanks again for getting the ball rolling on this!

@nishakm
Copy link
Contributor

nishakm commented Apr 27, 2020

@abhaykatheria @rnjudge closing this as I have merged the other PR.

@nishakm nishakm closed this Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants