cayuga 0.0.22 → 0.0.23

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
  SHA256:
3
- metadata.gz: 9337cf770e84fa98c3bf787fcbd0e7f36b95421cb6accbf9805b811ed791b274
4
- data.tar.gz: 2b190d6b5082b3eb6244d0b4cd25201ce52884ddfb8e4af9699a81c2dc656501
3
+ metadata.gz: 87dc76d41fe2678a9f765c225ff3edd26e388ffdabd1a06f9f5adda9e10211f3
4
+ data.tar.gz: 8ce5e832b34ee07ff69178bfc343629f11d3dcac7f98d9283df70e865fff12e0
5
5
  SHA512:
6
- metadata.gz: 5c0aa9199661c4145cd1b81684a03fb8f37c62e43f63d450ef3efa3592b9a964fcdd1750a2ffaf9a00f53a865d121cf4a1bfc6c9eb747eff9fe0979dccfd9470
7
- data.tar.gz: de119d25bdebff1a4cc045a99bd1af40131e8dc365d72ae0bec6531411556b681f84554d2f078eddc0ee0fbd200d1e9242efcccdd181c019c4e722bcd0117ab3
6
+ metadata.gz: 5c7e6d646feae723788ccc3548d67618e2edac96ce39757de2e2ad8b3ab5f4913d1d22bf3f632b4e263beeed6caf11d8729713c551b8c36ad38ac389b019a5e1
7
+ data.tar.gz: 9cde352d35f924fabeab8992a77a68eb2233d860a958bacfda876b3cf63caf3c4cc9e91658a803a4c9dd01448c07a541d9444607d9a38a075e0c2c210937231a
data/.gitignore CHANGED
@@ -6,6 +6,7 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ *.logs
9
10
 
10
11
  # rspec failure tracking
11
12
  .rspec_status
@@ -1,6 +1,9 @@
1
1
  Layout/AlignParameters:
2
2
  Enabled: false
3
3
 
4
+ Layout/CaseIndentation:
5
+ Enabled: false
6
+
4
7
  Layout/EmptyLinesAroundBlockBody:
5
8
  Enabled: false
6
9
 
@@ -13,11 +16,13 @@ Layout/EmptyLinesAroundModuleBody:
13
16
  Layout/EndAlignment:
14
17
  EnforcedStyleAlignWith: start_of_line
15
18
 
16
- Layout/MultilineOperationIndentation:
19
+ Layout/MultilineMethodCallIndentation:
17
20
  EnforcedStyle: indented
18
21
 
19
- Layout/MultilineCallIndentation:
22
+ Layout/MultilineOperationIndentation:
23
+ Enabled: false
20
24
  EnforcedStyle: indented
25
+ IndentationWidth: 2
21
26
 
22
27
  Layout/SpaceAroundOperators:
23
28
  Enabled: false
@@ -25,16 +30,19 @@ Layout/SpaceAroundOperators:
25
30
  Layout/TrailingBlankLines:
26
31
  Enabled: false
27
32
 
33
+ Metrics/AbcSize:
34
+ Max: 15
35
+
28
36
  Metrics/BlockLength:
29
- ExcludedMethods: [ RSpec.describe ]
37
+ Max: 30
38
+ ExcludedMethods: [ RSpec.describe, Specification.new]
30
39
 
31
40
  Metrics/MethodLength:
32
41
  Enabled: true
33
42
  Max: 25
34
43
 
35
- Style/CaseIndentation:
36
- Enabled: false
37
-
38
44
  Style/IfUnlessModifier:
39
45
  Enabled: false
40
46
 
47
+ Style/EmptyElse:
48
+ EnforcedStyle: empty
@@ -34,11 +34,16 @@ Gem::Specification.new do |spec|
34
34
 
35
35
  spec.add_runtime_dependency 'facets', '~>3.1'
36
36
  spec.add_runtime_dependency 'ice_nine', '~>0.11'
37
+ spec.add_runtime_dependency 'puma', '~> 3.0'
37
38
  spec.add_runtime_dependency 'semantic_logger', '~>4.3'
39
+ spec.add_runtime_dependency 'sinatra', '~> 2.0'
38
40
 
39
41
  spec.add_development_dependency 'bundler', '~> 2.0'
42
+ spec.add_development_dependency 'capybara', '~> 3.0'
40
43
  spec.add_development_dependency 'file-tail', '~>1.2'
44
+ spec.add_development_dependency 'launchy', '~>2.4'
41
45
  spec.add_development_dependency 'rake', '~> 10.0'
42
46
  spec.add_development_dependency 'rspec', '~> 3.0'
47
+ spec.add_development_dependency 'selenium-webdriver', '~> 3.0'
43
48
 
44
49
  end
data/cayuga.iml CHANGED
@@ -13,20 +13,40 @@
13
13
  </content>
14
14
  <orderEntry type="jdk" jdkName="ruby-2.4.4-p296" jdkType="RUBY_SDK" />
15
15
  <orderEntry type="sourceFolder" forTests="false" />
16
+ <orderEntry type="library" scope="PROVIDED" name="addressable (v2.6.0, ruby-2.4.4-p296) [gem]" level="application" />
16
17
  <orderEntry type="library" scope="PROVIDED" name="bundler (v2.0.1, ruby-2.4.4-p296) [gem]" level="application" />
18
+ <orderEntry type="library" scope="PROVIDED" name="capybara (v3.12.0, ruby-2.4.4-p296) [gem]" level="application" />
19
+ <orderEntry type="library" scope="PROVIDED" name="childprocess (v0.9.0, ruby-2.4.4-p296) [gem]" level="application" />
17
20
  <orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.1.4, ruby-2.4.4-p296) [gem]" level="application" />
18
21
  <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.3, ruby-2.4.4-p296) [gem]" level="application" />
19
22
  <orderEntry type="library" scope="PROVIDED" name="facets (v3.1.0, ruby-2.4.4-p296) [gem]" level="application" />
23
+ <orderEntry type="library" scope="PROVIDED" name="ffi (v1.10.0, ruby-2.4.4-p296) [gem]" level="application" />
20
24
  <orderEntry type="library" scope="PROVIDED" name="file-tail (v1.2.0, ruby-2.4.4-p296) [gem]" level="application" />
21
25
  <orderEntry type="library" scope="PROVIDED" name="ice_nine (v0.11.2, ruby-2.4.4-p296) [gem]" level="application" />
26
+ <orderEntry type="library" scope="PROVIDED" name="launchy (v2.4.3, ruby-2.4.4-p296) [gem]" level="application" />
27
+ <orderEntry type="library" scope="PROVIDED" name="mini_mime (v1.0.1, ruby-2.4.4-p296) [gem]" level="application" />
28
+ <orderEntry type="library" scope="PROVIDED" name="mini_portile2 (v2.4.0, ruby-2.4.4-p296) [gem]" level="application" />
29
+ <orderEntry type="library" scope="PROVIDED" name="mustermann (v1.0.3, ruby-2.4.4-p296) [gem]" level="application" />
30
+ <orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.10.1, ruby-2.4.4-p296) [gem]" level="application" />
31
+ <orderEntry type="library" scope="PROVIDED" name="public_suffix (v3.0.3, ruby-2.4.4-p296) [gem]" level="application" />
32
+ <orderEntry type="library" scope="PROVIDED" name="puma (v3.12.0, ruby-2.4.4-p296) [gem]" level="application" />
33
+ <orderEntry type="library" scope="PROVIDED" name="rack (v2.0.6, ruby-2.4.4-p296) [gem]" level="application" />
34
+ <orderEntry type="library" scope="PROVIDED" name="rack-protection (v2.0.5, ruby-2.4.4-p296) [gem]" level="application" />
35
+ <orderEntry type="library" scope="PROVIDED" name="rack-test (v1.1.0, ruby-2.4.4-p296) [gem]" level="application" />
22
36
  <orderEntry type="library" scope="PROVIDED" name="rake (v10.5.0, ruby-2.4.4-p296) [gem]" level="application" />
37
+ <orderEntry type="library" scope="PROVIDED" name="regexp_parser (v1.3.0, ruby-2.4.4-p296) [gem]" level="application" />
23
38
  <orderEntry type="library" scope="PROVIDED" name="rspec (v3.8.0, ruby-2.4.4-p296) [gem]" level="application" />
24
39
  <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.8.0, ruby-2.4.4-p296) [gem]" level="application" />
25
40
  <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.8.2, ruby-2.4.4-p296) [gem]" level="application" />
26
41
  <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.8.0, ruby-2.4.4-p296) [gem]" level="application" />
27
42
  <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.8.0, ruby-2.4.4-p296) [gem]" level="application" />
43
+ <orderEntry type="library" scope="PROVIDED" name="rubyzip (v1.2.2, ruby-2.4.4-p296) [gem]" level="application" />
44
+ <orderEntry type="library" scope="PROVIDED" name="selenium-webdriver (v3.141.0, ruby-2.4.4-p296) [gem]" level="application" />
28
45
  <orderEntry type="library" scope="PROVIDED" name="semantic_logger (v4.3.1, ruby-2.4.4-p296) [gem]" level="application" />
46
+ <orderEntry type="library" scope="PROVIDED" name="sinatra (v2.0.5, ruby-2.4.4-p296) [gem]" level="application" />
47
+ <orderEntry type="library" scope="PROVIDED" name="tilt (v2.0.9, ruby-2.4.4-p296) [gem]" level="application" />
29
48
  <orderEntry type="library" scope="PROVIDED" name="tins (v1.20.2, ruby-2.4.4-p296) [gem]" level="application" />
49
+ <orderEntry type="library" scope="PROVIDED" name="xpath (v3.2.0, ruby-2.4.4-p296) [gem]" level="application" />
30
50
  </component>
31
51
  <component name="RModuleSettingsStorage">
32
52
  <LOAD_PATH number="2" string0="$MODULE_DIR$/lib" string1="$MODULE_DIR$/spec" />
@@ -36,4 +36,4 @@ module Cayuga
36
36
 
37
37
  end
38
38
  end
39
- end
39
+ end
@@ -40,6 +40,7 @@ module Cayuga
40
40
  message = "'#{type}' must be object, singleton or named"
41
41
  ok = %i[object singleton named].include? type.symbolize
42
42
  raise ArgumentError, message unless ok
43
+
43
44
  register_classes([klass], type)
44
45
  end
45
46
 
@@ -81,6 +82,7 @@ module Cayuga
81
82
  def release(klass, name = nil)
82
83
  key = klass.symbolize
83
84
  return unless registered?(key, name)
85
+
84
86
  type = type(key)
85
87
  case type
86
88
  when :singleton
@@ -71,6 +71,7 @@ module Cayuga
71
71
 
72
72
  def register_classes(list, type)
73
73
  return if list.nil?
74
+
74
75
  list.each do |klass|
75
76
  types[klass.symbolize] = type
76
77
  end
@@ -86,7 +87,7 @@ module Cayuga
86
87
 
87
88
  def generate_registration_errors(klass, name, key, type)
88
89
  unless lookup_registered_instances(key, name).nil?
89
- value = name.nil? ? klass.string : "#{klass.string}[#{name}]"
90
+ value = name.nil? ? klass.stringify : "#{klass.string}[#{name}]"
90
91
  raise "instance for #{value} already registered}"
91
92
  end
92
93
  types = %i[singleton named]
@@ -35,6 +35,7 @@ module Cayuga
35
35
  end
36
36
  count = all.count
37
37
  raise "More than one log with name #{name}" if count > 1
38
+
38
39
  count == 1 ? all[0] : nil
39
40
  end
40
41
 
@@ -100,7 +101,9 @@ module Cayuga
100
101
 
101
102
  def remove_any_orphan_appender(name)
102
103
  return if log_log?(name)
104
+
103
105
  return unless log_appender_exists?(name)
106
+
104
107
  logger.warn(
105
108
  'log without registration',
106
109
  name: name,
@@ -24,6 +24,7 @@ module Cayuga
24
24
  if factory.registered?(self, name)
25
25
  raise "#{stringify}[#{name}] already registered"
26
26
  end
27
+
27
28
  if primary?(name)
28
29
  primary = name
29
30
  alternate = nil
@@ -41,7 +42,7 @@ module Cayuga
41
42
  case object_name
42
43
  when Hash
43
44
  result = object_name.map { |key, value| "@#{key}=\"#{value}\"" }
44
- .join(' ')
45
+ .join(' ')
45
46
  "#<#{self.class.name}:#{object_id} #{result}>"
46
47
  else
47
48
  "#<#{self.class.name}:#{object_id} @name=\"#{object_name}\">"
@@ -61,6 +62,7 @@ module Cayuga
61
62
  unless valid_name?(factory, name)
62
63
  raise "'#{self}['#{name}'] is not a valid #{self}"
63
64
  end
65
+
64
66
  # name valid
65
67
  # check alternate valid if exists
66
68
  unless alternate.nil?
@@ -88,4 +90,4 @@ module Cayuga
88
90
 
89
91
  end
90
92
  end
91
- end
93
+ end
@@ -28,6 +28,7 @@ module Cayuga
28
28
  @configuration = configuration
29
29
  @configuration_name = factory.configuration_name
30
30
  return if self.class == Logger
31
+
31
32
  factory[Logger]
32
33
  .log_log!(self.class, filter: Regexp.new(self.class.name))
33
34
  end
@@ -7,6 +7,7 @@ module Cayuga
7
7
  class Singleton < Object
8
8
  def self.create(factory, configuration)
9
9
  raise "#{stringify} already registered" if factory.registered?(self)
10
+
10
11
  factory.register(new(factory, configuration), self)
11
12
  end
12
13
 
@@ -32,11 +32,13 @@ module Cayuga
32
32
 
33
33
  def standardize
34
34
  return self unless alternative?
35
+
35
36
  standardize_string(self)
36
37
  end
37
38
 
38
39
  def standardize_string(string)
39
40
  return string if string.empty?
41
+
40
42
  string =~ /^([^A-Za-z0-9])?([A-Za-z0-9]+)?(.*)$/
41
43
  my_matches = []
42
44
  (1..3).each do |i|
@@ -20,6 +20,7 @@ module Cayuga
20
20
  # noinspection RubyResolve
21
21
  klass = RootObject.const_get(to_s.modulize)
22
22
  raise NameError, "wrong class name '#{klass}'" unless klass.is_a?(Class)
23
+
23
24
  klass
24
25
  end
25
26
 
@@ -1,3 +1,3 @@
1
1
  module Cayuga
2
- VERSION = '0.0.22'.freeze
2
+ VERSION = '0.0.23'.freeze
3
3
  end
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cayuga
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.22
4
+ version: 0.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - patrick
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-06 00:00:00.000000000 Z
11
+ date: 2019-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facets
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.11'
41
+ - !ruby/object:Gem::Dependency
42
+ name: puma
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: semantic_logger
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +66,20 @@ dependencies:
52
66
  - - "~>"
53
67
  - !ruby/object:Gem::Version
54
68
  version: '4.3'
69
+ - !ruby/object:Gem::Dependency
70
+ name: sinatra
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '2.0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '2.0'
55
83
  - !ruby/object:Gem::Dependency
56
84
  name: bundler
57
85
  requirement: !ruby/object:Gem::Requirement
@@ -66,6 +94,20 @@ dependencies:
66
94
  - - "~>"
67
95
  - !ruby/object:Gem::Version
68
96
  version: '2.0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: capybara
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '3.0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '3.0'
69
111
  - !ruby/object:Gem::Dependency
70
112
  name: file-tail
71
113
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +122,20 @@ dependencies:
80
122
  - - "~>"
81
123
  - !ruby/object:Gem::Version
82
124
  version: '1.2'
125
+ - !ruby/object:Gem::Dependency
126
+ name: launchy
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '2.4'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '2.4'
83
139
  - !ruby/object:Gem::Dependency
84
140
  name: rake
85
141
  requirement: !ruby/object:Gem::Requirement
@@ -108,6 +164,20 @@ dependencies:
108
164
  - - "~>"
109
165
  - !ruby/object:Gem::Version
110
166
  version: '3.0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: selenium-webdriver
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '3.0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '3.0'
111
181
  description:
112
182
  email:
113
183
  - peateas@gmail.com
@@ -138,17 +208,7 @@ files:
138
208
  - lib/cayuga/tools/string.rb
139
209
  - lib/cayuga/tools/symbol.rb
140
210
  - lib/cayuga/version.rb
141
- - load_categories_810.json
142
- - load_patrick_810.json
143
- - load_relations_810.json
144
- - load_time_and_locations_810.json
145
- - load_universe_810.json
146
- - reports.txt
147
- - system_category_reports_2018.json
148
- - system_relation_reports_2018.json
149
- - system_test.json
150
- - system_things_reports_2018.json
151
- - test_script.rb
211
+ - logs/.gitkeep
152
212
  homepage: ''
153
213
  licenses: []
154
214
  metadata: {}
@@ -1,39 +0,0 @@
1
- {
2
- "system": "/us/cayuga/system/2018",
3
- "namespace": "system",
4
- "tag-language": "english",
5
- "context": "system",
6
- "document": "load",
7
- "topics": [
8
- "categories"
9
- ],
10
- "title": "there are the essential categories in the system",
11
- "reports": [
12
- {
13
- "things": [
14
- "category::relation",
15
- "category::category",
16
- "category::thing",
17
- "category::relationship",
18
- "category::predicate",
19
- "category::property",
20
- "category::time",
21
- "category::location",
22
- "category::occurrence",
23
- "category::owner",
24
- "category::value",
25
- "category::state",
26
- "category::agent",
27
- "category::event",
28
- "category::report"
29
- ],
30
- "relationships": [
31
- "things said-to-be-made-to-be in universe universe",
32
- "things said-to-be-made-to-be instance of category category"
33
- ],
34
- "states": "relationships do occur at time always at location universe",
35
- "events": "states do be made to occur by agent patrick at time 2018 at location earth",
36
- "report": "events do be said to occur by agent patrick at time 2018 at location earth"
37
- }
38
- ]
39
- }
@@ -1,21 +0,0 @@
1
- {
2
- "system": "/us/cayuga/system/2018",
3
- "namespace": "system",
4
- "tag-language": "english",
5
- "context": "system",
6
- "document": "load",
7
- "topics": ["agent patrick"],
8
- "title": "agent patrick",
9
- "reports": [
10
- {
11
- "thing": "agent::patrick",
12
- "relationships": [
13
- "thing said-to-be-made-to-be in universe universe",
14
- "thing said-to-be-made-to-be instance of category source"
15
- ],
16
- "states": "relationships do occur at time always at location universe",
17
- "events": "states do be made to occur by agent patrick at time 2018 at location earth",
18
- "report": "events do be said to occur by agent patrick at time 2018 at location earth"
19
- }
20
- ]
21
- }
@@ -1,28 +0,0 @@
1
- {
2
- "system": "/us/cayuga/system/2018",
3
- "namespace": "system",
4
- "tag-language": "english",
5
- "context": "system",
6
- "document": "load",
7
- "topics": [
8
- "relations"
9
- ],
10
- "title": "there are the essential relations in the system",
11
- "reports": [
12
- {
13
- "things": [
14
- "relation::universe#have#thing#thing",
15
- "relation::category#have#instance#thing",
16
- "relation::thing#be#thing#in#universe",
17
- "relation::thing#be#instance#of#category"
18
- ],
19
- "relationships": [
20
- "things said-to-be-made-to-be thing in universe universe",
21
- "things said-to-be-made-to-be instance of category relation"
22
- ],
23
- "states": "relationships do occur at time always at location universe",
24
- "events": "states do be made to occur by agent patrick at time 2018 at location earth",
25
- "report": "events do be said to occur by agent patrick at time 2018 at location earth"
26
- }
27
- ]
28
- }
@@ -1,43 +0,0 @@
1
- {
2
- "system": "/us/cayuga/system/2018",
3
- "namespace": "system",
4
- "tag-language": "english",
5
- "context": "system",
6
- "document": "load",
7
- "topics": [
8
- "times",
9
- "locations"
10
- ],
11
- "title": "times and locations",
12
- "reports": [
13
- {
14
- "things": [
15
- "time::powers-on-high-made",
16
- "time::universe-made",
17
- "time::earth-made",
18
- "time::always"
19
- ],
20
- "relationship": [
21
- "things said-to-be-made-to-be in universe universe",
22
- "things said-to-be-made-to-be instance of category time"
23
- ],
24
- "state": "relationship do occur at time always at location universe",
25
- "event": "state do be made to occur by agent powers-on-high at time powers-on-high-made at location powers-on-high-when-made",
26
- "report": "event do be said to occur by agent patrick at time 2018 at location earth"
27
- },
28
- {
29
- "things": [
30
- "location powers-on-high-when-made",
31
- "location universe",
32
- "location earth"
33
- ],
34
- "relationship": [
35
- "things said-to-be-made-to-be in universe universe",
36
- "things said-to-be-made-to-be instance of category location"
37
- ],
38
- "state": "relationship do occur at time always at location universe",
39
- "event": "state do be made to occur by agent powers-on-high at time powers-on-high-made at location powers-on-high-when-made",
40
- "report": "event do be said to occur by agent patrick at time 2018 at location earth"
41
- }
42
- ]
43
- }
@@ -1,45 +0,0 @@
1
- {
2
- "system": "/us/cayuga/system/2018",
3
- "namespace": "system",
4
- "tag-language": "english",
5
- "context": "system",
6
- "document": "load",
7
- "topics": [
8
- "thing universe",
9
- "thing earth",
10
- "agent powers-on-high"
11
- ],
12
- "title": "universe, earth, power-on-high",
13
- "reports": [
14
- {
15
- "thing": "universe::universe",
16
- "relationship": [
17
- "thing said-to-be-made-to-be in universe universe",
18
- "thing said-to-be-made-to-be instance of category universe"
19
- ],
20
- "state": "relationship do occur at time always at location universe",
21
- "event": "state do be made to occur by agent powers-on-high at time universe-made at location universe",
22
- "report": "event do be said to occur by agent patrick at time 2018 at location earth"
23
- },
24
- {
25
- "thing": "earth",
26
- "relationship": [
27
- "thing said-to-be-made-to-be in universe universe",
28
- "thing said-to-be-made-to-be instance of category thing"
29
- ],
30
- "state": "relationship do occur at time always at location universe",
31
- "event": "state do be made to occur by agent thing::universe at time earth-made at location universe",
32
- "report": "event do be said to occur by agent patrick at time 2018 at location earth"
33
- },
34
- {
35
- "thing": "agent::powers-on-high",
36
- "relationship": [
37
- "thing said-to-be-made-to-be in universe universe",
38
- "thing said-to-be-made-to-be instance of category agent"
39
- ],
40
- "state": "relationship do occur at time always at location universe",
41
- "event": "state do be made to occur by agent powers-on-high at time powers-on-high-made at location powers-on-high-when-made",
42
- "report": "event do be said to occur by agent patrick at time 2018 at location earth"
43
- }
44
- ]
45
- }
@@ -1,77 +0,0 @@
1
- REPORTS
2
- thing category::relation
3
- do be instance of category category at time always at location universe
4
- made by agent patrick at time 2018 at location earth
5
- said by source agent::patrick at time 2018 at location earth
6
-
7
- thing category::category
8
- do be instance of category category at time always at location universe
9
- made by agent patrick at time 2018 at location earth
10
- said by source agent::patrick at time 2018 at location earth
11
-
12
- thing category::thing
13
- do be instance of category category at time always at location universe
14
- made by agent patrick at time 2018 at location earth
15
- said by source agent::patrick at time 2018 at location earth
16
-
17
- OCCURRENCES
18
- category category do have instance thing category::relation at time always at location universe
19
- source agent::Patrick do have reported ##### at time 2018 at location earth
20
- agent Patrick do have made ##### at time 2018 at location earth
21
- category category do have instance thing category::category at time always at location universe
22
- source agent::Patrick do have reported ##### at time 2018 at location earth
23
- agent Patrick do have made ##### at time 2018 at location earth
24
- category category do have instance thing category::thing at time always at location universe
25
- source agent::Patrick do have reported ##### at time 2018 at location earth
26
- agent Patrick do have made ##### at time 2018 at location earth
27
-
28
- NAMES
29
- group::system::namespace
30
- group::system::category
31
- group::system::agent
32
- group::system::time
33
- group::system::location
34
- category::system::namespace
35
- category::system::relation
36
- category::system::category
37
- category::system::thing
38
- category::system::agent
39
- category::system::source
40
- namespace::system::system
41
- agent::system::patrick
42
- time::system::always
43
- location::system::earth
44
- location::system::universe
45
-
46
- TAGS (ENGLISH)
47
- group
48
- system
49
- namespace
50
- category
51
- agent
52
- time
53
- location
54
- relation
55
- thing
56
- source
57
- patrick
58
- always
59
- earth
60
- universe
61
- do
62
- be
63
- of
64
- by
65
- at
66
-
67
- RELATIONS
68
- category#have#instance#thing / thing#be#instance#of#category
69
- agent#have#made#state / state#be#made#by#agent
70
- source#have#said#action / action#be#reported#by#source
71
-
72
- SUGAR
73
- do
74
- be
75
- of
76
- by
77
- at
@@ -1,149 +0,0 @@
1
- {
2
- "tag-language": "english",
3
- "system": "/us/cayuga/system/2018",
4
- "context": "system",
5
- "topics": [
6
- "category category"
7
- ],
8
- "document": "reports",
9
- "location": "earth",
10
- "time": "2018",
11
- "reports": "agent Patrick do report events at time now at location here",
12
- "events": "agent Patrick do cause occurrences at time now at location here",
13
- "occurrences": "relationships do occur at time always at location universe",
14
- "relationships": [
15
- {
16
- "subject": "category category",
17
- "predicates": {
18
- "type type-of-category": "referential",
19
- "mandatory predicates": [
20
- "thing#be#instance#of#category thing"
21
- ],
22
- "definitive relations": [
23
- "category#have#type#type",
24
- "category#have#definitive-relation",
25
- "category#have#instance#thing"
26
- ]
27
- }
28
- },
29
- {
30
- "subject": "category descriptive-category",
31
- "predicates": {
32
- "type type-of-category": "referential",
33
- "mandatory predicates": [
34
- "thing#be#instance#of#category category",
35
- "category#have#type#type descriptive"
36
- ],
37
- "definitive relations": [
38
- "descriptive-category#have#differentiator#relation"
39
- ]
40
- }
41
- },
42
- {
43
- "subject": "category referential-category",
44
- "predicates": {
45
- "type type-of-category": "referential",
46
- "mandatory predicates": [
47
- "thing#be#category#category",
48
- "category#have#type#type#referential"
49
- ],
50
- "definitive relations": [
51
- ]
52
- }
53
- },
54
- {
55
- "subject": "category inclusion-category",
56
- "predicates": {
57
- "type type-of-category": "descriptive",
58
- "mandatory predicates": [
59
- "thing#be#category#category category",
60
- "category#have#type#type# inclusion"
61
- ],
62
- "definitive relations": [
63
- "inclusion#category#have#included#categories"
64
- ],
65
- "differentiator relations": [
66
- "inclusion#category#have#included#categories"
67
- ]
68
- }
69
- },
70
- {
71
- "subject": "category exclusion-category",
72
- "predicates": {
73
- "type type": "descriptive",
74
- "mandatory predicates": [
75
- "thing#be#category#category category",
76
- "category#have#type#type exclusion"
77
- ],
78
- "definitive relations": [
79
- "exclusion#category#have#domain#category",
80
- "exclusion#category#have#excluded#category"
81
- ],
82
- "differentiator relations": [
83
- "exclusion#category#have#excluded#categories"
84
- ]
85
- }
86
- },
87
- {
88
- "subject": "category restrictive-category",
89
- "predicates": {
90
- "type type-of-category": "descriptive",
91
- "mandatory predicates": [
92
- "thing#be#category#category category",
93
- "category#have#type#type restrictive"
94
- ],
95
- "definitive relations": [
96
- "restrictive#category#have#mandatory#category"
97
- ]
98
- }
99
- },
100
- {
101
- "subject": "category relation",
102
- "properties": {
103
- "type type-of-category": "referential",
104
- "mandatory properties": [
105
- "thing#be#instance#of#category#thing"
106
- ],
107
- "definitive relations": [
108
- "relation#have#inverse#relation",
109
- "relation#have#domain#category",
110
- "relation#have#image#category",
111
- "relation#have#singularity#singularity-of-relation",
112
- "relation#have#completeness#completeness-of-relation",
113
- "relation#have#co-domain#category",
114
- "relation#have#co-image#category",
115
- "relation#have#co-singularity#singularity-of-relation",
116
- "relation#have#co-completeness#completeness-of-relation",
117
- "relation#have#mutability#mutability-of-relation"
118
- ]
119
- }
120
- },
121
- {
122
- "subject": "category type-of-category",
123
- "predicates": {
124
- "type type-of-category": "referential",
125
- "mandatory predicates": [
126
- "thing#be#instance#of#category"
127
- ]
128
- }
129
- },
130
- {
131
- "subject": "category singularity-of-relation",
132
- "predicates": {
133
- "type type-of-category": "referential"
134
- }
135
- },
136
- {
137
- "subject": "category completeness-of-relation",
138
- "predicates": {
139
- "type type-of-category": "referential"
140
- }
141
- },
142
- {
143
- "subject": "category mutability-of-relation",
144
- "predicates": {
145
- "type type-of-category": "referential"
146
- }
147
- }
148
- ]
149
- }
@@ -1,175 +0,0 @@
1
- {
2
- "tag-language": "english",
3
- "system": "/us/cayuga/system/2018",
4
- "namespace": "system",
5
- "context": "system",
6
- "topics": ["category relation"],
7
- "document": "reports",
8
- "location": "earth",
9
- "time": "2018",
10
- "reports": "agent Patrick do report events here and now",
11
- "events": "agent Patrick do cause occurrences here and now",
12
- "occurrences": "relationships do occur time always location universe",
13
- "relationships": [
14
- {
15
- "subject": "relation relation#have#inverse#relation",
16
- "predicates": {
17
- "inverse#relation": "relation#have#inverse#relation",
18
- "domain#category": "relation",
19
- "image#category": "relation",
20
- "singularity#singularity": "singular",
21
- "completeness#completeness": "complete",
22
- "co-domain#category": "relation",
23
- "co-image#category": "relation",
24
- "co-singularity#singularity": "singular",
25
- "co-completeness#completeness": "complete",
26
- "mutability": "mutable"
27
- }
28
- },
29
- {
30
- "subject": "relation relation#have#domain#category",
31
- "predicates": {
32
- "inverse#relation": "category#be#domain#of#relation",
33
- "domain#category": "relation",
34
- "image#category": "domain#category#of#relations",
35
- "singularity#singularity": "singular",
36
- "completeness#completeness": "complete",
37
- "co-domain#category": "category",
38
- "co-image#category": "relation",
39
- "co-singularity#singularity": "plural",
40
- "co-completeness#completeness": "partial",
41
- "mutability": "mutable"
42
- }
43
- },
44
- {
45
- "subject": "relation relation#have#image#category",
46
- "predicates": {
47
- "inverse#relation": "category#be#image#of#relation",
48
- "domain#category": "relation",
49
- "image#category": "image#category#of#relations",
50
- "singularity#singularity": "singularity",
51
- "completeness#completeness": "complete",
52
- "co-domain#category": "category",
53
- "co-image#category": "relation",
54
- "co-singularity#singularity": "plural",
55
- "co-completeness#completeness": "partial",
56
- "mutability": "mutable"
57
- }
58
- },
59
- {
60
- "subject": "relation relation#have#singularity#singularity",
61
- "predicates": {
62
- "inverse#relation": "category#be#singularity#of#relation",
63
- "domain#category": "relation",
64
- "image#category": "singularity#singularity#of#relations",
65
- "singularity#singularity": "singular",
66
- "completeness#completeness": "complete",
67
- "co-domain#category": "singularity",
68
- "co-image#category": "relation",
69
- "co-singularity#singularity": "plural",
70
- "co-completeness#completeness": "partial",
71
- "mutability": "mutable"
72
- }
73
- },
74
- {
75
- "subject": "relation relation#have#complexity#complexity",
76
- "predicates": {
77
- "inverse#relation": "complexity#be#complexity#of#relation",
78
- "domain#category": "relation",
79
- "image": "complexity#complexity#of#relations",
80
- "singularity#singularity": "singular",
81
- "completeness#completeness": "complete",
82
- "co-domain#category": "complexity",
83
- "co-image#category": "relation",
84
- "co-singularity#singularity": "plural",
85
- "co-completeness#completeness": "partial",
86
- "mutability": "mutable"
87
- }
88
- },
89
- {
90
- "subject": "relation relation#have#co-domain#category",
91
- "predicates": {
92
- "inverse#relation": "category#be#co-domain#of#relation",
93
- "domain#category": "relation",
94
- "image#category": "co-domain#category#of#relation",
95
- "singularity#singularity": "singular",
96
- "completeness#completeness": "complete",
97
- "co-domain#category": "category",
98
- "co-image#category": "relation",
99
- "co-singularity#singularity": "plural",
100
- "co-completeness#completeness": "partial",
101
- "mutability": "mutable"
102
- }
103
- },
104
- {
105
- "subject": "relation relation#have#co-image#category",
106
- "predicates": {
107
- "inverse#relation": "category#be#co-image#of#relation",
108
- "domain#category": "relation",
109
- "image#category": "co-image#category#of#relation",
110
- "singularity#singularity": "singular",
111
- "completeness#completeness": "complete",
112
- "co-domain#category": "category",
113
- "co-singularity#singularity": "plural",
114
- "co-image#category": "relation",
115
- "co-completeness#completeness": "partial",
116
- "mutability": "mutable"
117
- }
118
- },
119
- {
120
- "subject": "relation relation#have#co-singularity#singularity",
121
- "predicates": {
122
- "inverse#relation": "singularity#be#co-singularity#of#relation",
123
- "domain#category": "relation",
124
- "image#category": "co-singularity#singularity#of#relations",
125
- "singularity#singularity": "singular",
126
- "completeness#completeness": "complete",
127
- "co-domain#category": "singularity",
128
- "co-image#category": "relation",
129
- "co-singularity#singularity": "plural",
130
- "co-completeness#completeness": "partial",
131
- "mutability": "mutable"
132
- }
133
- },
134
- {
135
- "subject": "relation relation#have#co-complexity#complexity",
136
- "predicates": {
137
- "inverse#relation": "complexity#be#co-complexity#of#relation",
138
- "domain#category": "relation",
139
- "image#category": "co-complexity#complexity#of#relations",
140
- "singularity#singularity": "singular",
141
- "completeness#completeness": "complete",
142
- "co-domain#category": "complexity",
143
- "co-image#category": "relation",
144
- "co-singularity#singularity": "plural",
145
- "co-completeness#completeness": "partial",
146
- "mutability": "mutable"
147
- }
148
- },
149
- {
150
- "subject": "relation relation#have#mutability#mutability",
151
- "predicates": {
152
- "inverse#relation": "mutability#be#mutability#of#relation",
153
- "domain#category": "relation",
154
- "image#category": "mutability#mutability#of#relations",
155
- "singularity#singularity": "singular",
156
- "completeness#completeness": "complete",
157
- "co-domain#category": "mutability",
158
- "co-image#category": "relation",
159
- "co-singularity#singularity": "plural",
160
- "co-completeness#completeness": "partial",
161
- "mutability": "mutable"
162
- }
163
- },
164
- "thing#be#instance#of#category",
165
- "thing#have#relationship#relationship",
166
- "category#have#type#type-of-category",
167
- "category#have#mandatory#predicate",
168
- "category#have#definitive#relationship",
169
- "descriptive-category#have#differentiator#relation",
170
- "inclusion-category#have#inclusion#category",
171
- "exclusion-category#have#domain#category",
172
- "exclusion-category#have#exclusion#category",
173
- "restrictive-category#have#restrictive#category"
174
- ]
175
- }
@@ -1,8 +0,0 @@
1
- {
2
- "context": "system",
3
- "categories": [
4
- "relation",
5
- "category",
6
- "thing"
7
- ]
8
- }
@@ -1,77 +0,0 @@
1
- {
2
- "tag-language": "english",
3
- "system": "/us/cayuga/system/2018",
4
- "context": "system",
5
- "topics": [
6
- "category thing"
7
- ],
8
- "document": "reports",
9
- "location": "earth",
10
- "time": "2018",
11
- "reports": "agent Patrick do report events here and now",
12
- "events": "agent Patrick do cause occurrences here and now",
13
- "occurrences": "relationships do occur time always location universe",
14
- "relationships": [
15
- {
16
- "subjects": [
17
- "category::category",
18
- "category::descriptive-category",
19
- "category::referential-category",
20
- "category::type-of-category",
21
- "category::singularity-of-relation",
22
- "category::complexity-of-relation",
23
- "category::mutability-of-relation"
24
- ],
25
- "predicate": "thing be instance of category referential-category"
26
- },
27
- {
28
- "subjects": [
29
- "category inclusion-category",
30
- "category exclusion-category",
31
- "category restrictive-category"
32
- ],
33
- "predicate": "thing#be#instance#of#category descriptive-category"
34
- },
35
- {
36
- "subjects": [
37
- "thing#be#instance#of#category",
38
- "thing#have#relationship#relationship",
39
- "category#have#type#type-of-category",
40
- "category#have#mandatory#predicate",
41
- "category#have#definitive#relationship",
42
- "descriptive-category#have#differentiator#relation",
43
- "inclusion-category#have#inclusion#category",
44
- "exclusion-category#have#domain#category",
45
- "exclusion-category#have#exclusion#category",
46
- "restrictive-category#have#restrictive#category",
47
- "relation#have#inverse#relation",
48
- "relation#have#domain#category",
49
- "relation#have#image#category",
50
- "relation#have#singularity#singularity-of-relation",
51
- "relation#have#complexity#complexity-of-relation",
52
- "relation#have#co-domain#category",
53
- "relation#have#co-image#category",
54
- "relation#have#co-singularity#singularity-of-relation",
55
- "relation#have#co-complexity#complexity-of-relation",
56
- "relation#have#mutability#mutability-of-relation"
57
- ],
58
- "predicate": "thing#be#instance#of#category relation"
59
- },
60
- {
61
- "subjects": ["descriptive", "referential", "inclusion", "exclusion", "restrictive"],
62
- "predicate": "thing#be#instance#of#category type-of-category"
63
- },
64
- {
65
- "subjects": ["singular", "plural"],
66
- "predicate": "thing#be#instance#of#category singularity-of-relation"
67
- },
68
- {
69
- "subjects": ["complete", "incomplete"],
70
- "predicate": "thing#be#instance#of#category completeness-of-relation"
71
- },
72
- {
73
- "subjects": ["mutable", "immutable"],
74
- "predicate": "thing#be#instance#of#category mutation-of-relation"
75
- }
76
- ]
77
- }
@@ -1,92 +0,0 @@
1
- require 'semantic_logger'
2
- require 'set'
3
- require 'file-tail'
4
-
5
- log = SemanticLogger['main']
6
- filename = File.expand_path('development.log')
7
- SemanticLogger.add_appender(file_name: filename)
8
- SemanticLogger.add_appender(io: $stderr)
9
- buffer = StringIO.new
10
- SemanticLogger.add_appender(io: buffer) # , formatter: :json)
11
- tail_lines = 3
12
-
13
- log.info 'start'
14
- # puts buffer.string
15
-
16
- start = Time.now
17
- last = start
18
- old = -1
19
- duration = 0
20
- puts start
21
- set = Set.new
22
- array = []
23
- top = 2 ** 23
24
- (0...top).each do |i|
25
- set << i
26
- # array[i] = i
27
- now = Time.now
28
- elapsed = now - last
29
- next unless (elapsed > 5) && (now.sec % 5).zero?
30
- stats = "#{now}: #{format('%.6f', (i / 1e6))}" \
31
- ", #{format('%.2f', elapsed)}s" \
32
- ", #{format('%.2f', (now - start))}s" \
33
- ", #{format('%.6f', ((i - old) / 1e6))}"
34
- puts stats
35
- log.info(stats)
36
- # puts buffer.string
37
- last = now
38
- old = i
39
- # end
40
- # rubocop: disable Style/Next
41
- if (now - start > 1800) || (i == top - 1)
42
- duration = now - start
43
- stats = "#{now}: #{format('%.6f', (i / 1e6))}" \
44
- ", #{format('%.2f', duration)}s" \
45
- ", #{format('%.6f', set.size / 1e6)}" \
46
- ", #{format('%.6f', array.size / 1e6)}"
47
- puts stats
48
- log.info stats
49
- # puts buffer.string
50
- break
51
- end
52
- # rubocop: enable Style/Next
53
- end
54
- now = Time.now
55
- # last = now
56
- # result = set.classify do |i|
57
- # here = Time.now
58
- # if (here - last) > 5 && (here.sec % 5).zero?
59
- # last = here
60
- # puts "#{here}: #{i}"
61
- # end
62
- # i % 10
63
- # end
64
- # result.keys.each do |key|
65
- # puts "#{key}: #{format('%.6f', result[key].size / 1e6)}"
66
- # end
67
- puts format('%.6f', (set.size / 1e6)), format('%.6f', (array.size / 1e6))
68
- puts format('%.2fs', duration)
69
- puts format('%.2fs', (Time.now - now))
70
- puts format('%.2fs', (Time.now - start))
71
-
72
- log.info(
73
- 'finish',
74
- set_size: set.size / 1e6,
75
- load: duration,
76
- analyze: Time.now - now,
77
- total: Time.now - start
78
- )
79
- SemanticLogger.flush
80
- puts '*****FILE*****'
81
- File.open(filename) do |a_log|
82
- a_log.extend(File::Tail)
83
- puts a_log.backward(tail_lines).tail(tail_lines)
84
- end
85
- puts '*****BUFFER*****'
86
- puts buffer.string
87
- # sleep(1)
88
- puts '*****FILE*****'
89
- File.open(filename) do |a_log|
90
- a_log.extend(File::Tail)
91
- puts a_log.backward(tail_lines).tail(tail_lines)
92
- end