Giter Club home page Giter Club logo

iostreams's People

Contributors

alice-qiu avatar andresfcamacho avatar lambcr avatar marc avatar reidmorrison avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

iostreams's Issues

Importing PGP generated key

Environment

ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin18]
iostreams (1.2.1)
MacOS
gpg (GnuPG) 2.2.20
libgcrypt 1.8.5

Expected Behavior

Ultimately I would like to import a PGP public key from a 3rd party and I'm having no luck. When I try to just run:

2.6.5 :041 > key=[Key generated with  PGP Command Line v10.4.2 (Build 37) (Linux)...]
2.6.5 :041 > IOStreams::Pgp.key_info(key: key)

with debug logging, I get:

IOStreams::Pgp.key_info: gpg
gpg: WARNING: no command supplied.  Trying to guess what you mean ...
pub   rsa2048 2019-02-10 [SC]
      6256321AE171AB2DA3742D05EEE1FE2084DC5BF2
uid           mftssvc
sub   rsa2048 2019-02-10 [E]
 => []

Actual Behavior

Should return key info hash

From what I've read I think its possible for gpg to use keys generated with pgp. I'm going to fork and see if I can get it working, but any insight you have would be super useful. I've been able to get things working when I generate keys with gpg but yeah my partner is using PGP Command Line.

documentation for Pgp module needs to be updated

Environment

Provide at least:

  • Gem version 1.10.3

Expected Behavior

image
List keys function documentation outdated
private and trust should be added to the example list

Actual Behavior

[34] pry(main)> IOStreams::Pgp.list_keys.first.keys
=> [:private, :key_length, :key_type, :date, :key_id, :email, :name, :trust]

Pull Request

  • Consider submitting a Pull Request with a fix for the issue.
  • Or, even a Pull request that only includes a test that reproduces the problem.

CSV processing not compatible with Ruby 2.6

Ruby 2.6 is not currently supported when processing CSV files. All other stream types
work. Ruby 2.6 completely changed the CSV library, but still failed to make an efficient API
available for processing a single line of CSV data.

Looking for a CSV parsing library that supports:

  • Highly performant single line CSV parsing into an array of strings.
  • Human readable CSV files that are not necessarily conformant to the CSV specification but are still
    valid according to the spirit of CSV.
    For example:
    • "Invalid spaces after", "the comma.", "Yet, still valid for processing purposes."
  • Works on Ruby v2.2 through v2.6.

import_and_trust_key errs with gpg 1.4

Environment

  • Ruby 2.4.4p296
  • IOStreams 1.6.1
  • Rails 5.2.3
  • GPG 1.4.16

Expected Behavior

  • A PGP key generated by IOStreams can be passed as an import_and_trust_key option

Actual Behavior

Error is thrown:

IOStreams::Pgp::Failure:
       GPG Failed trusting key: gpg: error in `[stdin]': invalid fingerprint

I suspect that this happens with any key on GPG 1.4.16. The same key, when passed in as import_and_trust_key on GPG 2.2.4, works without incident.

Pull Request

Coming soon!

Add support for embedded new lines

When reading a CSV file it can contain embedded newlines.

Example:

data = <<LINES
"name", "description", "zip"
"Jack", "Firstname is Jack", 234567
"John", "Firstname\nis John", 234568
LINES
io = StringIO.new(data)
IOStreams.each_line(io) do |line|
  p line
end

Results in 4 lines

"\"name\", \"description\", \"zip\""
"\"Jack\", \"Firstname is Jack\", 234567"
"\"John\", \"Firstname"
"is John\", 234568"

When reading a CSV file it needs an option that allows embedded newlines to remain on the line.

Expected output once the new option has been added, should result in 3 lines:

"\"name\", \"description\", \"zip\""
"\"Jack\", \"Firstname is Jack\", 234567"
"\"John\", \"Firstname"\n"is John\", 234568"

Possible candidate for option could be embedded_newline with a variety of arguments:

  • Proc/lambda that returns true when the returned newline embedded, and false when it is not.
  • :quoted (for CSV files above)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.