Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add back activesupport #259

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

LightService is a powerful and flexible service skeleton framework with an emphasis on simplicity

🔥 **It now comes with no external gem dependency.** 🔥

## Table of Contents
- [Table of Contents](#table-of-contents)
- [Why LightService?](#why-lightservice)
Expand Down
1 change: 1 addition & 0 deletions lib/light-service.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'logger'
require 'active_support/core_ext/string'

require 'light-service/version'

Expand Down
2 changes: 1 addition & 1 deletion lib/light-service/context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def stop_processing?
end

def define_accessor_methods_for_keys(keys)
return if keys.blank?
return if keys.empty?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adomokos since we are adding back activesupport, do we really need to make this change? Instead, we could simply include active_support/core_ext/object/blank and use the same method without introducing additional changes.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The goal is to yank Active Support dependency, entirely, for pure Ruby projects. Not sure how easily feasible (or how much needed) that is, though.


Array(keys).each do |key|
next if respond_to?(key.to_sym)
Expand Down
2 changes: 2 additions & 0 deletions light-service.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Gem::Specification.new do |gem|
gem.version = LightService::VERSION
gem.required_ruby_version = '>= 2.6.0'

gem.add_dependency("activesupport", ">= 5.0", "< 9.0")

gem.add_development_dependency("generator_spec", "~> 0.9.4")
gem.add_development_dependency("test-unit", "~> 3.0") # Needed for generator specs.
gem.add_development_dependency("rspec", "~> 3.0")
Expand Down