Skip to content

Packagedcode to handle Ruby(.gemspec) and Cocoapods(.podspec) - #2075

Merged
pombredanne merged 19 commits into
aboutcode-org:developfrom
rpotter12:gemspec-parser-new
Sep 3, 2020
Merged

Packagedcode to handle Ruby(.gemspec) and Cocoapods(.podspec)#2075
pombredanne merged 19 commits into
aboutcode-org:developfrom
rpotter12:gemspec-parser-new

Conversation

@rpotter12

@rpotter12 rpotter12 commented Jun 18, 2020

Copy link
Copy Markdown
Contributor

Fixes #2035
Packedcode to handle Ruby(.gemspec) and Cocoapods(.podspec).

  1. Created spec.py file which will extract all the necessary data.
  2. Dependencies are extracted by using gemfileparser.
    In this way we don't need to edit any library code.

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled 📑 and links the original issue above 🔗
  • Tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
    Run tests locally to check for errors.
  • Commits are in uniquely-named feature branch and has no merge conflicts 📁

@rpotter12
rpotter12 force-pushed the gemspec-parser-new branch 2 times, most recently from 97e99d9 to 3382eee Compare June 18, 2020 22:33
@rpotter12 rpotter12 mentioned this pull request Jun 19, 2020

@pombredanne pombredanne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you .. that looks good overall 👍

But I would like to get @balasankarc https://github.com/balasankarc/gemfileparser take on the license and status of his library.

In general it would be mucho better to maintain a clean fork and push a PR to him and use that gemfileparser as a library IMHO.
Or take over the maintenance of it if that's what @balasankarc wants
So let's wait a bit for him to reply if that works for you!

Comment thread src/packagedcode/gemspec.py Outdated
Comment thread tests/packagedcode/test_rubygems.py
Comment thread tests/packagedcode/test_rubygems.py
@rpotter12
rpotter12 force-pushed the gemspec-parser-new branch 2 times, most recently from 344bcdc to 9a01c46 Compare June 20, 2020 15:08

@steven-esser steven-esser left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rpotter12 I think we

Comment thread src/packagedcode/gemspec.py Outdated
@rpotter12
rpotter12 force-pushed the gemspec-parser-new branch from 9a01c46 to ae9a3cb Compare July 4, 2020 12:53
@rpotter12
rpotter12 force-pushed the gemspec-parser-new branch 4 times, most recently from ed0850a to 157a647 Compare July 5, 2020 15:12

@steven-esser steven-esser left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. @pombredanne Anything else to add here?

Comment thread src/packagedcode/gemspec.py Outdated
@rpotter12

Copy link
Copy Markdown
Contributor Author

@MaJuRG #2075 (comment) Now nothing is edited from gemfileparser. I have made a different file which will handle gemspec and podspec all the data except dependency and dependencies will be handled by gemfileparser library. So there is no edited code in this PR :)

@steven-esser

Copy link
Copy Markdown
Contributor

@rpotter12 Yeah I see that you have done that change already. Not sure why GH has updated that comment... Anyway, it looks good.

@pombredanne pombredanne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Please see my comments inline for your review.

Comment thread src/packagedcode/rubygems.py Outdated
Comment thread src/packagedcode/spec.py Outdated
Comment thread src/packagedcode/spec.py Outdated
Comment thread src/packagedcode/spec.py
Comment thread tests/packagedcode/data/rubygems/gemspec/arel.gemspec.expected.json Outdated
Comment thread tests/packagedcode/data/rubygems/gemspec/arel.gemspec.expected.json
Comment thread tests/packagedcode/data/rubygems/gemspec/cocoapods.gemspec.expected.json Outdated
@rpotter12
rpotter12 force-pushed the gemspec-parser-new branch from 6f2626a to 0722eec Compare July 9, 2020 02:12
@rpotter12
rpotter12 requested a review from pombredanne July 9, 2020 02:12

@steven-esser steven-esser left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rpotter12 What is the purpose of the nose dependency you have added?

@rpotter12

Copy link
Copy Markdown
Contributor Author

@rpotter12 What is the purpose of the nose dependency you have added?

@MaJuRG Many tests were failing because of it. I think gemfileparser is using nose somewhere but has not mentioned it in the installation file. That's why I have to add that here to get installed. Maybe I have to add this in setup.py file too.

Comment thread src/packagedcode/rubygems.py Outdated

@pombredanne pombredanne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. See my comments inline.
Also we need to get these resolved:

Comment thread src/packagedcode/rubygems.py Outdated
Comment thread src/packagedcode/rubygems.py
Comment thread src/packagedcode/spec.py
Comment thread src/packagedcode/spec.py Outdated
Comment thread src/packagedcode/spec.py Outdated
Comment thread tests/packagedcode/data/rubygems/gemspec/github.gemspec.expected.json Outdated
Comment thread tests/packagedcode/data/rubygems/gemspec/github.gemspec
Comment thread tests/packagedcode/data/rubygems/gemspec/rubocop.gemspec Outdated
Comment thread tests/packagedcode/data/rubygems/gemspec/mecab-ruby.gemspec
Comment thread tests/packagedcode/test_rubygems.py Outdated
@rpotter12
rpotter12 force-pushed the gemspec-parser-new branch from b456d9a to 6c4f350 Compare July 13, 2020 08:40
@rpotter12 rpotter12 changed the title Packagedcode to handle Ruby(.gemspec) files Packagedcode to handle Ruby(.gemspec) and Cocoapods(.podspec) Jul 13, 2020
@rpotter12
rpotter12 force-pushed the gemspec-parser-new branch 2 times, most recently from ee33304 to 1d0acb7 Compare July 13, 2020 09:47
@rpotter12

Copy link
Copy Markdown
Contributor Author

@pombredanne Please ignore test files and checks for now. checks may be failing as gemfileparser2 has published version

@rpotter12
rpotter12 requested a review from pombredanne July 17, 2020 00:44
@rpotter12
rpotter12 force-pushed the gemspec-parser-new branch from 000197e to fd1abbe Compare August 4, 2020 12:29
Signed-off-by: rpotter12 <rohitpotter12@gmail.com>
Signed-off-by: rpotter12 <rohitpotter12@gmail.com>
Signed-off-by: rpotter12 <rohitpotter12@gmail.com>
Signed-off-by: rpotter12 <rohitpotter12@gmail.com>
Signed-off-by: rpotter12 <rohitpotter12@gmail.com>
Signed-off-by: rpotter12 <rohitpotter12@gmail.com>
Signed-off-by: rpotter12 <rohitpotter12@gmail.com>
Signed-off-by: rpotter12 <rohitpotter12@gmail.com>
Signed-off-by: rpotter12 <rohitpotter12@gmail.com>
Signed-off-by: rpotter12 <rohitpotter12@gmail.com>
Signed-off-by: rpotter12 <rohitpotter12@gmail.com>
Signed-off-by: rpotter12 <rohitpotter12@gmail.com>
Signed-off-by: rpotter12 <rohitpotter12@gmail.com>
Signed-off-by: rpotter12 <rohitpotter12@gmail.com>
Signed-off-by: rpotter12 <rohitpotter12@gmail.com>
@rpotter12
rpotter12 force-pushed the gemspec-parser-new branch from fd1abbe to c2e044d Compare August 4, 2020 12:37
Signed-off-by: rpotter12 <rohitpotter12@gmail.com>
Signed-off-by: rpotter12 <rohitpotter12@gmail.com>
Comment thread tests/packagedcode/test_rubygems.py Outdated
Signed-off-by: rpotter12 <rohitpotter12@gmail.com>
@rpotter12
rpotter12 requested a review from pombredanne August 26, 2020 15:14

@pombredanne pombredanne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good! Thank you ++ for your preseverance!

@pombredanne
pombredanne merged commit 31b9d58 into aboutcode-org:develop Sep 3, 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.

Parse Gemspec Files

3 participants