Bowline – A Ruby GUI framework | Lead Thinking
In a nutshell, Bowline lets you build cross platform desktop applications with Ruby, HTML and JavaScript. The idea is to make building desktop apps as simple (and fun) as building Rails websites.
Related cards:
httpclient: A Ruby HTTP client for serious business
While debugging an intricate issue with failed HTTP requests I have come to appreciate the more advanced features of the httpclient Rubygem.
The gem is much more than a lightweight wrapper around Ruby's `net/...
Limelight
Limelight is a rich client GUI framework unlike any other. With a unique angle on GUI development, Limelight harnesses the power to develop a wide range of applications from business tools to games.
Terminus: a client-side Capybara driver
Terminus is a Capybara driver where most of the driver functions are implemented in client-side JavaScript. It lets you script any browser on any machine using the Capybara API, without any browser plugins or extensions.
How to make changes to a Ruby gem (as a Rails developer)
At makandra, we've built a few gems over the years. Some of these are quite popular: spreewald (> 1M downloads), active_type (> 1M downloads), and geordi (> 200k downloads)
Developing a Ruby gem is different from developing Rails applications, w...
Ruby: How to connect to a host with expired SSL certificate
If you need to make an HTTPS connection to a host which uses an expired certificate, do not disable certificate verifications entirely. Doing that enables e.g. man in the middle attacks.
If you accept only a single expired and known certifica...
Interacting with a Microsoft Exchange server from Ruby
Microsoft Exchange service administrators can enable Exchange Web Services (EWS) which is a rather accessible XML API for interacting with Exchange. This allows you to rea...
Detecting if a Ruby gem is loaded
Detect if a gem has been activated
A gem is activated if it is either in the current bundle (Gemfile.lock
), or if you have manually activated it using Kernel#gem
(old-sc...
Ruby: How to load a file with a known encoding
In case Ruby does not detected the expected encoding of a file automatically you can specify the known encoding manually.
Example with File.open
file = File.open('some.bin', encoding: Encoding::ASCII_8BIT)
text = file.read
text.encoding =>...
Use a Ruby method like a block or lambda
Sometimes you want to use a vanilla Ruby method like a block. You can use Object#method
to obtain a method reference that responds to #call
:
foo_plus = "foo".method(:+)
foo_plus.call("bar") # =...
Ruby 2.1 returns a symbol when defining a method
Since Ruby 2.1, defining a method returns its name as a Symbol:
def foo() end # => :foo
define_method :foo do end # => :foo
You can use this to do Python-like decorators like so:
private def foo; end
memoize def foo...