Introducing month-serializer

Month::Serializer - Integer Serialization Plugin for Month Gem Allows you to convert Month objects to Integer, and vice versa. This is useful for serializing Months into other data structures, like String, or to pass values in JSON, or send as parameters to Resque / Sidekiq jobs (which parameters are only compatible with simple JSON data types). Neither Date or Time can serialize properly to Resque/Sidekiq jobs.

New Release of oauth2: Version 1.4.1

A Ruby wrapper for the OAuth 2.0 protocol The oauth2 gem team has been working hard (72 Issues Closed, 6 remaining!) on preparing a version 2.0.0 for release. It will have some minor breaking changes, and some important bug fixes. It will have code cleanup, and new features. But for many people version 1.4.0 has been working fine, and all they need is a new version, warts and all, which allows them to upgrade some locked dependencies, particularly jwt and faraday.

Introducing rspec-stubbed_env

ENV stubbing via a shared context for more powerful tests. Installation Add this line to your application’s Gemfile: gem 'rspec-stubbed_env', group: :test And then execute: $ bundle Or install it yourself as: $ gem install rspec-stubbed_env You must configure RSpec to use the :expect syntax, or some compatible alternative. RSpec.configure do |config| config.

Introducing rspec-block_is_expected

Allows you to use block_is_expected similarly to how you would use is_expected if a block was wrapping the subject. This gem does one very simple thing very well. It allows you to use block_is_expected similarly to how you would use is_expected if a block was wrapping the subject. Supports the same versions of Ruby that RSpec does, 1.

Introducing silent_stream

ActiveSupport’s Stream Silencing - Without ActiveSupport SilentStream is an extraction of some parts of ActiveSupport’s Kernel Reporting Core Extentions. Since July 2014 silence_stream, silence_stderr, capture, silence, and quietly have been deprecated because they are not thread safe. See that discussion in the PR where it all went down. I rely on them a lot in single threaded code, and so I plan to keep them alive.

Introducing require_bench

Ruby Bootstrapping Analysis Ruby app loading slowly, or never? Discover bootstrapping issues in Ruby by benchmarking “Kernel.require” Installation Add this line to your application’s Gemfile: gem 'require_bench' And then execute: $ bundle Or install it yourself as: $ gem install require_bench Usage Require the library where it will be loaded prior to any other requires you want to benchmark.

Updates from Australia, Ghana, Canada, and Liberia

Consolidation in Fundraising Industry Gofundme, the company behind Crowdrise, has acquired Youcaring, which was the primary site I had been using to fundraise. It doesn’t appear that they have retained the old campaigns, so I am moving back to Crowdrise as the primary campaign, and regretting the loss of all the updates that had been posted to YouCaring. I’ve cross posted this update to my blog from the campaign website.

How I Go Again

I am upgrading my Hugo-based blog from v0.15 to v0.48 (extended)! Quite a mad leap. Update: As it turns out, extended won’t run on my (or any) shared hosting provider, and I am still building my site on my shared host. I know, that’s not cool anymore, but updating my deployment pipeline would require more time than I have. My Architecture Local is Mac I am using a Mac for this process.

Introducing anonymous_active_record

ActiveRecord Without a Database? Replacement for broken Class.new(ActiveRecord::Base). Very useful in testing Rails apps, and even more so for testing gems without having to specify full blown models. If you prefer an exceptionally hacky alternative that could also be used for real runtime code, see my other gem activerecord-tablefree! Installation Add this line to your application’s Gemfile: gem 'anonymous_active_record' And then execute:

Maintaining oauth2

A Ruby wrapper for the OAuth 2.0 protocol UPDATE 2018-10-13: Version 1.4.1 has been released! I am now the lead maintainer of the oauth2 gem. I will work toward getting a version 2.0.0 released, which will not drop support for any currently supported Rubies. After that a 3.0.0 release will drop support for EOL Rubies. Oauth2 gem is looking for additional maintainers.

Introducing activerecord-tablefree

ActiveRecord Without a Database? ActiveRecord Tablefree Models provides a simple mixin for creating models that are not bound to the database. This approach is useful for taking advantage of the features of ActiveRecord such as validation, relationships, nested_attributes, etc. This can also be very useful in testing where a mock-like object will suffice. This gem is exceptionally hacky.

Introducing resque-unique_at_runtime

Ensures that only one job for a given queue will be running concurrently. A semanticaly versioned Resque plugin which ensures for a given queue, that only one worker is working on a job at any given time. Resque::Plugins::UniqueAtRuntime differs from resque-lonely_job in that it is compatible with, and can be used at the same time as, resque-solo.

CV

Resume Download Resume Here I’m not a fan of vendor-lockin, so have it your way! WEB (a website, for a web browser) ePub (formatted for e-readers) ODT (OpenDocument Text file) PDF (Portable Document Format) RTF (Rich Text Format) HTML, Zipped (Raw HTML assets, archived as a Zip file) - Even DOCX (Word Open XML Format Document file) if that’s your thing. It’s not my thing. Might have ugly formatting.

Gemfile Specs! New for gem_bench v1.0.2

Gemfile Specs! New for 1.0.2 Version constraints are important. Give the Gemfile some love in your CI build Create a spec/gemfile_spec.rb like: Rspec.describe "Gemfile" do it("has version constraint on every gem") do requirements = GemBench::StrictVersionRequirement.new({verbose: false}) expect(requirements.list_missing_version_constraints).to eq([]) end end Then your build will fail as soon as a gem is added without a proper constraint: Failures: 1) Gemfile has version constraint on every gem Failure/Error: expect(requirements.list_missing_version_constraints).to eq([]) expected: [] got: ["puma"] (compared using ==) # .

Introducing resque-unique_by_arity

Magic hacks which allow integration of job multiple Resque plugins providing different types of job uniqueness

Because some jobs have parameters that you do not want to consider for determination of uniqueness.

resque_solo and resque-unique_at_runtime (a resque-lonely_job rewrite) will now work together! Without this gem they are fundamentally incompatible.

Total Downloads Downloads Today Build Status Test Coverage Maintainability Depfu Open Source Helpers Network Stars Version Documentation Chat License: MIT

I’ll put something here soon.

Introducing debug_logging

Unobtrusive Call Stack Logging for the discerning Rubyist

Total Downloads Downloads Today Build Test Coverage Maintainability Depfu Network Stars Version Open Source Helpers Chat License: MIT

I’ll put something here soon.

Gem Source Grep! New for gem_bench v1.0.0

Find WAT Dragons! New for 1.0.0 Search the Ruby source code of all the gems loaded by your Gemfile for a specified regex, to find out which gems have wat DRAGONS. Gem: “I have no wat DRAGONS!” You: ❨╯°□°❩╯︵┻━┻ >> puts GemBench.find(look_for_regex: /wat/).starters.map {|gem| "#{gem.name} has wat DRAGONS at #{gem.stats}" }.join("\n") [GemBench] Will search for gems in ["/Users/pboling/.rvm/gems/ruby-2.4.0@foss/gems", "/Users/pboling/.rvm/gems/ruby-2.4.0@global/gems", "/Users/pboling/.rvm/gems/ruby-2.4.0@foss/bundler/gems"] [GemBench] Detected 11 loaded gems + 2 loaded gems which GemBench is configured to ignore.

Repatriate Refugees

Repatriating Refugees

I have created a fundraiser for anyone that would like to help me in my efforts assisting refugees.

Help Refugees with Hope For Tomorrow, Liberia on Crowdrise

Maintaining dynamoid

Ruby ORM for Amazon’s DynamoDB. NOTE: This post has been updated for version 3 of dynamoid! For version 1.3.x use the 1-3-stable branch README. Installation Installing Dynamoid is pretty simple. First include the Gem in your Gemfile: gem 'dynamoid', '~> 2' Prerequisities Dynamoid depends on the aws-sdk, and this is tested on the current version of aws-sdk (~> 3), rails (>= 4).

Introducing activerecord-transactionable

Properly Implement ActiveRecord Transactions Provides a method, transaction_wrapper at the class and instance levels that can be used instead of ActiveRecord#transaction. Enables you to do transactions properly, with custom rescues and retry, including with or without locking. Installation Add this line to your application’s Gemfile: gem 'activerecord-transactionable' And then execute: $ bundle Or install it yourself as:

Introducing rails_env_local

Provides content_tag_for method signature to create customizable and logic-gated labels from objects.

Also includes a presenter base class to allow any Ruby web framework to create logic around HTML tags.

Total Downloads Downloads Today Code Quality Network Stars Version Build Documentation Depfu Chat License: MIT

I’ll put something here soon.

Introducing celluloid-io-pg-listener

Introducing a new RubyGem celluloid-io-pg-listener (on github) Allows you to asynchronously LISTEN for Postgresql NOTIFY messages and do something with the payloads. Sure! It should work if you just run bin/setup from the root directory of the gem, then you can follow along the examples in the readme. All the data about db setup and structure is located in the spec/apps directory.

Why Should You Use flag_shih_tzu

What is it? See the what is it post. Why should you use it? No migrations needed for new boolean attributes Avoids ALTER TABLE when adding a new boolean field to a model, which can be important for very large tables Only the one integer column needs to be indexed The index is actually meaningful, unlike a boolean column index Bitwise operations are fast, indexes are even faster, and you can use either one Adds scopes to easily access collections of records with specific fields Chained scopes to combine sql for different bit fields for maximum performance Provides condition builder methods for each bit field so you can construct your own custom SQL with the correct bit field values for the list.

Introducing archivist-client

Archive.org client

Total Downloads Downloads Today Code Quality Network GitHub stars Version Build Documentation Depfu Chat License: MIT

I’ll put something here soon.

cacheable-flash

Gets the Rails flash object working with page cacheing.

This gem is no longer maintained.

Please consider switching to unobtrusive_flash!

Total Downloads Downloads Today Code Quality Network Stars Version Build Documentation Depfu License: MIT

humorous_log_formatter

Allows you to customize (and normalize the length of!) the text and color used to write the log level to your logs.

This gem is no longer maintained.

  • “error” can become red and say “noo”.
  • “info” can become white and say “meh”.
  • “debug” can become blue and say “wat”.
  • Or whatever you want…

Total Downloads Downloads Today Code Quality Network Stars Version Build Documentation License: MIT

rack-insight

An endlessly customizable development toolbar added to your website. Successor of ye olde rack-bug.

This gem is no longer maintained.

Total Downloads Downloads Today Code Quality Network Stars Version Build Documentation License: MIT

rack-toolbar

Rack Middleware that injects things into the response body.

This gem is no longer maintained.

Total Downloads Downloads Today Code Quality Network Stars Version Build Documentation Chat License: MIT

stackable_flash

Provides super powers to the Rails flash object.

This gem is no longer maintained.

Total Downloads Downloads Today Code Quality Network Stars Version Build Documentation License: MIT

subdomain-fu

Subdomain linking and routing for Rails

This gem is no longer maintained.

written by Michael Bleigh, maintained by myself.

Total Downloads Downloads Today Code Quality Network Stars Version Build Documentation

Introducing strict_states

Provides content_tag_for method signature to create customizable and logic-gated labels from objects.

Also includes a presenter base class to allow any Ruby web framework to create logic around HTML tags.

Total Downloads Downloads Today Code Quality Network Stars Version Build Documentation Depfu Chat License: MIT

I’ll put something here soon.

Introducing rspec-pending_for

Mark specs pending or skipped for specific Ruby engine (e.g. MRI or JRuby) / version combinations. Easiest to just show you: it("blah is blah") do pending_for(engine: "rbx") pending_for(engine: "ruby", versions: "2.1.5") pending_for(engine: "jruby", versions: "2.2.2", reason: "due to a bug in Ruby") pending_for(engine: "ruby", versions: "2.0.0", reason: "because I don't have the time") expect("blah").to eq "blah" end Installation Add this line to your application’s Gemfile:

The Why and How of celluloid-io-pg-listener

LISTEN for Postgresql NOTIFY messages; Asynchronously process payloads celluloid-io-pg-listener (on github) Why? At Trumaker & Co we had a distributed data problem. Two data stores that needed to be kept synchronized, in real time, with inserts and updates allowed on both sides. There wasn’t a good solution available for that, so I did a lot of research and built celluloid-io-pg-listener to solve the problem.

Upgrade to El Capitan with Homebrew, Ruby, qt5, & Java

I upgraded to El Capitan, with Homebrew & Ruby, and this is how I did it flawlessly. … and Xcode and Java, etc. Prepare If you don’t already have homebrew installed, do that first, so you don’t have to deal with SIP issues. Install all Software Updates available in the Apple Menu, up to and including El Capitan. Hardware After the installs and forced reboots my 27” Thunderbolt display wouldn’t display anything.

My Git Commit Hooks

I quite envy a nice commit message. The Rails project has rules about commit messages that are tops. This is a great example from a great developer I know, which got merged into core. So now on my own projects I have cribbed, tweaked, and automated a tiny bit of of that sweet, sweet commit message honey. Naming your branch Step 1 I name my branches with a prefix that is one of: “hotfix”, “bug”, “feature”, or “candy”.

Fix The Nokogiri Warning

One of the most consistent warnings that has been with me through the years has been that Nokogiri was built against a version of libXML that is different than the version that is dynamically loaded. WARNING: Nokogiri was built against LibXML version 2.6.30, but has dynamically loaded 2.9.0 I had most recently, out of frustration, and due to sundry circumstances, resorted to the --use-system-libraries flag in my project’s bundler config just to get shit done.

How I Go

I am relaunching my blog! I have decided to use Hugo after much internal debate, and strong lobbying from all the sleazy corporate bag-men that are constantly trying to bribe me with buzz words . I will always Ruby and use it every day, but for my blog I gotta go. So easy, static and fast! As my first post I will document how I made this work.

Introducing status_tag

Provides content_tag_for method signature to create customizable and logic-gated labels from objects.

Also includes a presenter base class to allow any Ruby web framework to create logic around HTML tags.

Total Downloads Downloads Today Code Quality Network Stars Version Build Documentation Depfu Chat License: MIT

I’ll put something here soon.

FOSS Ruby Projects

I have been writing RubyGems since 2008, and Rails plugins since 2005. Contributions to the community Along the way I have contributed to many projects, including rails’ active-record (PR #20921), annotate_models (PR #473), hashie (PR #313, PR #314, PR #315, PR #316, and PR #318), git-reflow (PR #155, and PR #159), memoist (PR #33), month (PR #7), neography (PR #74 and PR #104), masonry-rails (PR #14), zues-parallel_tests (PR #28), rusen (PR #5, and PR #6), gem-release (PR #37 and PR #38), gem-dependent (PR #11), RubyGems Guides (PR #211), sidekiq-unique-jobs (PR #194), keep-a-changelog (PR #224), rchardet (PR #28), clearance (PR #769), wwtd (PR #48), capistrano-ssh-doctor (PR #11), google-drive-ruby (PR #282), subroutine (PR #4), clockwork (PR #14), ruby toolbox catalog (PR #12), amazon-awis (PR #2), and appraisal (PR #128).

javascript

Open Source Javascript

A simple, lightweight JavaScript API for handling cookies namespaced with calibre_*

On Github Version Network Stars

jquery.ellipsis

Yet Another jQuery Ellipsis Plugin… only better.

Network Stars

bash shell

Open Source Bash Shell Scripts

bash_step

Bash Step Function Library

Network Stars

bsfl (fork)

Bash Shell Function Library

Network Stars

I want to get better at bash scripting!

moldy ruby

Open Source Ruby - Deprecated - New maintainers please apply! cacheable_flash See retired_projects/cacheable_flash controller_validator See retired_projects/controller_validator humorous_log_formatter See retired_projects/rack-insight rack-insight See retired_projects/rack-insight/ rack-toolbar See retired_projects/rack-toolbar/ react-rails-benchmark_renderer See retired_projects/react-rails-benchmark_renderer/ stackable_flash See retired_projects/stackable_flash/ subdomain-fu See retired_projects/subdomain-fu/ Deprecated Open Source Ruby - The Real Zombies! remit Amazon Flexible Payment Service client. capistrano_mailer Configure automated email notifications when Capistrano tasks are run.

contact

SMS, Message, Facetime, or Voice

+1.765.760.2012

Email

peter.boling@gmail.com

Looking for my Resume?

Want More?

On Github On RubyGems

My Schedule

Here is my public calendar so you know when I am available:

about

What is this website?

It is a place for me to write about code, technology, and the future.

Who am I?

I am Peter Boling, presently of Earth.

You’re still here?

Checkout some of my pages!

react-rails-benchmark_renderer

A reference implementation of a custom React renderer for Rails.

Adds benchmarking info to Rails logs for parity with Rails view rendering benchmarking.

Total Downloads Downloads Today Code Quality Network Stars Version Build Documentation Chat License: MIT

I’ll put something here soon.

Introducing each_in_batches

Performance Measured and Tuned Batch Processing of Records with Blocks in Rails. EachInBatches (Originally BolingForBatches) NOTE: I am resurrecting this code because I still have this recurring need, and Rail’s native batching doesn’t cut mustard. It is some of my most ancient code, and it isn’t pretty, but I hope to improve it over time. I often need to execute really large computations on really large data sets.

Introducing destination_errors

Collect errors from multiple objects on a single object, especially useful with the Form Object Presenter Pattern.

Total Downloads Downloads Today Code Quality Network Stars Version Build Documentation Depfu License: MIT

I’ll put something here soon.

Introducing letter_group

Organize data results from raw sql queries (as with PGresult, or Dossier) intelligently.

Total Downloads Downloads Today Code Quality Network Stars Version Build Documentation Depfu Chat License: MIT

I’ll put something here soon.

controller_validator

This Gem Is No Longer Maintained

Total Downloads Downloads Today Code Quality Network Stars Version Build Documentation License: MIT

Maintaining flag_shih_tzu

Bit Fields for Active Record What is a bit field? https://en.wikipedia.org/wiki/Bit_field What is a bitwise operation? https://en.wikipedia.org/wiki/Bitwise_operation flag_shih_tzu supports both :bit_operator and :in_list query modes, but only :in_list can will utilize a database index. What does it look like? class Lead < ActiveRecord::Base include FlagShihTzu has_flags 1 => :warm_up_email_sent, 2 => :follow_up_call_made, 3 => :final_email_sent, 4 => :appointment_scheduled, 5 => :not_interested, # You can specify use any integer column to use for flags!

Introducing gem_bench

Ruby Gemfile analysis. gem_bench is for static Gemfile and installed gem library source code analysis. gem_bench can also be used to trim down app load times by keeping your worst players on the bench. Gem: “Put me in coach!” You: ❨╯°□°❩╯︵┻━┻ Usage Works with Ruby >= 2.0 due to use of named parameters. Example! Getting tired of seeing this irb warning, perhaps?

Introducing dry_views

Enhancer of Rails’ content_for system. Allows defaults, and no_content_for overrides in partials. For Rails 3, 4. Why? Keep the views dry with content_for_with_default and friends! Complete flexibility in defining defaults and overrides. Remove most or all logic from views. Allow for no content to override a default. DryViews provides extensions to ActionView::Helpers::CaptureHelper, which is part of ActionPack: * content_for_with_default * no_content_for * content_for (enhanced to play nice with the above methods)

Introducing sanitize_email

An Email Condom for your Ruby Server sanitize_email This gem allows you to override your mail delivery settings, globally or in a local context. It is like a Ruby encrusted condom for your email server, just in case it decides to have intercourse with other servers via sundry mail protocols. Summary It’s particularly helpful when you want to prevent the delivery of email (e.

Introducing csv_pirate

For those engaged in the pillage and plunder of comma separated values.

Total Downloads Downloads Today Code Quality Network Stars Version Build Documentation Depfu Chat License: MIT

I’ll put something here soon.