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

Added class to handle Pebble bundles. #3

Merged
merged 5 commits into from
Sep 28, 2013
Merged

Conversation

phistep
Copy link
Contributor

@phistep phistep commented Sep 28, 2013

Created a class to handle the information in Pebble bundles. Might be handy when trying to implement app/firmware upload. This implements the file structure as reported here. The actual implementation is similar to the Python libpebble.

I also added an example file to show case the API.

class AppInfo < BinData::Record
endian :big

string :header, :length => 8, :asserted_value => "PBLAPP\0\0"
Copy link
Owner

Choose a reason for hiding this comment

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

Use Ruby 1.9 Hash syntax.

@DouweM
Copy link
Owner

DouweM commented Sep 28, 2013

The code itself looks fine, I just have some style complaints. Nice work otherwise!

@DouweM
Copy link
Owner

DouweM commented Sep 28, 2013

Also, please make mention of this in the readme, in the same place I mention Pebble::Protocol for example.

@phistep
Copy link
Contributor Author

phistep commented Sep 28, 2013

I have fixed everything but lazy initialization (see line comment above). Shall I also convert tab indentation to two spaces?

@DouweM
Copy link
Owner

DouweM commented Sep 28, 2013

I see you've already fixed everything—awesome. I'll pull it in later tonight.

DouweM added a commit that referenced this pull request Sep 28, 2013
Added class to handle Pebble bundles.
@DouweM DouweM merged commit fc252ce into DouweM:master Sep 28, 2013
@phistep
Copy link
Contributor Author

phistep commented Sep 28, 2013

Yay! This was probably my first contribution to a actually useful tool ever! (if you don't count OS X homebrew)

@DouweM
Copy link
Owner

DouweM commented Sep 28, 2013

Keep up the good work! Your next two contributions could be fixes for your own issues #1 and #2 ;)

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.

2 participants