MrFox 0.0.2 → 0.0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/mr_fox.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require "mr_fox/railtie" if defined? Rails
1
2
  module MrFox
2
3
  # Your code goes here...
3
4
  end
@@ -0,0 +1,13 @@
1
+ module MrFox
2
+ class Middleware
3
+
4
+ def initialize(app)
5
+ @app = app
6
+ end
7
+
8
+ def call(env)
9
+ [200, {"Content-type"=> "text/html"}, "Hello World"]
10
+ end
11
+
12
+ end
13
+ end
@@ -0,0 +1,9 @@
1
+ require 'mr_fox/middleware'
2
+
3
+ module MrFox
4
+ class Railtie < Rails::Railtie
5
+ initializer "mr_fox.insert_middleware" do |app|
6
+ app.config.middleware.use "MrFox::Middleware"
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module MrFox
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.2.1"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: MrFox
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.2
5
+ version: 0.0.2.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Alvaro Pereyra
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2011-05-12 00:00:00 -05:00
14
+ date: 2011-05-13 00:00:00 -05:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
@@ -41,6 +41,8 @@ files:
41
41
  - Rakefile
42
42
  - bin/mr_fox
43
43
  - lib/mr_fox.rb
44
+ - lib/mr_fox/middleware.rb
45
+ - lib/mr_fox/railtie.rb
44
46
  - lib/mr_fox/version.rb
45
47
  - mr_fox.gemspec
46
48
  has_rdoc: true