slomo 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b681998744a2636e641c42fa4a04cf0aaa91b6bd
4
+ data.tar.gz: 41bf697b95cf05b3ffac1f2fe808e9c34b6e3d2a
5
+ SHA512:
6
+ metadata.gz: 37be53e44ff15bb01edb92f4986ac41f8fdcf41590fae89aa667f8a3e0d77875ca24201b92c80e85b4d9db8214c618c169d5889b349923760befa84cad2cba9e
7
+ data.tar.gz: bdb6721ad14886735c96941913e6c4ec8f30a9f310ea4a1201d1abbddacacb1e5b8a243632d9fe687b5c005a1fb098d6510e488fb08bd3a136a5fe7e2bf9c55c
data/lib/slomo.rb ADDED
@@ -0,0 +1,6 @@
1
+ require "slomo/version"
2
+ require "slomo/middleware"
3
+
4
+ module Slomo
5
+ DEFAULT_SLOWNESS = 0..2
6
+ end
@@ -0,0 +1,12 @@
1
+ module Slomo
2
+ class Middleware
3
+ def initialize(app)
4
+ @app = app
5
+ end
6
+
7
+ def call(env)
8
+ sleep(rand(Slomo::DEFAULT_SLOWNESS))
9
+ @app.call(env)
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,3 @@
1
+ module Slomo
2
+ VERSION = '0.1.0'.freeze
3
+ end
metadata ADDED
@@ -0,0 +1,46 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: slomo
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Pedro Carriço
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-11-27 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Slow motion middleware
14
+ email: pedro.carrico@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/slomo.rb
20
+ - lib/slomo/middleware.rb
21
+ - lib/slomo/version.rb
22
+ homepage: http://www.github.com/pedrocarrico/slomo
23
+ licenses:
24
+ - WTFPL
25
+ metadata: {}
26
+ post_install_message: Thank you for installing slomo, enjoy your slow motion applications!
27
+ rdoc_options: []
28
+ require_paths:
29
+ - lib
30
+ required_ruby_version: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '1.9'
35
+ required_rubygems_version: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ requirements: []
41
+ rubyforge_project:
42
+ rubygems_version: 2.2.2
43
+ signing_key:
44
+ specification_version: 4
45
+ summary: Slow motion middleware
46
+ test_files: []