lazy_static 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.coveralls.yml +1 -0
- data/.rspec +2 -0
- data/.travis.yml +1 -0
- data/Gemfile +2 -0
- data/README.md +3 -5
- data/lazy_static.gemspec +1 -0
- data/lib/lazy_static.rb +1 -1
- data/lib/lazy_static/version.rb +1 -1
- data/spec/lib/lazy_static_spec.rb +19 -0
- data/spec/spec_helper.rb +11 -0
- metadata +23 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2559257b9e76344cb74a9ce8a8663c447da4e536
|
4
|
+
data.tar.gz: de64a1a62c78606ba00ba658d4bf5df004e2b13d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ba875f600cad357515ea6a198be823ab669983651d3106e5e4cb7eef76f2bd05e034e6658dd6a0b0fd42d9307e7b02df521a493667574e2d2e62c63c0a778da
|
7
|
+
data.tar.gz: 01f895ef2155b68a220bf085f00f3135323d91a085cd201bcb4247e595defbb27c68b911ce1644a60b9b5ff53b0b7e3018af66d8d3e8bf7ac84a2a4e3e9d108d
|
data/.coveralls.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
service_name: travis-ci
|
data/.rspec
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
language: ruby
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -7,10 +7,12 @@ It's a lazy static type checker, simple as this:
|
|
7
7
|
=> true
|
8
8
|
|
9
9
|
[2] pry(main)> LazyStatic.check 5, is_a: String
|
10
|
-
|
10
|
+
TypeError: Expected 5 to be String
|
11
11
|
from /Users/lemur/dev/lazy_static/lib/lazy_static.rb:5:in `check'
|
12
12
|
```
|
13
13
|
|
14
|
+
...and that's all it'll ever need to be.
|
15
|
+
|
14
16
|
## Installation
|
15
17
|
|
16
18
|
Add this line to your application's Gemfile:
|
@@ -25,10 +27,6 @@ Or install it yourself as:
|
|
25
27
|
|
26
28
|
$ gem install lazy_static
|
27
29
|
|
28
|
-
## Usage
|
29
|
-
|
30
|
-
TODO: Write usage instructions here
|
31
|
-
|
32
30
|
## Contributing
|
33
31
|
|
34
32
|
1. Fork it ( https://github.com/baweaver/lazy_static/fork )
|
data/lazy_static.gemspec
CHANGED
data/lib/lazy_static.rb
CHANGED
data/lib/lazy_static/version.rb
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe LazyStatic do
|
4
|
+
describe 'self#check' do
|
5
|
+
context 'A Valid check' do
|
6
|
+
it 'returns true' do
|
7
|
+
expect(LazyStatic.check 5, is_a: Integer).to eq(true)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
context 'An Invalid check' do
|
12
|
+
it 'returns true' do
|
13
|
+
expect { LazyStatic.check 5, is_a: String }.to raise_error(
|
14
|
+
TypeError, "Expected 5 to be String"
|
15
|
+
)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lazy_static
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Weaver
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
description:
|
42
56
|
email:
|
43
57
|
- keystonelemur@gmail.com
|
@@ -45,7 +59,10 @@ executables: []
|
|
45
59
|
extensions: []
|
46
60
|
extra_rdoc_files: []
|
47
61
|
files:
|
62
|
+
- ".coveralls.yml"
|
48
63
|
- ".gitignore"
|
64
|
+
- ".rspec"
|
65
|
+
- ".travis.yml"
|
49
66
|
- Gemfile
|
50
67
|
- LICENSE.txt
|
51
68
|
- README.md
|
@@ -53,6 +70,8 @@ files:
|
|
53
70
|
- lazy_static.gemspec
|
54
71
|
- lib/lazy_static.rb
|
55
72
|
- lib/lazy_static/version.rb
|
73
|
+
- spec/lib/lazy_static_spec.rb
|
74
|
+
- spec/spec_helper.rb
|
56
75
|
homepage: https://github.com/baweaver/lazy_static
|
57
76
|
licenses:
|
58
77
|
- MIT
|
@@ -77,5 +96,7 @@ rubygems_version: 2.2.2
|
|
77
96
|
signing_key:
|
78
97
|
specification_version: 4
|
79
98
|
summary: Lazy static type checking
|
80
|
-
test_files:
|
99
|
+
test_files:
|
100
|
+
- spec/lib/lazy_static_spec.rb
|
101
|
+
- spec/spec_helper.rb
|
81
102
|
has_rdoc:
|