…string as the second argument sets the name of the metric. You can also customize the name using a Hash as the second argument. class User < ActiveRecord::Base extend Nunes::Instrumentable # gonna
# wrap save and instrument the timing of it instrument_method_time :save, name: 'crazy_town.save' end
In addition to name, you can also pass a payload that will get sent along with the generated event. class User < ActiveRecord::Base extend Nunes::Instrumentable # give nunes …
Interacting with core classes (like I wrote about the effect of the global lock, and how to protect your data with mutexes .and Hash) appears to be thread-safe with MRI because of the global lock. There are no such guarantees on the truly multi-threaded implementations like and .
…consideration given for cookbook dependencies. Previously they were based on the order given by ruby's Hash implementation, which differs based on version and vendor patching. This change ensures that your runs will continue to be reproducible.
We've merged knife-essentials into core knife. These new sub-commands are particularly useful for working with getting cookbooks between the server and your workstation and maintaining them. They are documented on the docs site …
For some reason this collection of classes is stored in a Hash, but it seems like the keys of the hash are the only aspect used, so I don't understand why it isn't an Array... ↩
...a.k.a.subclass, a.k.a. your actual tests. I'm not sure why the code is riddled with references to ‘suites', when the classes that it's actually running are called TestCases . Perhaps it's a compromise involving historic names of classes in test-unit …
Welcome to this week's roundup of Ruby Weekly.news, articles, videos, and more, cobbled together from my e-mail newsletter,
Highlights include: MRI 1.9.3-p327,3.2.9, 2.0, and the .
Carefully crafted strings can be used in a denial of service attack on apps that parse strings to create Hash objects by using the strings as keys. This new patch level release of 1.9.3 counters the issue.
Hash-flooding DoS attack reported for the Hash function ruby 1.9 series were using. This vulnerability is different from CVS-2011-4815 for ruby 1.8.7. All ruby 1.9 users are recommended to upgrade to ruby-1.9.3 patchlevel 327 to get this security fix.
Carefully crafted sequence of strings can cause a denial of service attack on the service that parses the sequence to create a Hash object by using the strings as keys. For instance, this vulnerability affects web …
…Ongoing ActiveRecord Optimizations: Freeze Columns Before Using Them As Hash Keys
An interesting (and ongoing) pull request on therepository where freezing column names before using them as hash keys seems to result in memory and performance improvements.
Sinatra-Like in Rails Controllers
Jose Valim demonstrates how simple it is to tinker with Rails controllers to support Sinatra-style routes.
Punch Reloaded: A Modern Web Publishing…
…CHEF-3276 ] - rubygem's provider incorrectly handles options passed as a Hash if gem_binary attribute is specified.
[ CHEF-3279 ] - undefined method describe_error...
[ CHEF-3280 ] - Permit chef to run solr searches with @ in terms
[ CHEF-3286 ] - requires_root rspec test conditional broken by shared_context
[ CHEF-3288 ] - Running knife with unicode input gives rise to error: "data not multiple …
…implementation used an extra true argument, but we changed to use a Hash instead, so the flush key can express better the behavior we're expecting.
<% content_for :example , "This will be rendered" %> <% content_for :example , flush: true do %> <h1>But this will override everything on the ':example' block.</h1> <% end %>
The gallery situation
I've stumbled upon this on a recent project, where we had a somewhat …
…the chart, in actuality the query took 1280 seconds to finish in the IO bound workload. In this test Hash join is not ideal because you have a highly selective where clause that reduces the size of the joining data set. And hash join performs even badly and takes 7x more time for in-memory workload in this test case. While for IO bound workload, hash join takes 53x less time to execute the query as compared to MySQL 5.5 but takes slightly more time as compared to BKA algorithm of MySQL 5.6. …