wolf_core 0.1.80 → 0.1.82
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23473c2b309abb30732eeeb899af9f028cdd040f9e7ad7a2d7af060248d49d3b
|
4
|
+
data.tar.gz: a9c390678c164da149a21163b3a139ad49368e9e48ecc69580db24bedaf86892
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11b90e14e12f07bfcf09f148950bde91509a508f16928baf8427ba24d9510f38633a5cbc73e4bff8720f3a501f53c7947cacf1092c3b3bb5460b5917e8d891c1
|
7
|
+
data.tar.gz: 77f4b387b06f286a04766b6c4c45052411953a88cc32dd6ba98645c410a4009508878612eadedcff91724867a4065b7d59dd5c0cd8fc5eb5fe3ef7b7fc49247b
|
@@ -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.82
|
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.
|