Logo Rails Bling
Logo Inverted Logo
  • Tags
  • active_record
  • activerecord-tablefree
  • activerecord-transactionable
  • africa
  • agile
  • anonymous_active_record
  • archivist-client
  • authentication
  • benchmarking
  • bundler
  • cacheable-flash
  • celluloid-io-pg-listener
  • charity
  • controller_validator
  • csv_pirate
  • database
  • debug_logging
  • destination_errors
  • development
  • DevOps
  • dry_views
  • dvcs
  • Dynamoid
  • each_in_batches
  • email
  • environment
  • federation
  • flag_shih_tzu
  • floss
  • gem_bench
  • ghana
  • git
  • github
  • Go
  • homebrew
  • hooks
  • humanitarian
  • humorous_log_formatter
  • include_with_respect
  • java
  • letter_group
  • liberia
  • logging
  • management
  • month-serializer
  • nokogiri
  • oauth
  • oauth2
  • process
  • qt5
  • rack-insight
  • rack-toolbar
  • rails
  • rails_env_local
  • react-rails-benchmark_renderer
  • refugees
  • release
  • repatriation
  • require_bench
  • resque
  • resque-unique_at_runtime
  • resque-unique_by_arity
  • retired
  • rspec
  • rspec-block_is_expected
  • rspec-pending_for
  • rspec-stubbed_env
  • ruby
  • rubygems
  • rubyweekly
  • SAFe
  • sanitize_email
  • scrum
  • security
  • silent_stream
  • stackable_flash
  • status_tag
  • strict_states
  • subdomain-fu
Hero Image
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: $ bundle Or install it yourself as: $ gem install anonymous_active_record Usage Require the library in your spec_helper or other test suite boot file.

January 4, 2018 Read
Hero Image
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. See #307. A Ruby wrapper for the OAuth 2.

December 6, 2017 Read
Hero Image
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. For an alternative solution, primarily aimed at testing, that is less hacky, see my other gem anonymous_active_record!

November 14, 2017 Read
Hero Image
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. Resque::Plugins::UniqueAtRuntime differs from resque_solo in that resque-solo offers queue-time uniqueness, while resque-unique_at_runtime offers runtime uniqueness.

October 1, 2017 Read
Hero Image
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 ==) # .

June 2, 2017 Read
Hero Image
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. I’ll put something here soon.

April 29, 2017 Read
Hero Image
Introducing debug_logging

Unobtrusive Call Stack Logging for the discerning Rubyist A new release is coming soon!

March 25, 2017 Read
Hero Image
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@floss/gems", "/Users/pboling/.rvm/gems/ruby-2.4.0@global/gems", "/Users/pboling/.rvm/gems/ruby-2.4.0@floss/bundler/gems"] [GemBench] Detected 11 loaded gems + 2 loaded gems which GemBench is configured to ignore.

February 26, 2017 Read
Hero Image
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). Hence the configuration as needed for aws to work will be dealt with by aws setup.

September 4, 2016 Read
Hero Image
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: $ gem install activerecord-transactionable Usage class Car < ActiveRecord::Base include Activerecord::Transactionable # Note lowercase "r" in Activerecord (different namespace than rails' module) validates_presence_of :name end When creating, saving, deleting within the transaction make sure to use the bang methods (!

March 28, 2016 Read
Hero Image
Introducing rails_env_local

“development” is not always the best name for the local environment rails_env_local, where a rails environment for local development can be anything it desires. Even a butterfly. Tell your DevOps friends. Rails Guides has more information on the Rails initialization routines. You can easily accomplish what this gem does in a few lines of code. … But are you going to write specs for code in your config/boot.rb file? Really?

March 8, 2016 Read
Hero Image
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. In spec/apps/Rakefile you will find a test_db_setup task. Check it out.

December 7, 2015 Read
  • ««
  • «
  • 1
  • 2
  • 3
  • 4
  • 5
  • »
  • »»
Navigation
  • About
  • Skills
  • Experience
  • Projects
Contact me:
  • peter.boling a@t gmail.com
  • +1-925-252-5351

Toha Theme Logo Toha (tweaked by @pboling)
© 2024 Peter Boling
CC BY-SA 4.0
Powered by Hugo Logo