resterl 0.0.2 → 0.0.3

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -7,18 +7,18 @@ module ClassLevelInheritableAttributes
7
7
 
8
8
  module ClassMethods
9
9
  def inheritable_attributes(*args)
10
- @inheritable_attributes ||= [:inheritable_attributes]
11
- @inheritable_attributes += args
10
+ @resterl_inheritable_attributes ||= [:inheritable_attributes]
11
+ @resterl_inheritable_attributes += args
12
12
  args.each do |arg|
13
13
  class_eval %(
14
14
  class << self; attr_accessor :#{arg} end
15
15
  )
16
16
  end
17
- @inheritable_attributes
17
+ @resterl_inheritable_attributes
18
18
  end
19
19
 
20
20
  def inherited(subclass)
21
- @inheritable_attributes.each do |inheritable_attribute|
21
+ @resterl_inheritable_attributes.each do |inheritable_attribute|
22
22
  instance_var = "@#{inheritable_attribute}"
23
23
  subclass.instance_variable_set(instance_var,
24
24
  instance_variable_get(instance_var))
data/resterl.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{resterl}
8
- s.version = "0.0.2"
8
+ s.version = "0.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Florian Dütsch"]
data/test/test_resterl.rb CHANGED
@@ -16,4 +16,21 @@ class TestResterl < Test::Unit::TestCase
16
16
  )
17
17
  end
18
18
 
19
+ context 'BaseObject' do
20
+ should 'provide class level inheritable attributes' do
21
+
22
+ assert_nil Resterl::BaseObject.resterl_client
23
+ assert_nil Resterl::BaseObject.complete_mime_type
24
+
25
+ assert_nothing_raised do
26
+ class Test < Resterl::BaseObject
27
+ self.resterl_client = nil
28
+ self.complete_mime_type = 'text/plain'
29
+ end
30
+ end
31
+
32
+ end
33
+
34
+ end
35
+
19
36
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - "Florian D\xC3\xBCtsch"