assure 0.1.1 → 0.1.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.
- data/assure.gemspec +2 -1
- data/lib/assure.rb +3 -4
- metadata +4 -3
data/assure.gemspec
CHANGED
@@ -2,10 +2,11 @@ require 'rubygems'
|
|
2
2
|
|
3
3
|
SPEC = Gem::Specification.new do |s|
|
4
4
|
s.name = "assure"
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.2"
|
6
6
|
s.author = "Pluron, Inc."
|
7
7
|
s.email = "support@pluron.com"
|
8
8
|
s.homepage = "http://github.com/acunote/assure"
|
9
|
+
s.license = 'MIT'
|
9
10
|
s.platform = Gem::Platform::RUBY
|
10
11
|
s.description = "Adds assure and internal_error methods"
|
11
12
|
s.summary = "Raises internal error when expression evaluates to nil or false."
|
data/lib/assure.rb
CHANGED
@@ -32,13 +32,12 @@ end
|
|
32
32
|
|
33
33
|
def get_caller_location_for_assure(options = {:depth => 2})
|
34
34
|
caller_method = caller(options[:depth])[0]
|
35
|
-
|
36
35
|
#Sample output is:
|
37
36
|
# test/unit/assure_test.rb:9:in `test_assure
|
38
|
-
#
|
39
|
-
caller_method =~ /([^:]+):([0-9]+):in `(.+)'
|
37
|
+
# test.rb:3
|
38
|
+
caller_method =~ /([^:]+):([0-9]+)(:in `(.+)')*/
|
40
39
|
file = $1
|
41
40
|
line = $2
|
42
|
-
method = $
|
41
|
+
method = $4
|
43
42
|
[file, method, line]
|
44
43
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: assure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-08-
|
12
|
+
date: 2013-08-23 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Adds assure and internal_error methods
|
15
15
|
email: support@pluron.com
|
@@ -26,7 +26,8 @@ files:
|
|
26
26
|
- lib/assure.rb
|
27
27
|
- test/assure_test.rb
|
28
28
|
homepage: http://github.com/acunote/assure
|
29
|
-
licenses:
|
29
|
+
licenses:
|
30
|
+
- MIT
|
30
31
|
post_install_message:
|
31
32
|
rdoc_options: []
|
32
33
|
require_paths:
|