Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
Hooopo
@hooopo
管理员
第 8 位会员 / 2011-10-28

[email protected]
nil
北京
160 篇帖子 / 3013 条回帖
360 关注者
0 正在关注
74 收藏
聪明的妖怪录下了唐僧的紧箍咒
打赏作者
GitHub Public Repos
  • oh-my-github-circles 47

    GitHub User Circle Generator Using GitHub Actions

  • hackernews-insight 21

    Hackernews Insight using TiDB Cloud

  • repo-track-pipeline 6

    🔄 A flexible open-source data pipeline for seamlessly syncing data from any repository to your da...

  • oh-my-github-pipeline 6

    🔄 A flexible open-source data pipeline for seamlessly syncing data from any github user to your d...

  • chatgpt-xiaoai 3

    小爱音箱集成LLM,SaaS 服务

  • repo-contributor-circles 1

    GitHub repo contributor circles generator.

  • ossinsight-x 1

    Automatically post trending repos to Twitter every day.

  • mi-service 1

    XiaoMi Cloud Service for mi.com

  • hooopo 0

  • streamlit-echarts-demo 0

    Demo for Streamlit ECharts component

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • One Assertion Per Test & DAMP Not DRY at 2013年05月21日

    #12 楼 @knwang 学习了

  • RSpec or Minitest? at 2013年05月21日

    #21 楼 @bhuztez 这太原始了吧。不过你说的也有道理啊。。实际上也就这个流程。

  • RSpec or Minitest? at 2013年05月21日

    #19 楼 @luikore 这个? 好像不是..

    ##
    # Provides before/after hooks for setup and teardown. These are
    # meant for library writers, NOT for regular test authors. See
    # #before_setup for an example.
    
    module LifecycleHooks
    
      ##
      # Runs before every test, before setup. This hook is meant for
      # libraries to extend minitest. It is not meant to be used by
      # test developers.
      #
      # As a simplistic example:
      #
      #   module MyMinitestPlugin
      #     def before_setup
      #       super
      #       # ... stuff to do before setup is run
      #     end
      #
      #     def after_setup
      #       # ... stuff to do after setup is run
      #       super
      #     end
      #
      #     def before_teardown
      #       super
      #       # ... stuff to do before teardown is run
      #     end
      #
      #     def after_teardown
      #       # ... stuff to do after teardown is run
      #       super
      #     end
      #   end
      #
      #   class MiniTest::Test
      #     include MyMinitestPlugin
      #   end
    

    搜了一下还真没有

    nothing for before_tests though, dammit. I can't believe this still doesn't exist outside of rspec after all these years.

  • RSpec or Minitest? at 2013年05月21日

    #10 楼 @bhuztez 说起 REPL,Ruby 的 Pry 不知道比这两个先进多少倍...

  • RSpec or Minitest? at 2013年05月21日

    #11 楼 @luikore 用 minitest specs 就可以使用 it,并且重名不会覆盖。 全局 teardown?

    MiniTest::Unit.after_tests do
      puts "all test finished!"
    end
    
  • RSpec or Minitest? at 2013年05月19日

    #7 楼 @bhuztez 还真的不支持 Erlang 语法高亮呢 你一来就跑题.......

  • RSpec or Minitest? at 2013年05月19日

    #1 楼 @zgm 已更新..

  • RSpec or Minitest? at 2013年05月19日

    #2 楼 @doitian 哪个是正确的?

  • 服务器自动监控并报警. at 2013年05月17日

    好像有好多监控软件啊 ruby 的有 god

  • 写一个 Gem 需要哪些知识? at 2013年05月17日

    #14 楼 @yzhrain @_@

  • 写一个 Gem 需要哪些知识? at 2013年05月17日

    #16 楼 @reyesyang 名字起的好啊

  • 写一个 Gem 需要哪些知识? at 2013年05月17日

    #15 楼 @ywjno http://huangzhimin.com/2012/08/06/how-to-write-a-jruby-gem-part-1/

  • 写一个 Gem 需要哪些知识? at 2013年05月17日

    #3 楼 @Saito 就是 heroku 那个家伙呀 他用 commit 历史画了他名字的图.. https://github.com/will

  • 隐晦的 Ruby 语法:单字符的字符串 at 2013年05月17日

    这个用法是 1.9 新加的,和 1.8.7 还不兼容。

    [~/work] $ ruby -v -e "p ?a"
    ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
    97
    
    [~/work] $ ruby -v -e "p ?a"
    ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.3.0]
    "a"
    
    # A shortcut to HighLine.ask() a question that only accepts "yes" or "no"
    # answers ("y" and "n" are allowed) and returns +true+ or +false+
    # (+true+ for "yes").  If provided a +true+ value, _character_ will cause
    # HighLine to fetch a single character response. A block can be provided
    # to further configure the question as in HighLine.ask()
    # 
    # Raises EOFError if input is exhausted.
    #
    def agree( yes_or_no_question, character = nil )
      ask(yes_or_no_question, lambda { |yn| yn.downcase[0] == ?y}) do |q|
        q.validate                 = /\Ay(?:es)?|no?\Z/i
        q.responses[:not_valid]    = 'Please enter "yes" or "no".'
        q.responses[:ask_on_error] = :question
        q.character                = character
    
        yield q if block_given?
      end
    end
    

    哇,他这种写法是可以兼容 1.9 和 1.8 的.... 1.8 的 String#[] 返回 ascii,?也返回 ascii 1.9 的 String#[] 返回字符串,?也返回字符串

  • Working With Unix Processes for Rubyist at 2013年05月16日

    #15 楼 @bhuztez #14 楼 @ensonmj
    u r all dashen.

  • [杭州][2013年5月16日] Ruby Tuesday 活动召集 - 朴灵讲 nodejs at 2013年05月16日

    #35 楼 @Saito 专业挖掘黑历史..

  • [杭州][2013年5月16日] Ruby Tuesday 活动召集 - 朴灵讲 nodejs at 2013年05月16日

    #36 楼 @xieren58 每次听到 ruby 开发者说“npm 比 bundler 好用”我就只能“interesting”了

  • [杭州][2013年5月16日] Ruby Tuesday 活动召集 - 朴灵讲 nodejs at 2013年05月16日

    #29 楼 @jiyinyiyong 主要是只会写 hello world 啦 匿..

  • can't type chinese on mobile at 2013年05月16日

    #37 楼 @Rei 图不错..收了

  • [杭州][2013年5月16日] Ruby Tuesday 活动召集 - 朴灵讲 nodejs at 2013年05月16日

    #26 楼 @bhuztez 我记得当时 node 的 logo 上还有一朵云呢 现在怎么变得那么丑?

  • [杭州][2013年5月16日] Ruby Tuesday 活动召集 - 朴灵讲 nodejs at 2013年05月16日

    #23 楼 @bhuztez 擦 我记得我刚开始折腾的时候也是 0.1 呢 http://helloworld.group.iteye.com/group/topic/20827

    不过后来这东西火的一塌糊涂,就没心情用了..

  • 如何让 Session 在 Rails 项目和 PHP 项目间共享? at 2013年05月15日

    I think it's a AB problem, however, what's your real problem, LZ?

  • can't type chinese on mobile at 2013年05月15日

    #29 楼 @jasl 大家好才是真的好

  • can't type chinese on mobile at 2013年05月15日

    #20 楼 @jimrokliu 蝙蝠挂了..

  • can't type chinese on mobile at 2013年05月15日

    #23 楼 @Los ..

  • can't type chinese on mobile at 2013年05月15日

    #24 楼 @reyesyang 那是我的手机输入法问题啦

  • can't type chinese on mobile at 2013年05月15日

    #25 楼 @lgn21st 快别这么说。

  • can't type chinese on mobile at 2013年05月15日

    #19 楼 @huacnlee ok,thanks...

  • can't type chinese on mobile at 2013年05月11日

    #13 楼 @jasl confusing too

  • 上一页
  • 1
  • 2
  • …
  • 59
  • 60
  • 61
  • 62
  • 63
  • …
  • 108
  • 109
  • 下一页
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English