2012-04-05 12:06 package install: Theme - Pseudo OSX Theme - Soda open Sublime Text 2 -> Preferences -> Settings - User add following config: "theme": "Pseudo OSX.sublime-theme", // "theme": "Soda Dark.sublime-theme", switching theme by uncomment the selected theme config, the theme config will immediately take effect when settings saved. |
2012-03-14 18:38 sublimelint (http://github.com/Kronuz/SublimeLinter) 是个Sublme text2插件,用于在保存文件时能检查代码的语法,默认支持Javascript,python,ruby,php,java,perl,可以及早发现一些如忘记逗号分号之类低级错误。 ruby 1.9 支持新的hash rocket 语法 (http://peepcode.com/blog/2011/rip-ruby-hash-rocket-syntax),如 {key:"value",dr_nic |
2012-03-14 17:27 2012-02-28 17:30 gems/mongoid-2.4.5/lib/mongoid/config.rb:249:in `check_database!': MongoDB 1.6.3 not supported, please upgrade to 2.0.0. (Mongoid::Errors::UnsupportedVersion) $ brew --version 0.7.1 $ brew install mongodb Formula already installed: /usr/local/Cellar/mongodb/1.6.3-x86_64 $ mongod --version db version v1.6.3, pdfile version 4.5 Tue Feb 28 17:24:07 git version |
2012-02-24 18:46 难点在于如果构造出一个假的imap server,然imap client能”连接“上,rspec代码为: describe 'MyImapClient' do context "test imap" do it "should be able to get my mail using imap connect" do imaps_test do |port| @imap_client = Net::IMAP.new("localhost", :port => port, : |
2012-02-21 12:30 require 'webmock/rspec' 发现执行 Feedzirra::Feed.fetch_and_parse(‘http://news.yahoo.com/rss/economy’) 没有触发webmock 原因是为了实现高效的数据抓取,Feedzirra使用了curb,curb不是用net::http,所以webmock无法勾住。 那只好勾住fetch_and_parse,让这个方法返回已经适当的值就行,具体如下: stub(Feedzirra::Feed).fetch_and_parse do |url| resp = Net::HTTP.g |
2012-02-16 18:05 # with block argument MyClass.run { puts "start" } # rspec mocks: MyClass.stub!(:run).and_yield # rr: mock(MyClass).run { |block| block.call } # by argument type # rr: stub(User).find do |id| if id != '123' raise "Unexpected id #{id.inspect} passed to me" else fake |
2012-02-16 10:43 1. 下载Color Scheme文件 https://github.com/antlong/Textmate-Themes/blob/master/Railscasts%202.tmTheme 2. 保存到 ~/Library/Application Support/Sublime Text 2/Packages/Color Scheme - Default 3. 修改设置(command + ,) { "color_scheme": "Packages/Color Scheme - Default/Railscasts.tmTheme", "font_size": 14.0 } |
2012-02-13 18:33 不知怎么的Textmate部分功能出异常了,例如Duplicate line / selection 快捷键是: CTRL+SHIFT+D 按下但出现: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/pathname.rb:263: warning: `*' interpreted as argument prefix /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/dependency.rb:52: warning: instance variable @type not initialized /System/Library/Fra |
2012-02-11 18:57 open ~/Library/Application Support/Sublime Text 2/Packages/Rails/Ruby Haml Comments.tmPreferences
replace <string>/ </string> with <string>-# </string> tips: http://www.sublimetext.com/forum/viewtopic.php?f=4&t=3995 |
| | |