Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: hchoroomi/ruby-style-guide
base: 45feb66b1e
...
head fork: hchoroomi/ruby-style-guide
compare: 95f7e7ed7d
Checking mergeability… Don't worry, you can still create the pull request.
Commits on Sep 14, 2011
@harbichidian harbichidian Reset lines to 80 characters 9f8ab7b
@harbichidian harbichidian Edited for grammar and formatting. 03cbfba
@harbichidian harbichidian Moved Emacs stuff to parentheses. 9872e4e
@harbichidian harbichidian Made argument naming convention consistent. dbc387b
@harbichidian harbichidian Made argument naming convention consistent. 861cf3b
@harbichidian harbichidian Merge branch 'master' of github.com:echoback/ruby-style-guide 3e6b326
@harbichidian harbichidian Combined Steve McConell quote with its parent bullet 5de71f6
@bbatsov bbatsov Merge pull request #6 from echoback/master
Edited formatting and grammar for consistency.
7a2203e
Bozhidar Batsov fixed heading 3add7a8
Bozhidar Batsov formatting fix 8d46362
Bozhidar Batsov improved the header a bit 15e47f1
@bbatsov bbatsov started sections on classes and exceptions c7d8768
Commits on Sep 15, 2011
@eregon eregon Adapt enumerable methods preference between find_all and select 981f67e
@Gonzih Gonzih fix typo 1f379fc
@bbatsov bbatsov Merge pull request #14 from Gonzih/master
fixed a typo
e3ddc20
Commits on Sep 16, 2011
@excepttheweasel excepttheweasel Recommend against rescuing Exception f044210
@lyleunderwood lyleunderwood fixed a grammar issue d8519e5
@bbatsov bbatsov Merge pull request #19 from lyleunderwood/patch-1
fixed a grammar issue
3e09547
@bbatsov bbatsov Merge pull request #18 from excepttheweasel/patch-1
Recommend against rescuing Exception
1e60da9
@bbatsov bbatsov Merge pull request #13 from eregon/patch-1
Adapt enumerable methods preference between find_all and select
527224c
@restorer restorer Fix examples for "case" 00032bf
@bbatsov bbatsov Merge pull request #20 from restorer/master
Fix examples for "case"
f994799
Bozhidar Batsov improved formatting 7e83122
Bozhidar Batsov fixed the single line when rule and added a couple of new rules ee895dd
Bozhidar Batsov fixed a typo d76ad22
@stevenharman stevenharman In the digital age, we use one space after periods. Period. f659b21
@bbatsov bbatsov Merge pull request #22 from stevenharman/patch-1
In the digital age, we use one space after periods.
fec9452
@geoffyoungs geoffyoungs Added use class/module singleton methods in preference to global vari…
…ables.
1d48b95
@bbatsov bbatsov Merge pull request #24 from geoffyoungs/patch-1
Added use class/module singleton methods in preference to global variable
db7bdec
@bbatsov bbatsov clearer wording of the newly added advice 409bdbd
@bbatsov bbatsov fixed issue #15 25be93e
@bbatsov bbatsov added a few more rules from TRPL book 0f01b15
@bbatsov bbatsov fixed a bunch of typos be08fb1
Commits on Sep 17, 2011
@mitio mitio Remove trailing whitespace, fix punctuation and minor mistakes. 8a50545
@mitio mitio Add a third option for defining class methods. eb80893
Commits on Sep 18, 2011
@mkorfmann mkorfmann favor ternary operator over if/then/else/end 5830b65
@mkorfmann mkorfmann add example to ternary operator rule 2405608
@mkorfmann mkorfmann typos d78137c
@mitio mitio Add string section with interpolation hints. 8a4ab51
@mitio mitio Prefer String#<< instead of String#+ 3507928
@bbatsov bbatsov Merge pull request #27 from mitio/strings
Strings section
a0a2be7
@mitio mitio Merge branch 'master' of git://github.com/bbatsov/ruby-style-guide a95ffa3
@bbatsov bbatsov Merge pull request #26 from mkorfmann/master
Favor ternary operators
0fb6387
@bbatsov bbatsov Merge pull request #25 from mitio/master
Minor fixes and an additional way for defining singleton methods
51b5d46
@bbatsov bbatsov fixed a typo c7f6612
@bbatsov bbatsov the Perl-style variables are of course special, not global 875fbe2
Commits on Sep 19, 2011
Burke Libbey Added section on annotations 73fee24
Burke Libbey Added an opinion on indentation of access modifiers 8ccea6c
@bbatsov bbatsov Merge pull request #33 from burke/access-modifiers
Added an opinion on indentation of access modifiers
2c1dd34
@bbatsov bbatsov Merge pull request #32 from burke/master
Annotations
04bcdcc
Burke Libbey Added section on percent functions e5d5186
Burke Libbey Undo fatfinger increment 5e5d6f5
@bbatsov bbatsov Merge pull request #34 from burke/percents
Added section on percent functions
a29b842
@mitio mitio %w etc are syntax literals, not functions. 49f38fd
@mitio mitio Use consistently "multi-line", not "multiline". c3ba754
@bbatsov bbatsov Merge pull request #35 from mitio/percent-literals
%w etc are syntax literals, not functions.
324df32
@bbatsov bbatsov Merge pull request #36 from mitio/wording-consistency
Use consistently "multi-line", not "multiline".
d13cd9d
Burke Libbey Added unless/else guideline 7733e3e
Commits on Sep 20, 2011
@bbatsov bbatsov Merge pull request #38 from burke/unlesselse
Added unless/else guideline
3e91948
Commits on Sep 22, 2011
@bbatsov bbatsov fixed a few errors a08f5cc
@bbatsov bbatsov corrected indentation level 1182c91
@bbatsov bbatsov better wording 47c97ea
@bbatsov bbatsov added a few small emacs tips 019af68
@bbatsov bbatsov minor fix 04e436f
@bbatsov bbatsov this indentation is driving me crazy... 45fdf40
@bbatsov bbatsov fixed a typo eb137df
Commits on Sep 23, 2011
@bbatsov bbatsov added some more editor hints 6c1baad
@bbatsov bbatsov various updates 1060e65
Commits on Sep 26, 2011
Bozhidar Batsov fixed a heading 1b18587
@bbatsov bbatsov minor update 3ff4a43
@bbatsov bbatsov fixed a typo 9b3db7c
@jmettraux jmettraux typo 840faa5
@bbatsov bbatsov Merge pull request #41 from jmettraux/master
it's --> its
84a7af0
Commits on Sep 27, 2011
@mrtazz mrtazz add vim config option for 80 chars line length f2dc987
@bbatsov bbatsov Merge pull request #42 from mrtazz/patch-1
add vim config option for 80 chars line length
55e123e
@meh meh Better non modifying way to see if there are trailing spaces. 4691fd1
@bbatsov bbatsov Merge pull request #43 from meh/patch-1
Better non modifying way to see if there are trailing spaces.
585fe17
Phillip Ridlen 'Amount' should be 'number' 593a579
@bbatsov bbatsov Merge pull request #45 from philtr/master
'Amount' should be 'number'
b7bc05a
@bbatsov bbatsov fixed a typo ec4dcd2
Commits on Oct 01, 2011
@eMxyzptlk eMxyzptlk Add some rake tasks to easily generate a PDF or an HTML file of the g…
…uide.

The rake tasks uses Redcarpet, Albino and PDFkit to generate a beautiful
colorized HTML and PDF files, from the README, the logic is the same used by
Github to parse markdown.
b6fffe7
@eMxyzptlk eMxyzptlk Use ruby 1.8 lambda style. cdeaa06
@eMxyzptlk eMxyzptlk Remove Gemlock.lock file as it has some gems only for mac, besides we…
… have locked most versions in the Gemfile itself.
13f5ea4
@eMxyzptlk eMxyzptlk HtmlGenerator is more descriptive than MarkdownGenerator, it generate…
…s HTML after all.
9259d76
@eMxyzptlk eMxyzptlk Use ruby 1.8 lambda style. 1c1c00a
@eMxyzptlk eMxyzptlk Remove false assertion. a92eafa
@eMxyzptlk eMxyzptlk Update bundles. 4183df0
@eMxyzptlk eMxyzptlk Add a little note on how to generate HTML/PDF version in the README. ec1e662
@eMxyzptlk eMxyzptlk Hard wrap makes the document too long. e7d7f27
Phillip Ridlen Add formatting exception for exponent operator.
Fixes #44
ea832ae
Phillip Ridlen Remove extra spaces before code block
(#44)
1c90cc8
@eMxyzptlk eMxyzptlk Add a note about requirements in the README. 626ce31
@eMxyzptlk eMxyzptlk Put the command on a new line. 2f55c15
@bbatsov bbatsov Merge pull request #50 from eMxyzptlk/generation
Add some rake tasks to easily generate a PDF or an HTML file of the guide
114152b
@bbatsov bbatsov fixed indentation level 2da5592
@bbatsov bbatsov typo 37cc4c7
Commits on Oct 02, 2011
@bbatsov bbatsov enforced the single quoted strings rule across all examples in the guide 3c42fef
@bbatsov bbatsov added an instance variable interpolation rule 1a4ebd4
@bbatsov bbatsov fixed indentation 64cc624
Commits on Oct 03, 2011
@Heliosmaster Heliosmaster fixed instruction about single quotes + typo 0356bdd
@bbatsov bbatsov Merge pull request #51 from Heliosmaster/master
Quotes
be7f3c4
Commits on Oct 05, 2011
Phillip Ridlen Add preface about real-world usage vs. ideal usage 59a96d4
Brandon Philips README.md: remove trailing whitespace and tabs
README.md had some trailing whitespace and in one location tabs were
used instead of spaces to indent some code snippets. Fix both of these
issues.
18653c0
Brandon Philips gitattributes: Initial commit
Add trailing space check for markdown files as several trailing spaces
have crept into the README.md. Also, check for tab-in-indent as the
prevailing style uses spaces for indents.
12028f0
@bbatsov bbatsov Merge pull request #56 from philips/master
fixup whitespace issues
bfb6acf
@bbatsov bbatsov Merge pull request #55 from philtr/realworld
Add preface about real-world usage vs. ideal usage
3809e75
@mitio mitio Fix broken code block indentation 70570a2
@bbatsov bbatsov Merge pull request #57 from mitio/fix-indentation
Fix broken code block indentation
10695cb
Commits on Oct 07, 2011
Phillip Ridlen Convert quotes to Markdown blockquote syntax 61a9061
@bbatsov bbatsov Merge pull request #58 from philtr/quotes
Convert quotes to Markdown blockquote syntax
bf5a8a8
Commits on Oct 09, 2011
@originell originell Replace vim's auto-linebreak with highlighting of the 80th column.
This might be more preferable since it does not automatically break code or enforces you to line-break there. Sometimes it might be preferable to have lines longer than 80 characters, for example when quickly sketching out an idea. I guess this is more in the spirit of PEP8, where having a line length of 79 characters is just a recommendation and no enforcement.

Add Syntax Highlighting to the vim/emacs code snippets.
68428b4
@bbatsov bbatsov added an example 931cf16
@bbatsov bbatsov fixes #52 e61e9d4
@bbatsov bbatsov Merge pull request #59 from originell/patch-1
Replace vim's auto-linebreak with highlighting of the 80th column.
0e5e574
@tmaier tmaier Avoid page break in code blocks 394cf5d
@bbatsov bbatsov Merge pull request #60 from tmaier/patch-1
Avoid page break in code blocks
3cf3389
Commits on Oct 11, 2011
@bbatsov bbatsov added a new rule about using parentheses around an if condition 2f54da0
@bbatsov bbatsov added a new rule and a bit of rationale for the `for` rule c30722e
@bbatsov bbatsov started work on a collections section b27eff1
Commits on Oct 17, 2011
Daniel Esplin Clarify usage of empty lines inside methods.
This removes the empty line before return value rule in favor of a
more generic line breaks for delimiting paragraphs approach.
74a6727
Commits on Oct 21, 2011
Bozhidar Batsov added a table of contents 81f9b3a
Bozhidar Batsov fixed toc 25de415
@bbatsov bbatsov fixed a typo 0b313cd
Commits on Oct 23, 2011
@bbatsov bbatsov fixed a typo f9e1e46
Commits on Oct 24, 2011
@bbatsov bbatsov Merge pull request #61 from eremite/master
Empty lines before return values?
64ce870
Commits on Oct 29, 2011
@bbatsov bbatsov removed the HTML/PDF generation code 59a8349
Commits on Nov 23, 2011
@bbatsov bbatsov a few updates 6b1470c
@bbatsov bbatsov fixed a typo 299d937
Commits on Jan 06, 2012
@amiel amiel Add requirement of parens when using assignment in a conditional.
Closes #53.
d06c70d
Commits on Jan 09, 2012
@asifkalam asifkalam Syntax fix. 20893df
Commits on Jan 10, 2012
@bbatsov bbatsov Merge pull request #67 from asifkalam/master
Syntax fix in 'omit parantheses' example.
e359ed5
@bbatsov bbatsov Merge pull request #65 from amiel/master
Add requirement of parens when using assignment in a conditional.
acdf848
Commits on Feb 07, 2012
@bbatsov bbatsov a bit of cleanup d31f312
Commits on Feb 13, 2012
Bozhidar Batsov fixes #69 - prefer `reduce` over `inject` d677d44
Bozhidar Batsov added an example about attr fae7eda
Bozhidar Batsov fixed a typo efd39f7
Bozhidar Batsov added a bunch of examples faaae80
Bozhidar Batsov added a bunch of examples d348321
Commits on Feb 14, 2012
Bozhidar Batsov fixed #71 - clarify Set usage advice 058bc63
Commits on Feb 22, 2012
@orione-team orione-team fixed SOLID link d7fcf8b
@bbatsov bbatsov Merge pull request #77 from xpeppers/master
fixed SOLID link to wikipedia
b92db84
Commits on Feb 28, 2012
Bozhidar Batsov fixed #78 - use _ as a variable placeholder edf22c1
Bozhidar Batsov Merge branch 'master' of github.com:bbatsov/ruby-style-guide a48666f
Bozhidar Batsov expanded the section on exceptions e31e80d
Commits on Mar 01, 2012
Vasil Sakarov Added section for regular expression. e026a7c
@bbatsov bbatsov Merge pull request #81 from vsakarov/master
added regular expression section
232e98d
Bozhidar Batsov fixes #80 - Indentation on multi-line method calls 4e98267
Commits on Mar 26, 2012
@knugie knugie Cannot divide by 0! 2051162
Commits on Mar 27, 2012
@bbatsov bbatsov Merge pull request #90 from knugie/patch-1
fixed a typo
9016f23
Commits on Mar 28, 2012
Bozhidar Batsov extended the metaprogramming section 95f7e7e
Something went wrong with that request. Please try again.