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
| # To send to LA | |
| @my_db_records.each do |r| | |
| LocaleApp::MissingTranslations.add('en', "sometable.some_field.#{id}", r.content) | |
| end | |
| LocaleApp.sender.post_missing_translations | |
| # This will post them up to the app. (They go onto resque first so there may be a short delay before they appear) |
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
| function listener() { | |
| if [[ -f Procfile ]]; then | |
| echo "Starting Foreman" | |
| bundle exec foreman start | |
| else | |
| if [[ -x script/server ]]; then | |
| echo "Starting Rails 2 listener" | |
| script/server $* | |
| else | |
| echo "Starting Rails 3 listener" |
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
| function console() { | |
| if [[ -x script/console ]]; then | |
| script/console $* | |
| else | |
| bundle exec rails c $* | |
| fi | |
| } | |
| function listener() { | |
| if [[ -f Procfile ]]; then |
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
| class Name | |
| def initialize(first_name, last_name) | |
| @first_name, @last_name = first_name, last_name | |
| end | |
| def to_s | |
| "#{first_name} #{last_name}" | |
| end | |
| 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
| chris@tanker % rake spec:ci | |
| (in /Users/chris/dev/MacRuby) | |
| rm -rf rubyspec_temp | |
| ./mspec/bin/mspec ci -B ./spec/macruby.mspec :full | |
| MacRuby 0.8 (ruby 1.9.2) [universal-darwin10.0, x86_64] | |
| .[!] Compiling fixture `/Users/chris/dev/MacRuby/spec/macruby/fixtures/method.m' | |
| ........*** Dispatch block exited prematurely because of an uncaught exception: | |
| /Users/chris/dev/MacRuby/mspec/lib/mspec/expectations/expectations.rb:15:in `fail_with:': Expected true to equal false (SpecExpectationNotMetError) | |
| from /Users/chris/dev/MacRuby/mspec/lib/mspec/matchers/base.rb:9:in `==:' | |
| from /Users/chris/dev/MacRuby/spec/macruby/core/gcd/semaphore_spec.rb:62:in `block' |
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
| chris@tanker % rake | |
| (in /Users/chris/dev/MacRuby) | |
| /usr/bin/g++-4.2 -std=c99 -I. -I./include -fno-common -pipe -g -Wall -fexceptions -O3 -Wno-deprecated-declarations -Werror -arch i386 -arch x86_64 -I./icu-1060 .objs/array.o .objs/bignum.o .objs/class.o .objs/compar.o .objs/complex.o .objs/enum.o .objs/enumerator.o .objs/error.o .objs/eval.o .objs/file.o .objs/load.o .objs/proc.o .objs/gc.o .objs/hash.o .objs/env.o .objs/inits.o .objs/io.o .objs/math.o .objs/numeric.o .objs/object.o .objs/pack.o .objs/parse.o .objs/prec.o .objs/dir.o .objs/process.o .objs/random.o .objs/range.o .objs/rational.o .objs/re.o .objs/ruby.o .objs/signal.o .objs/sprintf.o .objs/st.o .objs/string.o .objs/struct.o .objs/time.o .objs/util.o .objs/variable.o .objs/version.o .objs/thread.o .objs/id.o .objs/objc.o .objs/bs.o .objs/ucnv.o .objs/encoding.o .objs/dln.o .objs/dmyext.o .objs/marshal.o .objs/gcd.o .objs/vm_eval.o .objs/bridgesupport.o .objs/compiler.o .objs/dispatcher.o .objs/vm.o .objs/symbol.o .objs/debugger.o .objs/interprete |
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
| chris@slinky % rvm list | |
| rvm Rubies | |
| jruby-1.3.1 [ [x86_64-java] ] | |
| jruby-1.4.0 [ [x86_64-java] ] | |
| jruby-1.5.0.RC3 [ [x86_64-java] ] | |
| rbx-1.0.0-head [ ] | |
| rbx-1.0.0-rc1 [ ] | |
| ruby-1.8.6-p383 [ x86_64 ] |
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
| chris@slinky % rvm install rbx | |
| Installing pre-requisites | |
| Downloading rubinius-1.0.0-rc5, this may take a while depending on your connection... | |
| % Total % Received % Xferd Average Speed Time Time Time Current | |
| Dload Upload Total Spent Left Speed | |
| 100 8143k 100 8143k 0 0 155k 0 0:00:52 0:00:52 --:--:-- 160k | |
| Extracting ... | |
| Configuring rbx | |
| Compiling rbx | |
| Error running '/Users/chris/.rvm/bin/ruby-1.8.7-p249 -S rake install', please check /Users/chris/.rvm/log/rbx-1.0.0-rc5/rake*.log |
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
| " select at current indent level from http://vim.wikia.com/wiki/Visual_selection_of_indent_block | |
| " modified for ruby to allow selecting the prev and next lines too for blocks | |
| function! SelectIndent (blockmode) | |
| let temp_var=indent(line(".")) | |
| while indent(line(".")-1) >= temp_var | |
| exe "normal k" | |
| endwhile | |
| if a:blockmode == "yes" | |
| exe "normal k" | |
| 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
| function! Run_shitty_tests | |
| silent exe "!truncate log/test.log" | |
| let old_make = &makeprg | |
| let test_command = "ruby -I <some libs> " | |
| let &makeprg = test_command.expand("%") | |
| exe "make!" | |
| let &makeprg = old_make | |
| endfunction | |
| nnoremap <C-c>c :call Run_shitty_tests<cr> |