Page 1 of 15 | Next »
[21:48:15] choke: Hey all, having a small routing problem with Rails5. Hoping I can get some insight. I've outlined everything at https://gist.github.com/jblac/14e1493aae25cbb1800356170677723b but if there are any other questions, please do ask.
[04:16:53] choke: documentation for my user_type_a routes, user_type_b routes, and one that's all inclusive )... I'm either an idiot and all these gems are great, i'm trying to do something I shouldn't, or documenting is seriously the worst job ever... Not sure how to get this done quickly and easily -- any insight?
[04:16:53] choke: Hey all i'm trying to document my api and i'm having issues... major issues... Been dealing with this for a week with nothing to show for it... started off with swagger-docs gem and of course it's out of date... moved to swagger-blocks gem, has really bad documentation... moved to rswag gem, no-go... checked out apipie - couldn't figure out how to have different versions AND different subsets ( i need a separate set of
[04:21:30] choke: hey all, i have a quick question regarding creating documentation... I have a full-featured API of a monolith web application and I'm working on docs currently. Are there any tools to generate different types of documentation?
[04:21:38] choke: What I mean is I have different user-types ( companies, internal, vendors, etc ) so I want to provide a docs link that provides information only on the items available for a specific user type -- not sure if its possible or if i should even worry about it.
[04:30:42] choke: I'll look at it -- I was generating swagger-blocks which is good ( kinda ) but as far as I can tell doesn't have the ability to be selective about what gets generated it's an all-or-nothing sort of thing.
[04:31:13] choke: Never had to do docs before ( at least official docs ) all api's i've done have been private api's for use by a web/mobile system.
[06:37:14] choke: ^ Agreed, though if you wanted to do it in ruby -- you could maybe use the gem list functionality somehow ie: gem list -i "^gem_name$"
[06:37:43] choke: I know that with mysql2 without certain libraries installed, it won't let you install the gem -- so it'd be one way to tell if pg is installed if the gem acts the same way.
[06:39:16] choke: I'm currently having all sorts of problems with it ( not really, it's mostly problems trying to bring a horribly designed php application that's in production to rails, without being able to modify the database up-front to make it rails friendly )
[06:41:10] choke: 'cause, the php application will remain in place -- and the rails app is a json api, that i'll eventually migrate the php side to utilize ( I'm the only ruby dev on the team, everyone else is only php so I can't just bring the entire app to ruby )
[06:46:59] choke: One guy is learning ruby to help me out ( because my task list is about 3 years worth of work )... But the others - not so much. I pick my battle on this one...
[06:47:28] choke: Once the api is done, we're in a position that we can change the look and even the language multiple times a year and the functionality will always be the same.
[06:48:54] choke: Of course, so far - in 3 months of working on this myself, i've got over 3000 tests ( a bunch of pundit spec, and a bunch of request and unit spec )
[16:59:22] choke: https://gist.github.com/jblac/6e588112921c53b79b5684597edd190f dealing with moving a legacy app to rails, and having a small issue with pundit. When I run rspec, it's telling me: unable to find scope `CompanyLocationPolicy::Scope` for `CompanyLocation` not sure what's going on here
[17:04:10] choke: dminuoso https://gist.github.com/jblac/6e588112921c53b79b5684597edd190f just updated the gist with the backtrace
[17:22:39] choke: Figured it out -- my policies are namespaced ( api::v1::policynamehere ) and pundit doesn't allow for that. if i move them outside of name spacing it works fine. Though seems odd not to allow NS, 'cause authorization might be different from one version to the next... I'll have to re-think how I'm building my policies..
[17:30:54] choke: dminuoso that works, but what happens in the future when I have 2 versions of the API and they both require different permissions ( likely to happen - our permissions are changing a lot right now ). I'm guessing i'd almost have to namespace my models as well?
[17:09:55] choke: Hey all, working on bringing a php legacy application to rails. having an issue with my factories: https://gist.github.com/jblac/128df32bab746f78376f05ec5428f1e4. I'm sure i'm doing something dumb but no clue what to do.
[17:44:04] choke: With devise, anyone know how to extend or overwrite DatabaseAuthenticatable ( https://github.com/plataformatec/devise/blob/master/lib/devise/models/database_authenticatable.rb ) to change the key for the password ( requirement for legacy app )
[18:22:56] choke: dflomo that's what I use for all of my rails apps... It does a great job from unit testing, functional testing - plus being able to test my routing, and my views is a great thing... also does awesome for JSON api endpoint testing
[18:25:59] choke: Yeah, I've never had a problem with rspec. And little tip: Be sure to use FactoryBot for your factories ( used to be FactoryGirl )... and IF you're doing a JSON Api I use https://github.com/ruby-json-schema/json-schema to define my valid result structure
[19:03:30] choke: dflomo Some of them can be pretty gnarly to read, but you get used to it. The stack trace is where the magic is at... then of course, you can use byebug to do debugging as well
[20:01:03] choke: I have some rules in one of my models, https://gist.github.com/jblac/5555017313131bf5ea7dcb39e95bfc34 just wondering if there's an alternate way I should be defining these since the sub-options are identical
[23:58:40] choke: I'm working on a rails API for a legacy app, adding in devise right now... anyone know if it's possible to change the keys for the encrypted_password so I don't have to change the schema on the database and alter all the references in the legacy app?
[17:27:12] choke: https://gist.github.com/jblac/f8c3ce3499d04eb4bad39a5753ee2ca4 having a small issue. Working on an API for a legacy database, so I can't modify the schema too much. Is there a way I can do a has_many relation on the company, to read from the tertiary table?
[19:15:28] choke: mustmodify depends on what it's for and the capabilities really... https://aws.amazon.com/ec2/pricing/on-demand/. The bulk of my servers are within the "compute" class, or "memory" class with a smattering of some in the storage class ( for my file servers )
[19:19:05] choke: Should definitely do that -- I personally separate everything... I have a small cluster of nginx servers to load balance between all of my rails servers which are all on compute... which reads my redis server and my db server ( which is really an RDS instance ) with failover, backups and redundancy in place. Try to eliminate a single point of failure
[19:22:43] choke: hopefully you've got some monitoring in place, like nagios or datadog? Really helps to understand your traffic patterns and server usage
[19:27:52] choke: ivanskie - add a unique id to the button the same way you added the success class to it... then use jquery .on and .ajax methods to perform the request.
[19:29:15] choke: mustmodify you'll get better performance by having your DB and everything separated... it could just be as simple as your read/write io being maxed out
[19:35:35] choke: mustmodify Easiest way is to create a "test environment" and build it out.... But you should really have some monitoring in place -- it's pretty much mandatory in my opinion. On my servers, I use datadog which allows me to setup all sorts of awesome monitoring tracks and be notified before anything goes down.
[21:07:24] choke: Hey all -- anyone know if theres any alternative to Kaminari? Trying to add pagination to my R5 API results in horrible query-string urls that I can't get rid of