CocoaPods / cocoapods-acknowledgements

CocoaPods plugin that generates a plist which includes the installation metadata
MIT License
111 stars 17 forks source link

License text is blank if file is not given #3

Closed orta closed 8 years ago

orta commented 10 years ago

We should see if nothing is there, and if so pop in the contents of LICENSE

orta commented 10 years ago

The default action of pod lib create is to do this.

marcelofabri commented 9 years ago

It seems that file_accessor is nil for development pods, but not for regular ones.

From what I've seen, the file_accessor already checks for LICENSE (http://www.rubydoc.info/gems/cocoapods/Pod/Sandbox/FileAccessor#license-instance_method).

marcelofabri commented 9 years ago

I've checked that sandbox.pod_dir(spec.name) is returning an invalid path for a local Pod. Is it a bug on CocoaPods itself?

The documentation says:

Returns the path where the Pod with the given name is stored, taking into account whether the Pod is locally sourced.

segiddins commented 9 years ago

@marcelofabri is it the same Sandbox instance as the CocoaPods installer is using? Because the list of development pods is stored in an ivar.

marcelofabri commented 9 years ago

Nop, it's created here: https://github.com/CocoaPods/cocoapods-acknowledgements/blob/master/lib/cocoapods_acknowledgements.rb#L50.

However, I haven't found an obvious way to get the Sandbox from a PostInstallHooksContext.

segiddins commented 9 years ago

Yeah.... maybe the context should pass the Sandbox instead of just the path?

marcelofabri commented 9 years ago

I think it's the better way to solve this, but I don't have the full overview of what it means for plugins in general. (Does this change enable plugins to do something they shouldn't? If it does, is it a problem?)

marcelofabri commented 8 years ago

@segiddins ping on this? This needs a change in CocoaPods itself, right?

segiddins commented 8 years ago

Yeah.

marcelofabri commented 8 years ago

So, the only change need is storing sandbox here: https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/installer/post_install_hooks_context.rb#L46? If so, I'll happily make a PR.

segiddins commented 8 years ago

Correct.

marcelofabri commented 8 years ago

@segiddins This still needs work to use the provided sandbox.

segiddins commented 8 years ago

@marcelofabri it closed automatically

marcelofabri commented 8 years ago

:speak_no_evil: