extraction_metadata_client 0.0.1a

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: a11497e3071b601b07ee28b7cb37b5fe90928c3541bc49bd4f9c143816a6bee5
4
+ data.tar.gz: 6d3d8ed9a9272357ba1c18c0880dc454b9485ec380504186a5b26b5698931ec2
5
+ SHA512:
6
+ metadata.gz: 10706e5c0de6ec9a818101855e1d3816553afcda2f7998791f91dd13f2d1bddddafa8d65d0316cd358bd99ab36690fd5baee15a7ba117222295577ec9397ee65
7
+ data.tar.gz: 9317c40de9a0be3150ac5b0a8d4742f06461e3c3011a9aa509844f01b62079f60a536c0d3ee62344bf38394dd32e4ece96e05ae6635f55c347d4f72e537b0a65
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Eduardo Martín Rojo
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 all
13
+ 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 THE
21
+ SOFTWARE.
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Main module for the gem
4
+ module ExtractionMetadataClient
5
+ end
6
+
7
+ require 'json_api_client'
8
+
9
+ require 'extraction_metadata_client/model'
10
+ require 'extraction_metadata_client/asset'
11
+ require 'extraction_metadata_client/asset_group'
12
+ require 'extraction_metadata_client/fact'
13
+ require 'extraction_metadata_client/metadata_transaction'
14
+ require 'extraction_metadata_client/uploaded_file'
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ExtractionMetadataClient
4
+ #
5
+ # Json api client model for Asset
6
+ class Asset < Model
7
+ has_many :facts
8
+ has_one :uploaded_file
9
+ end
10
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ExtractionMetadataClient
4
+ #
5
+ # Json api client model for AssetGroup
6
+ class AssetGroup < Model
7
+ has_many :assets
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ExtractionMetadataClient
4
+ #
5
+ # Json api client model for Fact
6
+ class Fact < Model
7
+ belongs_to :asset
8
+ end
9
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ExtractionMetadataClient
4
+ #
5
+ # Json api client model for MetadataTransaction
6
+ class MetadataTransaction < Model
7
+ end
8
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ExtractionMetadataClient
4
+ #
5
+ # Json api client model for main class.
6
+ # It can ben initialized by defining the environment variable METADATA_CLIENT_URL
7
+ # with the url to the metadata client
8
+ class Model < JsonApiClient::Resource
9
+ self.site = ENV['METADATA_CLIENT_URL']
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ExtractionMetadataClient
4
+ #
5
+ # Json api client model for UploadedFile
6
+ class UploadedFile < Model
7
+ belongs_to :asset
8
+ end
9
+ end
metadata ADDED
@@ -0,0 +1,135 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: extraction_metadata_client
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1a
5
+ platform: ruby
6
+ authors:
7
+ - Eduardo Martin Rojo
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-03-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: json_api_client
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.16'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.16'
27
+ - !ruby/object:Gem::Dependency
28
+ name: byebug
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '11'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '11'
41
+ - !ruby/object:Gem::Dependency
42
+ name: factory_bot
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '5'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '5'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.80'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0.80'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop-rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.38'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.38'
97
+ description:
98
+ email:
99
+ executables: []
100
+ extensions: []
101
+ extra_rdoc_files: []
102
+ files:
103
+ - LICENSE
104
+ - lib/extraction_metadata_client.rb
105
+ - lib/extraction_metadata_client/asset.rb
106
+ - lib/extraction_metadata_client/asset_group.rb
107
+ - lib/extraction_metadata_client/fact.rb
108
+ - lib/extraction_metadata_client/metadata_transaction.rb
109
+ - lib/extraction_metadata_client/model.rb
110
+ - lib/extraction_metadata_client/uploaded_file.rb
111
+ homepage: https://rubygems.org/gems/extraction_metadata_client
112
+ licenses:
113
+ - MIT
114
+ metadata: {}
115
+ post_install_message:
116
+ rdoc_options: []
117
+ require_paths:
118
+ - lib
119
+ required_ruby_version: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ required_rubygems_version: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - ">"
127
+ - !ruby/object:Gem::Version
128
+ version: 1.3.1
129
+ requirements: []
130
+ rubygems_version: 3.0.3
131
+ signing_key:
132
+ specification_version: 4
133
+ summary: JSON-API client that talks with the metadata service to store and apply all
134
+ metadata modifications in a single transaction
135
+ test_files: []