tzispa_data 0.2.0 → 0.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a9234402ed79a266e628d427704877a3e1a7286a
4
- data.tar.gz: 52cde789079f0e62cddb344ebb1b7c612316156f
3
+ metadata.gz: 541b8583385fa3cd067dcd15d4600da2f0be5b55
4
+ data.tar.gz: f8ecf752ae8345dc0267975a73b644265053e8e5
5
5
  SHA512:
6
- metadata.gz: 72bc1e0dd2b08fa542e3e758b3c6465da6b8c9b6017e82e114c9fb684b221e0876a595e4085541fdfc415c28952b70ab4b86a0b6ef91134f7881f6655c6271a6
7
- data.tar.gz: 355d77a38353fe5af31d77927d3dff04f22e89337e6a3b105bc4dc94279b383dc1c134e1ef8a844dd97985bd5aecda3efc12e464af4ece17b2755a18c1589275
6
+ metadata.gz: 26e9037dd1d200fc2eaef19561dc355e8cb193f2c915ed001fc11b8886bff12987bf6f6c50aaeeba55ffbb4cf2b9ffc975bb6eda95b6d8c15e20e3d3fe6892a0
7
+ data.tar.gz: edca3ff381626055bbff6b841e0b0355b5b1c42fc5013e33bacd371d25b82f0a432dc64df7d954644e44dc3480a990c2ee9907cc8717c14ce50129aec1dcfb60
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  Tzispa Data
2
2
 
3
+ ## v0.2.1
4
+ - code fixes for replacing TzString with String refinement
5
+
3
6
  ## v0.2.0
4
7
  - add data transporter class for import/export data
5
8
 
@@ -15,27 +15,16 @@ module Tzispa
15
15
  end
16
16
 
17
17
  module ClassMethods
18
+ using Tzispa::Utils
19
+
18
20
  def entity_class
19
21
  class_variable_defined?(:@@__entity_class) ?
20
22
  class_variable_get(:@@__entity_class) :
21
- class_variable_set(:@@__entity_class, TzString.constantize("#{self}Entity") )
23
+ class_variable_set(:@@__entity_class, "#{self}Entity".constantize )
22
24
  end
23
25
  alias_method :entity, :entity_class
24
26
  end
25
27
 
26
- #unless model_class.respond_to?(:entity_class!)
27
- # model_class.send(:define_singleton_method, :entity_class) {
28
- # class_variable_defined?(:@@__entity_class) ?
29
- # class_variable_get(:@@__entity_class) :
30
- # class_variable_set(:@@__entity_class, TzString.constantize("#{self}Entity") )
31
- # }
32
- #end
33
- #model_class.send(:define_method, :entity!) {
34
- # instance_variable_defined?(:@__entity) ?
35
- # instance_variable_get(:@__entity) :
36
- # instance_variable_set(:@__entity, self.class.entity_class!.new(self))
37
- #}
38
-
39
28
  end
40
29
  end
41
30
  end
@@ -14,6 +14,8 @@ module Tzispa
14
14
 
15
15
  class Repository
16
16
 
17
+ using Tzispa::Utils
18
+
17
19
  attr_reader :root, :adapters
18
20
 
19
21
  LOCAL_REPO_ROOT = :repository
@@ -39,8 +41,8 @@ module Tzispa
39
41
  build_local_repo id, cfg
40
42
  else
41
43
  require cfg.gem
42
- repo_mod, build_method = cfg.register.split('#')
43
- (TzString.constantize repo_mod).send build_method, self, id, cfg
44
+ self.class.include "Repository::#{id.to_s.camelize}".constantize
45
+ self.class.send "load_#{id}", self, id, cfg
44
46
  end
45
47
  }
46
48
  }
@@ -61,7 +63,7 @@ module Tzispa
61
63
  Dir["./#{root.to_s.downcase}/#{repo_id}/*.rb"].each { |file|
62
64
  model_id = file.split('/').last.split('.').first
63
65
  require local_model_source(model_id, repo_id)
64
- model_class = TzString.constantize "Repository::#{TzString.camelize repo_id}::#{TzString.camelize model_id}"
66
+ model_class = "Repository::#{repo_id.camelize}::#{model_id.camelize}".constantize
65
67
  register model_id, model_class, repo_id, config
66
68
  }
67
69
  end
@@ -3,7 +3,7 @@
3
3
  module Tzispa
4
4
  module Data
5
5
 
6
- VERSION = '0.2.0'
6
+ VERSION = '0.2.1'
7
7
  NAME = 'Tzispa Data'
8
8
  GEM_NAME = 'tzispa_data'
9
9
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tzispa_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Antonio Piñero
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-11 00:00:00.000000000 Z
11
+ date: 2016-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  version: '0'
76
76
  requirements: []
77
77
  rubyforge_project:
78
- rubygems_version: 2.5.1
78
+ rubygems_version: 2.5.2
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Data access for Tzispa framework