fedux_org-stdlib 0.0.21 → 0.0.22

Sign up to get free protection for your applications and to get access to all the features.
@@ -44,7 +44,7 @@ module FeduxOrg
44
44
  end
45
45
 
46
46
  def hash
47
- self.name.to_s.hash
47
+ name.to_s.hash
48
48
  end
49
49
 
50
50
  class << self
@@ -42,8 +42,8 @@ module FeduxOrg
42
42
  raise FeduxOrg::Stdlib::Models::Exceptions::MethodNeedsToBeImplemented, "Please defined the method \"suffix\" to make the library work."
43
43
  end
44
44
 
45
- def path
46
- raise FeduxOrg::Stdlib::Models::Exceptions::MethodNeedsToBeImplemented, "Please defined the method \"path\" to make the library work."
45
+ def model_path
46
+ raise FeduxOrg::Stdlib::Models::Exceptions::MethodNeedsToBeImplemented, "Please defined the method \"model_path\" to make the library work."
47
47
  end
48
48
 
49
49
  def ignore
@@ -67,7 +67,7 @@ module FeduxOrg
67
67
  end
68
68
 
69
69
  def path_to_instances
70
- return_path = ::File.expand_path("../../#{model_name.pluralize.underscore}", path )
70
+ return_path = ::File.expand_path("../../#{model_name.pluralize.underscore}", model_path )
71
71
 
72
72
  FeduxOrg::Stdlib.logger.debug(self) { "Path to instances of model: #{return_path}" }
73
73
 
@@ -1,6 +1,6 @@
1
1
  #main FeduxOrg
2
2
  module FeduxOrg
3
3
  module Stdlib
4
- VERSION = '0.0.21'
4
+ VERSION = '0.0.22'
5
5
  end
6
6
  end
@@ -17,7 +17,7 @@ describe Models::ClassBasedModel do
17
17
  class TestClassForFilesystem < FeduxOrg::Stdlib::Models::BaseModel
18
18
  include FeduxOrg::Stdlib::Models::FilesystemBasedModel
19
19
  include FeduxOrg::Stdlib::Models::ClassBasedModel
20
- def self.path
20
+ def self.model_path
21
21
  File.join( examples_dir, 'models', 'class_based.rb' )
22
22
  end
23
23
  end
@@ -29,7 +29,7 @@ describe Models::ClassBasedModel do
29
29
  class TestClassForFilesystem2 < FeduxOrg::Stdlib::Models::BaseModel
30
30
  include FeduxOrg::Stdlib::Models::FilesystemBasedModel
31
31
  include FeduxOrg::Stdlib::Models::ClassBasedModel
32
- def self.path
32
+ def self.model_path
33
33
  File.join( examples_dir, 'models', 'forbidden.rb' )
34
34
  end
35
35
 
@@ -301,12 +301,12 @@ describe Models::ClassBasedModel do
301
301
  end
302
302
 
303
303
  it "returns the name for the instance based on the path to the ruby file" do
304
- expect( Test123::Models::TestClassForFilesystem.send(:name, Test123::Models::TestClassForFilesystem.send( :path ) ) ).to eq( :class_based )
304
+ expect( Test123::Models::TestClassForFilesystem.send(:name, Test123::Models::TestClassForFilesystem.send( :model_path ) ) ).to eq( :class_based )
305
305
  end
306
306
 
307
307
  it "check if the name for the instances is forbidden" do
308
308
  expect {
309
- Test123::Models::TestClassForFilesystem2.send(:name, Test123::Models::TestClassForFilesystem2.send( :path ) )
309
+ Test123::Models::TestClassForFilesystem2.send(:name, Test123::Models::TestClassForFilesystem2.send( :model_path ) )
310
310
  }.to raise_error FeduxOrg::Stdlib::Models::Exceptions::UnauthorizedUseOfKeyword
311
311
  end
312
312
 
@@ -323,7 +323,7 @@ describe Models::ClassBasedModel do
323
323
  'Internal'
324
324
  end
325
325
 
326
- def self.path
326
+ def self.model_path
327
327
  'asdfasf'
328
328
  end
329
329
  end
@@ -101,7 +101,7 @@ describe Models::FilesystemBasedModel do
101
101
  'FindFiles'
102
102
  end
103
103
 
104
- def self.path
104
+ def self.model_path
105
105
  File.join( examples_dir, 'models', 'filesystem_based', 'find_files')
106
106
  end
107
107
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fedux_org-stdlib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.21
4
+ version: 0.0.22
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-19 00:00:00.000000000 Z
12
+ date: 2013-07-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler