-
Notifications
You must be signed in to change notification settings - Fork 11
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
(#82) fix undefined method .blank?
#84
Conversation
I have been wondering why you set a version restriction The new line |
As far as I learned it's good practice to use explicit pinning to ensure we don't pull in old versions that don't work and also don't pull in new major versions. 7.1.1 was the latest version when I wrote the patch. |
Hm... But doesn't the gemspec transitively expand also on downstream users of this library? I don't think we should force other projects to use only activesupport '>= 7.1.1' (unless we know for sure that our library does not work with versions below 7.1.1). I usually like to keep libraries as broad as possible and pin applications strictly (what I have one project that uses this library and added a restriction With the current release of
If you can remove the version restriction, I could merge it. |
@aufziehvogel are you fine with the upper limit to prevent pulling int major releases that might break hcloud? with the dependabot plugin you will get an automatic PR that will run tests and bump the version, so you won't miss it. |
a7cce8a
to
e6ba33c
Compare
@tonobo What do you think? I'd also allow future major versions (in this case activesupport 8 or later), because the chances that our code still runs with activesupport 8 without problems are pretty high. Or in other words, I'd only put a restriction if I really know that we're broken with a specific version. |
Howdy, applying a static pinning via gemspec is not what we commonly do, it's up to your project to pin dependencies (usually via Gemfile.lock). I personally dislike introducing hard dependencies at gem level, guess the project isn't maintained anymore but still enforcing |
Same opinion from my side. I also prefer no pinnings in |
This adds the activesupport dependency which provides `.blank?`. It's used in a lot of places so I added the dependency instead of switching to native ruby. ``` $ git grep .blank? lib/hcloud/certificate_resource.rb: raise Hcloud::Error::InvalidInput, 'no name given' if name.blank? lib/hcloud/certificate_resource.rb: raise Hcloud::Error::InvalidInput, 'no certificate given' if certificate.blank? lib/hcloud/certificate_resource.rb: raise Hcloud::Error::InvalidInput, 'no private_key given' if private_key.blank? lib/hcloud/entry_loader.rb: raise Hcloud::Error::InvalidInput, 'no type given' if kwargs[:type].blank? lib/hcloud/entry_loader.rb: raise Hcloud::Error::InvalidInput, 'no start given' if kwargs[:start].blank? lib/hcloud/entry_loader.rb: raise Hcloud::Error::InvalidInput, 'no end given' if kwargs[:end].blank? lib/hcloud/firewall_resource.rb: raise Hcloud::Error::InvalidInput, 'no name given' if name.blank? lib/hcloud/floating_ip.rb: raise Hcloud::Error::InvalidInput, 'no IP given' if ip.blank? lib/hcloud/floating_ip_resource.rb: raise Hcloud::Error::InvalidInput, 'no type given' if type.blank? lib/hcloud/load_balancer.rb: raise Hcloud::Error::InvalidInput, 'no IP given' if ip.blank? lib/hcloud/load_balancer.rb: raise Hcloud::Error::InvalidInput, 'no dns_ptr given' if dns_ptr.blank? lib/hcloud/load_balancer.rb: raise Hcloud::Error::InvalidInput, 'no type given' if load_balancer_type.blank? lib/hcloud/load_balancer.rb: raise Hcloud::Error::InvalidInput, 'no type given' if type.blank? lib/hcloud/load_balancer.rb: raise Hcloud::Error::InvalidInput, 'no protocol given' if protocol.blank? lib/hcloud/load_balancer.rb: raise Hcloud::Error::InvalidInput, 'no IP given' if ip.blank? lib/hcloud/load_balancer_resource.rb: raise Hcloud::Error::InvalidInput, 'no name given' if name.blank? lib/hcloud/load_balancer_resource.rb: raise Hcloud::Error::InvalidInput, 'no type given' if load_balancer_type.blank? lib/hcloud/load_balancer_resource.rb: if !algorithm.to_h.key?(:type) || algorithm[:type].blank? lib/hcloud/load_balancer_resource.rb: if location.blank? && network_zone.blank? lib/hcloud/network.rb: raise Hcloud::Error::InvalidInput, 'no type given' if type.blank? lib/hcloud/network.rb: raise Hcloud::Error::InvalidInput, 'no network_zone given' if network_zone.blank? lib/hcloud/network.rb: raise Hcloud::Error::InvalidInput, 'no ip_range given' if ip_range.blank? lib/hcloud/network.rb: raise Hcloud::Error::InvalidInput, 'no destination given' if destination.blank? lib/hcloud/network.rb: raise Hcloud::Error::InvalidInput, 'no gateway given' if gateway.blank? lib/hcloud/network.rb: raise Hcloud::Error::InvalidInput, 'no destination given' if destination.blank? lib/hcloud/network.rb: raise Hcloud::Error::InvalidInput, 'no gateway given' if gateway.blank? lib/hcloud/network.rb: raise Hcloud::Error::InvalidInput, 'no ip_range given' if ip_range.blank? lib/hcloud/network_resource.rb: raise Hcloud::Error::InvalidInput, 'no name given' if name.blank? lib/hcloud/network_resource.rb: raise Hcloud::Error::InvalidInput, 'no IP range given' if ip_range.blank? lib/hcloud/placement_group_resource.rb: raise Hcloud::Error::InvalidInput, 'no name given' if name.blank? lib/hcloud/primary_ip.rb: raise Hcloud::Error::InvalidInput, 'no IP given' if ip.blank? lib/hcloud/primary_ip_resource.rb: raise Hcloud::Error::InvalidInput, 'no name given' if name.blank? lib/hcloud/primary_ip_resource.rb: raise Hcloud::Error::InvalidInput, 'no assignee_type given' if assignee_type.blank? lib/hcloud/server.rb: raise Hcloud::Error::InvalidInput, 'no image given' if image.blank? lib/hcloud/server.rb: raise Hcloud::Error::InvalidInput, 'no server_type given' if server_type.blank? lib/hcloud/server.rb: raise Hcloud::Error::InvalidInput, 'no iso given' if iso.blank? lib/hcloud/server.rb: raise Hcloud::Error::InvalidInput, 'no IP given' if ip.blank? lib/hcloud/server.rb: raise Hcloud::Error::InvalidInput, 'no dns_ptr given' if dns_ptr.blank? lib/hcloud/ssh_key_resource.rb: raise Hcloud::Error::InvalidInput, 'no name given' if name.blank? lib/hcloud/volume_resource.rb: raise Hcloud::Error::InvalidInput, 'no name given' if name.blank? lib/hcloud/volume_resource.rb: if location.blank? && server.nil? ```
@skoch-hc thanks for merging, can you also do a new release? |
Have released version 1.3.0 to rubygems. |
This adds the activesupport dependency which provides
.blank?
. It's used in a lot of places so I added the dependency instead of switching to native ruby.