24 April 2014

The Ruby Reflector

Topic

ENV

  Source Favicon
By Michal Papis of niczsoft almost 2 years ago.
Email

…uninstaller rubygems-bundler-uninstaller it will restore binstubs for gems to the safe #!/ usr/bin/env ruby and remove wrapper.

Installation / Testing gem uninstall -ax rubygems-bundler gem install rubygems-bundler --pre

The uninstall step is needed to prevent collisions of the rubygems plugin available in older versions.

What's the future of this gem?

While discussing it with Yehuda we have agreed to merge it to bundler, as it's the most user friendly solution that could …

niczsoft.com Read
  Source Favicon
Email

ENV['PATH'] = "#{root.join('bin').to_s}#{File:: PATH SEPARATOR}#{ ENV['PATH']}"

```

The PATH environment variable is used by Aruba to find commands we want to run. We could specify a full path in each test, but by setting PATH above we can just call the tool by its name, completely pathless, like we would be doing on a production system.

How do you go about writing tests?

The workflow for writing stepless Aruba tests that still use the …

holmwood.id.au Read
  Source Favicon
By Shannon -jj Behrens of JJinuxLand 2 years ago.
Email

…contain the dir containing sitecustomize.py. People should use "#!/ usr/bin/env python" so that the caller can control which Python it uses.

He monkeypatched __import__ so that code gets executed whenever someone tries to import something! Wow! I've never seen that trick before!

sitecustomize.py gets invoked really early. It gets imported so early, it can be an awkward environment to try to work in. For instance, sys.argv doesn't even exist yet.

He showed a …

jjinux.blogspot.com Read
  Source Favicon
Email

This is just an example bin/setup file. Each project will be different. Some might not use Pow. Some might test if Redis or MongoDB is installed and run, install, or print a message if not. Some might want to pull some ENV variables into .env from Heroku.

Regardless of the bin/setup file's contents, a developer should be able to clone the project and run a single, consistent, reliable command to start contributing.

robots.thoughtbot.com Read
  Source Favicon
By Stewart Smith of MySQL Performance Blog over 2 years ago.
Email

…/usr/bin/perl was where the Perl binary was located. With this bug fix, it instead uses / usr/bin/env perl which fixes running of innobackupex on systems where Perl is not /usr/bin/perl . Bug Fixed: # 892393 ( Stewart Smith )

innobackupex reaches the server wait_timeout. This bug meant that for backups that would take a long time, innobackupex would hit the server wait_timeout and be disconnected, leading to a failed backup. With this bug fixed, instead of setting a large …

mysqlperformanceblog.com Read
  Source Favicon
Email

…Mail.register_interceptor(OverrideRecipientInterceptor.new) end

Use the ENV[' EMAIL RECIPIENTS'] environment variable to update the list of email addresses that should receive staging emails. For example: heroku config:add EMAIL_RECIPIENTS="product+staging@example.com" --remote staging

Gmail filter

Depending on the app, this may generate thousands of emails a day. Avoid spamming yourself by setting up a Gmail filter for emails sent to product+staging@example.com .

robots.thoughtbot.com Read
  Source Favicon
By Dan DeLeo of Chef Blog over 1 year ago.
Email

…CHEF-3597 ] - knife.rb cannot handle frozen strings in chef_server_url (like from ENV)

[ CHEF-3619 ] - Chef still has obsolete 'rake/rdoctask' require

[ CHEF-3622 ] - Chef fails curl download with -bootstrap-proxy option

[ CHEF-3632 ] - All providers have whyrun enabled by default due to RemoteDirectory

[ CHEF-3650 ] - whyrun output says resource updated

[ CHEF-3660 ] - …

opscode.com Read
  Source Favicon
By Allen Wei of RubyLearning Blog over 3 years ago.
Email

Put line #!/ usr/bin/env ruby into the first line of your command-line file which will tell the shell to execute your file using Ruby ( #!/ usr/bin/env ruby is similar to simply calling ruby from the command line, so the same rules apply. Basically, the individual entries in the $PATH environment variable are checked in order, and the ruby that is found first is used.).

Make sure your file is executable, run chmod u+x FILE PATH .

Print help text if the user uses it in the wrong …

rubylearning.com Read
  Source Favicon
By Bryan McLellan of Chef Blog over 1 year ago.
Email

…CHEF-3597 ] - knife.rb cannot handle frozen strings in chef_server_url (like from ENV)

[ CHEF-3632 ] - All providers have whyrun enabled by default due to RemoteDirectory

[ CHEF-3672 ] - ubuntu12.04-gems bootstrap needs to be updated for 12.10

[ CHEF-3721 ] - Moneta 0.7.0 breaks remote_file/remote_directory

[ CHEF-3660 ] - Deploy Revision Provider Fails on Solaris 9

[ CHEF-3619 ] - Chef

opscode.com Read
  Source Favicon
By Jason King of flow 4 years ago.
Email

…generator friends, do one of two things. Either they are just hardcoded to use #!/ usr/bin/env ruby or they set that line to whatever version of Ruby you happen to be using when you install/generate/make them the first time, which will be either what I've just written or #!/ usr/bin/env ruby1.9 or (like rails) an actual hard coded path to your MacPorts ruby executable.

Ok, not really a big problem there, until you want to test your application, generator, plugin, gem, whatever …

flow.handle.it Read