nasty 0.0.1388163823 → 0.0.1388164765
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nasty.rb +1 -0
- data/lib/nasty/expose_binding.rb +7 -0
- data/lib/nasty/log.rb +4 -0
- data/spec/unit/expose_binding_spec.rb +16 -0
- data/spec/unit/log_spec.rb +4 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 995a19f3b4d92203b7f3933b8a7f9ddd9e45b309
|
4
|
+
data.tar.gz: d401b56b95c311a714792fa3ff52ca4e020c3d43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16f0eac4ab391be52b8cc1c8c16886f70f4a0ae9e4e527ee5df459f31e86344cd49ff7b00510f929871751384e8cc8d64da101770521dc6f228aee633b0dd7ac
|
7
|
+
data.tar.gz: 5206da615cfbc0acec78631d77e242c857d0d24dd58d6b348724c1669a1b26651384000a8ee72f8398a1551a89dc813ac07bf18a7e4b0b0de67145516753241e
|
data/lib/nasty.rb
CHANGED
data/lib/nasty/log.rb
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
module Nasty
|
4
|
+
describe ExposeBinding do
|
5
|
+
it "exposes an objects private binding" do
|
6
|
+
item = Object.new
|
7
|
+
item.instance_eval do
|
8
|
+
@message = "secret"
|
9
|
+
end
|
10
|
+
item.extend(Nasty::ExposeBinding)
|
11
|
+
binding = item.get_binder
|
12
|
+
result = ERB.new("<%= @message %>").result(binding)
|
13
|
+
result.should == "secret"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/spec/unit/log_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nasty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1388164765
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mo khan
|
@@ -83,6 +83,7 @@ files:
|
|
83
83
|
- lib/nasty/background_job.rb
|
84
84
|
- lib/nasty/command.rb
|
85
85
|
- lib/nasty/composite_command.rb
|
86
|
+
- lib/nasty/expose_binding.rb
|
86
87
|
- lib/nasty/kernel.rb
|
87
88
|
- lib/nasty/lambda_behaviours.rb
|
88
89
|
- lib/nasty/log.rb
|
@@ -91,6 +92,7 @@ files:
|
|
91
92
|
- nasty.gemspec
|
92
93
|
- spec/spec_helper.rb
|
93
94
|
- spec/unit/command_spec.rb
|
95
|
+
- spec/unit/expose_binding_spec.rb
|
94
96
|
- spec/unit/lambda_behaviours_spec.rb
|
95
97
|
- spec/unit/log_spec.rb
|
96
98
|
- spec/unit/using_spec.rb
|
@@ -121,6 +123,7 @@ summary: basicly it's a commons library
|
|
121
123
|
test_files:
|
122
124
|
- spec/spec_helper.rb
|
123
125
|
- spec/unit/command_spec.rb
|
126
|
+
- spec/unit/expose_binding_spec.rb
|
124
127
|
- spec/unit/lambda_behaviours_spec.rb
|
125
128
|
- spec/unit/log_spec.rb
|
126
129
|
- spec/unit/using_spec.rb
|