From 1ecb1c73d67507ca9b872572f5fd795f2c7cbde6 Mon Sep 17 00:00:00 2001 From: Denny Mueller Date: Tue, 24 Sep 2013 11:02:50 +0200 Subject: [PATCH 01/11] Create rails.md initial commit with kinda outdated data --- rails.md | 272 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 272 insertions(+) create mode 100644 rails.md diff --git a/rails.md b/rails.md new file mode 100644 index 0000000..b1abd60 --- /dev/null +++ b/rails.md @@ -0,0 +1,272 @@ +# Default Directory Structure +rails_root +|-- app +| |-- assets +| |-- controllers +| | `-- application.rb +| |-- helpers +| | `-- application_helper.rb +| |-- models +| `-- views +| `-- layouts +|-- components +|-- config +| |-- enviroments +| | |-- development.rb +| | |-- production.rb +| | `-- test.rb +| |-- database.yml +| |-- enviroment.rb +| `-- routes.rb +|-- db +|-- doc +|-- lib +|-- log +| |-- development.log +| |-- production.log +| |-- server.log +| `-- test.log +|-- public +|-- script +|-- test +| |-- fixtures +| |-- functional +| |-- mocks +| |-- unit +| `-- test_helper.rb +`-- vendor + +# Methods +## Strings +capitalize! +center +chomp! +chop +concat +count +crypt +delete! +downcase! +dump +each +each_byte +empty? +gsub! +hash +hex +include? +index +intern +length +|just, rjust +next! +oct +replace +reverse! +rindex +scan +slice! +split +squeeze! +strip! +sub! +sum +swapcase! +tr! +tr_s +unpack +upcase! +upto + +## Regex +escape +last_match +new +quote +casefold? +kcode +match +source +## Time +asctime +ctime +day +gmt? +gmtime +hour +isdst +localtime +mday +min +mon +month +sec +strftime +tv_sec +tv_usec +usec +utc +utc? +wday +yday +year +zone + +## Arrays +assoc +at +clear +collect! +compact! +concat +delete +delete_at +delete_if +each +each_index +empty? +eql? +fill +first +flatten! +include? +index +indexes +join +last +length +nitems +pack +pop +push +rassoc +reject! +replace +reverse! +reverse_each +rindex +shift +slice! +sort! +uniq! +unshift + +## Validation +condition_block? +create! +evaluate_condition +validate +validate_on_create +validate_on_update +validates_acceptance_of +validates_associated +validates_confirmation_of +validates_each +validates_exclusion_of +validates_format_of +validates_inclusion_of +validates_length_of +validates_numericality_of +validates_presence_of +validates_size_of +validates_uniqueness_of + +## Enumerable Mixin +collect +each_with_index +entries +find +find_all +grep +include? +max +min +reject +sort + +# Pre-defined Variables +$! Exception information +$& String of last match +$` String left of last match +$' String right of last match +$+ Last group of last match +$N Nth group of last match +$= Case insensitive flag +$/ Input record separator +$\ Output record separator +$, Output field separator +$. Current line number of last file read +$> Default output for print +$_ Last input line of string +$0 Name of script +$* Command line arguments +$stderr Standard error output +$stdin Standart input +$stdout Standart output +$-a True if -a is set. +$-d Status of -d switch +$-l True if -l is set +$-p True if -p is set +$-v Verbose Flag + +# Reserved Words +begin +elsif +rescue +=end +end +retry +BEGIN +ensure +return +END +false +self +alias +for +super +and +if +then +begin +in +true +break +module +undef +case +next +unless +class +nil +until +def +not +when +defined? +or +while +do +redo +yield +else + +# Regular Expression Syntax + +^ Start of string +$ End of string +. Any single character +(a|b) a or b +(...) Group section +[abc] Item in range (a or b or c) +[^abc] Not in range (not a or b or c) +a? Zero or one of a +a* Zero or more of a +a+ One or more of a +a{3} +test +Exactly 3 of a +a{3,} 3 or more of a +a{3,6} +Between 3 and 6 of a +!(pattern) "Not" prefix. Apply rule when URL does not match pattern. From 7652312d0ddaf391ee4a07b0c18cd8c514ba022e Mon Sep 17 00:00:00 2001 From: Denny Mueller Date: Tue, 24 Sep 2013 11:04:02 +0200 Subject: [PATCH 02/11] Update rails.md fix headings --- rails.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rails.md b/rails.md index b1abd60..25c5635 100644 --- a/rails.md +++ b/rails.md @@ -37,7 +37,7 @@ rails_root `-- vendor # Methods -## Strings +### Strings capitalize! center chomp! @@ -78,7 +78,7 @@ unpack upcase! upto -## Regex +### Regex escape last_match new @@ -112,7 +112,7 @@ yday year zone -## Arrays +### Arrays assoc at clear @@ -151,7 +151,7 @@ sort! uniq! unshift -## Validation +### Validation condition_block? create! evaluate_condition @@ -171,7 +171,7 @@ validates_presence_of validates_size_of validates_uniqueness_of -## Enumerable Mixin +### Enumerable Mixin collect each_with_index entries From 8d251eaf98ccc4e804bd5ab2f7f42809ba5a045a Mon Sep 17 00:00:00 2001 From: Denny Mueller Date: Tue, 24 Sep 2013 11:07:31 +0200 Subject: [PATCH 03/11] Update rails.md --- rails.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rails.md b/rails.md index 25c5635..76bc94b 100644 --- a/rails.md +++ b/rails.md @@ -1,11 +1,11 @@ # Default Directory Structure -rails_root -|-- app -| |-- assets -| |-- controllers -| | `-- application.rb -| |-- helpers -| | `-- application_helper.rb +rails_root +|-- app +| |-- assets +| |-- controllers +| | `-- application.rb +| |-- helpers +| | `-- application_helper.rb | |-- models | `-- views | `-- layouts From d4f420c6da2821e2c7c94b6ff3b8725716bc01fc Mon Sep 17 00:00:00 2001 From: Denny Mueller Date: Tue, 24 Sep 2013 11:13:15 +0200 Subject: [PATCH 04/11] fix line breaks --- rails.md | 493 +++++++++++++++++++++++++++---------------------------- 1 file changed, 246 insertions(+), 247 deletions(-) diff --git a/rails.md b/rails.md index 76bc94b..a7d56f4 100644 --- a/rails.md +++ b/rails.md @@ -6,267 +6,266 @@ rails_root | | `-- application.rb | |-- helpers | | `-- application_helper.rb -| |-- models -| `-- views -| `-- layouts -|-- components -|-- config -| |-- enviroments -| | |-- development.rb -| | |-- production.rb -| | `-- test.rb -| |-- database.yml -| |-- enviroment.rb -| `-- routes.rb -|-- db -|-- doc -|-- lib -|-- log -| |-- development.log -| |-- production.log -| |-- server.log -| `-- test.log -|-- public -|-- script -|-- test -| |-- fixtures -| |-- functional -| |-- mocks -| |-- unit -| `-- test_helper.rb -`-- vendor +| |-- models +| `-- views +| `-- layouts +|-- components +|-- config +| |-- enviroments +| | |-- development.rb +| | |-- production.rb +| | `-- test.rb +| |-- database.yml +| |-- enviroment.rb +| `-- routes.rb +|-- db +|-- doc +|-- lib +|-- log +| |-- development.log +| |-- production.log +| |-- server.log +| `-- test.log +|-- public +|-- script +|-- test +| |-- fixtures +| |-- functional +| |-- mocks +| |-- unit +| `-- test_helper.rb +`-- vendor # Methods ### Strings -capitalize! -center -chomp! -chop -concat -count -crypt -delete! -downcase! -dump -each -each_byte -empty? -gsub! -hash -hex -include? -index -intern -length -|just, rjust -next! -oct -replace -reverse! -rindex -scan -slice! -split -squeeze! -strip! -sub! -sum -swapcase! -tr! -tr_s -unpack -upcase! -upto +capitalize! +center +chomp! +chop +concat +count +crypt +delete! +downcase! +dump +each +each_byte +empty? +gsub! +hash +hex +include? +index +intern +length +|just, rjust +next! +oct +replace +reverse! +rindex +scan +slice! +split +squeeze! +strip! +sub! +sum +swapcase! +tr! +tr_s +unpack +upcase! +upto ### Regex -escape -last_match -new -quote -casefold? -kcode -match -source -## Time -asctime -ctime -day -gmt? -gmtime -hour -isdst -localtime -mday -min -mon -month -sec -strftime -tv_sec -tv_usec -usec -utc -utc? -wday -yday -year -zone - +escape +last_match +new +quote +casefold? +kcode +match +source +### Time +asctime +ctime +day +gmt? +gmtime +hour +isdst +localtime +mday +min +mon +month +sec +strftime +tv_sec +tv_usec +usec +utc +utc? +wday +yday +year +zone ### Arrays -assoc -at -clear -collect! -compact! -concat -delete -delete_at -delete_if -each -each_index -empty? -eql? -fill -first -flatten! -include? -index -indexes -join -last -length -nitems -pack -pop -push -rassoc -reject! -replace -reverse! -reverse_each -rindex -shift -slice! -sort! -uniq! -unshift +assoc +at +clear +collect! +compact! +concat +delete +delete_at +delete_if +each +each_index +empty? +eql? +fill +first +flatten! +include? +index +indexes +join +last +length +nitems +pack +pop +push +rassoc +reject! +replace +reverse! +reverse_each +rindex +shift +slice! +sort! +uniq! +unshift ### Validation -condition_block? -create! -evaluate_condition -validate -validate_on_create -validate_on_update -validates_acceptance_of -validates_associated -validates_confirmation_of -validates_each -validates_exclusion_of -validates_format_of -validates_inclusion_of -validates_length_of -validates_numericality_of -validates_presence_of -validates_size_of -validates_uniqueness_of +condition_block? +create! +evaluate_condition +validate +validate_on_create +validate_on_update +validates_acceptance_of +validates_associated +validates_confirmation_of +validates_each +validates_exclusion_of +validates_format_of +validates_inclusion_of +validates_length_of +validates_numericality_of +validates_presence_of +validates_size_of +validates_uniqueness_of ### Enumerable Mixin -collect -each_with_index -entries -find -find_all -grep -include? -max -min -reject -sort +collect +each_with_index +entries +find +find_all +grep +include? +max +min +reject +sort # Pre-defined Variables -$! Exception information -$& String of last match -$` String left of last match -$' String right of last match -$+ Last group of last match -$N Nth group of last match -$= Case insensitive flag -$/ Input record separator -$\ Output record separator -$, Output field separator -$. Current line number of last file read -$> Default output for print -$_ Last input line of string -$0 Name of script -$* Command line arguments -$stderr Standard error output -$stdin Standart input -$stdout Standart output -$-a True if -a is set. -$-d Status of -d switch -$-l True if -l is set -$-p True if -p is set -$-v Verbose Flag +$! Exception information +$& String of last match +$` String left of last match +$' String right of last match +$+ Last group of last match +$N Nth group of last match +$= Case insensitive flag +$/ Input record separator +$\ Output record separator +$, Output field separator +$. Current line number of last file read +$> Default output for print +$_ Last input line of string +$0 Name of script +$* Command line arguments +$stderr Standard error output +$stdin Standart input +$stdout Standart output +$-a True if -a is set. +$-d Status of -d switch +$-l True if -l is set +$-p True if -p is set +$-v Verbose Flag # Reserved Words -begin -elsif -rescue -=end -end -retry -BEGIN -ensure -return -END -false -self -alias -for -super -and -if -then -begin -in -true -break -module -undef -case -next -unless -class -nil -until -def -not -when -defined? -or -while -do -redo -yield -else +begin +elsif +rescue +=end +end +retry +BEGIN +ensure +return +END +false +self +alias +for +super +and +if +then +begin +in +true +break +module +undef +case +next +unless +class +nil +until +def +not +when +defined? +or +while +do +redo +yield +else # Regular Expression Syntax -^ Start of string -$ End of string -. Any single character -(a|b) a or b -(...) Group section -[abc] Item in range (a or b or c) -[^abc] Not in range (not a or b or c) -a? Zero or one of a -a* Zero or more of a -a+ One or more of a -a{3} -test -Exactly 3 of a -a{3,} 3 or more of a -a{3,6} -Between 3 and 6 of a -!(pattern) "Not" prefix. Apply rule when URL does not match pattern. +^ Start of string +$ End of string +. Any single character +(a|b) a or b +(...) Group section +[abc] Item in range (a or b or c) +[^abc] Not in range (not a or b or c) +a? Zero or one of a +a* Zero or more of a +a+ One or more of a +a{3} +test +Exactly 3 of a +a{3,} 3 or more of a +a{3,6} +Between 3 and 6 of a +!(pattern) "Not" prefix. Apply rule when URL does not match pattern. From aef0080280989b5a63434bd1abce98c499aea087 Mon Sep 17 00:00:00 2001 From: Denny Mueller Date: Tue, 24 Sep 2013 11:14:41 +0200 Subject: [PATCH 05/11] Update rails.md --- rails.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rails.md b/rails.md index a7d56f4..c15cd61 100644 --- a/rails.md +++ b/rails.md @@ -3,21 +3,21 @@ rails_root |-- app | |-- assets | |-- controllers -| | `-- application.rb +| | |-- application.rb | |-- helpers -| | `-- application_helper.rb +| | |-- application_helper.rb | |-- models | `-- views -| `-- layouts +| |-- layouts |-- components |-- config | |-- enviroments | | |-- development.rb | | |-- production.rb -| | `-- test.rb +| | |-- test.rb | |-- database.yml | |-- enviroment.rb -| `-- routes.rb +| |-- routes.rb |-- db |-- doc |-- lib @@ -25,7 +25,7 @@ rails_root | |-- development.log | |-- production.log | |-- server.log -| `-- test.log +| |-- test.log |-- public |-- script |-- test @@ -33,8 +33,8 @@ rails_root | |-- functional | |-- mocks | |-- unit -| `-- test_helper.rb -`-- vendor +| |-- test_helper.rb +|-- vendor # Methods ### Strings From 7e7641068e13987e01faf508a974d8fa17230522 Mon Sep 17 00:00:00 2001 From: Denny Mueller Date: Tue, 24 Sep 2013 11:16:30 +0200 Subject: [PATCH 06/11] Update rails.md --- rails.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rails.md b/rails.md index c15cd61..4bfa2d4 100644 --- a/rails.md +++ b/rails.md @@ -1,14 +1,14 @@ # Default Directory Structure rails_root |-- app -| |-- assets -| |-- controllers -| | |-- application.rb -| |-- helpers -| | |-- application_helper.rb -| |-- models -| `-- views -| |-- layouts +:| |-- assets +:| |-- controllers +:| | |-- application.rb +:| |-- helpers +:| | |-- application_helper.rb +:| |-- models +:| |-- views +:| |-- layouts |-- components |-- config | |-- enviroments From 5fd8e63bb2be0cee3817092c7fa557ab318abe26 Mon Sep 17 00:00:00 2001 From: Denny Mueller Date: Tue, 24 Sep 2013 11:16:38 +0200 Subject: [PATCH 07/11] Update rails.md --- rails.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rails.md b/rails.md index 4bfa2d4..8e7ea64 100644 --- a/rails.md +++ b/rails.md @@ -1,7 +1,7 @@ # Default Directory Structure rails_root |-- app -:| |-- assets +: | |-- assets :| |-- controllers :| | |-- application.rb :| |-- helpers From b00b2466b2c43f5dedeb32a830a0d7bd03d596fd Mon Sep 17 00:00:00 2001 From: Denny Mueller Date: Tue, 24 Sep 2013 11:17:49 +0200 Subject: [PATCH 08/11] Update rails.md --- rails.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rails.md b/rails.md index 8e7ea64..34f2509 100644 --- a/rails.md +++ b/rails.md @@ -1,14 +1,14 @@ # Default Directory Structure rails_root |-- app -: | |-- assets -:| |-- controllers -:| | |-- application.rb -:| |-- helpers -:| | |-- application_helper.rb -:| |-- models -:| |-- views -:| |-- layouts +|: |-- assets +| |-- controllers +| | |-- application.rb +| |-- helpers +| | |-- application_helper.rb +| |-- models +| |-- views +| |-- layouts |-- components |-- config | |-- enviroments From 39824ce0688c793675280ccbfa642a2c2a764c8c Mon Sep 17 00:00:00 2001 From: Denny Mueller Date: Tue, 24 Sep 2013 11:18:42 +0200 Subject: [PATCH 09/11] Update rails.md --- rails.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rails.md b/rails.md index 34f2509..d3cf8e2 100644 --- a/rails.md +++ b/rails.md @@ -1,7 +1,8 @@ # Default Directory Structure +` rails_root |-- app -|: |-- assets +| |-- assets | |-- controllers | | |-- application.rb | |-- helpers @@ -35,7 +36,7 @@ rails_root | |-- unit | |-- test_helper.rb |-- vendor - +` # Methods ### Strings capitalize! From 815ddcd21ed31804291fc97e139591c79d79f45b Mon Sep 17 00:00:00 2001 From: Denny Mueller Date: Tue, 24 Sep 2013 11:22:27 +0200 Subject: [PATCH 10/11] Update rails.md --- rails.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/rails.md b/rails.md index d3cf8e2..cc45eda 100644 --- a/rails.md +++ b/rails.md @@ -1,24 +1,24 @@ # Default Directory Structure -` +``` rails_root |-- app | |-- assets | |-- controllers -| | |-- application.rb +| | `-- application.rb | |-- helpers -| | |-- application_helper.rb +| | `-- application_helper.rb | |-- models -| |-- views -| |-- layouts +| `-- views +| `-- layouts |-- components |-- config | |-- enviroments | | |-- development.rb | | |-- production.rb -| | |-- test.rb +| | `-- test.rb | |-- database.yml | |-- enviroment.rb -| |-- routes.rb +| `-- routes.rb |-- db |-- doc |-- lib @@ -26,7 +26,7 @@ rails_root | |-- development.log | |-- production.log | |-- server.log -| |-- test.log +| `-- test.log |-- public |-- script |-- test @@ -34,9 +34,9 @@ rails_root | |-- functional | |-- mocks | |-- unit -| |-- test_helper.rb -|-- vendor -` +| `-- test_helper.rb +`-- vendor +``` # Methods ### Strings capitalize! From 036de748abab55eb41cd3a17b771affd5a9b0240 Mon Sep 17 00:00:00 2001 From: Denny Mueller Date: Tue, 24 Sep 2013 11:24:38 +0200 Subject: [PATCH 11/11] Update rails.md --- rails.md | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/rails.md b/rails.md index cc45eda..c000e0c 100644 --- a/rails.md +++ b/rails.md @@ -253,20 +253,17 @@ else # Regular Expression Syntax -^ Start of string -$ End of string -. Any single character -(a|b) a or b -(...) Group section -[abc] Item in range (a or b or c) -[^abc] Not in range (not a or b or c) -a? Zero or one of a -a* Zero or more of a -a+ One or more of a -a{3} -test -Exactly 3 of a -a{3,} 3 or more of a -a{3,6} -Between 3 and 6 of a -!(pattern) "Not" prefix. Apply rule when URL does not match pattern. +`^` Start of string +`$` End of string +`.` Any single character +`(a|b)` a or b +`(...)` Group section +`[abc]` Item in range (a or b or c) +`[^abc]` Not in range (not a or b or c) +`a?` Zero or one of a +`a*` Zero or more of a +`a+` One or more of a +`a{3}` Exactly 3 of a +`a{3,}` 3 or more of a +`a{3,6}` Between 3 and 6 of a +`!(pattern)` "Not" prefix. Apply rule when URL does not match pattern.