Stream

Join this community to post or comment

Nicholas Keene

Education  - 
 
Is anyone using BrowserMob Proxy with a multiple file test suite to blacklist third party cross domain scripts?

It starts off working fine but somewhere in the middle the third party sites that I have listed begin showing up and timing out again. I've checked the bmp log, and it doesn't look like the Proxy is closing. 
1
Add a comment...
 
how to find old ActiveJob or something like that? I tried to understand how sidekiq works, but old faults from old applications make me problems.

1
Add a comment...
 
I don't understand it. Can you please explain to me?

I am talking about this: https://ruby-doc.org/stdlib-2.4.0/libdoc/matrix/rdoc/Matrix.html#method-i-2B-40

What is the instance method with name "+@" ? The implementation has only one statement. It returns "self". But, how do I call this method on a Matrix instance? What is it used for?

Thanks in advance.
P.
Class : Matrix - Ruby 2.4.0
1
Christophe Grandsire-Koevoets's profile photo
 
It's the unary plus operator:

+Matrix[[1,5], [4,2]] == Matrix[[1,5], [4,2]] => true

It doesn't do anything, and is usually there simply for symmetry with the unary minus operator (see "-@"). You call it by putting a "+" in front of a matrix, just like you would do with a number ("+1" and "1" are one and the same thing in Ruby, and in maths :) ).
Add a comment...
 
[Screencast] Client Side Encryption

Add an extra level of security to your application with client side encryption. Even over an SSL connection, there are attacks which could expose your users' sensitive information. Using JSEncrypt, learn how to encrypt on the client side and decrypt on the server side.
1
Add a comment...
Presentation of the fundamental Ruby object artefacts - A Ruby Object Model Cheat Sheet
3
Add a comment...

Parth Modi

Discussion  - 
 
Guide for #Documenting Your #Rails #API with #Swagger

Checkout my latest article Do the Right Thing and Document Your Rails API with Swagger to know about documenting Rails API with Swagger published on +SitePoint.

Please share your thoughts and criticism on using Swagger for documentation, also share how you document your rails API?

Thanks, and visit http://parthtalks.weebly.com/ where I share my thoughts on #rails.
Parth Modi generates executable docs for his Rails API using swagger-docs and swagger-ui.
1
Add a comment...
1
Add a comment...
 
Released Coverband 1.5 with some significant feature improvements. Most notably it now supports production usage density. Find your heaviest hit methods and lines as well as dead code that is never used in production. 
2
Arthur Shagall's profile photo
 
Can't believe this is the first I hear of this. Looks incredibly useful.
Add a comment...

jesus castello

Education  - 
 
What if you could find out what a method is doing? Using this built-in Ruby class you will be able to take a look at what's going on...
8
1
Dan Mayer's profile photo
 
good intro to tracepoint... I saw this as I was sharing on some places about Coverband, which measure production code usage. github.com - coverband if you look under the hood it is actually using tracepoint to capture that data https://github.com/danmayer/coverband/blob/master/lib/coverband/base.rb
Add a comment...
 
I want to update Ruby to 2.4 but rvm has only 2.4 rc1..

tried to reload, update rvm..
1
Christof's profile photoPeter Blake (Ch4mp)'s profile photo
4 comments
 
ye, you have to type 2.4.0
Add a comment...

About this community

The Ruby community! No recruitment please; you will be moderated.
 
Passenger 5.1 has been released! It contains various improvements for minimizing and preventing down time, introduces more secure defaults and defense in depth, has become faster and uses resources more efficiently, improves developer productivity and updates various ecosystem integrations to stay ahead of the curve.
It’s been a little over a year-and-a-half since we released the first version of Passenger 5, the application server for Ruby, Python, Node.js and Meteor. It brought a large amount of major improvements. Since then we have introduced many more major improvements. To celebrate this fact, we bumped
2
Add a comment...
 
Does it make sense to use to use interfaces in Ruby?

http://shiroyasha.io/interfaces-in-ruby.html
Ruby is not the fastest language, nor is it the simplest language, but damn it, it is definitely one of the most fun languages out there. For someone...
1
Ross Matoi's profile photo
 
Interesting take on unit testing. Though I think the title is a little click-baity (the article isn't really about interfaces in Ruby at all), there are some good points about using rspec (or any unit testing framework) as a communication tool. 
Add a comment...
 
I use net-ping gem to check if a server is online / offline on my website but it takes like 3-4 seconds to load the page.

is there any way to speed it up?

def xonotic
@http_uri = '38931293182'
@check_host = Net::Ping::HTTP.new(@http_uri)
end

<% if @check_host.ping? %>
<span class="w3-text-white">server is&nbsp;
</span>
<span class="w3-tag w3-margin-bottom w3-green">online</span>
<% else %>
<span class="w3-text-white">server is&nbsp;
</span>
<span class="w3-tag w3-margin-bottom w3-red">offline</span>
<% end %>
1
Robert Klemme's profile photoJuan Salvador Pérez García's profile photo
5 comments
 
Regular ajax implies a polling mechanism. That kind of solutions scale bad as the number of clients increase. Additionally there is a delay between when the ping response is received and it's polled by the clients. In general terms ws scale better and give the user real time impression but of course they're more complex. Decide one or the other depends on the estimated load
Add a comment...
 
DLWT has a Ruby development project for 8 hours a week long term available - are you a senior ruby developer - want a challenge ? Contact me.
1
Add a comment...
 
Looking for an experienced Ruby programmer for an awesome project for 8 hours a week - long term. Contact me if you are interested.
1
Ryan Minihan's profile photo
 
I'd like to talk to you about this Dave. rpminihan@gmail.com
Add a comment...
 
Episode 62 - Security and Static Code Analyzers
Whether your preparing for a third-party security scan or already doing peer code reviews, you should always run brakeman scanner on your application to identify potential security vulnerabilities.
1
Add a comment...
 
Advice on mixing in Enumerable

I have a class called LinkedList and which implements a simple linked list data structure. I would like to include the Enumerable module in order to get some methods for free. The Enumerable says that I have to implement the `#each` method. Here is my implementation. It seems to be working. My question is whether this is a good practice/approach or whether I should be using another implementation pattern for the `#each` implementation.

Note: @first is an instance variable of the LinkedList that points to the first item in the list. Each item in the list exposes a `#next` method that points to the next item in the list.

def each
return enum_for unless block_given?

item = @first

while item
yield item
item = item.next
end
end

Thanks in advance.
1
mathew murphy's profile photo
 
In general it depends on how expensive the #next method is. For a linked list, #next is cheap, so a naive approach to implementing #each is fine.
Add a comment...
 

Build your Rails portfolio with 8 super cool web applications in Ruby on Rails. Use it to begin seeking jobs as proof of what you can do, or feel confident to launch projects.
https://deal.techcus.com/p/HJCa1TZZg
1
Add a comment...
 
Episode #61 - Periodic Tasks with sidekiq-cron

Using a third-party add-on, sidekiq-cron, we can create periodic tasks to extend the functionality of sidekiq.

Using a third-party add-on, sidekiq-cron, we can create periodic tasks to extend the functionality of sidekiq.
1
Add a comment...

jesus castello

Education  - 
 
You will like this! It's a list of the best Ruby articles published in 2016 :)

(Btw one of my posts made it into the list!)
We’ve delved into all the data from Ruby Weekly and found the most popular links of the year.
7
1
Add a comment...