bindan 0.1.0
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 +7 -0
- data/.editorconfig +5 -0
- data/.envrc +2 -0
- data/.standard.yml +3 -0
- data/CHANGELOG.md +9 -0
- data/LICENSE +9 -0
- data/README.md +136 -0
- data/Rakefile +14 -0
- data/Steepfile +17 -0
- data/compose.yml +12 -0
- data/lib/bindan/emulators/firestore_controller.rb +152 -0
- data/lib/bindan/emulators/gcs_server_controller.rb +119 -0
- data/lib/bindan/error.rb +3 -0
- data/lib/bindan/providers/envvar.rb +27 -0
- data/lib/bindan/providers/firestore.rb +87 -0
- data/lib/bindan/providers/storage.rb +96 -0
- data/lib/bindan/providers.rb +1 -0
- data/lib/bindan/version.rb +5 -0
- data/lib/bindan.rb +24 -0
- data/rbs_collection.lock.yaml +328 -0
- data/rbs_collection.yaml +19 -0
- data/sig/bindan/emulators/firestore_controller.rbs +76 -0
- data/sig/bindan/emulators/gcs_server_controller.rbs +71 -0
- data/sig/bindan/error.rbs +4 -0
- data/sig/bindan/providers/envvar.rbs +22 -0
- data/sig/bindan/providers/firestore.rbs +47 -0
- data/sig/bindan/providers/storage.rbs +61 -0
- data/sig/bindan/version.rbs +3 -0
- data/sig/bindan.rbs +8 -0
- metadata +79 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
module Google
|
|
2
|
+
module Cloud
|
|
3
|
+
class Storage
|
|
4
|
+
def initialize: (**untyped kwargs) -> void
|
|
5
|
+
|
|
6
|
+
def bucket: (*untyped args) -> untyped
|
|
7
|
+
end
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
module Bindan
|
|
12
|
+
module Provider
|
|
13
|
+
class Storage
|
|
14
|
+
@_options: Hash[Symbol, untyped]
|
|
15
|
+
|
|
16
|
+
@bucket: String
|
|
17
|
+
|
|
18
|
+
@separator: String
|
|
19
|
+
|
|
20
|
+
@project_id: String
|
|
21
|
+
|
|
22
|
+
@_storage: Google::Cloud::Storage
|
|
23
|
+
|
|
24
|
+
class FileNotExist < Error
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
#
|
|
28
|
+
# @param [String] bucket
|
|
29
|
+
# @param [String] project_id
|
|
30
|
+
# @param [String] separator
|
|
31
|
+
# @param [String] credentials
|
|
32
|
+
# @param [Google::Cloud::Storage] sdk
|
|
33
|
+
#
|
|
34
|
+
def initialize: (String bucket, ?raise_error: bool?, ?separator: ::String, ?sdk: untyped, **untyped kwargs) -> void
|
|
35
|
+
|
|
36
|
+
attr_reader project_id: String
|
|
37
|
+
|
|
38
|
+
attr_reader separator: String
|
|
39
|
+
|
|
40
|
+
#
|
|
41
|
+
# @param [Hash] options
|
|
42
|
+
# @return [Hash}
|
|
43
|
+
#
|
|
44
|
+
def prepare_options: (Hash[Symbol, untyped] options) -> Hash[Symbol, untyped]
|
|
45
|
+
|
|
46
|
+
#
|
|
47
|
+
# decorated bucket name
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
#
|
|
51
|
+
def bucket: () -> String
|
|
52
|
+
|
|
53
|
+
#
|
|
54
|
+
# @raise FileNotExist
|
|
55
|
+
# @param [String] file
|
|
56
|
+
# @return [String]
|
|
57
|
+
#
|
|
58
|
+
def []: (String file) -> untyped
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
data/sig/bindan.rbs
ADDED
metadata
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: bindan
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- wtnabe
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2025-08-03 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: Bindan is a Ruby gem for building single configuration object from various
|
|
14
|
+
sources with providers (that is bundled Google Cloud Storage and Firestore platform
|
|
15
|
+
by default). It provides a flexible way to manage application settings, supporting
|
|
16
|
+
lazy initialization and seamless switching between development (using emulators)
|
|
17
|
+
and production (eg. actual GCP services) environments.
|
|
18
|
+
email:
|
|
19
|
+
- 18510+wtnabe@users.noreply.github.com
|
|
20
|
+
executables: []
|
|
21
|
+
extensions: []
|
|
22
|
+
extra_rdoc_files: []
|
|
23
|
+
files:
|
|
24
|
+
- ".editorconfig"
|
|
25
|
+
- ".envrc"
|
|
26
|
+
- ".standard.yml"
|
|
27
|
+
- CHANGELOG.md
|
|
28
|
+
- LICENSE
|
|
29
|
+
- README.md
|
|
30
|
+
- Rakefile
|
|
31
|
+
- Steepfile
|
|
32
|
+
- compose.yml
|
|
33
|
+
- lib/bindan.rb
|
|
34
|
+
- lib/bindan/emulators/firestore_controller.rb
|
|
35
|
+
- lib/bindan/emulators/gcs_server_controller.rb
|
|
36
|
+
- lib/bindan/error.rb
|
|
37
|
+
- lib/bindan/providers.rb
|
|
38
|
+
- lib/bindan/providers/envvar.rb
|
|
39
|
+
- lib/bindan/providers/firestore.rb
|
|
40
|
+
- lib/bindan/providers/storage.rb
|
|
41
|
+
- lib/bindan/version.rb
|
|
42
|
+
- rbs_collection.lock.yaml
|
|
43
|
+
- rbs_collection.yaml
|
|
44
|
+
- sig/bindan.rbs
|
|
45
|
+
- sig/bindan/emulators/firestore_controller.rbs
|
|
46
|
+
- sig/bindan/emulators/gcs_server_controller.rbs
|
|
47
|
+
- sig/bindan/error.rbs
|
|
48
|
+
- sig/bindan/providers/envvar.rbs
|
|
49
|
+
- sig/bindan/providers/firestore.rbs
|
|
50
|
+
- sig/bindan/providers/storage.rbs
|
|
51
|
+
- sig/bindan/version.rbs
|
|
52
|
+
homepage: https://github.com/wtnabe/bindan
|
|
53
|
+
licenses: []
|
|
54
|
+
metadata:
|
|
55
|
+
allowed_push_host: https://rubygems.org
|
|
56
|
+
homepage_uri: https://github.com/wtnabe/bindan
|
|
57
|
+
source_code_uri: https://github.com/wtnabe/bindan
|
|
58
|
+
changelog_uri: https://github.com/wtnabe/bindan/blob/main/CHANGELOG.md
|
|
59
|
+
post_install_message:
|
|
60
|
+
rdoc_options: []
|
|
61
|
+
require_paths:
|
|
62
|
+
- lib
|
|
63
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
64
|
+
requirements:
|
|
65
|
+
- - ">="
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: 3.0.0
|
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
|
+
requirements:
|
|
70
|
+
- - ">="
|
|
71
|
+
- !ruby/object:Gem::Version
|
|
72
|
+
version: '0'
|
|
73
|
+
requirements: []
|
|
74
|
+
rubygems_version: 3.5.22
|
|
75
|
+
signing_key:
|
|
76
|
+
specification_version: 4
|
|
77
|
+
summary: Bindan is a Ruby gem for building single configuration object from various
|
|
78
|
+
sources with providers.
|
|
79
|
+
test_files: []
|