From 81fb71f0510a5464634a65d97939f6fa54f419dd Mon Sep 17 00:00:00 2001 From: hellekin Date: Mon, 5 Oct 2020 21:40:05 +0200 Subject: Use pry and bitfields Pry is a great console enhancement for development. You can navigate through code and object with `cd` and `ls`, or use `show-method foo` to see how it's written... Bitfields allow to store multiple flags in an efficient integer. It will be used to keep track of a User's roles within an Agent. Pry: https://pry.github.io/ Pry-Rails: https://github.com/rweng/pry-rails Bitfields: https://github.com/grosser/bitfields --- Gemfile | 5 +++++ Gemfile.lock | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/Gemfile b/Gemfile index cbe2487..882905b 100644 --- a/Gemfile +++ b/Gemfile @@ -23,18 +23,23 @@ gem 'jbuilder', '~> 2.7' # Use Active Storage variant # gem 'image_processing', '~> 1.2' +# Use bitfields in models +gem 'bitfields' + # Reduces boot times through caching; required in config/boot.rb gem 'bootsnap', '>= 1.4.2', require: false group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] + gem 'pry' end group :development do # Access an interactive console on exception pages or by calling 'console' anywhere in the code. gem 'web-console', '>= 3.3.0' gem 'listen', '~> 3.2' + gem 'pry-rails' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' gem 'spring-watcher-listen', '~> 2.0.0' diff --git a/Gemfile.lock b/Gemfile.lock index 74deacd..dc66e9a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,10 +57,13 @@ GEM tzinfo (~> 1.1) zeitwerk (~> 2.2, >= 2.2.2) bindex (0.8.1) + bitfields (0.14.0) + activerecord (>= 5.1) bootsnap (1.4.8) msgpack (~> 1.0) builder (3.2.4) byebug (11.1.3) + coderay (1.1.3) concurrent-ruby (1.1.7) crass (1.0.6) erubi (1.9.0) @@ -91,6 +94,11 @@ GEM nokogiri (1.10.10) mini_portile2 (~> 2.4.0) pg (1.2.3) + pry (0.13.1) + coderay (~> 1.1) + method_source (~> 1.0) + pry-rails (0.3.9) + pry (>= 0.10.4) puma (4.3.6) nio4r (~> 2.0) rack (2.2.3) @@ -175,11 +183,14 @@ PLATFORMS ruby DEPENDENCIES + bitfields bootsnap (>= 1.4.2) byebug jbuilder (~> 2.7) listen (~> 3.2) pg (>= 0.18, < 2.0) + pry + pry-rails puma (~> 4.1) rails (~> 6.0.3, >= 6.0.3.2) sass-rails (>= 6) -- cgit v1.2.3