$ rails g model User
belongs_to
has_one
class Player | |
def play_turn(warrior) | |
if warrior.feel.empty? | |
warrior.walk! | |
else | |
warrior.attack! | |
end | |
end | |
end |
Beginning Regex | |
Intro to Regular Expressions by Michael Fitzgeral | |
http://www.amazon.com/Introducing-Regular-Expressions-ebook/dp/B008K9OGDA/ref=sr_1_2?ie=UTF8&qid=1374171971&sr=8-2&keywords=Regular+Expressions | |
Using Regular Expressions in Ruby: Part 1 by Nell Shamrell | |
https://www.bluebox.net/insight/blog-article/using-regular-expressions-in-ruby-part-1-of-3 | |
Intermediate Regex |
<http://nokogiri.org> | |
- Includes helpful tutorials | |
<http://ruby.bastardsbook.com/chapters/html-parsing/> | |
- An easy to understand explanation | |
<http://railscasts.com/episodes/190-screen-scraping-with-nokogiri> | |
-Railscast Video |
Katrina's Beautiful Mapping Layout (most impressive)
https://github.com/MappingKat/gschool-map-blog
Simon's Intentionally Tacky Style
https://github.com/srt32/gschool-blog/tree/styling
https://db.tt/dQoh2Kb4
Simon | |
https://github.com/srt32 | |
http://www.simontaranto.com/ | |
Louisa | |
https://github.com/LouisaBarrett | |
http://www.linkedin.com/in/louisabarrett | |
Kevin | |
https://github.com/x46672 |
development and test gems | |
---------------------------------------------- | |
group :development, :test do | |
gem 'sqlite3' | |
gem 'rspec-rails' | |
gem "capybara" | |
gem 'selenium-webdriver' | |
gem 'shoulda-matchers' | |
gem 'launchy' |
##PROTIP: README Love
READMEs are AWESOME. They are one of the best things you can add to a repo, (other than quality code), to make it look professional.
####Things that make a README great:
This is an excellent post that explains a little bit behind the difficulty in testing external services https://robots.thoughtbot.com/how-to-stub-external-services-in-tests How to Stub External Services in Tests
One simple option is to use Webmock
Here is an example of using Webmock in a similar way to what VCR does - which is recording and reading from a file
stub_request(:any, "www.example.com").
Step One: Watch Writing Testable JavaScript - Rebecca Murphey from Full Frontal 2012 (award for worst conference name ever?)
Step Two: Fork this gist.
Step Three: Consider the four responsibilities that Rebecca lists for client side code (hint: they're color coded).
Step Four: Totally Optional: take a look at some of the other forks and comment if the spirit moves you.