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
| object @posts | |
| attributes :id, :title, :created_at | |
| child :user do | |
| extends "users/show" | |
| 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
| diff --git a/lib/caching_presenter.rb b/lib/caching_presenter.rb | |
| index 0b11077..4578511 100644 | |
| --- a/lib/caching_presenter.rb | |
| +++ b/lib/caching_presenter.rb | |
| @@ -33,7 +33,11 @@ class CachingPresenter | |
| @cached_instance_methods = Hash.new{ |h,k| h[k] = {}} | |
| write_constructor :presents => @presents, :options => options | |
| %w(class id to_param).each do |method| | |
| - undef_method method if respond_to?(method) | |
| + begin |
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
| namespace :db do | |
| namespace :structure do | |
| desc "Dump the database structure to a SQL file" | |
| task :dump => :load_config do | |
| config = ActiveRecord::Base.configurations[Rails.env] | |
| command = "mysqldump -u #{config["username"]} #{config["database"]} --no-data --skip-comments --skip-add-drop-table > db/#{Rails.env}_structure.sql" | |
| puts "Running: #{command}" | |
| system command |
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
| ➜ ~ rvm install ree | |
| Installing Ruby Enterprise Edition from source to: /Users/lmelia/.rvm/rubies/ree-1.8.7-2011.03 | |
| ree-1.8.7-2011.03 - #fetching (ruby-enterprise-1.8.7-2011.03) | |
| /Users/lmelia/.rvm/scripts/functions/logging: line 14: printf: --: invalid option | |
| printf: usage: printf [-v var] format [arguments] | |
| ree-1.8.7-2011.03 - #installing | |
| Removing old Rubygems files... | |
| Installing rubygems dedicated to ree-1.8.7-2011.03... | |
| Installing rubygems for /Users/lmelia/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby | |
| Installation of rubygems completed successfully. |
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
| ➜ ~ rvm install ree --enable-shared --with-readline-dir=$HOME/.rvm/usr --patch readline-fix --with-iconv-dir=$rvm_path/usr --trace >outfile 2>stderr | |
| ➜ ~ cat outfile | |
| ree --enable-shared --with-readline-dir=/Users/lmelia/.rvm/usr --patch readline-fix --with-iconv-dir=/Users/lmelia/.rvm/usr --trace | |
| rvm 1.6.5 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/] | |
| Installing Ruby Enterprise Edition from source to: /Users/lmelia/.rvm/rubies/ree-1.8.7-2011.03 | |
| ree-1.8.7-2011.03 - #fetching (ruby-enterprise-1.8.7-2011.03) | |
| Applying patch 'readline-fix' (located at /Users/lmelia/.rvm/patches/ree/1.8.7/readline-fix.diff) |
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
| ➜ ~ file .rvm/rubies/ree-1.8.7-2011.03/bin/ruby | |
| .rvm/rubies/ree-1.8.7-2011.03/bin/ruby: a /Users/lmelia/.rvm/rubies/ree-1 script text executable | |
| ➜ ~ cat .rvm/rubies/ree-1.8.7-2011.03/bin/ruby | |
| #!/Users/lmelia/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby | |
| }/usr/lib/libSystem.B.dylib | |
| 8?/usr/lib/libobjc.A.dylib?@ | |
| /Users/lmelia/.rvm/rubies/ree-1.8.7-2011.03/libjH??H???H?H?u?????H?H???H?H?9u?H?? | |
| ???9??UH??H?]?L?e?H?? A??H??H?}??!?H??D?????%>?%@?%B?%D?%Fh?*h | |
| ? h?h4? |
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
| ➜ ~ rvm install ree --enable-shared --with-readline-dir=$HOME/.rvm/usr --patch readline-fix --with-iconv-dir=$rvm_path/usr | |
| Installing Ruby Enterprise Edition from source to: /Users/lmelia/.rvm/rubies/ree-1.8.7-2011.03 | |
| ree-1.8.7-2011.03 - #fetching (ruby-enterprise-1.8.7-2011.03) | |
| /Users/lmelia/.rvm/scripts/functions/logging: line 14: printf: --: invalid option | |
| printf: usage: printf [-v var] format [arguments] | |
| Applying patch 'readline-fix' (located at /Users/lmelia/.rvm/patches/ree/1.8.7/readline-fix.diff) | |
| ree-1.8.7-2011.03 - #installing | |
| Removing old Rubygems files... | |
| /Users/lmelia/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby: command substitution: line 2: syntax error near unexpected token `2' | |
| /Users/lmelia/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby: command substitution: line 2: `hpx(2<@dyld_stub_binderQr(?r8@_exit?r@@_ruby_init?rH@_ruby_init_stack?rP@_ruby_options?rX@_ruby_run?_ |
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
| <html><head></head><body leftMargin="0" topMargin="0" marginwidth="0" marginheight="0"><script language="Javascript1.1" type="text/javascript"> | |
| var ftClick = "http://adclick.g.doubleclick.net/aclk?sa=L&ai=BBntyHeGtTd2_IZLtlQeF7qSkD8jZiuwBAAAAEAEgADgAWLDUiJAgYMnGqYvApNgPggEXY2EtcHViLTE3NDEzNzUwNzQwNTAxODSyARF3d3cubG9jYWxob3N0LmNvbboBCjMwMHgyNTBfYXPIAQnaATdodHRwOi8vd3d3LmxvY2FsaG9zdC5jb20vZ3JvdXBzLzE3OC1UaGUtQmF5c2lkZS1CYWxsZXJzwAIC4AIA6gIeNTI0NS93ZXBsYXlfZ3JvdXAvZ3JvdXBwcm9maWxl-ALw0R6QA-ADmAPgA6gDAdAEkE7gBAE&num=0&sig=AGiWqtwgPZ3gBV_d2qrfHxvMeD-ecveiWQ&client=ca-pub-1741375074050184&adurl=http%3A%2F%2Fad.doubleclick.net%2Fclick%253Bh%253Dv8%2F3aee%2F3%2F0%2F%252a%2Fe%253B239237637%253B0-0%253B1%253B59478063%253B4307-300%2F250%253B41457365%2F41475152%2F1%253B%253B%257Eokv%253D%253Bsect%253Dros%253Bsz%253D300x250%253Btile%253D1%253B%253Bbsg%253D101110%253Bbsg%253D101111%253Bbsg%253D101112%253Bbsg%253D101254%253B%253B%257Eaopt%253D2%2F1%2F75%2F0%253B%257Esscs%253D%253f"; | |
| var ftX = ""; | |
| var ftY = ""; | |
| var ftZ = ""; |
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
| namespace :analyze do | |
| namespace :commits do | |
| desc 'Flog the most commonly revised files in the git history' | |
| task :most_changed_files do | |
| counts = Hash.new(0) | |
| IO.popen("PAGER=cat git log --name-only --pretty=oneline 2>&1") do |pipe| | |
| while (!pipe.eof) do | |
| line = pipe.readline | |
| next unless line =~ /^(app|lib).*\.rb$/ | |
| counts[line.chomp] += 1 |
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
| using System; | |
| using System.Collections; | |
| using System.Collections.Specialized; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using System.Reflection; | |
| using System.Runtime.InteropServices; | |
| using System.Text; | |
| using System.Text.RegularExpressions; | |
| using System.Xml; |