thumblemonks-inquisition 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 1
3
- :patch: 2
3
+ :patch: 3
4
4
  :major: 0
@@ -29,6 +29,8 @@ module Inquisition
29
29
  end
30
30
  end
31
31
  alias_method_chain :read_attribute, :cleansing
32
+
33
+ attributes.each { |attr| define_method(attr.to_sym) { read_attribute(attr.to_sym) } }
32
34
  end
33
35
 
34
36
  def cleanse_attr_writer(*attributes)
@@ -13,7 +13,7 @@ class InquisitionTest < Test::Unit::TestCase
13
13
  end
14
14
 
15
15
  should "remove already-ingrained heresey" do
16
- @whisky.instance_variable_set(:@name, "<script>alert('Cragganmore')</script>")
16
+ @whisky.instance_variable_set(:@attributes, "name" => "<script>alert('Cragganmore')</script>")
17
17
  assert_equal "&lt;script&gt;alert('Cragganmore')&lt;/script&gt;", @whisky.name
18
18
  end
19
19
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thumblemonks-inquisition
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - toothrot