Comments (4)
Please check out the latest v1.0.1
from awesome_print.
Michael,
It works a little too well! Unfortunately, it dives down a little deep into LDAP schema definitions and other things. I am not sure if that is a function of the way an ActiveLdap object is defined or not. Setting :limit restricts the amount of output, but it appears that ap is trying to parse all of the schema information before outputting anything, so it takes a really long time to get values back. The limit also ends up needing to be rather high to get any of the actual "values" out.
Here's a sample object:
#<LdapUser objectClass:<country, person, organizationalPerson, inetOrgPerson, zarafa-user, top>, must:<c, cn, objectClass, sn>, may:<audio, businessCategory, carLicense, departmentNumber, description, destinationIndicator, displayName, employeeNumber, employeeType, facsimileTelephoneNumber, givenName, homePhone, homePostalAddress, initials, internationaliSDNNumber, jpegPhoto, l, labeledUri, mail, manager, mobile, o, ou, pager, photo, physicalDeliveryOfficeName, postOfficeBox, postalAddress, postalCode, preferredDeliveryMethod, preferredLanguage, registeredAddress, roomNumber, searchGuide, secretary, seeAlso, st, street, telephoneNumber, teletexTerminalIdentifier, telexNumber, title, uid, userCertificate, userPKCS12, userPassword, userSMIMECertificate, x121Address, x500UniqueIdentifier, zarafaAccount, zarafaAdmin, zarafaAliases, zarafaDisabledFeatures, zarafaEnabledFeatures, zarafaHidden, zarafaQuotaHard, zarafaQuotaOverride, zarafaQuotaSoft, zarafaQuotaWarn, zarafaResourceCapacity, zarafaResourceType, zarafaSendAsPrivilege, zarafaSharedStoreOnly, zarafaUserServer>, audio: [], businessCategory: [], c: ["US"], carLicense: [], cn: ["Super Duper"], commonName: ["Super Duper"], countryName: ["US"], departmentNumber: [], description: [], destinationIndicator: [], displayName: [], employeeNumber: [], employeeType: [], facsimileTelephoneNumber: [], fax: [], givenName: ["Super"], homePhone: [], homePostalAddress: [], homeTelephoneNumber: [], initials: [], internationaliSDNNumber: [], jpegPhoto: [], l: ["San Jose"], labeledUri: [], labeledurl: [], locality: ["San Jose"], localityname: ["San Jose"], mail: ["kyletest"], manager: [], mobile: [], mobileTelephoneNumber: [], o: [], objectClass: ["country", "person", "organizationalPerson", "inetOrgPerson", "zarafa-user", "top"], organizationalUnitName: [], organizationname: [], ou: [], pager: [], pagerTelephoneNumber: [], photo: [], physicalDeliveryOfficeName: [], postOfficeBox: [], postalAddress: ["123 Main St"], postalCode: ["95131"], preferredDeliveryMethod: [], preferredLanguage: [], registeredAddress: [], rfc822mailbox: ["[email protected]"], roomNumber: [], searchGuide: [], secretary: [], seeAlso: [], sn: ["Duper"], st: ["CA"], stateOrProvinceName: ["CA"], street: [], streetaddress: [], surName: ["Duper"], telephoneNumber: [], teletexTerminalIdentifier: [], telexNumber: [], title: [], uid: ["kyletest"], userCertificate: [], userPKCS12: [], userPassword: ["{SSHA}"], userSMIMECertificate: [], userid: ["kyletest"], x121Address: [], x500UniqueIdentifier: [], zarafaAccount: [], zarafaAdmin: [], zarafaAliases: [], zarafaDisabledFeatures: ["pop3"], zarafaEnabledFeatures: [], zarafaHidden: [], zarafaQuotaHard: [1048576000], zarafaQuotaOverride: [1], zarafaQuotaSoft: [996147200], zarafaQuotaWarn: [943718400], zarafaResourceCapacity: [], zarafaResourceType: [], zarafaSendAsPrivilege: [], zarafaSharedStoreOnly: [], zarafaUserServer: []>
Sample output is here, because it's 53,652 lines:
http://www.erikjacobs.com/stuff/awesome_print.rb
from awesome_print.
Hi Erik,
Well, your example proves that ap works as designed. ;-) What is it what you would like it to display?
Michael
from awesome_print.
Michael,
I'm not really sure I guess. The difficulty is that AP is parsing down into the definitions of many of the objects contained within the object... if that makes any sense.
If there was an option in AP to only print what is normally shown, but justified and with colors, that might be nice. In other words, if there was a flag like "donotdescend", or something, that would cause AP to print only what is shown above.
Does that make any sense? I'm not sure if it's an edge case or not.
from awesome_print.
Related Issues (20)
- Forked to AmazingPrint HOT 6
- Proc.new is deprecated; use `&block` instead HOT 7
- new lines HOT 1
- Proc.new is deprecated HOT 5
- irb: ArgumentError (wrong number of arguments (given 1, expected 0)) HOT 2
- Output of non-empty Hash object fails when using Ruby 3.0 HOT 1
- 1.9 release HOT 12
- Array#uniq is not working on pry with `AwesomePrint.pry!` HOT 5
- Ruby 2.7.0 compatibility HOT 2
- problem with rails and ruby 3.0.0 HOT 2
- ArgumentError (wrong number of arguments (given 1, expected 0)) HOT 4
- undefined method `marshal_dump` for `ActiveModel::Errors` HOT 6
- Getting FrozenError (can't modify frozen String: "false") after upgrading to Ruby 2.7.3 using awesome_print (1.9.2) HOT 5
- Plain Ruby Objects are not formatted properly HOT 2
- Hi, can I put `.aprc` under ~/.config/awesome_print/aprc?
- `.pry!` does nothing in rails console
- Don't override/monkey patch `String` class HOT 3
- Provide a way of specifying custom formatting on user-created classes/objects HOT 2
- object_id option not operating as expected
- Maintained fork: amazing-print/amazing_print
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from awesome_print.