Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump racksh from 1.0.0 to 1.0.1 #501

Merged
merged 1 commit into from
Jul 7, 2023
Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jul 6, 2023

Bumps racksh from 1.0.0 to 1.0.1.

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [racksh](https://github.com/sickill/racksh) from 1.0.0 to 1.0.1.
- [Changelog](https://github.com/sickill/racksh/blob/master/CHANGELOG.txt)
- [Commits](https://github.com/sickill/racksh/commits)

---
updated-dependencies:
- dependency-name: racksh
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies ruby Pull requests that update Ruby code labels Jul 6, 2023
@github-actions
Copy link

github-actions bot commented Jul 6, 2023

@github-actions
Copy link

github-actions bot commented Jul 6, 2023

gem compare racksh 1.0.0 1.0.1

Compared versions: ["1.0.0", "1.0.1"]
  DIFFERENT date:
    1.0.0: 2012-10-11 00:00:00 UTC
    1.0.1: 2023-07-05 00:00:00 UTC
  DIFFERENT licenses:
    1.0.0: []
    1.0.1: ["MIT"]
  DIFFERENT rubygems_version:
    1.0.0: 1.8.23
    1.0.1: 3.3.25
  DIFFERENT version:
    1.0.0: 1.0.0
    1.0.1: 1.0.1
  DIFFERENT files:
    1.0.0->1.0.1:
      * Deleted:
            README.markdown
      * Added:
            README.md +150/-0
      * Changed:
            lib/racksh/init.rb +3/-3
            lib/racksh/irb.rb +1/-1
            lib/racksh/version.rb +1/-1

@github-actions
Copy link

github-actions bot commented Jul 6, 2023

gem compare --diff racksh 1.0.0 1.0.1

Compared versions: ["1.0.0", "1.0.1"]
  DIFFERENT files:
    1.0.0->1.0.1:
      * Deleted:
            README.markdown
      * Added:
        README.md
                --- /tmp/20230706-1665-3idgdv	2023-07-06 02:52:57.045626997 +0000
                +++ /tmp/d20230706-1665-4kflo4/racksh-1.0.1/README.md	2023-07-06 02:52:57.045626997 +0000
                @@ -0,0 +1,150 @@
                +# racksh
                +
                +## About
                +
                +**racksh** (Rack::Shell) is a console for Rack based ruby web applications.
                +
                +It's like _script/console_ in Rails or _merb -i_ in Merb, but for any app built on Rack. You can use it to load application 
                +environment for Rails, Merb, Sinatra, Camping, Ramaze or your own framework provided there is _config.ru_ file in app's root 
                +directory.
                +
                +It's purpose is to allow developer to introspect his application and/or make some initial setup. You can for example run 
                +_DataMapper.auto_migrate!_ or make a request to _/users/666_ and check response details. It's mainly aimed at apps that don't 
                +have console-like component (ie. app built with Sinatra) but all frameworks can benefit from interactive Rack stack and request
                +introspection.
                +
                +## How it works?
                +
                +It loads whole application environment like Rack web server, but instead of running the app it starts _irb_ session. 
                +Additionally it exposes _$rack_ variable which allows you to make simulated HTTP requests to your app.
                +
                +## Installation
                +
                +    gem install racksh
                +
                +## Usage
                +
                +### Starting racksh
                +
                +To start racksh session run following inside rack application directory (containing config.ru file):
                +
                +    % racksh
                +    Rack::Shell v1.0.1 started in development environment.
                +    >>
                +
                +Specifying location of config.ru:
                +
                +    % CONFIG_RU=~/projects/foobar/config.ru racksh
                +
                +Executing ruby code inside application environment and printing results:
                +
                +    % racksh Order.all
                +    % racksh "Order.first :created_at => Date.today"
                +
                +Specifying Rack environment (default is development):
                +
                +    % RACK_ENV=production racksh
                +    Rack::Shell v1.0.1 started in production environment.
                +    >>
                +    
                +### Making simulated HTTP requests to your app
                +
                +    % racksh
                +    Rack::Shell v1.0.1 started in development environment.
                +    >> $rack.get "/"
                +    => #<Rack::MockResponse:0xb68fa7bc @body="<html>...", @headers={"Content-Type"=>"text/html", "Content-Length"=>"1812"}, @status=200, ...
                +
                +_$rack_ variable contains following methods (thanks to [rack-test](https://github.com/brynary/rack-test) gem):
                +
                +    # make GET request
                +    $rack.get uri, params, env
                +    
                +    # make POST request
                +    $rack.post uri, params, env
                +    
                +    # make PUT request
                +    $rack.put uri, params, env
                +    
                +    # make DELETE request
                +    $rack.delete uri, params, env
                +    
                +    # make HEAD request
                +    $rack.head uri, params, env
                +    
                +    # make custom request
                +    $rack.request uri, params, env
                +    
                +    # set HTTP header
                +    $rack.header name, value
                +    
                +    # set credentials for Basic Authorization
                +    $rack.basic_authorize username, password
                +    
                +    # set credentials for Digest Authorization
                +    $rack.digest_authorize username, password
                +    
                +    # follow redirect from previous request
                +    $rack.follow_redirect!
                +    
                +    # last request object
                +    $rack.last_request
                +
                +    # last response object
                +    $rack.last_response
                +
                +    # access your Rack app
                +    $rack.app
                +
                +    # name of environment
                +    $rack.env
                +    
                +Check [test.rb from brynary's rack-test](http://github.com/brynary/rack-test/blob/master/lib/rack/test.rb) for implementation of 
                +above methods.
                + 
                +Examples:
                +
                +    $rack.get "/", {}, { 'REMOTE_ADDR' => '123.45.67.89' }
                +    $rack.header "User-Agent", "Firefox"
                +    $rack.post "/users", :user => { :name => "Jola", :email => "[email protected]" }
                +
                +### Configuration files
                +
                +Rack::Shell supports configuration file _.rackshrc_ which is loaded from two places during startup: user's home dir and 
                +application directory (in this order). You can put any ruby code in it, but it's purpose is to setup your session, ie. setting 
                +headers which will be used for all $rack.get/post/... requests.
                +
                +For example to set user agent to Firefox and re-migrate db if loaded environment is _test_ put following in _.rackshrc_:
                +
                +    $rack.header "User-Agent", "Firefox"
                +    DataMapper.auto_migrate! if $rack.env == "test"
                +    
                +You can also make requests:
                +
                +    $rack.put "/signin", :login => "jola", :password => "misiacz"
                +    
                +This will ensure you are always logged in when you start _racksh_.
                +
                +### Reloading
                +
                +If you've made some changes to your app and you want to reload it type:
                +
                +    reload!
                +    
                +It will reload (actually restart) whole Rack application in new process.
                +
                +### Loading racksh into existing irb session
                +
                +If you already opened irb and you want racksh functionality just run following:
                +
                +    require 'racksh/irb'
                +
                +It will initialize racksh and load rack app. From now on you can use _$rack_.
                +
                +## Bugs & feature requests
                +
                +Please report bugs and/or feature requests on the github issue tracker for the project located [here](https://github.com/sickill/racksh/issues).
                +
                +## Authors
                +
                + * Marcin Kulik - [ku1ik.com](https://ku1ik.com/)
                +
      * Changed:
        lib/racksh/init.rb
                --- /tmp/d20230706-1665-4kflo4/racksh-1.0.0/lib/racksh/init.rb	2023-07-06 02:52:57.045626997 +0000
                +++ /tmp/d20230706-1665-4kflo4/racksh-1.0.1/lib/racksh/init.rb	2023-07-06 02:52:57.045626997 +0000
                @@ -23 +23 @@
                -      rack_app = Rack::Builder.parse_file(config_ru).first
                +      rack_app = Array(Rack::Builder.parse_file(config_ru)).first
                @@ -28 +28 @@
                -      eval(File.read(rcfile)) if File.exists?(rcfile)
                +      eval(File.read(rcfile)) if File.exist?(rcfile)
                @@ -32 +32 @@
                -      eval(File.read(rcfile)) if File.exists?(rcfile)
                +      eval(File.read(rcfile)) if File.exist?(rcfile)
        lib/racksh/irb.rb
                --- /tmp/d20230706-1665-4kflo4/racksh-1.0.0/lib/racksh/irb.rb	2023-07-06 02:52:57.045626997 +0000
                +++ /tmp/d20230706-1665-4kflo4/racksh-1.0.1/lib/racksh/irb.rb	2023-07-06 02:52:57.045626997 +0000
                @@ -2 +2 @@
                -Rack::Shell.init(false)
                +Rack::Shell.init
        lib/racksh/version.rb
                --- /tmp/d20230706-1665-4kflo4/racksh-1.0.0/lib/racksh/version.rb	2023-07-06 02:52:57.045626997 +0000
                +++ /tmp/d20230706-1665-4kflo4/racksh-1.0.1/lib/racksh/version.rb	2023-07-06 02:52:57.045626997 +0000
                @@ -3 +3 @@
                -    VERSION = '1.0.0'.freeze
                +    VERSION = '1.0.1'.freeze

@dentarg dentarg merged commit c096042 into main Jul 7, 2023
7 checks passed
@dentarg dentarg deleted the dependabot/bundler/racksh-1.0.1 branch July 7, 2023 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant