Tiny simple dropdown.
A Pen by Carl Calderon on CodePen.
Verifying I am +nicotaing on my passcard. https://onename.com/nicotaing |
Tiny simple dropdown.
A Pen by Carl Calderon on CodePen.
I think that the approach @tenderlove has suggested to avoid monkey-patching MiniTest
(and the way MiniTest
works) means that to use Mocha
with MiniTest
, you would either need to include the Mocha
integration module into every test case, or define your own test case class inheriting from MiniTest::Unit::TestCase
.
This works well for Rails
(i.e. ActiveSupport
), because it already defines a new test case class (ActiveSupport::TestCase
) which is a suitable place to include the Mocha
integration module.
If we were to go down this route, in non-Rails Ruby projects you'd need to do one of the following...
$ curl -L https://get.rvm.io
$ rvm pkg remove
$ rvm requirements run
#!/usr/bin/env ruby | |
a1 = [8, 2, 1, 5, 9, 10] | |
a2 = [7, 14, 2, 8, 1, 6, 3, 10] | |
# Sort arrays | |
a1.sort!; a2.sort! | |
i,j = 0,0 |
# Connection, Tubes, Jobs, Stats | |
@beaneater_connection = Beaneater::Connection.new(['localhost:11300']) | |
### Producer | |
@beaneater_tube = @beaneater_connection.tubes.find_or_create('tube2') | |
@beaneater_tube.put "data", :priority => 1000, :ttr => 10, :delay => 5 | |
# => true | |
### Worker |
ruby-1.9.2-p290 :293 > Sideshow.find('4f2b35718de4984840000395').sync_items.map(&:id) | |
[ | |
[ 0] BSON::ObjectId('4f2b35718de4984840000396'), | |
[ 1] BSON::ObjectId('4f2b35718de4984840000396'), | |
[ 2] BSON::ObjectId('4f2b35ad8de498484000039c'), | |
[ 3] BSON::ObjectId('4f2b35ad8de498484000039c'), | |
[ 4] BSON::ObjectId('4f2b35a28de498484000039b'), | |
[ 5] BSON::ObjectId('4f2b35a28de498484000039b'), | |
[ 6] BSON::ObjectId('4f2b35858de498484000039a'), | |
[ 7] BSON::ObjectId('4f2b35858de498484000039a'), |
module Hominid | |
class API | |
def class | |
Hominid::API | |
end | |
end | |
end |
Install Passenger in Lion | |
http://electronicholas.com/2011/08/passenger-prefpane-1-5-for-mac-os-x-lion-10-7/passenger-prefpane/ | |
Enable web server in "Server App" | |
gem install passenger | |
rvmsudo passenger-install-apache2-module | |
copy commands from output to /etc/apache2/other/passenger.conf | |
Here's an example with ree@integrity gemset |
["featured_sections.yml", "team.yml","press_articles.yml"].each do |yr| | |
text = File.read(Rails.root.join("config/#{yr}")) | |
$redis.set("yaml_record:" + yr, text) | |
puts "#{yr}: yes!" if text == $redis.get("yaml_record:" + yr) | |
end | |
["partner_shows.yml", "faq.yml"].each do |sf| | |
text = File.read(Rails.root.join("config/#{sf}")) | |
$redis.set("simple_yaml:" + sf, text) | |
puts "#{sf}: yes!" if text == $redis.get("simple_yaml:" + sf) |