• Stars
    star
    146
  • Rank 252,769 (Top 5 %)
  • Language
    Ruby
  • Created over 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Stop use Active Support in not rails related projects

Stop ActiveSupport Anywhere

Goal

We love ruby and ruby community. We can find excellent web (and not only web) frameworks like rails, hanami, grape, sinatra, dry-wb, roda, etc. But sometimes some developers use rails dependency in gems which not related to use only with rails. That's why the main idea of this repo is to collect all libraries which you can use instead using ActiveSupport

Some Problems with ActiveSupport

ActiveSupport is a "toolkit of support libraries and Ruby core extensions extracted from the Rails framework". Core extensions is a prettier name for monkey-patches of Ruby core classes. Monkey-patching breaks fundamental contracts with the language core - with deadly consequences.

Monkey-patching hinders interoperability. Any piece of Ruby software is written to work either in the monkey-patch-free environment, or in the monkey-patched one. Sure: with a bit of luck, many work in both. But won't your gem break with the next release of ActiveRecord (which it itself doesn't rely on at all)? Noone can say in advance.

When it is Permissible to Depend on ActiveSupport?

"You are definitely allowed to shoot yourself in the foot, if you really want to." It is only responsible to rely on ActiveSupport (or another similar ton of monkey-patches) if you are in position of the "lord of the stack", i.e., if you are developing an application, and you are the only one who decides forever, which components will interoperate. Libraries, aiming to be general tools, maximally interoperable with others, as well as applications open to extensions, must never pollute the runtime environment by monkey-patching.

Blog Posts

TODO

  1. collect all gems or solutions which can replace some parts of AS (current status)
  2. filter all this information
  3. create list of not only rails gems which use AS and try to fix it

Table of contents

Features

date formatters

ActiveSupport::ArrayInquirer

Link to rails docs

Alternatives

# instead of:
[:blue, :green].blue?

# do this:
[:blue, :green].include?(:blue)

ActiveSupport::BacktraceCleaner

Link to rails docs

Alternatives

  1. gem: Morozzzko/backtrace_cleaner link

ActiveSupport::Callbacks

Link to rails docs

Alternatives

  1. gem: delner/hollerback link
  2. gem: PragTob/after_do link
  3. sources: RSpec::Core::Hooks link

ActiveSupport::Configurable

Link to rails docs

Alternatives

  1. gem: dry-configurable link
  2. gem: markevans/configurable link
  3. gem: ged/configurability link
  4. post: Ruby Gem Configuration Patterns link
  5. post: MyGem.configure Block link

ActiveSupport::Concurrency

Link to rails docs

Alternatives

  1. ruby-concurrency link

ActiveSupport::Deprecation

Link to rails docs

Alternatives

  1. core library: Gem::Deprecate link
  2. gem: Hanami::Deprecation link
  3. gem: erikh/deprecated link
  4. gem: cbeer/deprecation link

ActiveSupport::Duration

Link to rails docs

Alternatives

  1. gem: zverok/time_math2 link
  2. gem: zverok/time_calc link
  3. gem: janko-m/as-duration link

ActiveSupport::Gzip

Link to rails docs

Alternatives

  1. core library: zlib link
  2. SO question: How to decompress Gzip string in ruby? link

ActiveSupport::HashWithIndifferentAccess

Link to rails docs

Alternatives

  1. core library: OpenStruct link

ActiveSupport::Inflector

Link to rails docs

Alternatives

  1. gem: linguistics link
  2. gem: dry-inflector link

ActiveSupport::LazyLoadHooks

Link to rails docs

Alternatives

none

ActiveSupport::Notifications

Link to rails docs

Alternatives

  1. gem: dry-monitor link
  2. gem: dry-events: link

ActiveSupport::NumberHelper

Link to rails docs

Alternatives

  1. core library: Kernel#sprintf link

ActiveSupport::NumericWithFormat

Link to rails docs

Alternatives

none

ActiveSupport::RangeWithFormat

Link to rails docs

Alternatives

none

ActiveSupport::TimeWithZone

Link to rails docs

Alternatives

  1. gem: et-orbi link
  2. Ruby 2.6 added timezone support to core link

ActiveSupport::CoreExtensions

Integer

Not rails specific gems which use AS as dependency

Contribute

Contributions welcome!

More Repositories

1

sidekiq-statistic

See statistic about your workers
Ruby
797
star
2

awesome-hanami

A collection of awesome Hanami Gems and projects
Ruby
410
star
3

kan

Simple, functional authorization library and role management for ruby
Ruby
234
star
4

shallow_attributes

Simple and lightweight Virtus analog.
Ruby
99
star
5

rubyjobs.dev

Job boards for Russian-speaking Ruby developers
Ruby
80
star
6

novel

Orchestration SAGA builder for ruby
Ruby
47
star
7

hanami-architecture

Ideas and suggestions about architecture for hanami projects
47
star
8

rspec-hanami

RSpec Matchers for Hanami
Ruby
46
star
9

cqrs-ruby-example

Example of using CQRS with ruby, hanami-api, rom, dry-system and kafka
Ruby
42
star
10

AnyBar_rb

Ruby wrapper for AnyBar.app
Ruby
37
star
11

ruby-service-template

Simple (Micro)Service template based on dry-system, hanami-api, hanami 2.0, rom, rabbitmq, kafka, psql, and other microlibraries.
Ruby
31
star
12

relative_time

Micro lib without any dependency for getting relative time
Ruby
22
star
13

hanami-serializer

Serializer library for hanami applications
Ruby
22
star
14

dotfiles

My dotfiles
Vim Script
21
star
15

rodauth_hanami

Example app for integrate rodauth server to hanami app
Ruby
16
star
16

web_bouncer

Simple and module auth lib for any rack projects
Ruby
16
star
17

popug-inventory

HTML
16
star
18

layerd-arch-style-with-dry-example

Example of layered architecture style builded with dry-rb libs
Ruby
16
star
19

hanami_event_example

Simple hanami app with hanami events
Ruby
15
star
20

hanami-pagination

Ruby
14
star
21

hanami-bootstrap

Bootstrap wrapper for hanami framework.
Ruby
14
star
22

cookie_box

Follow and controll issues from several repositories from one place
Ruby
12
star
23

hanami-scaffold

Make hanami scaffolds faster
Ruby
12
star
24

octostar

Improved search for your github stars
Ruby
11
star
25

event_schema_registry

Simple implantation of schema registry for JSON schema events
Ruby
11
star
26

rom_sql_graph

Display your DB (sql) association graph
Ruby
9
star
27

soa-readiness-checklist

Check your system for SOA readiness
9
star
28

state_changer

The state machine for change your data between states.
Ruby
9
star
29

dry-system-hanami

Folder resolver for dry-system in hanami projects
Ruby
8
star
30

hanami-zsh

Zsh plugin for hanami.
7
star
31

hanami-rodauth

This repository is no longer maintain: Roudauth wrapper for hanami apps
Ruby
7
star
32

ivento

Simple event sourcing framework in functional style
Ruby
7
star
33

rlisp

Simple scheme interpreter written on ruby
Ruby
7
star
34

hanami-bench

Benchmarks for hanami
Ruby
6
star
35

link-shortener

Simple hanami link shortener application
Ruby
6
star
36

ruby-job-task

Тестовое задание на позицию ruby разработчика
Ruby
6
star
37

vim-html2slim

Vim plugin for convert HTML(erb) to Slim
Vim Script
6
star
38

hanami-project-template

Template repository for all new project
Ruby
5
star
39

AnyBar_cr

Simple crystal wrapper for AnyBar
Crystal
5
star
40

igoods-service-template

Igoods service template
Ruby
4
star
41

excess.zsh-theme

Simple zsh color theme
4
star
42

davydovanton.github.io

HTML
4
star
43

grape-rodauth

Simple grape app with rodauth
Ruby
4
star
44

kaminari-hanami

This repository is no longer maintain: Kaminari integration for @hanami
Ruby
4
star
45

yeelight-lamp-client

Ruby client for yeelight lamps
Ruby
4
star
46

pepe

Pepe for you ruby console
Ruby
3
star
47

dry-http-client

This repository is no longer maintain: Fundctional HTTP client based on dry stack.
Ruby
3
star
48

rubyunderhood

Коллективный твиттер-аккаунт для ruby разработчиков с новым автором каждую неделю.
3
star
49

hanami-action-documentation

Automatically generate documentation for you actions
Ruby
2
star
50

system-analysis-example-system

2
star
51

event_sourcing_ruby

Simple repository for playing with event sourcing conceptions from F#
Ruby
2
star
52

hanami-workshop

Simple hanami app for workshop
Ruby
2
star
53

lotus-webpack-reactjs

Simple lotus app with webpack and react js
JavaScript
2
star
54

hanami-graphql-example

Simple example of GQL in hanami application
Ruby
2
star
55

arch-katas-solution

Personal repository for arch kata solutions (rus)
1
star
56

hanami-auth

This repository is no longer maintain. Prototype for hanami auth (bad way)
Ruby
1
star
57

hanami-interactor-matcher

This repository is no longer maintain: Simple dry-matcher for hanami interactor
Ruby
1
star
58

service-separation-checklist

Simple checklist for service separation
1
star
59

bruevich

Ruby
1
star
60

momiji

Post framework
Ruby
1
star
61

hanami-operation-generator

Simple library for generating operations for hanami-dry-system project
Ruby
1
star
62

data_matrix

simple way for creating grids for any data objects and for any frameworks
Ruby
1
star