rack_injection 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b08f9bdc6b962695f8c8d73916cf9c112e7eafb
4
- data.tar.gz: 1eec398e9a035199a63de35d1b661e2012ff0c7c
3
+ metadata.gz: a04e9109ec58bf6fd91f01748d38c67e0ef573a8
4
+ data.tar.gz: a8408754bdea64cfc4ba38f31e4ed54f2a3fe5d9
5
5
  SHA512:
6
- metadata.gz: 0c3c396cc78a2389e245acd251c544be18e3c189401e68a5be06ad1990ebaf11ab5990f1501f98d26f121664cd633097e9906ce5ea8e4b73fe93017216ddae57
7
- data.tar.gz: 48a9bc5070588d5718ef6b36cdb20c482e52b27e2b50d2eff8cab04ab83651c0bf121588e20f4a9988dbd9c7f12ab5d8dde7444e1c05b95dedd517c820158669
6
+ metadata.gz: 87c131c3fef965bfd96f8bfbff83c1a6c354a9eadc87c8ea47dd66fc354bec07b0d2c368ef2ef49900ea301207c5757376ada2e807394ad06e604c269740a887
7
+ data.tar.gz: 7a0c5370b44a5c7a6b0902133d02e626111705bd579cc9a4d1fbb5cbcb0e12f3255e7963b25cc925cb1d9b12d075d6035a29886e5b228809cc5e82218c7cc0bb
data/README.md CHANGED
@@ -1,29 +1,22 @@
1
1
  # RackInjection
2
2
 
3
- TODO: Write a gem description
3
+ This very simple gem just provides a middleware named RackInjection that
4
+ allows you to inject arbitrary key-value pairs into the Rack env on every
5
+ request.
4
6
 
5
7
  ## Installation
6
8
 
7
- Add this line to your application's Gemfile:
8
-
9
- gem 'rack_injection'
10
-
11
- And then execute:
12
-
13
- $ bundle
14
-
15
- Or install it yourself as:
16
-
17
- $ gem install rack_injection
9
+ You know how to install gems...
18
10
 
19
11
  ## Usage
20
12
 
21
- TODO: Write usage instructions here
13
+ In your config.ru file:
14
+ ```ruby
15
+ use RackEnvInjector, 'rack.logger' => my_special_logger
16
+ ```
17
+ Now env['rack.logger'] will refer to `my_special_logger` in every
18
+ request.
22
19
 
23
20
  ## Contributing
24
21
 
25
- 1. Fork it ( https://github.com/[my-github-username]/rack_injection/fork )
26
- 2. Create your feature branch (`git checkout -b my-new-feature`)
27
- 3. Commit your changes (`git commit -am 'Add some feature'`)
28
- 4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create a new Pull Request
22
+ If send me a pull request, I promise I'll look at it.
@@ -1,7 +1,7 @@
1
- require "rack_injection/version"
2
-
3
1
  # Yes, this is really all it does...
4
- module RackInjection
2
+ class RackInjection
3
+ VERSION = "0.2.0"
4
+
5
5
  def initialize(app, opts={})
6
6
  @app = app
7
7
  @injections = opts
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'rack_injection/version'
4
+ require 'rack_injection'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "rack_injection"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack_injection
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Crosby
@@ -54,7 +54,6 @@ files:
54
54
  - README.md
55
55
  - Rakefile
56
56
  - lib/rack_injection.rb
57
- - lib/rack_injection/version.rb
58
57
  - rack_injection.gemspec
59
58
  homepage: https://github.com/stevecrozz/rack_injection
60
59
  licenses:
@@ -1,3 +0,0 @@
1
- module RackInjection
2
- VERSION = "0.1.0"
3
- end