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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8cbfe4c7d55c382dee1a3096290be516abf181f1
4
- data.tar.gz: 7b14f91068167a97ee3a7bb388870c5ac2ec7aab
3
+ metadata.gz: 2559257b9e76344cb74a9ce8a8663c447da4e536
4
+ data.tar.gz: de64a1a62c78606ba00ba658d4bf5df004e2b13d
5
5
  SHA512:
6
- metadata.gz: 07cc33f88a93c01769a1ab6dfc50da3b59801940be855ee82b43e05c98987788cad49322d4fe2eba43b47f274f2915ddbb7fff5af8097e88b3452e8f47e5c9ac
7
- data.tar.gz: b91ff8eeaf05f16383a29dc0d4354a0f6f7f9a0e343dd856d4307aa6f3c1443aedc6e9b20753f5a1f81b508fbbcbbfc8d62418fa98fac981429ef578cf0ffcad
6
+ metadata.gz: 3ba875f600cad357515ea6a198be823ab669983651d3106e5e4cb7eef76f2bd05e034e6658dd6a0b0fd42d9307e7b02df521a493667574e2d2e62c63c0a778da
7
+ data.tar.gz: 01f895ef2155b68a220bf085f00f3135323d91a085cd201bcb4247e595defbb27c68b911ce1644a60b9b5ff53b0b7e3018af66d8d3e8bf7ac84a2a4e3e9d108d
@@ -0,0 +1 @@
1
+ service_name: travis-ci
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format documentation
@@ -0,0 +1 @@
1
+ language: ruby
data/Gemfile CHANGED
@@ -2,3 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in lazy_static.gemspec
4
4
  gemspec
5
+
6
+ gem 'coveralls', require: false
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
- StandardError: Expected 5 to be String
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 )
@@ -19,4 +19,5 @@ Gem::Specification.new do |spec|
19
19
 
20
20
  spec.add_development_dependency "bundler", "~> 1.6"
21
21
  spec.add_development_dependency "rake"
22
+ spec.add_development_dependency "rspec"
22
23
  end
@@ -2,6 +2,6 @@ require "lazy_static/version"
2
2
 
3
3
  module LazyStatic
4
4
  def self.check(object, is_a:)
5
- is_a === object or raise StandardError, "Expected #{object} to be #{is_a}"
5
+ is_a === object or raise TypeError, "Expected #{object} to be #{is_a}"
6
6
  end
7
7
  end
@@ -1,3 +1,3 @@
1
1
  module LazyStatic
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -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
@@ -0,0 +1,11 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+
4
+ require 'lazy_static'
5
+
6
+ require 'coveralls'
7
+ Coveralls.wear!
8
+
9
+ RSpec.configure do |config|
10
+ # some (optional) config here
11
+ end
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.1
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: