Skip to content

Instantly share code, notes, and snippets.

@vladshablinsky
Last active March 8, 2016 15:54
Show Gist options
  • Select an option

  • Save vladshablinsky/9e933e9ed9082c3f808b to your computer and use it in GitHub Desktop.

Select an option

Save vladshablinsky/9e933e9ed9082c3f808b to your computer and use it in GitHub Desktop.

Revisions

  1. vladshablinsky revised this gist Mar 8, 2016. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions bundle_help.md
    Original file line number Diff line number Diff line change
    @@ -62,6 +62,11 @@ RubyGems Environment:
    - /usr/sbin
    - /sbin
    - /usr/texbin
    ➜ vlad:bundler$ gem list rubygems-bundler master

    *** LOCAL GEMS ***

    rubygems-bundler (1.4.4)
    ```

    # `bin/rspec spec/commands/help_spec.rb` output
  2. vladshablinsky revised this gist Mar 8, 2016. 1 changed file with 68 additions and 0 deletions.
    68 changes: 68 additions & 0 deletions bundle_help.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,71 @@
    #

    ```shell
    ➜ vlad:bundler$ sw_vers master
    ProductName: Mac OS X
    ProductVersion: 10.10.5
    BuildVersion: 14F27
    ➜ vlad:bundler$ ruby -v master
    ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin14]
    ➜ vlad:bundler$ rvm -v master
    rvm 1.26.11 (latest) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]
    ➜ vlad:bundler$ dbundle -v master
    Bundler version 1.12.0.pre.2
    ➜ vlad:bundler$ gem -v master
    2.5.1
    ➜ vlad:bundler$ gem env master
    RubyGems Environment:
    - RUBYGEMS VERSION: 2.5.1
    - RUBY VERSION: 2.3.0 (2015-12-25 patchlevel 0) [x86_64-darwin14]
    - INSTALLATION DIRECTORY: /Users/vlad/.rvm/gems/ruby-2.3.0
    - USER INSTALLATION DIRECTORY: /Users/vlad/.gem/ruby/2.3.0
    - RUBY EXECUTABLE: /Users/vlad/.rvm/rubies/ruby-2.3.0/bin/ruby
    - EXECUTABLE DIRECTORY: /Users/vlad/.rvm/gems/ruby-2.3.0/bin
    - SPEC CACHE DIRECTORY: /Users/vlad/.gem/specs
    - SYSTEM CONFIGURATION DIRECTORY: /Users/vlad/.rvm/rubies/ruby-2.3.0/etc
    - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-14
    - GEM PATHS:
    - /Users/vlad/.rvm/gems/ruby-2.3.0
    - /Users/vlad/.rvm/gems/ruby-2.3.0@global
    - GEM CONFIGURATION:
    - :update_sources => true
    - :verbose => true
    - :backtrace => false
    - :bulk_threshold => 1000
    - REMOTE SOURCES:
    - https://rubygems.org/
    - SHELL PATH:
    - /Users/vlad/.rvm/gems/ruby-2.3.0/bin
    - /Users/vlad/.rvm/gems/ruby-2.3.0@global/bin
    - /Users/vlad/.rvm/rubies/ruby-2.3.0/bin
    - /Users/vlad/.rvm/bin
    - /Users/vlad/google-cloud-sdk/bin
    - /usr/local/bin
    - /usr/bin
    - /bin
    - /usr/sbin
    - /sbin
    - /usr/texbin
    - /Users/vlad/google-cloud-sdk/bin
    - /usr/local/bin
    - /usr/local/sbin
    - /usr/bin
    - /bin
    - /usr/sbin
    - /sbin
    - /usr/texbin
    - /usr/local/bin
    - /usr/bin
    - /bin
    - /usr/sbin
    - /sbin
    - /usr/texbin
    ```

    # `bin/rspec spec/commands/help_spec.rb` output

    ```
    ➜ vlad:bundler$ bin/rspec spec/commands/help_spec.rb master ✗
    Run options:
  3. vladshablinsky created this gist Mar 8, 2016.
    44 changes: 44 additions & 0 deletions bundle_help.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,44 @@
    ```
    ➜ vlad:bundler$ bin/rspec spec/commands/help_spec.rb master ✗
    Run options:
    include {:focused=>true}
    exclude {:rubygems_master=>true, :rubygems=>"=< 2.5.1", :ruby=>"=< 2.3.0", :realworld=>true, :sudo=>true}
    All examples were filtered out; ignoring {:focused=>true}
    bundle help
    uses mann when available
    prefixes bundle commands with bundle- when finding the groff files
    simply outputs the txt file when there is no man on the path (FAILED - 1)
    still outputs the old help for commands that do not have man pages yet
    looks for a binary and executes it with --help option if it's named bundler-<task>
    is called when the --help flag is used after the command
    is called when the --help flag is used before the command
    is called when the -h flag is used before the command
    is called when the -h flag is used after the command
    has helpful output when using --help flag for a non-existent command
    Retried examples: 0
    Failures:
    1) bundle help simply outputs the txt file when there is no man on the path
    Failure/Error: expect(out).to match(/BUNDLE-INSTALL/)
    expected "" to match /BUNDLE-INSTALL/
    Diff:
    @@ -1,2 +1,2 @@
    -/BUNDLE-INSTALL/
    +""
    # ./spec/commands/help_spec.rb:33:in `block (2 levels) in <top (required)>'
    Finished in 3.13 seconds (files took 0.34352 seconds to load)
    10 examples, 1 failure
    Failed examples:
    rspec ./spec/commands/help_spec.rb:29 # bundle help simply outputs the txt file when there is no man on the path
    ```