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

support uu encoding #796

Merged
merged 1 commit into from
Oct 31, 2014
Merged

support uu encoding #796

merged 1 commit into from
Oct 31, 2014

Conversation

grosser
Copy link
Contributor

@grosser grosser commented Sep 18, 2014

@grosser
Copy link
Contributor Author

grosser commented Sep 22, 2014

@jeremy can I haz merge ?

NAME = "x-uuencode"

def self.decode(str)
str.gsub(/^begin \d+ [^\n]*\n/, '').unpack('u').join
Copy link
Collaborator

Choose a reason for hiding this comment

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

@jeremy @mikel Are you ok with having this implemented here as above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah .. don't hold your breath for a response ;)

Copy link
Collaborator

Choose a reason for hiding this comment

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

You'll only need to strip a single leading line:

str.sub(/\Abegin \d+ [^\n]*\n/, '').unpack('u').first

@bf4
Copy link
Collaborator

bf4 commented Oct 22, 2014

Looks fine to me. Have you taken a look at #812 by any chance?

end

def self.encode(str)
[str].pack("u")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing the header line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's optional ...

@grosser
Copy link
Contributor Author

grosser commented Oct 24, 2014

good to merge ?

@grosser grosser force-pushed the grosser/uu branch 3 times, most recently from 4b93783 to b897fa8 Compare October 24, 2014 02:07
NAME = "x-uuencode"

def self.decode(str)
str.sub(/\Abegin \d+ [^\n]*\n/, '').unpack('u').first
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just curious if there is a reference you looked at to generate this expression.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

was part of our legacy email structure, no idea where it came from, but
works with the attachments we have seen so far, which are prefixed with
"begin 644 Invoice.pdf" etc

On Thu, Oct 23, 2014 at 7:09 PM, Benjamin Fleischer <
[email protected]> wrote:

In lib/mail/encodings/unix_to_unix.rb:

@@ -0,0 +1,17 @@
+module Mail

  • module Encodings
  • module UnixToUnix
  •  NAME = "x-uuencode"
    
  •  def self.decode(str)
    
  •    str.sub(/\Abegin \d+ [^\n]*\n/, '').unpack('u').first
    

Just curious if there is a reference you looked at to generate this
expression.


Reply to this email directly or view it on GitHub
https://github.com/mikel/mail/pull/796/files#r19320162.

@grosser
Copy link
Contributor Author

grosser commented Oct 27, 2014

@jeremy good to go ?

@grosser
Copy link
Contributor Author

grosser commented Oct 31, 2014

is this good to go now ?

jeremy added a commit that referenced this pull request Oct 31, 2014
@jeremy jeremy merged commit 17457e4 into mikel:master Oct 31, 2014
@jeremy
Copy link
Collaborator

jeremy commented Oct 31, 2014

Thank you @grosser ❤️

@grosser
Copy link
Contributor Author

grosser commented Oct 31, 2014

thanks for merging, 1 less hack in our project :)

@mariozaizar mariozaizar deleted the grosser/uu branch July 26, 2018 22:33
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.

x-uuencode support
3 participants