ardm 0.2.2 → 0.2.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.
@@ -24,7 +24,7 @@ module Ardm
24
24
  attr_accessible prop.name
25
25
  attr_accessible prop.field
26
26
  rescue => e
27
- puts "WARNING: Error silenced. FIXME before release.\n#{e}" unless $attr_accessible_warning
27
+ puts "WARNING: `attr_accessible` not found. Include 'protected_attributes' gem in rails >= 4 (or if you need it).\n#{e}" unless $attr_accessible_warning
28
28
  $attr_accessible_warning = true
29
29
  end
30
30
  prop
@@ -12,6 +12,18 @@ module Ardm
12
12
  ::DataMapper.finalize
13
13
  end
14
14
 
15
+ def self.repository
16
+ ::DataMapper.repository
17
+ end
18
+
19
+ def self.logger
20
+ ::DataMapper.logger
21
+ end
22
+
23
+ def self.logger=(logger)
24
+ ::DataMapper.logger = logger
25
+ end
26
+
15
27
  def self.alias_attribute(new, old)
16
28
  alias_method new, old
17
29
  end
data/lib/ardm/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ardm
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  end
@@ -0,0 +1,20 @@
1
+ require 'spec_helper'
2
+ require 'ardm/data_mapper/record'
3
+
4
+ describe Ardm::DataMapper::Record do
5
+ it 'responds to finalize' do
6
+ expect(described_class.respond_to?(:finalize)).to be_truthy
7
+ end
8
+
9
+ it 'responds to repository' do
10
+ expect(described_class.respond_to?(:repository)).to be_truthy
11
+ end
12
+
13
+ it 'responds to logger' do
14
+ expect(described_class.respond_to?(:logger)).to be_truthy
15
+ end
16
+
17
+ it 'responds to logger=' do
18
+ expect(described_class.respond_to?(:logger=)).to be_truthy
19
+ end
20
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ardm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -275,6 +275,7 @@ files:
275
275
  - lib/ardm/support/subject_set.rb
276
276
  - lib/ardm/version.rb
277
277
  - spec/ardm/datamapper_constants_spec.rb
278
+ - spec/ardm/record_forwarding_spec.rb
278
279
  - spec/fixtures/api_user.rb
279
280
  - spec/fixtures/article.rb
280
281
  - spec/fixtures/bookmark.rb