| Factor | Zapier | Self-made | Notes |
|---|---|---|---|
| Advanced level of customization | โ | โ | Self-made solution provides 100% flexibility in logic, architecture, and integrations. |
| Debugging/fixing issues/customer support cost | โ | โ | Zapier gives limited logs and debugging tools; self-made allows full control, observability, and in-house fixes. |
| Data consistency guarantee (exactly-once delivery) | โ | โ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # This file tells systemd how to run Sidekiq as a 24/7 long-running daemon. | |
| # | |
| # Customize this file based on your bundler location, app directory, etc. | |
| # | |
| # If you are going to run this as a user service (or you are going to use capistrano-sidekiq) | |
| # Customize and copy this to ~/.config/systemd/user | |
| # Then run: | |
| # - systemctl --user enable sidekiq | |
| # - systemctl --user {start,stop,restart} sidekiq |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # frozen_string_literal: true | |
| # Source: https://gist.github.com/ka8725/6053d55be74f15b53cabfc3ac4dc99df | |
| # Installation: put this file into spec/support/matchers/ folder. | |
| # Simple matcher that allows checking of an email was sent during an example run. | |
| # | |
| # @example Positive expectation | |
| # expect { action }.to send_email | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git grep --name-only '< ApplicationJob' | xargs -I {} sed -i '' -e 's/< ApplicationJob/< BaseJobWithRetry/' {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This custom matcher can be used to test state machine | |
| # | |
| # Examples | |
| # | |
| # it { should have_event(:status, :event_name, [:state1, :state2] => [:state3, :state4]) } | |
| # it { should have_event(:status, :event_name, { | |
| # :state1 => :state3, | |
| # :state1 => :state4, | |
| # :state3 => :state3, | |
| # :state2 => :state4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class SMSGateway | |
| # @param phone [String] | |
| # @param message [String] | |
| def self.send_message(phone, message) | |
| puts "Hello #{phone}, #{message}" | |
| end | |
| end | |
| User = Struct.new(:phone, :active) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def foo | |
| puts 'hello from foo' | |
| end | |
| def bar(f) | |
| f() | |
| end | |
| bar(foo) # => NoMethodError (undefined method `f' for main:Object) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module LiquidPresenters | |
| class Plan < SimpleDelegator | |
| def to_liquid | |
| @to_liquid ||= HashWithIndifferentAccess.new({ | |
| id: self.id, | |
| name: self.name, | |
| description: self.description, | |
| status: self.status, | |
| class_id: self.plan_class_id | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'yaml' | |
| desc 'Generates database.yml, optional arguments: [adapter, user, password]' | |
| task :dbconfig => 'database.yml' | |
| file 'database.yml', [:adapter, :username, :password] do |t, args| | |
| Dir.chdir('config') | |
| args.with_defaults(:project_path => Dir.pwd) | |
| DBConfigGenerator.new(t, args).generate | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Base | |
| end | |
| class A < Base | |
| def foo | |
| puts 'foo' | |
| end | |
| end | |
| class A < Base |
NewerOlder