universe_compiler 0.4.3 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d3ec4856a55e676294a38c02533d2107b7e315f6
4
- data.tar.gz: 5aeb5dc2d1f22314b636f65e9a7b412d84bd3415
3
+ metadata.gz: 46d2b21ce9c76579d82e7f06287ebf7606473dc9
4
+ data.tar.gz: 661e0e6951b00b4f359633e0ee72c3395c274846
5
5
  SHA512:
6
- metadata.gz: 07c5b9132b70584508c268827e9744c0b3fca36ac8bb0892401f4e797bcf58b7130fe6f5ee15d034cc442713331b171b52dc471e558d0f4583e0c3b846343812
7
- data.tar.gz: aadd6b0fa6a59864896b1dcd94dbd4c9329d1f68c374b29a1325bcb49b2509042dcf2b131cfd1c42381f89c3afc38b776e8526d6f666e1c07ef02e57c5406539
6
+ metadata.gz: 75c8e7108b07624c35daa5cc5f696035cd65ff3f4206c9f94a3bd541194a23c7987bb83fa79d0b562dbc165a6851981a1b16f2d16042574f9100ed81ac942ba0
7
+ data.tar.gz: 6a55fb45b6d49a3efc8f40d0f6a6cbddc0f4f816053325bb5364d9e516f200101b9581acd23a553901051f557f5e4465773e6f381a6a60aabbd1946ac3bd1e48
data/.gitlab-ci.yml ADDED
@@ -0,0 +1,9 @@
1
+ image: "ruby:2.3"
2
+
3
+ before_script:
4
+ - gem install bundler --no-document
5
+ - bundle install --jobs $(nproc) "${FLAGS[@]}"
6
+
7
+ rspec:
8
+ script:
9
+ - bundle exec rspec
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  UniverseCompiler
2
2
  ================
3
3
 
4
+ [![ ](https://gitlab.com/tools4devops/universe_compiler/badges/master/pipeline.svg)](https://gitlab.com/tools4devops/universe_compiler/commits/master)
5
+
4
6
  <!-- TOC -->
5
7
 
6
8
  - [Overview](#overview)
@@ -30,6 +30,7 @@ module UniverseCompiler
30
30
  end
31
31
 
32
32
  yaml_tag '!psref'
33
+ yaml_tag '!entity'
33
34
 
34
35
  include UniverseCompiler::Utils::ErrorPropagation
35
36
  include UniverseCompiler::Entity::Conversion
@@ -61,17 +62,29 @@ module UniverseCompiler
61
62
  end
62
63
 
63
64
  def encode_with(coder)
64
- coder['type'] = type
65
- coder['name'] = name
65
+ coder.scalar = '%s/%s' % [type, name]
66
66
  end
67
67
 
68
68
  def init_with(coder)
69
69
  initialize
70
- @type = coder['type']
71
- @name = coder['name']
70
+ case coder.tag
71
+ when '!psref'
72
+ @type = coder['type']
73
+ @name = coder['name']
74
+ when '!entity'
75
+ if md = coder.scalar.match(/^(?<type>[^\/]+)\/(?<name>.+)$/)
76
+ @type = md['type'].to_sym
77
+ @name = md['name']
78
+ else
79
+ raise UniverseCompiler::Error 'Invalid deserialization !'
80
+ end
81
+ else
82
+ raise UniverseCompiler::Error 'Invalid deserialization !'
83
+ end
84
+
72
85
  end
73
86
 
74
87
  end
75
88
 
76
89
  end
77
- end
90
+ end
@@ -1,3 +1,3 @@
1
1
  module UniverseCompiler
2
- VERSION = '0.4.3'.freeze
2
+ VERSION = '0.5.1'.freeze
3
3
  end
@@ -20,14 +20,14 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ['lib']
21
21
 
22
22
  spec.add_development_dependency 'bundler', '~> 2.0'
23
+ spec.add_development_dependency 'factory_girl', '~> 4.0', '>= 4.8'
24
+ spec.add_development_dependency 'pry'
23
25
  spec.add_development_dependency 'rake', '~> 10.0'
24
26
  spec.add_development_dependency 'rspec', '~> 3.0'
25
- spec.add_development_dependency 'factory_girl', '~> 4.0', '>= 4.8'
26
27
  spec.add_development_dependency 'rubocop'
27
- spec.add_development_dependency 'pry'
28
28
 
29
- spec.add_runtime_dependency 'super_stack', '~> 1.0', '>= 1.0.6'
30
29
  spec.add_runtime_dependency 'activesupport', '~> 5.0'
31
- spec.add_dependency 'ruby-graphviz'
30
+ spec.add_runtime_dependency 'ruby-graphviz'
31
+ spec.add_runtime_dependency 'super_stack', '~> 1.0', '>= 1.0.6'
32
32
 
33
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: universe_compiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurent B.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-17 00:00:00.000000000 Z
11
+ date: 2019-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -25,69 +25,69 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
28
+ name: factory_girl
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '4.0'
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: '4.8'
34
37
  type: :development
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
41
  - - "~>"
39
42
  - !ruby/object:Gem::Version
40
- version: '10.0'
43
+ version: '4.0'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '4.8'
41
47
  - !ruby/object:Gem::Dependency
42
- name: rspec
48
+ name: pry
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
- - - "~>"
51
+ - - ">="
46
52
  - !ruby/object:Gem::Version
47
- version: '3.0'
53
+ version: '0'
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
- - - "~>"
58
+ - - ">="
53
59
  - !ruby/object:Gem::Version
54
- version: '3.0'
60
+ version: '0'
55
61
  - !ruby/object:Gem::Dependency
56
- name: factory_girl
62
+ name: rake
57
63
  requirement: !ruby/object:Gem::Requirement
58
64
  requirements:
59
65
  - - "~>"
60
66
  - !ruby/object:Gem::Version
61
- version: '4.0'
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- version: '4.8'
67
+ version: '10.0'
65
68
  type: :development
66
69
  prerelease: false
67
70
  version_requirements: !ruby/object:Gem::Requirement
68
71
  requirements:
69
72
  - - "~>"
70
73
  - !ruby/object:Gem::Version
71
- version: '4.0'
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- version: '4.8'
74
+ version: '10.0'
75
75
  - !ruby/object:Gem::Dependency
76
- name: rubocop
76
+ name: rspec
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - ">="
79
+ - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '0'
81
+ version: '3.0'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - ">="
86
+ - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '0'
88
+ version: '3.0'
89
89
  - !ruby/object:Gem::Dependency
90
- name: pry
90
+ name: rubocop
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - ">="
@@ -101,53 +101,53 @@ dependencies:
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  - !ruby/object:Gem::Dependency
104
- name: super_stack
104
+ name: activesupport
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: '1.0'
110
- - - ">="
111
- - !ruby/object:Gem::Version
112
- version: 1.0.6
109
+ version: '5.0'
113
110
  type: :runtime
114
111
  prerelease: false
115
112
  version_requirements: !ruby/object:Gem::Requirement
116
113
  requirements:
117
114
  - - "~>"
118
115
  - !ruby/object:Gem::Version
119
- version: '1.0'
120
- - - ">="
121
- - !ruby/object:Gem::Version
122
- version: 1.0.6
116
+ version: '5.0'
123
117
  - !ruby/object:Gem::Dependency
124
- name: activesupport
118
+ name: ruby-graphviz
125
119
  requirement: !ruby/object:Gem::Requirement
126
120
  requirements:
127
- - - "~>"
121
+ - - ">="
128
122
  - !ruby/object:Gem::Version
129
- version: '5.0'
123
+ version: '0'
130
124
  type: :runtime
131
125
  prerelease: false
132
126
  version_requirements: !ruby/object:Gem::Requirement
133
127
  requirements:
134
- - - "~>"
128
+ - - ">="
135
129
  - !ruby/object:Gem::Version
136
- version: '5.0'
130
+ version: '0'
137
131
  - !ruby/object:Gem::Dependency
138
- name: ruby-graphviz
132
+ name: super_stack
139
133
  requirement: !ruby/object:Gem::Requirement
140
134
  requirements:
135
+ - - "~>"
136
+ - !ruby/object:Gem::Version
137
+ version: '1.0'
141
138
  - - ">="
142
139
  - !ruby/object:Gem::Version
143
- version: '0'
140
+ version: 1.0.6
144
141
  type: :runtime
145
142
  prerelease: false
146
143
  version_requirements: !ruby/object:Gem::Requirement
147
144
  requirements:
145
+ - - "~>"
146
+ - !ruby/object:Gem::Version
147
+ version: '1.0'
148
148
  - - ">="
149
149
  - !ruby/object:Gem::Version
150
- version: '0'
150
+ version: 1.0.6
151
151
  description: Provide a way to create objects with complex relationships, inheritance
152
152
  and override mechanisms.
153
153
  email:
@@ -157,6 +157,7 @@ extensions: []
157
157
  extra_rdoc_files: []
158
158
  files:
159
159
  - ".gitignore"
160
+ - ".gitlab-ci.yml"
160
161
  - ".rspec"
161
162
  - ".rubocop.yml"
162
163
  - ".travis.yml"