syshare 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8fb62b0d0b19dd84c5d95f58fbd7829c474e7e571728c72fda910fed24d1e6c6
4
+ data.tar.gz: d2f4fdf6e33ab2d74205592036c3e5b6a4639ba8548517f65a638b5a4845528f
5
+ SHA512:
6
+ metadata.gz: b24f6ab458b63fc8a61e2fd07b037266d766032f224b33eaaf8dfadee6f60dabb32970127d43b3aaaf5dff8aed464891fc7648f96a749a6a9d415938f32057ee
7
+ data.tar.gz: 4ff951a7711d27ef1d9133f18cb7e55d037787ad7e5eaf13fd6033e53152cc8c45823a7fa343aef8b53d92838ccc9048d946178aadde8c0c45d6f686c445f22f
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.standard.yml ADDED
@@ -0,0 +1,2 @@
1
+ # For available configuration options, see:
2
+ # https://github.com/testdouble/standard
data/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ ruby 3.0.2
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2021-12-14
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at i.kerseymer@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in syshare.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rspec", "~> 3.0"
11
+
12
+ gem "standard", "~> 1.3"
13
+
14
+ gem "dry-system", "~> 0.21.0"
15
+
16
+ gem "redis", "~> 4.5"
17
+ gem "hiredis", "~> 0.6.3"
18
+ gem "connection_pool", "~> 2.2"
19
+
20
+ gem "pry", "~> 0.14.1"
21
+
22
+ gem "dalli", "~> 3.1"
data/Gemfile.lock ADDED
@@ -0,0 +1,112 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ syshare (0.1.0)
5
+ dry-system
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ ast (2.4.2)
11
+ coderay (1.1.3)
12
+ concurrent-ruby (1.1.9)
13
+ connection_pool (2.2.5)
14
+ dalli (3.1.3)
15
+ diff-lcs (1.4.4)
16
+ dry-auto_inject (0.8.0)
17
+ dry-container (>= 0.3.4)
18
+ dry-configurable (0.13.0)
19
+ concurrent-ruby (~> 1.0)
20
+ dry-core (~> 0.6)
21
+ dry-container (0.9.0)
22
+ concurrent-ruby (~> 1.0)
23
+ dry-configurable (~> 0.13, >= 0.13.0)
24
+ dry-core (0.7.1)
25
+ concurrent-ruby (~> 1.0)
26
+ dry-inflector (0.2.1)
27
+ dry-logic (1.2.0)
28
+ concurrent-ruby (~> 1.0)
29
+ dry-core (~> 0.5, >= 0.5)
30
+ dry-struct (1.4.0)
31
+ dry-core (~> 0.5, >= 0.5)
32
+ dry-types (~> 1.5)
33
+ ice_nine (~> 0.11)
34
+ dry-system (0.21.0)
35
+ concurrent-ruby (~> 1.0)
36
+ dry-auto_inject (>= 0.4.0)
37
+ dry-configurable (~> 0.13, >= 0.13.0)
38
+ dry-container (~> 0.9, >= 0.9.0)
39
+ dry-core (~> 0.5, >= 0.5)
40
+ dry-inflector (~> 0.1, >= 0.1.2)
41
+ dry-struct (~> 1.0)
42
+ dry-types (1.5.1)
43
+ concurrent-ruby (~> 1.0)
44
+ dry-container (~> 0.3)
45
+ dry-core (~> 0.5, >= 0.5)
46
+ dry-inflector (~> 0.1, >= 0.1.2)
47
+ dry-logic (~> 1.0, >= 1.0.2)
48
+ hiredis (0.6.3)
49
+ ice_nine (0.11.2)
50
+ method_source (1.0.0)
51
+ parallel (1.21.0)
52
+ parser (3.0.3.2)
53
+ ast (~> 2.4.1)
54
+ pry (0.14.1)
55
+ coderay (~> 1.1)
56
+ method_source (~> 1.0)
57
+ rainbow (3.0.0)
58
+ rake (13.0.6)
59
+ redis (4.5.1)
60
+ regexp_parser (2.2.0)
61
+ rexml (3.2.5)
62
+ rspec (3.10.0)
63
+ rspec-core (~> 3.10.0)
64
+ rspec-expectations (~> 3.10.0)
65
+ rspec-mocks (~> 3.10.0)
66
+ rspec-core (3.10.1)
67
+ rspec-support (~> 3.10.0)
68
+ rspec-expectations (3.10.1)
69
+ diff-lcs (>= 1.2.0, < 2.0)
70
+ rspec-support (~> 3.10.0)
71
+ rspec-mocks (3.10.2)
72
+ diff-lcs (>= 1.2.0, < 2.0)
73
+ rspec-support (~> 3.10.0)
74
+ rspec-support (3.10.3)
75
+ rubocop (1.23.0)
76
+ parallel (~> 1.10)
77
+ parser (>= 3.0.0.0)
78
+ rainbow (>= 2.2.2, < 4.0)
79
+ regexp_parser (>= 1.8, < 3.0)
80
+ rexml
81
+ rubocop-ast (>= 1.12.0, < 2.0)
82
+ ruby-progressbar (~> 1.7)
83
+ unicode-display_width (>= 1.4.0, < 3.0)
84
+ rubocop-ast (1.15.0)
85
+ parser (>= 3.0.1.1)
86
+ rubocop-performance (1.12.0)
87
+ rubocop (>= 1.7.0, < 2.0)
88
+ rubocop-ast (>= 0.4.0)
89
+ ruby-progressbar (1.11.0)
90
+ standard (1.5.0)
91
+ rubocop (= 1.23.0)
92
+ rubocop-performance (= 1.12.0)
93
+ unicode-display_width (2.1.0)
94
+
95
+ PLATFORMS
96
+ arm64-darwin-21
97
+ x86_64-linux
98
+
99
+ DEPENDENCIES
100
+ connection_pool (~> 2.2)
101
+ dalli (~> 3.1)
102
+ dry-system (~> 0.21.0)
103
+ hiredis (~> 0.6.3)
104
+ pry (~> 0.14.1)
105
+ rake (~> 13.0)
106
+ redis (~> 4.5)
107
+ rspec (~> 3.0)
108
+ standard (~> 1.3)
109
+ syshare!
110
+
111
+ BUNDLED WITH
112
+ 2.2.22
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 Ian Ker-Seymer
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
13
+ all 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
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # Syshare
2
+
3
+ `syshare` provides some useful components for
4
+ [dry-system](https://dry-rb.org/gems/dry-system/). The goal is to be able to
5
+ easily add dependencies to your project, in a robust and easy way. The gem will
6
+ take care of important best practices for you, such as:
7
+
8
+ - Managing the lifecycle of a dependency (starting, shutting down, etc.)
9
+ - Ensure the resources are safely wrapped (i.e. using a connection pool when neccesary)
10
+ - Configuring the environment
11
+ - Adding logging
12
+ - And more...
13
+
14
+ ## Components
15
+
16
+ ### Redis
17
+
18
+ The `redis` component sets up a connection to a Redis server with a few bonuses:
19
+
20
+ - Sets up sane defaults for timeouts
21
+ - Uses a a connection pool by default
22
+ - Adds a logger if one is available on the app container
23
+ - Automatically detects the `REDIS_URL` environment variable and uses it if present
24
+
25
+ [View All Settings](https://github.com/ianks/syshare/blob/main/lib/syshare/boot/redis.rb#L5)
26
+
27
+ ```ruby
28
+ require 'dry/system/container'
29
+ require 'syshare'
30
+
31
+ class App < Dry::System::Container
32
+ boot(:redis, from: :syshare) do
33
+ configure do |config|
34
+ config.driver = 'hiredis'
35
+ end
36
+ end
37
+ end
38
+
39
+ # Later in your code...
40
+ App[:redis].ping # => "PONG"
41
+ ```
42
+
43
+ ### Dalli
44
+
45
+ The `Dalli` component sets up a connection to a Memcached server with a few bonuses:
46
+
47
+ - Sets up sane defaults for timeouts
48
+ - Uses a a connection pool by default
49
+ - Adds a logger if one is available on the app container
50
+
51
+ [View All Settings](https://github.com/ianks/syshare/blob/main/lib/syshare/boot/dalli.rb#L5)
52
+
53
+ ```ruby
54
+ require 'dry/system/container'
55
+ require 'syshare'
56
+
57
+ class App < Dry::System::Container
58
+ boot(:dalli, from: :syshare) do
59
+ configure do |config|
60
+ config.expires_in = 3600 # 1 hour
61
+ end
62
+ end
63
+ end
64
+
65
+ # Later in your code...
66
+ App[:dalli].set("abc", 123)
67
+ App[:dalli].get("abc") # => 123
68
+ ```
69
+
70
+ ## Development
71
+
72
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
73
+
74
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
75
+
76
+ ## Contributing
77
+
78
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/syshare. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/syshare/blob/main/CODE_OF_CONDUCT.md).
79
+
80
+ ## License
81
+
82
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
83
+
84
+ ## Code of Conduct
85
+
86
+ Everyone interacting in the Syshare project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/syshare/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "standard/rake"
9
+
10
+ task default: %i[spec standard]
data/bin/console ADDED
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "syshare"
6
+
7
+ require "dry/system/container"
8
+ require "syshare/components"
9
+
10
+ class App < Dry::System::Container
11
+ boot(:redis, from: :syshare) do
12
+ configure do |config|
13
+ config.use_connection_pool = true
14
+ config.driver = 'ruby'
15
+ end
16
+ end
17
+ end
18
+
19
+ App[:redis]
20
+
21
+ require "pry"
22
+ Pry.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Syshare
4
+ ::Dry::System.register_component(:dalli, provider: :syshare) do
5
+ settings do
6
+ key :servers, Types.Array(Types::String).optional.default(nil)
7
+ key :username, Types::String.optional.default(nil)
8
+ key :password, Types::String.optional.default(nil)
9
+ key :expires_in, Types::Coercible::Integer.default(0)
10
+ key :cache_nils, Types::Bool.default(false)
11
+ key :namespace, Types::String.optional.default(nil)
12
+ key :value_max_bytes, Types::Integer.default(1024 * 1024)
13
+ key :serializer, Types.Interface(:dump, :load).default(Marshal, shared: true)
14
+ key :compress, Types::Bool.default(true)
15
+ key :failover, Types::Bool.default(true)
16
+ key :socket_timeout, Types::Coercible::Integer.default(1)
17
+ key :socket_failure_delay, Types::Float.default(0.2)
18
+ key :down_retry_delay, Types::Coercible::Integer.default(60)
19
+ key :use_connection_pool, Types::Bool.default(true)
20
+ key :pool_timeout, Types::Coercible::Integer.default(5)
21
+ key :pool_size, Types::Coercible::Integer.default(5)
22
+ end
23
+
24
+ init do
25
+ Syshare.require_gem "dalli"
26
+ Syshare.require_gem "connection_pool" if config.use_connection_pool
27
+ end
28
+
29
+ start do
30
+ dalli_conf = config.to_h
31
+ servers = dalli_conf.delete(:servers)
32
+
33
+ Dalli.logger = target.logger if target.respond_to?(:logger)
34
+
35
+ if config.use_connection_pool
36
+ pool_config = {size: config.pool_size, timeout: config.pool_timeout}
37
+ pool = ConnectionPool.new(pool_config) do
38
+ Dalli::Client.new(servers, **dalli_conf.to_h, threadsafe: false)
39
+ end
40
+ register("dalli.pool", pool)
41
+ register("dalli", ConnectionPool::Wrapper.new(pool: pool))
42
+ else
43
+ register("dalli", Dalli::Client.new(servers, dalli_conf))
44
+ end
45
+ end
46
+
47
+ stop do
48
+ if config.use_connection_pool
49
+ dalli.shutdown(&:close)
50
+ else
51
+ dalli.close
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Syshare
4
+ ::Dry::System.register_component(:redis, provider: :syshare) do
5
+ settings do
6
+ key :url, Types::String.default(ENV.fetch("REDIS_URL", "redis://localhost:6379/0"))
7
+ key :connect_timeout, Types::Integer.default(5)
8
+ key :read_timeout, Types::Integer.default(1)
9
+ key :write_timeout, Types::Integer.default(1)
10
+ key :reconnect_attempts, Types::Integer.default(3)
11
+ key :driver, Types::String.default("hiredis").enum("ruby", "hiredis", "synchrony")
12
+ key :use_connection_pool, Types::Bool.default(true)
13
+ key :pool_timeout, Types::Integer.default(5)
14
+ key :pool_size, Types::Integer.default(5)
15
+ end
16
+
17
+ init do
18
+ Syshare.require_gem "redis"
19
+ Syshare.require_gem "connection_pool" if config.use_connection_pool
20
+
21
+ case config.driver
22
+ when "synchrony"
23
+ Syshare.require_gem("em-synchrony")
24
+ when "hiredis"
25
+ Syshare.require_gem("hiredis")
26
+ end
27
+ end
28
+
29
+ start do
30
+ redis_conf = config.to_h
31
+ redis_conf[:logger] = target.logger if target.respond_to?(:logger)
32
+
33
+ if config.use_connection_pool
34
+ pool_config = {size: config.pool_size, timeout: config.pool_timeout}
35
+ pool = ConnectionPool.new(pool_config) { Redis.new(redis_conf.to_h) }
36
+ register("redis.pool", pool)
37
+ register("redis", ConnectionPool::Wrapper.new(pool: pool))
38
+ else
39
+ register("redis", Redis.new(redis_conf.to_h))
40
+ end
41
+ end
42
+
43
+ stop do
44
+ if config.use_connection_pool
45
+ redis.shutdown(&:disconnect!)
46
+ else
47
+ redis.disconnect!
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,10 @@
1
+ require "dry/system"
2
+
3
+ module Syshare
4
+ module Components
5
+ Dry::System.register_provider(
6
+ :syshare,
7
+ boot_path: Pathname(__dir__).join("boot").realpath
8
+ )
9
+ end
10
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Syshare
4
+ VERSION = "0.1.0"
5
+ end
data/lib/syshare.rb ADDED
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "syshare/version"
4
+ require_relative "syshare/components"
5
+ require "dry-types"
6
+
7
+ module Syshare
8
+ class Error < StandardError; end
9
+
10
+ def self.require_gem(gem_name)
11
+ require gem_name
12
+ rescue LoadError => e
13
+ warn "The #{gem_name} gem is not available. Please add it to your Gemfile and run bundle install"
14
+ raise e
15
+ end
16
+
17
+ module Types
18
+ include Dry.Types()
19
+ end
20
+ end
data/sig/syshare.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Syshare
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
data/syshare.gemspec ADDED
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/syshare/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "syshare"
7
+ spec.version = Syshare::VERSION
8
+ spec.authors = ["Ian Ker-Seymer"]
9
+ spec.email = ["i.kerseymer@gmail.com"]
10
+
11
+ spec.summary = "A set of useful components for Ruby for dry-system users"
12
+ spec.description = <<~DESC
13
+ A gem that provides some useful components for dry-system. The goal is to be
14
+ able to easily add dependencies to your project, in a robust and easy way.
15
+ The gem will take care of important best practices for you, such as:
16
+
17
+ - Managing the lifecycle of a dependency (starting, shutting down, etc.)
18
+ - Ensure the resources are safely wrapped (i.e. using a connection pool when neccesary)
19
+ - Configuring the environment
20
+ - Adding logging
21
+ - And more...
22
+ DESC
23
+ spec.homepage = "https://github.com/ianks/syshare"
24
+ spec.license = "MIT"
25
+ spec.required_ruby_version = ">= 2.7.0"
26
+
27
+ spec.metadata["homepage_uri"] = spec.homepage
28
+ spec.metadata["source_code_uri"] = "https://github.com/ianks/syshare"
29
+ spec.metadata["changelog_uri"] = "https://github.com/ianks/syshare/blob/main/CHANGELOG.md"
30
+
31
+ # Specify which files should be added to the gem when it is released.
32
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
33
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
34
+ `git ls-files -z`.split("\x0").reject do |f|
35
+ (f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
36
+ end
37
+ end
38
+ spec.bindir = "exe"
39
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
40
+ spec.require_paths = ["lib"]
41
+
42
+ # Uncomment to register a new dependency of your gem
43
+ spec.add_runtime_dependency "dry-system"
44
+ spec.platform = Gem::Platform::RUBY
45
+
46
+ # For more information and examples about making a new gem, checkout our
47
+ # guide at: https://bundler.io/guides/creating_gem.html
48
+ end
metadata ADDED
@@ -0,0 +1,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: syshare
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Ian Ker-Seymer
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-12-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: dry-system
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: |
28
+ A gem that provides some useful components for dry-system. The goal is to be
29
+ able to easily add dependencies to your project, in a robust and easy way.
30
+ The gem will take care of important best practices for you, such as:
31
+
32
+ - Managing the lifecycle of a dependency (starting, shutting down, etc.)
33
+ - Ensure the resources are safely wrapped (i.e. using a connection pool when neccesary)
34
+ - Configuring the environment
35
+ - Adding logging
36
+ - And more...
37
+ email:
38
+ - i.kerseymer@gmail.com
39
+ executables: []
40
+ extensions: []
41
+ extra_rdoc_files: []
42
+ files:
43
+ - ".rspec"
44
+ - ".standard.yml"
45
+ - ".tool-versions"
46
+ - CHANGELOG.md
47
+ - CODE_OF_CONDUCT.md
48
+ - Gemfile
49
+ - Gemfile.lock
50
+ - LICENSE.txt
51
+ - README.md
52
+ - Rakefile
53
+ - bin/console
54
+ - bin/setup
55
+ - lib/syshare.rb
56
+ - lib/syshare/boot/dalli.rb
57
+ - lib/syshare/boot/redis.rb
58
+ - lib/syshare/components.rb
59
+ - lib/syshare/version.rb
60
+ - sig/syshare.rbs
61
+ - syshare.gemspec
62
+ homepage: https://github.com/ianks/syshare
63
+ licenses:
64
+ - MIT
65
+ metadata:
66
+ homepage_uri: https://github.com/ianks/syshare
67
+ source_code_uri: https://github.com/ianks/syshare
68
+ changelog_uri: https://github.com/ianks/syshare/blob/main/CHANGELOG.md
69
+ post_install_message:
70
+ rdoc_options: []
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: 2.7.0
78
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ requirements: []
84
+ rubygems_version: 3.2.22
85
+ signing_key:
86
+ specification_version: 4
87
+ summary: A set of useful components for Ruby for dry-system users
88
+ test_files: []