• Stars
    star
    104
  • Rank 330,604 (Top 7 %)
  • Language
    Ruby
  • License
    MIT License
  • Created almost 14 years ago
  • Updated over 11 years ago

Reviews

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

Repository Details

A Ruby gem that allows you to be yourself

Fsck

Gem Version

Fsck allows you to express your feelings while you're developing. It does this by allowing you to add words to method names on the fly.

Installation

gem install fsck

Examples

Fsck allows you to have a sense of closure during your everyday development life. Here's some examples:

A difficult problem causing you frustration? Tell it how you feel.

# all i want is to sum the goddamn elements
sum = 0
(1..10).each_fucking_element { |e| sum += e }

Find a method that you think rocks? Show it your praise.

# inject rocks!
(1..10).awesome_inject_is_awesome(&:+)

Usage

Spot Usage

Fsck comes as a module that you can include wherever you want.

require "fsck"

class MyClass
  include Fsck

  def my_method
    42
  end
end

my_object = MyClass.new
my_object.calling_my_awesome_method # => 42

Deep Usage

Fsck also provides a way to use its functionality on every object in ruby.

require "fsck/deep"

42.gimme_succ # => 43
ary = Array.new_array_please # => []

Fsck: How does it work?

Fsck achieves its functionality by tapping into method_missing. The first time a fscked method is called, every method defined on the object is examined. The method with the longest name that passes the examination process is assumed to be the intended method, and the fscked method is aliased to this method.

The examination process splits the words of each method name, building a regular expression that allows for any number of other words to be inserted anywhere in the method name. If you aren't careful with the words you choose, you may unintentionally call another method.

# you may expect this to call #each, but it will instead call #each_value
my_hash.what_i_need_is_each_set_of_key_plus_value { |k,v| puts k }

Origin

Fsck is named after the use of the Unix file system utility, specifically as it is applied to profanity.

NOTE: This gem has nothing to do with the Unix file system utility

Disclaimer

This gem is totally a joke. Please don't use it.

License

MIT License. Copyright 2011 Chris Thorn.

More Repositories

1

rubot

A Ruby Bot Framework for IRC. More importantly, a project used to learn Ruby.
Ruby
14
star
2

dotfiles

Attempts to keep my dev environment running smoothly
Vim Script
8
star
3

lgtm

Select a random emoji appropriate for a pull request review
Ruby
6
star
4

improved-includes

Improved Includes expands upon Rails' javascript_include_tag and stylesheet_link_tag methods, adding functionality to recursively include subdirectories.
Ruby
5
star
5

coder_game

Simple game written in Ruby using Gosu. Meant to be a small project for a show and tell.
Ruby
4
star
6

textual_theme

My theme for Textual
JavaScript
4
star
7

hello-velato

Hello World in Velato
LilyPond
2
star
8

SmackMyBenchUp

Possibly a sleek C# benchmarking tool. Will have to investigate further to know for sure.
C#
2
star
9

sqlight

Me following along with https://cstack.github.io/db_tutorial/
C
1
star
10

RandomDotNet

Random .Net stuff
C#
1
star
11

rails_finder

Find Rails applications and their versions
Ruby
1
star
12

culling-home

A simple app to organize apartment searches on Craigslist.
Ruby
1
star
13

euler

My attempt at solving the euler problems (http://projecteuler.net/) in ruby
Ruby
1
star
14

elevator

Building an experience around an elevator??
C#
1
star
15

rando

Generates random png files
Ruby
1
star
16

raspi-simon

A light-up memory game for the Raspberry Pi
Ruby
1
star
17

hc

Tool to generate charts from the command line, using Highcharts
Ruby
1
star
18

cli_rage

Soothes command line induced rage
Ruby
1
star
19

Progression

C# Console Progress Bar
C#
1
star
20

basestar

Ruby
1
star
21

specdiff

Ruby
1
star
22

VisualStudioTheme

Theme(s) for Visual Studio 2010
1
star
23

pi-temp-rb

Raspberry Pi temperature monitoring and reporting
Ruby
1
star
24

doiwanttobex

Ruby
1
star
25

commute-tracker

Ruby
1
star