umwelt 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circleci/config.yml +46 -0
- data/.gitignore +8 -0
- data/.rubocop.yml +28 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +79 -0
- data/LICENSE.txt +21 -0
- data/README.md +75 -0
- data/Rakefile +12 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/bin/umwelt +7 -0
- data/lib/umwelt.rb +23 -0
- data/lib/umwelt/abstract.rb +7 -0
- data/lib/umwelt/abstract/file.rb +7 -0
- data/lib/umwelt/abstract/file/restore.rb +48 -0
- data/lib/umwelt/abstract/file/store.rb +44 -0
- data/lib/umwelt/abstract/mapper.rb +17 -0
- data/lib/umwelt/cli.rb +6 -0
- data/lib/umwelt/cli/commands.rb +15 -0
- data/lib/umwelt/cli/commands/clone.rb +16 -0
- data/lib/umwelt/cli/commands/convey.rb +57 -0
- data/lib/umwelt/cli/commands/pull.rb +11 -0
- data/lib/umwelt/cli/commands/version.rb +9 -0
- data/lib/umwelt/command.rb +6 -0
- data/lib/umwelt/command/convey.rb +84 -0
- data/lib/umwelt/episode.rb +7 -0
- data/lib/umwelt/episode/file.rb +7 -0
- data/lib/umwelt/episode/file/restore.rb +22 -0
- data/lib/umwelt/episode/file/store.rb +15 -0
- data/lib/umwelt/episode/mapper.rb +33 -0
- data/lib/umwelt/fragment.rb +6 -0
- data/lib/umwelt/fragment/mapper.rb +11 -0
- data/lib/umwelt/history.rb +10 -0
- data/lib/umwelt/history/aggregate.rb +49 -0
- data/lib/umwelt/history/file.rb +7 -0
- data/lib/umwelt/history/file/restore.rb +22 -0
- data/lib/umwelt/history/file/store.rb +15 -0
- data/lib/umwelt/history/follow.rb +32 -0
- data/lib/umwelt/history/mapper.rb +33 -0
- data/lib/umwelt/history/trace.rb +51 -0
- data/lib/umwelt/node.rb +46 -0
- data/lib/umwelt/node/build.rb +31 -0
- data/lib/umwelt/node/root.rb +6 -0
- data/lib/umwelt/node/space.rb +6 -0
- data/lib/umwelt/phase.rb +6 -0
- data/lib/umwelt/phase/mapper.rb +18 -0
- data/lib/umwelt/project.rb +7 -0
- data/lib/umwelt/project/file.rb +7 -0
- data/lib/umwelt/project/file/restore.rb +22 -0
- data/lib/umwelt/project/file/store.rb +15 -0
- data/lib/umwelt/project/mapper.rb +11 -0
- data/lib/umwelt/semantic.rb +57 -0
- data/lib/umwelt/semantic/plain.rb +12 -0
- data/lib/umwelt/semantic/plain/root.rb +13 -0
- data/lib/umwelt/semantic/plain/space.rb +13 -0
- data/lib/umwelt/structs/episode.rb +9 -0
- data/lib/umwelt/structs/fragment.rb +13 -0
- data/lib/umwelt/structs/history.rb +3 -0
- data/lib/umwelt/structs/node.rb +13 -0
- data/lib/umwelt/structs/phase.rb +13 -0
- data/lib/umwelt/structs/project.rb +10 -0
- data/lib/umwelt/structs/trunk.rb +8 -0
- data/lib/umwelt/tree.rb +8 -0
- data/lib/umwelt/tree/fill.rb +35 -0
- data/lib/umwelt/tree/imprint.rb +53 -0
- data/lib/umwelt/tree/trunk.rb +27 -0
- data/lib/umwelt/version.rb +5 -0
- data/umwelt.gemspec +56 -0
- metadata +248 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c3fb7c44d581e5564b846b059ac1c559845148d09a29463272b0899096f703c0
|
4
|
+
data.tar.gz: 480f689563b3047198810f82a3d5e5ee1413adb274db39794f7f597ddaac0af8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1fac625d867d9c431d94101d1b1631fb956dcde15ca3d11c827a65a6cfa3b963b634ed016ecb7a1ebd67aa6d5cf66aa6d401cde7e1485bb48357d542b3b451d5
|
7
|
+
data.tar.gz: 6dc250ef7899d6b942a493c2d8dd8c2d9c9efadbb9cd42815cf7e8cc71103937312a0023fb909d0213d747e951b0da33cadf56a163cb3316e523d825da9b27d6
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# Ruby CircleCI 2.0 configuration file
|
2
|
+
#
|
3
|
+
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
|
4
|
+
#
|
5
|
+
version: 2
|
6
|
+
jobs:
|
7
|
+
build:
|
8
|
+
docker:
|
9
|
+
# specify the version you desire here
|
10
|
+
- image: circleci/ruby:2.6.0
|
11
|
+
environment:
|
12
|
+
MINITEST_ENV: ci
|
13
|
+
|
14
|
+
working_directory: ~/umwelt
|
15
|
+
|
16
|
+
steps:
|
17
|
+
- checkout
|
18
|
+
|
19
|
+
# Download and cache dependencies
|
20
|
+
- restore_cache:
|
21
|
+
keys:
|
22
|
+
- v1-dependencies-{{ checksum "Gemfile.lock" }}
|
23
|
+
# fallback to using the latest cache if no exact match is found
|
24
|
+
- v1-dependencies-
|
25
|
+
|
26
|
+
- run:
|
27
|
+
name: Bundle install
|
28
|
+
command: |
|
29
|
+
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
30
|
+
|
31
|
+
- save_cache:
|
32
|
+
paths:
|
33
|
+
- ./vendor/bundle
|
34
|
+
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
|
35
|
+
|
36
|
+
# run tests!
|
37
|
+
- run:
|
38
|
+
name: Run tests
|
39
|
+
command: bundle exec rake
|
40
|
+
|
41
|
+
# collect reports
|
42
|
+
# - store_test_results:
|
43
|
+
# path: ./test/reports
|
44
|
+
- store_artifacts:
|
45
|
+
path: ./test/html_reports
|
46
|
+
destination: reports
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2019-01-05 07:51:33 +0300 using RuboCop version 0.61.1.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
Metrics/AbcSize:
|
10
|
+
Exclude:
|
11
|
+
- 'lib/umwelt/cli/commands/*'
|
12
|
+
|
13
|
+
Metrics/MethodLength:
|
14
|
+
Exclude:
|
15
|
+
- 'lib/umwelt/cli/commands/*'
|
16
|
+
|
17
|
+
Metrics/BlockLength:
|
18
|
+
Exclude:
|
19
|
+
- 'spec/**/**/*_spec.rb'
|
20
|
+
- 'umwelt.gemspec'
|
21
|
+
|
22
|
+
# Compact style is forcing correct requiring files
|
23
|
+
Style/ClassAndModuleChildren:
|
24
|
+
AutoCorrect: true
|
25
|
+
EnforcedStyle: compact
|
26
|
+
|
27
|
+
Style/Documentation:
|
28
|
+
Enabled: false
|
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
umwelt
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-2.6.1
|
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at sovetnik@oblaka.biz. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
umwelt (0.1.0)
|
5
|
+
hanami-cli
|
6
|
+
unparser
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
abstract_type (0.0.7)
|
12
|
+
adamantium (0.2.0)
|
13
|
+
ice_nine (~> 0.11.0)
|
14
|
+
memoizable (~> 0.4.0)
|
15
|
+
ansi (1.5.0)
|
16
|
+
ast (2.4.0)
|
17
|
+
builder (3.2.3)
|
18
|
+
coderay (1.1.2)
|
19
|
+
concord (0.1.5)
|
20
|
+
adamantium (~> 0.2.0)
|
21
|
+
equalizer (~> 0.0.9)
|
22
|
+
concurrent-ruby (1.1.4)
|
23
|
+
diff-lcs (1.3)
|
24
|
+
equalizer (0.0.11)
|
25
|
+
fabrication (2.20.1)
|
26
|
+
faker (1.9.3)
|
27
|
+
i18n (>= 0.7)
|
28
|
+
hanami-cli (0.3.1)
|
29
|
+
concurrent-ruby (~> 1.0)
|
30
|
+
hanami-utils (~> 1.3)
|
31
|
+
hanami-utils (1.3.1)
|
32
|
+
concurrent-ruby (~> 1.0)
|
33
|
+
transproc (~> 1.0)
|
34
|
+
i18n (1.5.3)
|
35
|
+
concurrent-ruby (~> 1.0)
|
36
|
+
ice_nine (0.11.2)
|
37
|
+
memoizable (0.4.2)
|
38
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
39
|
+
method_source (0.9.2)
|
40
|
+
minitest (5.11.3)
|
41
|
+
minitest-reporters (1.3.6)
|
42
|
+
ansi
|
43
|
+
builder
|
44
|
+
minitest (>= 5.0)
|
45
|
+
ruby-progressbar
|
46
|
+
parser (2.6.0.0)
|
47
|
+
ast (~> 2.4.0)
|
48
|
+
procto (0.0.3)
|
49
|
+
pry (0.12.2)
|
50
|
+
coderay (~> 1.1.0)
|
51
|
+
method_source (~> 0.9.0)
|
52
|
+
rake (10.5.0)
|
53
|
+
ruby-progressbar (1.10.0)
|
54
|
+
thread_safe (0.3.6)
|
55
|
+
transproc (1.0.3)
|
56
|
+
unparser (0.4.3)
|
57
|
+
abstract_type (~> 0.0.7)
|
58
|
+
adamantium (~> 0.2.0)
|
59
|
+
concord (~> 0.1.5)
|
60
|
+
diff-lcs (~> 1.3)
|
61
|
+
equalizer (~> 0.0.9)
|
62
|
+
parser (~> 2.6.0)
|
63
|
+
procto (~> 0.0.2)
|
64
|
+
|
65
|
+
PLATFORMS
|
66
|
+
ruby
|
67
|
+
|
68
|
+
DEPENDENCIES
|
69
|
+
bundler (~> 1.16)
|
70
|
+
fabrication
|
71
|
+
faker
|
72
|
+
minitest (~> 5.0)
|
73
|
+
minitest-reporters
|
74
|
+
pry
|
75
|
+
rake (~> 10.0)
|
76
|
+
umwelt!
|
77
|
+
|
78
|
+
BUNDLED WITH
|
79
|
+
1.17.2
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 Oleg Sovetnik
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
# Umwelt
|
2
|
+
|
3
|
+
Umwelt is a way to express domain knowledge in figurable format.
|
4
|
+
It includes a language( collection of abstractions ),
|
5
|
+
[umwelt.dev](http://umwelt.dev) for collaborative domain development,
|
6
|
+
and this gem, as tool for generate code structure and specs from umwelt.
|
7
|
+
|
8
|
+
The word `Umwelt` was borrowed from [Biosemiotics](https://en.wikipedia.org/wiki/Biosemiotics). In the semiotic theories of Jakob von Uexküll and Thomas A. Sebeok, umwelt (plural: umwelten; from the German Umwelt meaning "environment" or "surroundings") is the "biological foundations that lie at the very epicenter of the study of both communication and signification in the human [and non-human] animal".[1] The term is usually translated as "self-centered world".
|
9
|
+
So, in our case umwelt is the world how it sees for our apps.
|
10
|
+
|
11
|
+
At now, this is proof of concept and work still in progress.
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
> Add this line to your application's Gemfile:
|
16
|
+
|
17
|
+
> ```ruby
|
18
|
+
> gem 'umwelt'
|
19
|
+
> ```
|
20
|
+
|
21
|
+
And then execute:
|
22
|
+
|
23
|
+
$ git clone https://github.com/sovetnik/umwelt.git
|
24
|
+
$ bundle
|
25
|
+
$ bin/umwelt
|
26
|
+
|
27
|
+
> Or install it yourself as:
|
28
|
+
|
29
|
+
> $ gem install umwelt
|
30
|
+
|
31
|
+
## Usage
|
32
|
+
|
33
|
+
Main executable is `umwelt`
|
34
|
+
```shell
|
35
|
+
umwelt help
|
36
|
+
Commands:
|
37
|
+
umwelt clone PROJECT # Clone project from remote Umwelt(umwelt.dev)
|
38
|
+
umwelt convey PHASE SEMANTIC # Convey Phase in Semantic from local Umwelt
|
39
|
+
umwelt pull # Pull project from remote Umwelt
|
40
|
+
umwelt version
|
41
|
+
```
|
42
|
+
|
43
|
+
In first release only one command is implemented: convey.
|
44
|
+
This is main feature of gem, generate imprints os code and write it to files. Examples of source files in human-readable json in `spec/examples` so we can test this feature by calling convey with parameters.
|
45
|
+
|
46
|
+
```shell
|
47
|
+
bin/umwelt convey 7 plain --source=spec/examples --target=target
|
48
|
+
cd target
|
49
|
+
```
|
50
|
+
|
51
|
+
After that you can see generated files in target directory.
|
52
|
+
|
53
|
+
```shell
|
54
|
+
Buildung phase: 7 with semantic plain...
|
55
|
+
...
|
56
|
+
10 files written succesfully
|
57
|
+
```
|
58
|
+
|
59
|
+
## Development
|
60
|
+
|
61
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
62
|
+
|
63
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
64
|
+
|
65
|
+
## Contributing
|
66
|
+
|
67
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/sovetnik/umwelt. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
68
|
+
|
69
|
+
## License
|
70
|
+
|
71
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
72
|
+
|
73
|
+
## Code of Conduct
|
74
|
+
|
75
|
+
Everyone interacting in the Umwelt project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/umwelt/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'umwelt'
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
require 'pry'
|
11
|
+
Pry.start
|
12
|
+
|
13
|
+
# require 'irb'
|
14
|
+
# IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/bin/umwelt
ADDED
data/lib/umwelt.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'hanami/cli'
|
4
|
+
require 'hanami/interactor'
|
5
|
+
require 'unparser'
|
6
|
+
|
7
|
+
module Umwelt
|
8
|
+
end
|
9
|
+
|
10
|
+
require 'umwelt/abstract'
|
11
|
+
|
12
|
+
require 'umwelt/episode'
|
13
|
+
require 'umwelt/fragment'
|
14
|
+
require 'umwelt/history'
|
15
|
+
require 'umwelt/phase'
|
16
|
+
require 'umwelt/project'
|
17
|
+
require 'umwelt/node'
|
18
|
+
require 'umwelt/semantic'
|
19
|
+
require 'umwelt/tree'
|
20
|
+
require 'umwelt/version'
|
21
|
+
|
22
|
+
require 'umwelt/command'
|
23
|
+
require 'umwelt/cli'
|