subelsky_power_tools 1.0.1 → 1.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.
- data/CHANGELOG +7 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -0
- data/lib/subelsky_power_tools/environment.rb +11 -0
- data/lib/subelsky_power_tools/version.rb +1 -1
- data/spec/lib/environment_spec.rb +26 -0
- data/spec/{exception_spec.rb → lib/ext/exception_spec.rb} +0 -0
- data/spec/{hash_spec.rb → lib/ext/hash_spec.rb} +0 -0
- data/spec/{kernel_spec.rb → lib/ext/kernel_spec.rb} +0 -0
- metadata +14 -10
data/CHANGELOG
ADDED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -17,6 +17,7 @@ added, by requiring them individually, e.g.:
|
|
17
17
|
|
18
18
|
require 'subelsky_power_tools/ext/hash'
|
19
19
|
require 'subelsky_power_tools/ext/exception'
|
20
|
+
require 'subelsky_power_tools/ext/kernel'
|
20
21
|
|
21
22
|
See the individual extensions in `lib` or their tests in the `spec` directory.
|
22
23
|
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "subelsky_power_tools/environment"
|
3
|
+
|
4
|
+
describe SubelskyPowerTools::Environment do
|
5
|
+
def conduct_test(val1 = "shaz",val2 = "bot")
|
6
|
+
ENV['_SPT_EE_TEST_VALUE1'] = val1
|
7
|
+
ENV['_SPT_EE_TEST_VALUE2'] = val2
|
8
|
+
SubelskyPowerTools::Environment.enforce_variables('_SPT_EE_TEST_VALUE1','_SPT_EE_TEST_VALUE2')
|
9
|
+
end
|
10
|
+
|
11
|
+
it "succeeds if all specified variables are non-blank" do
|
12
|
+
expect { conduct_test }.not_to raise_error
|
13
|
+
end
|
14
|
+
|
15
|
+
it "fails the program if any specified variable is blank" do
|
16
|
+
expect { conduct_test(" ","bot") }.to raise_error(RuntimeError)
|
17
|
+
end
|
18
|
+
|
19
|
+
it "fails the program if any specified variable is zero-width" do
|
20
|
+
expect { conduct_test("shaz","") }.to raise_error(RuntimeError)
|
21
|
+
end
|
22
|
+
|
23
|
+
it "fails the program if any specified variable is nil" do
|
24
|
+
expect { conduct_test("",nil) }.to raise_error(RuntimeError)
|
25
|
+
end
|
26
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: subelsky_power_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,12 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-08-
|
12
|
+
date: 2011-08-12 00:00:00.000000000 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|
17
|
-
requirement: &
|
17
|
+
requirement: &2156325000 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,7 +22,7 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :development
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2156325000
|
26
26
|
description: ! "This is a collection of Ruby extensions and utilities I've been carting
|
27
27
|
around from project to project. \nMany are taken from the Facets project (I just
|
28
28
|
don't want to include that whole gem in my codebases).\n"
|
@@ -35,6 +35,7 @@ files:
|
|
35
35
|
- .gitignore
|
36
36
|
- .rspec
|
37
37
|
- .rvmrc
|
38
|
+
- CHANGELOG
|
38
39
|
- Gemfile
|
39
40
|
- Gemfile.lock
|
40
41
|
- Guardfile
|
@@ -42,13 +43,15 @@ files:
|
|
42
43
|
- README.md
|
43
44
|
- Rakefile
|
44
45
|
- lib/subelsky_power_tools.rb
|
46
|
+
- lib/subelsky_power_tools/environment.rb
|
45
47
|
- lib/subelsky_power_tools/ext/exception.rb
|
46
48
|
- lib/subelsky_power_tools/ext/hash.rb
|
47
49
|
- lib/subelsky_power_tools/ext/kernel.rb
|
48
50
|
- lib/subelsky_power_tools/version.rb
|
49
|
-
- spec/
|
50
|
-
- spec/
|
51
|
-
- spec/
|
51
|
+
- spec/lib/environment_spec.rb
|
52
|
+
- spec/lib/ext/exception_spec.rb
|
53
|
+
- spec/lib/ext/hash_spec.rb
|
54
|
+
- spec/lib/ext/kernel_spec.rb
|
52
55
|
- spec/spec_helper.rb
|
53
56
|
- subelsky_power_tools.gemspec
|
54
57
|
has_rdoc: true
|
@@ -80,7 +83,8 @@ specification_version: 3
|
|
80
83
|
summary: This is a collection of Ruby extensions and utilities I've been carting around
|
81
84
|
from project to project.
|
82
85
|
test_files:
|
83
|
-
- spec/
|
84
|
-
- spec/
|
85
|
-
- spec/
|
86
|
+
- spec/lib/environment_spec.rb
|
87
|
+
- spec/lib/ext/exception_spec.rb
|
88
|
+
- spec/lib/ext/hash_spec.rb
|
89
|
+
- spec/lib/ext/kernel_spec.rb
|
86
90
|
- spec/spec_helper.rb
|