wolf_core 0.1.80 → 0.1.81
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d8f5848e0da080deb068e1249aa74d70f8c87d247708a0a8d0ea1a696969126
|
4
|
+
data.tar.gz: d00831a1455a158cc7faeb8399e88ab1271c4835a34b2ebd99445c3b37dc0abe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78598feba5aa74437332e0bc8a7b09781a1bafbb0751b2911a6580a08544e28dd06c79ff6f8ae6e01f279115a96b3eb6e3c1f78e4cbfbdcc2092378a00f6fc67
|
7
|
+
data.tar.gz: 2c8d15ebb467c97fd2f471e031e2dad412025bd40947e4cb097c77ef83b16c9c0d7d13b979bb31f7617c34f0c6835f0cb89a47f5a09e79dfd259778133a267cf
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module WolfCore
|
2
|
+
module NoSqlDbDataSource
|
3
|
+
module_function
|
4
|
+
|
5
|
+
def init(region: 'us-east-1')
|
6
|
+
@@dynamodb_client ||= Aws::DynamoDB::Client.new(region: region)
|
7
|
+
end
|
8
|
+
|
9
|
+
def instance
|
10
|
+
@@dynamodb_client
|
11
|
+
end
|
12
|
+
|
13
|
+
def put_item(table_name:, item:)
|
14
|
+
instance.put_item({
|
15
|
+
table_name: table_name,
|
16
|
+
item: item
|
17
|
+
})
|
18
|
+
end
|
19
|
+
|
20
|
+
def get_item(table_name:, key:)
|
21
|
+
instance.get_item({
|
22
|
+
table_name: table_name,
|
23
|
+
key: key
|
24
|
+
}).item
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module WolfCore
|
2
|
+
module NoSqlDbOperations
|
3
|
+
def put_no_sql_item(table_name:, item:)
|
4
|
+
WolfCore::NoSqlDbDataSource.put_item(
|
5
|
+
table_name: table_name,
|
6
|
+
item: item,
|
7
|
+
)
|
8
|
+
end
|
9
|
+
|
10
|
+
def get_no_sql_item(table_name:, key:)
|
11
|
+
WolfCore::NoSqlDbDataSource.get_item(
|
12
|
+
table_name: table_name,
|
13
|
+
key: key,
|
14
|
+
)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/wolf_core/version.rb
CHANGED
data/lib/wolf_core.rb
CHANGED
@@ -7,6 +7,7 @@ require 'active_support'
|
|
7
7
|
require 'active_support/core_ext'
|
8
8
|
require 'aws-sdk-lambda'
|
9
9
|
require 'redis'
|
10
|
+
require 'aws-sdk-dynamodb'
|
10
11
|
|
11
12
|
module WolfCore; end
|
12
13
|
|
@@ -14,4 +15,5 @@ require 'wolf_core/utils/file_utils'
|
|
14
15
|
|
15
16
|
WolfCore::FileUtils.require_relative_folder(__dir__, 'wolf_core')
|
16
17
|
WolfCore::LambdaFunctionDataSource.init
|
17
|
-
WolfCore::InMemoryStorageDataSource.init
|
18
|
+
WolfCore::InMemoryStorageDataSource.init
|
19
|
+
WolfCore::NoSqlDbDataSource.init
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wolf_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.81
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javier Roncallo
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: aws-sdk-dynamodb
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
description: Repository to store shared code among Ruby projects.
|
70
84
|
email:
|
71
85
|
- jroncallo96@gmail.com
|
@@ -88,6 +102,8 @@ files:
|
|
88
102
|
- lib/wolf_core/infrastructure/in_memory_storage_operations.rb
|
89
103
|
- lib/wolf_core/infrastructure/lambda_function_data_source.rb
|
90
104
|
- lib/wolf_core/infrastructure/lambda_function_operations.rb
|
105
|
+
- lib/wolf_core/infrastructure/no_sql_db_data_source.rb
|
106
|
+
- lib/wolf_core/infrastructure/no_sql_db_operations.rb
|
91
107
|
- lib/wolf_core/utils/array_utils.rb
|
92
108
|
- lib/wolf_core/utils/async_utils.rb
|
93
109
|
- lib/wolf_core/utils/file_utils.rb
|
@@ -117,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
133
|
- !ruby/object:Gem::Version
|
118
134
|
version: '0'
|
119
135
|
requirements: []
|
120
|
-
rubygems_version: 3.5.
|
136
|
+
rubygems_version: 3.5.18
|
121
137
|
signing_key:
|
122
138
|
specification_version: 4
|
123
139
|
summary: Repository to store shared code among Ruby projects.
|