exception_no 0.0.1 → 0.0.2

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDg1YTk5NDNkNmRhNTA4NGVmNzE1ZTU3YzcwZDM3MGRlOWUyZWFiZg==
4
+ ZjQyYjlkYmY3YzFhN2I3MDVkM2U0YzkyOWMwZTRlODg2YWIxNmEzYw==
5
5
  data.tar.gz: !binary |-
6
- Yjc4Mzk0NjQzZWFjNjI4MWRjMDQ1OTA2Y2FiOGY3MWNjZjA2MjAyNA==
6
+ NjVhMTMxZGFkYWFmOTNiYTY4NjE1MDMzMjMwODc1NGMwMTAwYzY5Yw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YjQ1NGJmNjY1YWM2ZDc1OGJkNjMzYWQzZGZjNmJjNTE2YmNlZDBmMzdjYTgy
10
- NDM1M2EzNmJkOWZiOTU0MzRkNWZlZDQyNTExZmU0NzY3MGJjMDgzYmJiYzMw
11
- NTA0NDI5MjFmYWZiNjRjMDExZjZhMjRmMGZmNDkzZjA2MmYwZTI=
9
+ NjU2NWIyZmUxY2U5Y2MyYTcxODVmMTAwOTY4MTE3NzhiZDYxNzllODgxNDJh
10
+ NzIxNTU1M2U4NmZmMTE5MWYzZmZjMmNiNWE1OWFlZjA1ZmE4ZGE0M2IxMjY2
11
+ YzcyZjhlZWU3ZDBhOWQxNzczZDcyM2RjNDNiMmJjZDE3ZDM3OWE=
12
12
  data.tar.gz: !binary |-
13
- MjVhNzkxY2E2ZDFhY2UzNzUzMjJkMTIzNmY0MmZmY2NmNDdjOTU4ODVmOGRm
14
- NDYwYjU1NTgyMmZlNWYwNGJhMmIwNTFlZDRiODk0M2FjMTVjOTQ1M2E1N2E0
15
- ODU4ZGQxM2FmNTczNGE4NjI3NzY4MzRkM2M5Y2MzYTJlNTAzODg=
13
+ NGM1Zjg3YzgxYmJhNzMwNzNjOTQxMTlhNDJiMTc2NTU4YWE3YTc1MDNhN2Jk
14
+ OTIxZjQ3Yzk3YTZhNjg4OWY0ZjQxNTgwZjcxZjg5ZGFlYjg2OTE0ODdmYTZm
15
+ NjQ4MDg2NWY3M2M4OGZlYTFlZDY0NWRiOGI3NzhjNzE2OGI3NjY=
data/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ 0.0.2 - 2013-09-17
2
+ ==================
3
+
4
+ * `Middleware` now requires an explicit `ExceptionNo` instance.
5
+
6
+ This makes it easier to reuse your `ExceptionNo` instance in other parts of
7
+ your application.
8
+
9
+ 0.0.1 - 2013-09-17
10
+ ==================
11
+
12
+ * First release.
data/UNLICENSE ADDED
@@ -0,0 +1,24 @@
1
+ This is free and unencumbered software released into the public domain.
2
+
3
+ Anyone is free to copy, modify, publish, use, compile, sell, or
4
+ distribute this software, either in source code form or as a compiled
5
+ binary, for any purpose, commercial or non-commercial, and by any
6
+ means.
7
+
8
+ In jurisdictions that recognize copyright laws, the author or authors
9
+ of this software dedicate any and all copyright interest in the
10
+ software to the public domain. We make this dedication for the benefit
11
+ of the public at large and to the detriment of our heirs and
12
+ successors. We intend this dedication to be an overt act of
13
+ relinquishment in perpetuity of all present and future rights to this
14
+ software under copyright law.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ For more information, please refer to <http://unlicense.org/>
data/exception_no.gemspec CHANGED
@@ -11,6 +11,8 @@ Gem::Specification.new do |s|
11
11
  s.files = `git ls-files`.split("\n")
12
12
  s.test_files = `git ls-files -- {test}/*`.split("\n")
13
13
 
14
+ s.license = "Unlicense"
15
+
14
16
  s.add_development_dependency "mini-smtp-server"
15
17
  s.add_development_dependency "cutest"
16
18
  end
data/lib/exception_no.rb CHANGED
@@ -2,7 +2,7 @@ require "net/smtp"
2
2
  require "erb"
3
3
 
4
4
  class ExceptionNo
5
- VERSION = "0.0.1"
5
+ VERSION = "0.0.2"
6
6
 
7
7
  attr_accessor :backtrace_filter
8
8
 
@@ -50,9 +50,9 @@ class ExceptionNo
50
50
  EMAIL
51
51
 
52
52
  class Middleware
53
- def initialize(app, config = {})
53
+ def initialize(app, notifier)
54
54
  @app = app
55
- @notifier = ExceptionNo.new(config)
55
+ @notifier = notifier
56
56
  end
57
57
 
58
58
  def call(env)
data/test/middleware.rb CHANGED
@@ -5,10 +5,12 @@ require "rack"
5
5
  setup do
6
6
  Rack::Builder.new do |builder|
7
7
  builder.use ExceptionNo::Middleware,
8
- host: "127.0.0.1",
9
- port: 2525,
10
- to: "root@localhost",
11
- from: "service@localhost"
8
+ ExceptionNo.new(
9
+ host: "127.0.0.1",
10
+ port: 2525,
11
+ to: "root@localhost",
12
+ from: "service@localhost"
13
+ )
12
14
 
13
15
  builder.run(-> env { 1 / 0 })
14
16
  end
@@ -43,10 +45,12 @@ end
43
45
  test "doesn't raise when the notification fails" do |app|
44
46
  app = Rack::Builder.new do |builder|
45
47
  builder.use ExceptionNo::Middleware,
46
- host: "127.0.0.1",
47
- port: 2526,
48
- to: "root@localhost",
49
- from: "service@localhost"
48
+ ExceptionNo.new(
49
+ host: "127.0.0.1",
50
+ port: 2526,
51
+ to: "root@localhost",
52
+ from: "service@localhost"
53
+ )
50
54
 
51
55
  builder.run(-> env { 1 / 0 })
52
56
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exception_no
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
  - Educabilia
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-17 00:00:00.000000000 Z
12
+ date: 2013-09-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mini-smtp-server
@@ -48,14 +48,17 @@ extensions: []
48
48
  extra_rdoc_files: []
49
49
  files:
50
50
  - .gitignore
51
+ - CHANGELOG.md
51
52
  - Makefile
53
+ - UNLICENSE
52
54
  - exception_no.gemspec
53
55
  - lib/exception_no.rb
54
56
  - test/exception_no.rb
55
57
  - test/middleware.rb
56
58
  - test/prelude.rb
57
59
  homepage: https://github.com/djanowski/exception_no
58
- licenses: []
60
+ licenses:
61
+ - Unlicense
59
62
  metadata: {}
60
63
  post_install_message:
61
64
  rdoc_options: []