umwelt 0.1.1 → 0.2

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: 1cb12afc2e151d2a83421d27ba2de2af374784fe3b73f6422cf48dbf35664856
4
- data.tar.gz: c8c78d710f277519466ae71a67c8e1d004b39220c4c36c8bd05a7d04480e918b
3
+ metadata.gz: b09c7404541ae4d930a87a892759ff25a34e331075cec8ba4c1886e5dd4fb393
4
+ data.tar.gz: 44b3bec990a484b7d92bf75a8140a0c4d3aca1d7fdbdd7a535d73f9ddf025b47
5
5
  SHA512:
6
- metadata.gz: 11426ed1b445d39d6250e6d59485514bd050b5cf7ae82075fdad53ddcab33b6230b0100d5c07ae46c2c249caf623bf628146bd0b31d91c9862ec3f1ef004dd5f
7
- data.tar.gz: 9e18c2039f542026854ce71c3962c251ac3027d56d6f75fe276fe2c8fa97542309f9076bb8a550a1d85c90794ed35d712654e8441fc1ae076aac560705e39f02
6
+ metadata.gz: aa1c8c418bcd01669f04d6883679b753fb5434c3bf61d76826def775a7a53393f4f629b8ffd9b87c83e7bb671bf2dd8fcc80c5deb7b9a1ba2be7424ec51be7cb
7
+ data.tar.gz: 666cc5abb1392b5e709553a6e3b6c2b9804a0f63220266bf7aa80bccf7bf171c8382d8b203d75b3426482135bf304ffac8981b1d7c1de0f39eec0a9a32e9d040
@@ -1,8 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- umwelt (0.1.1)
4
+ umwelt (0.2)
5
5
  hanami-cli
6
+ httparty
6
7
  unparser
7
8
 
8
9
  GEM
@@ -12,6 +13,8 @@ GEM
12
13
  adamantium (0.2.0)
13
14
  ice_nine (~> 0.11.0)
14
15
  memoizable (~> 0.4.0)
16
+ addressable (2.6.0)
17
+ public_suffix (>= 2.0.2, < 4.0)
15
18
  ansi (1.5.0)
16
19
  ast (2.4.0)
17
20
  builder (3.2.3)
@@ -20,6 +23,8 @@ GEM
20
23
  adamantium (~> 0.2.0)
21
24
  equalizer (~> 0.0.9)
22
25
  concurrent-ruby (1.1.4)
26
+ crack (0.4.3)
27
+ safe_yaml (~> 1.0.0)
23
28
  diff-lcs (1.3)
24
29
  equalizer (0.0.11)
25
30
  fabrication (2.20.1)
@@ -31,26 +36,36 @@ GEM
31
36
  hanami-utils (1.3.1)
32
37
  concurrent-ruby (~> 1.0)
33
38
  transproc (~> 1.0)
39
+ hashdiff (0.3.8)
40
+ httparty (0.16.4)
41
+ mime-types (~> 3.0)
42
+ multi_xml (>= 0.5.2)
34
43
  i18n (1.5.3)
35
44
  concurrent-ruby (~> 1.0)
36
45
  ice_nine (0.11.2)
37
46
  memoizable (0.4.2)
38
47
  thread_safe (~> 0.3, >= 0.3.1)
39
48
  method_source (0.9.2)
49
+ mime-types (3.2.2)
50
+ mime-types-data (~> 3.2015)
51
+ mime-types-data (3.2018.0812)
40
52
  minitest (5.11.3)
41
53
  minitest-reporters (1.3.6)
42
54
  ansi
43
55
  builder
44
56
  minitest (>= 5.0)
45
57
  ruby-progressbar
58
+ multi_xml (0.6.0)
46
59
  parser (2.6.0.0)
47
60
  ast (~> 2.4.0)
48
61
  procto (0.0.3)
49
62
  pry (0.12.2)
50
63
  coderay (~> 1.1.0)
51
64
  method_source (~> 0.9.0)
65
+ public_suffix (3.0.3)
52
66
  rake (10.5.0)
53
67
  ruby-progressbar (1.10.0)
68
+ safe_yaml (1.0.5)
54
69
  thread_safe (0.3.6)
55
70
  transproc (1.0.3)
56
71
  unparser (0.4.3)
@@ -61,6 +76,10 @@ GEM
61
76
  equalizer (~> 0.0.9)
62
77
  parser (~> 2.6.0)
63
78
  procto (~> 0.0.2)
79
+ webmock (3.5.1)
80
+ addressable (>= 2.3.6)
81
+ crack (>= 0.3.2)
82
+ hashdiff
64
83
 
65
84
  PLATFORMS
66
85
  ruby
@@ -74,6 +93,7 @@ DEPENDENCIES
74
93
  pry
75
94
  rake (~> 10.0)
76
95
  umwelt!
96
+ webmock
77
97
 
78
98
  BUNDLED WITH
79
99
  1.17.2
data/README.md CHANGED
@@ -34,15 +34,21 @@ Main executable is `umwelt`
34
34
  ```shell
35
35
  umwelt help
36
36
  Commands:
37
- umwelt clone PROJECT # Clone project from remote Umwelt
37
+ umwelt clone PROJECT/USERNAME # Clone project from remote Umwelt
38
38
  umwelt convey PHASE SEMANTIC # Convey Phase in Semantic from local Umwelt
39
39
  umwelt example # Create example Umwelt
40
40
  umwelt pull # Pull project from remote Umwelt
41
41
  umwelt version
42
42
  ```
43
43
 
44
- In first release only two command is implemented: example and convey.
45
- To begin, call `example`, it will copy source files in `./.umwelt`
44
+ In 0.2 version only three command is implemented: `example`, `clone` and `convey`.
45
+
46
+ If you have project on [umwelt.dev](http://umwelt.dev), clone it and convey.
47
+ ```shell
48
+ umwelt clone 'username/projectname'
49
+ ```
50
+
51
+ If not, call `example`, it will copy source files in `./.umwelt`
46
52
  ```shell
47
53
  umwelt example
48
54
  ```
@@ -7,6 +7,7 @@ require 'unparser'
7
7
  module Umwelt
8
8
  end
9
9
 
10
+ require 'umwelt/version'
10
11
  require 'umwelt/abstract'
11
12
 
12
13
  require 'umwelt/episode'
@@ -17,7 +18,6 @@ require 'umwelt/project'
17
18
  require 'umwelt/node'
18
19
  require 'umwelt/semantic'
19
20
  require 'umwelt/tree'
20
- require 'umwelt/version'
21
21
 
22
22
  require 'umwelt/command'
23
23
  require 'umwelt/cli'
@@ -3,5 +3,7 @@
3
3
  module Umwelt::Abstract
4
4
  end
5
5
 
6
+ require_relative './abstract/interactor'
6
7
  require_relative './abstract/file'
7
8
  require_relative './abstract/mapper'
9
+ require_relative './abstract/request'
@@ -4,9 +4,7 @@ require 'hanami/interactor'
4
4
  require 'json'
5
5
 
6
6
  module Umwelt::Abstract::File
7
- class Restore
8
- include Hanami::Interactor
9
-
7
+ class Restore < Umwelt::Abstract::Interactor
10
8
  expose :struct
11
9
 
12
10
  def initialize(path: '.umwelt',
@@ -30,15 +28,9 @@ module Umwelt::Abstract::File
30
28
  end
31
29
 
32
30
  def struct(struct_hash)
33
- clean @mapper.new.call(struct_hash)
34
- end
35
-
36
- def clean(result)
37
- if result.success?
38
- result.struct
39
- else
40
- error! result.errors
41
- end
31
+ prove(
32
+ @mapper.new.call(struct_hash)
33
+ ).struct
42
34
  end
43
35
 
44
36
  def umwelt_root_path
@@ -6,15 +6,22 @@ require 'fileutils'
6
6
  require 'pathname'
7
7
 
8
8
  module Umwelt::Abstract::File
9
- class Store
10
- include Hanami::Interactor
9
+ class Store < Umwelt::Abstract::Interactor
10
+ expose :written_paths
11
11
 
12
12
  def initialize(path: '.umwelt')
13
13
  @path = path
14
+ @written_paths = {}
14
15
  end
15
16
 
16
17
  private
17
18
 
19
+ def write(path, struct)
20
+ path.dirname.mkpath
21
+
22
+ path.write serialize destruct struct
23
+ end
24
+
18
25
  def serialize(struct)
19
26
  JSON.pretty_generate struct
20
27
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'hanami/interactor'
4
+ # require_relative './structs/phase'
5
+ # require_relative './structs/fragment'
6
+
7
+ module Umwelt::Abstract
8
+ class Interactor
9
+ include Hanami::Interactor
10
+
11
+ def prove(result)
12
+ result.success? ? result : error!(result.errors)
13
+ end
14
+ end
15
+ end
@@ -4,14 +4,14 @@ require 'hanami/interactor'
4
4
  # require_relative './structs/phase'
5
5
  # require_relative './structs/fragment'
6
6
 
7
- class Umwelt::Abstract::Mapper
8
- include Hanami::Interactor
7
+ module Umwelt::Abstract
8
+ class Mapper < Umwelt::Abstract::Interactor
9
+ expose :struct
9
10
 
10
- expose :struct
11
-
12
- def fill(struct, data)
13
- struct.new(data)
14
- rescue ArgumentError => e
15
- error! [self.class.name, e.message, data]
11
+ def fill(struct, data)
12
+ struct.new(data)
13
+ rescue ArgumentError => e
14
+ error! [self.class.name, e.message, data]
15
+ end
16
16
  end
17
17
  end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'hanami/interactor'
4
+ require 'httparty'
5
+
6
+ module Umwelt::Abstract
7
+ class Request < Umwelt::Abstract::Interactor
8
+ BASE_URL = 'http://umwelt.dev/api'
9
+ # BASE_URL = 'http://localhost:2300/api'
10
+ HEADERS = {
11
+ 'Content-Type': 'application/json',
12
+ 'User-Agent': "Umwelt client #{Umwelt::VERSION}",
13
+ 'Accept': 'application/json'
14
+ }.freeze
15
+
16
+ def get(host: BASE_URL, path: '', params: {})
17
+ check HTTParty.get(
18
+ [host, path].join('/'), options(params)
19
+ )
20
+ rescue StandardError => e
21
+ error! [self.class.name, e.message, path]
22
+ end
23
+
24
+ def check(request)
25
+ if request.parsed_response.key?('errors')
26
+ error! request.parsed_response['errors']
27
+ else
28
+ request
29
+ end
30
+ end
31
+
32
+ def parse(request)
33
+ request
34
+ .parsed_response
35
+ .transform_keys(&:to_sym)
36
+ end
37
+
38
+ def struct(data, mapper)
39
+ result = mapper.call(data)
40
+ if result.success?
41
+ result.struct
42
+ else
43
+ error! result.errors
44
+ end
45
+ end
46
+
47
+ def options(params)
48
+ { headers: HEADERS, format: :json }.merge(params)
49
+ end
50
+ end
51
+ end
@@ -1,16 +1,41 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Umwelt::CLI
4
- class Commands::Clone < Hanami::CLI::Command
3
+ module Umwelt::CLI::Commands
4
+ class Clone < Hanami::CLI::Command
5
5
  desc 'Clone project from remote Umwelt'
6
6
 
7
- argument :project,
7
+ argument :user_project,
8
8
  type: :string, required: true,
9
9
  desc: 'provide project as USERNAME/PROJECTNAME'
10
10
 
11
- def call(project:)
12
- puts "Cloning project: <#{project}>"
13
- # Generator::Element.new(element).create
11
+ option :target,
12
+ type: :string,
13
+ default: '.umwelt',
14
+ desc: 'provide folder for store umwelt'
15
+
16
+ def call(user_project:, **options)
17
+ puts "Cloning project: <#{user_project}>"
18
+ puts options.inspect
19
+ puts options.fetch(:target)
20
+
21
+ report(
22
+ Umwelt::Command::Clone
23
+ .new(path: options.fetch(:target))
24
+ .call(user_project: user_project)
25
+ )
26
+ end
27
+
28
+ private
29
+
30
+ def report(result)
31
+ if result.success?
32
+ result.written_paths.each_pair do |key, value|
33
+ puts "#{key} => (#{value})"
34
+ end
35
+ puts "#{result.written_paths.keys.count} files written succesfully"
36
+ else
37
+ result.errors.each { |e| puts "Error: #{e}" }
38
+ end
14
39
  end
15
40
  end
16
41
  end
@@ -37,20 +37,26 @@ module Umwelt::CLI::Commands
37
37
  return
38
38
  end
39
39
 
40
- @convey = Umwelt::Command::Convey.new.call(
41
- phase_id: phase.to_i,
42
- semantic: classify(semantic).to_sym,
43
- source: Pathname.new(options.fetch(:source)),
44
- target: Pathname.new(options.fetch(:target))
40
+ report(
41
+ Umwelt::Command::Convey.new.call(
42
+ phase_id: phase.to_i,
43
+ semantic: classify(semantic).to_sym,
44
+ source: Pathname.new(options.fetch(:source)),
45
+ target: Pathname.new(options.fetch(:target))
46
+ )
45
47
  )
48
+ end
49
+
50
+ private
46
51
 
47
- if @convey.success?
48
- @convey.result.each_pair do |key, value|
52
+ def report(result)
53
+ if result.success?
54
+ result.written_paths.each_pair do |key, value|
49
55
  puts "#{key} => (#{value})"
50
56
  end
51
- puts "#{@convey.result.keys.count} files written succesfully"
57
+ puts "#{result.written_paths.keys.count} files written succesfully"
52
58
  else
53
- @convey.errors.each { |e| puts "Error: #{e}" }
59
+ result.errors.each { |e| puts "Error: #{e}" }
54
60
  end
55
61
  end
56
62
  end
@@ -1,6 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Umwelt::Command
4
+ class Base < Umwelt::Abstract::Interactor
5
+ end
4
6
  end
5
7
 
8
+ require_relative './command/clone'
6
9
  require_relative './command/convey'
@@ -0,0 +1,75 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Umwelt::Command
4
+ class Clone < Base
5
+ expose :written_paths
6
+
7
+ def initialize(path: '.umwelt')
8
+ @path = path
9
+ @written_paths = {}
10
+ end
11
+
12
+ def call(user_project: '/')
13
+ user_name, project_name = user_project.split('/')
14
+
15
+ project = get_project(
16
+ project_name: project_name, user_name: user_name
17
+ )
18
+ store_project!(project)
19
+
20
+ history = get_history(project.project_id)
21
+ store_history!(history)
22
+ get_episodes(history)
23
+ end
24
+
25
+ private
26
+
27
+ def get_episodes(history)
28
+ history.phases.map do |phase|
29
+ next if episode_exist? phase.id
30
+
31
+ episode = get_episode(phase.id)
32
+ store_episode!(phase.id, episode)
33
+ end
34
+ end
35
+
36
+ def episode_exist?(phase_id)
37
+ Umwelt::Episode::File::Restore
38
+ .new(path: @path)
39
+ .call(phase_id)
40
+ .success?
41
+ end
42
+
43
+ def store_episode!(id, episode)
44
+ @written_paths.merge! prove(
45
+ Umwelt::Episode::File::Store
46
+ .new(path: @path)
47
+ .call(id, episode)
48
+ ).written_paths
49
+ end
50
+
51
+ def get_episode(phase_id)
52
+ prove(Umwelt::Episode::Get.new.call(phase_id)).episode
53
+ end
54
+
55
+ def store_history!(history)
56
+ @written_paths.merge! prove(
57
+ Umwelt::History::File::Store.new(path: @path).call(history)
58
+ ).written_paths
59
+ end
60
+
61
+ def get_history(project_id)
62
+ prove(Umwelt::History::Get.new.call(project_id)).history
63
+ end
64
+
65
+ def store_project!(project)
66
+ @written_paths.merge! prove(
67
+ Umwelt::Project::File::Store.new(path: @path).call(project)
68
+ ).written_paths
69
+ end
70
+
71
+ def get_project(user_project)
72
+ prove(Umwelt::Project::Get.new.call(user_project)).project
73
+ end
74
+ end
75
+ end
@@ -1,14 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Umwelt::Command
4
- class Convey
5
- include Hanami::Interactor
6
- # TODO: change to dry-rb transaction here
7
-
8
- expose :result
4
+ class Convey < Base
5
+ expose :written_paths
9
6
 
10
7
  def call(phase_id:, semantic:, source:, target:)
11
- @result = imprint(
8
+ @written_paths = imprint(
12
9
  tree(source, phase_id), target, semantic
13
10
  )
14
11
  end
@@ -29,12 +26,11 @@ module Umwelt::Command
29
26
  end
30
27
 
31
28
  def imprint(tree, target, semantic)
32
- result = Umwelt::Tree::Imprint.new(tree, location: target).call(semantic)
33
- if result.success?
34
- result.written_paths
35
- else
36
- error! result.errors
37
- end
29
+ prove(
30
+ Umwelt::Tree::Imprint
31
+ .new(tree, location: target)
32
+ .call(semantic)
33
+ ).written_paths
38
34
  end
39
35
 
40
36
  def tree_fill(fragments)
@@ -42,43 +38,35 @@ module Umwelt::Command
42
38
  end
43
39
 
44
40
  def aggregate_history(episodes)
45
- result = Umwelt::History::Aggregate.new.call(episodes)
46
- if result.success?
47
- result.fragments
48
- else
49
- error! result.errors
50
- end
41
+ prove(
42
+ Umwelt::History::Aggregate
43
+ .new
44
+ .call(episodes)
45
+ ).fragments
51
46
  end
52
47
 
53
48
  def follow_history(continuity, source)
54
- result = Umwelt::History::Follow
55
- .new(path: source)
56
- .call(continuity)
57
- if result.success?
58
- result.episodes
59
- else
60
- error! result.errors
61
- end
49
+ prove(
50
+ Umwelt::History::Follow
51
+ .new(path: source)
52
+ .call(continuity)
53
+ ).episodes
62
54
  end
63
55
 
64
56
  def trace_history(history, phase_id)
65
- result = Umwelt::History::Trace.new.call(history, phase_id)
66
- if result.success?
67
- result.continuity
68
- else
69
- error! result.errors
70
- end
57
+ prove(
58
+ Umwelt::History::Trace
59
+ .new
60
+ .call(history, phase_id)
61
+ ).continuity
71
62
  end
72
63
 
73
64
  def restore_history(source)
74
- restored = Umwelt::History::File::Restore
75
- .new(path: source)
76
- .call
77
- if restored.success?
78
- restored.struct
79
- else
80
- error! "Cannot restore history from '#{source}': #{restored.errors}"
81
- end
65
+ prove(
66
+ Umwelt::History::File::Restore
67
+ .new(path: source)
68
+ .call
69
+ ).struct
82
70
  end
83
71
  end
84
72
  end
@@ -5,3 +5,4 @@ end
5
5
 
6
6
  require_relative './episode/file'
7
7
  require_relative './episode/mapper'
8
+ require_relative './episode/get'
@@ -3,9 +3,9 @@
3
3
  module Umwelt::Episode::File
4
4
  class Store < Umwelt::Abstract::File::Store
5
5
  def call(id, struct)
6
- full_path(id).dirname.mkpath
6
+ count = write(full_path(id), struct)
7
7
 
8
- full_path(id).write serialize(destruct(struct))
8
+ @written_paths[full_path(id)] = count
9
9
  end
10
10
 
11
11
  def full_path(id)
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Umwelt::Episode
4
+ class Get < Umwelt::Abstract::Request
5
+ expose :episode
6
+
7
+ def call(phase_id)
8
+ request = get(path: "episodes/#{phase_id}")
9
+
10
+ @episode = struct(parse(request), Mapper.new)
11
+ end
12
+ end
13
+ end
@@ -5,6 +5,7 @@ end
5
5
 
6
6
  require_relative './history/file'
7
7
  require_relative './history/mapper'
8
+ require_relative './history/get'
8
9
  require_relative './history/aggregate'
9
10
  require_relative './history/follow'
10
11
  require_relative './history/trace'
@@ -1,9 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Umwelt::History
4
- class Aggregate
5
- include Hanami::Interactor
6
-
4
+ class Aggregate < Umwelt::Abstract::Interactor
7
5
  expose :fragments
8
6
 
9
7
  def initialize
@@ -3,9 +3,9 @@
3
3
  module Umwelt::History::File
4
4
  class Store < Umwelt::Abstract::File::Store
5
5
  def call(struct)
6
- full_path.dirname.mkpath
6
+ count = write(full_path, struct)
7
7
 
8
- full_path.write serialize destruct struct
8
+ @written_paths[full_path] = count
9
9
  end
10
10
 
11
11
  def full_path
@@ -1,9 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Umwelt::History
4
- class Follow
5
- include Hanami::Interactor
6
-
4
+ class Follow < Umwelt::Abstract::Interactor
7
5
  expose :episodes
8
6
 
9
7
  def initialize(
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Umwelt::History
4
+ class Get < Umwelt::Abstract::Request
5
+ expose :history
6
+
7
+ def call(project_id)
8
+ request = get(path: "histories/#{project_id}")
9
+
10
+ @history = struct(parse(request), Mapper.new)
11
+ end
12
+ end
13
+ end
@@ -1,9 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Umwelt::History
4
- class Trace
5
- include Hanami::Interactor
6
-
4
+ class Trace < Umwelt::Abstract::Interactor
7
5
  expose :continuity
8
6
 
9
7
  def initialize
@@ -5,3 +5,4 @@ end
5
5
 
6
6
  require_relative './project/file'
7
7
  require_relative './project/mapper'
8
+ require_relative './project/get'
@@ -3,9 +3,9 @@
3
3
  module Umwelt::Project::File
4
4
  class Store < Umwelt::Abstract::File::Store
5
5
  def call(struct)
6
- full_path.dirname.mkpath
6
+ count = write(full_path, struct)
7
7
 
8
- full_path.write serialize destruct struct
8
+ @written_paths[full_path] = count
9
9
  end
10
10
 
11
11
  def full_path
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Umwelt::Project
4
+ class Get < Umwelt::Abstract::Request
5
+ expose :project
6
+
7
+ # query = {
8
+ # project_name: 'genry',
9
+ # user_name: 'ford'
10
+ # }
11
+
12
+ def call(query)
13
+ request = get(
14
+ path: 'projects/find',
15
+ params: { query: query }
16
+ )
17
+
18
+ @project = struct(parse(request), Mapper.new)
19
+ end
20
+ end
21
+ end
@@ -1,9 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Umwelt::Tree
4
- class Imprint
5
- include Hanami::Interactor
6
-
4
+ class Imprint < Umwelt::Abstract::Interactor
7
5
  expose :written_paths
8
6
 
9
7
  def initialize(trunk, location: nil)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Umwelt
4
- VERSION = '0.1.1'
4
+ VERSION = '0.2'
5
5
  end
@@ -0,0 +1,6 @@
1
+ {
2
+ "user_name": "donetta_hoeger",
3
+ "project_name": "non-euclidean",
4
+ "project_id": 1,
5
+ "description": "Intelligent Plastic Keyboard"
6
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "project": {
3
+ "user_name": "sovetnik",
4
+ "project_name": "example",
5
+ "project_id": "1",
6
+ "description": "Durable Rubber Watch"
7
+ },
8
+ "phases": [
9
+ {
10
+ "id": 1,
11
+ "parent_id": null,
12
+ "merge_id": null,
13
+ "user_id": 1,
14
+ "finished_at": "2018-12-19 22:54:23 UTC",
15
+ "name": "initial_phase",
16
+ "description": "Effulgence immemorial unnamable hideous."
17
+ },
18
+ {
19
+ "id": 2,
20
+ "parent_id": 1,
21
+ "merge_id": null,
22
+ "user_id": 1,
23
+ "finished_at": "2018-12-19 22:54:23 UTC",
24
+ "name": "alfa",
25
+ "description": "Fungus amorphous madness noisome foetid."
26
+ }
27
+ ]
28
+ }
@@ -44,6 +44,7 @@ Gem::Specification.new do |spec|
44
44
  spec.require_paths = ['lib']
45
45
 
46
46
  spec.add_dependency 'hanami-cli'
47
+ spec.add_dependency 'httparty'
47
48
  spec.add_dependency 'unparser'
48
49
 
49
50
  spec.add_development_dependency 'bundler', '~> 1.16'
@@ -53,4 +54,5 @@ Gem::Specification.new do |spec|
53
54
  spec.add_development_dependency 'minitest-reporters'
54
55
  spec.add_development_dependency 'pry'
55
56
  spec.add_development_dependency 'rake', '~> 10.0'
57
+ spec.add_development_dependency 'webmock'
56
58
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: umwelt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: '0.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleg Sovetnik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-03 00:00:00.000000000 Z
11
+ date: 2019-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hanami-cli
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: httparty
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: unparser
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -136,6 +150,20 @@ dependencies:
136
150
  - - "~>"
137
151
  - !ruby/object:Gem::Version
138
152
  version: '10.0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: webmock
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
139
167
  description: |
140
168
  Umwelt is a domain architecture development(knowledge management) tool,
141
169
  for handy prototyping domain specification with code structure.
@@ -166,7 +194,9 @@ files:
166
194
  - lib/umwelt/abstract/file.rb
167
195
  - lib/umwelt/abstract/file/restore.rb
168
196
  - lib/umwelt/abstract/file/store.rb
197
+ - lib/umwelt/abstract/interactor.rb
169
198
  - lib/umwelt/abstract/mapper.rb
199
+ - lib/umwelt/abstract/request.rb
170
200
  - lib/umwelt/cli.rb
171
201
  - lib/umwelt/cli/commands.rb
172
202
  - lib/umwelt/cli/commands/clone.rb
@@ -175,11 +205,13 @@ files:
175
205
  - lib/umwelt/cli/commands/pull.rb
176
206
  - lib/umwelt/cli/commands/version.rb
177
207
  - lib/umwelt/command.rb
208
+ - lib/umwelt/command/clone.rb
178
209
  - lib/umwelt/command/convey.rb
179
210
  - lib/umwelt/episode.rb
180
211
  - lib/umwelt/episode/file.rb
181
212
  - lib/umwelt/episode/file/restore.rb
182
213
  - lib/umwelt/episode/file/store.rb
214
+ - lib/umwelt/episode/get.rb
183
215
  - lib/umwelt/episode/mapper.rb
184
216
  - lib/umwelt/fragment.rb
185
217
  - lib/umwelt/fragment/mapper.rb
@@ -189,6 +221,7 @@ files:
189
221
  - lib/umwelt/history/file/restore.rb
190
222
  - lib/umwelt/history/file/store.rb
191
223
  - lib/umwelt/history/follow.rb
224
+ - lib/umwelt/history/get.rb
192
225
  - lib/umwelt/history/mapper.rb
193
226
  - lib/umwelt/history/trace.rb
194
227
  - lib/umwelt/node.rb
@@ -201,6 +234,7 @@ files:
201
234
  - lib/umwelt/project/file.rb
202
235
  - lib/umwelt/project/file/restore.rb
203
236
  - lib/umwelt/project/file/store.rb
237
+ - lib/umwelt/project/get.rb
204
238
  - lib/umwelt/project/mapper.rb
205
239
  - lib/umwelt/semantic.rb
206
240
  - lib/umwelt/semantic/plain.rb
@@ -225,6 +259,8 @@ files:
225
259
  - spec/examples/episodes/5.json
226
260
  - spec/examples/episodes/7.json
227
261
  - spec/examples/history.json
262
+ - spec/examples/project.json
263
+ - spec/examples/short_history.json
228
264
  - umwelt.gemspec
229
265
  homepage: http://umwelt.dev
230
266
  licenses: