power_by_autobots 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/power_by_autobots.rb +15 -7
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86ad5a97e7bd63536a067c91f5fcffc70d35109a
4
- data.tar.gz: f5c429ce303551fdc9e21880523c9e4c97375ec0
3
+ metadata.gz: e462183aaf3fc8c8c34258e48497a3d24acb4495
4
+ data.tar.gz: 02ffd34611cedc4b99768ec998b6b255dc94e740
5
5
  SHA512:
6
- metadata.gz: c43cb45e1ef00d1217c458de5e4e4bf640467ae325c28254889e0275b6431ea3b1bd63aacf6526c9a48572ea3f2d449341ae260a4a42f28e653f490dc2bcd87e
7
- data.tar.gz: 5731e76a85a38e3152f576f24cd841bd005ef59ebd7889534ae00dfa994c05ac6a060a14d8681084bb743064f33901bbd57e0ed560c0ea9290881b6893f3d4cf
6
+ metadata.gz: 36d1a365291e0bb9cf49746e1424515e2b63bb6936623e8621941e8740a22f19a24121cf1f35e99d92bf1bb2e236bf971d1b527aa9b4b6f42b9048324d7c98b9
7
+ data.tar.gz: 1eb998dcd59b89e1d8233162df57e2e5262674fc0bdcbb246318cb1cebadd0b2ac16313a0c04277ed5a544e26dbe21977f7547a543adaa263fd66e062f752c30
@@ -1,12 +1,20 @@
1
- class PowerByAutobots
2
- def initialize(app)
3
- @app = app
1
+ module Autobots
2
+ class Railtie < Rails::Railtie
3
+ initializer "autobots.configure_rails_initialization" do
4
+ Rails.application.middleware.use Autobots::PowerBy
5
+ end
4
6
  end
5
7
 
6
- def call(env)
7
- status, headers, response = @app.call(env)
8
- headers["X-Powered-By"] = "Autobots"
8
+ class PowerBy
9
+ def initialize(app)
10
+ @app = app
11
+ end
9
12
 
10
- [status, headers, response]
13
+ def call(env)
14
+ status, headers, response = @app.call(env)
15
+ headers["X-Powered-By"] = "Autobots"
16
+
17
+ [status, headers, response]
18
+ end
11
19
  end
12
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: power_by_autobots
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darmody
@@ -17,7 +17,7 @@ extensions: []
17
17
  extra_rdoc_files: []
18
18
  files:
19
19
  - lib/power_by_autobots.rb
20
- homepage: http://rubygems.org/gems/power_by_autobots
20
+ homepage: https://github.com/Darmody/power_by_autobots
21
21
  licenses:
22
22
  - MIT
23
23
  metadata: {}