null_plus 1.0.0 → 1.0.1

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
- SHA1:
3
- metadata.gz: 0bc61c208df3bca266a8bc9677559ed5be2b0a9f
4
- data.tar.gz: 88420396cf11a45bb657d85065ad1d10f2848f6b
2
+ SHA256:
3
+ metadata.gz: ac6e13040abaa45772195cb41646fe72cf118528a9bd1b259762a5b1389ab443
4
+ data.tar.gz: 9946e95dd4672c24d9bb68e65dccb919197f8b10e33832ad6cedd463f91922b7
5
5
  SHA512:
6
- metadata.gz: d4a6a5609c0f37557dda3e980c4d8fa9e0487c9ec8f6dbc5dcc0f90683510c373e152ffa38534e8adba96cb4ddc879bd6c298f97218e30000910c3512f73c87f
7
- data.tar.gz: 440a0e8997a8377b4ff163b3e861c31efc53197ce391807486c077a4c086b92e8a27da67af687b7e531fe94636ff83101f144939b98802b02e637e5af31e7e6f
6
+ metadata.gz: 4eb5b9b394663c137b667cd59bfa291132cf25d4a94c916b8ff8bd7e6bbb1033cadefa66a15732f8b8723c151934b4fe09c6743239d9002664942ef41e970894
7
+ data.tar.gz: 90f63600dd406a170aee9bcb1fa5ac399613967c0f9b50b3e26a4c07d99718e1d6f334ed326aa7f89427cedb822fbf7720e716358ca58d00531275cd5a5d637f
@@ -1,6 +1,10 @@
1
1
  ## CHANGELOG
2
2
 
3
+ ### 1.0.1
4
+
5
+ * Relax Ruby version requirement to allow Ruby 3.0
6
+
3
7
  ### 1.0.0
4
8
 
5
- * Inital release
9
+ * Initial release
6
10
 
data/Gemfile CHANGED
@@ -3,3 +3,4 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  gem 'minitest'
6
+ gem 'rake'
@@ -1,4 +1,4 @@
1
- Copyright (c) 2015 Jan Lelis, mail@janlelis.de
1
+ Copyright (c) 2015 Jan Lelis, https://janlelis.com
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,9 +1,10 @@
1
- # +nil [![[version]](https://badge.fury.io/rb/null_plus.svg)](http://badge.fury.io/rb/null_plus) [![[travis]](https://travis-ci.org/janlelis/null_plus.png)](https://travis-ci.org/janlelis/null_plus)
1
+ # +`nil` [![[version]](https://badge.fury.io/rb/null_plus.svg)](https://badge.fury.io/rb/null_plus) [![[ci]](https://github.com/janlelis/null_plus/workflows/Test/badge.svg)](https://github.com/janlelis/null_plus/actions?query=workflow%3ATest)
2
2
 
3
- This gem redefines Ruby's unary `+` operator to turn null objects into nil. By default, the unary `+` operator is not used in Ruby, so overloading it is not so dangerous as it might have sound to you when you read it.
3
+ This gem redefines Ruby's unary `+` operator to turn null objects into nil. By default, the unary `+` operator is rarely¹ used by Ruby, so overloading it is not so dangerous as it might have sounded to you when you read it.
4
4
 
5
5
  Every object that returns [true for `null?`](https://github.com/janlelis/null_question) is considered a null object.
6
6
 
7
+ ¹ (Ruby 2.3 introduced `+` for String: It will return an unfrozen version of the string)
7
8
 
8
9
  ## Setup
9
10
 
@@ -13,19 +14,18 @@ Add to your **Gemfile**:
13
14
  gem "null_plus"
14
15
  ```
15
16
 
16
-
17
17
  ## Usage
18
18
 
19
19
  ```ruby
20
20
  class NullObject
21
21
  def null?
22
22
  true
23
- end
23
+ end
24
24
  end
25
25
 
26
26
  null = NullObject.new
27
27
 
28
- +nil #=> nil
28
+ +nil #=> nil
29
29
  +null #=> nil
30
30
  +"some object" #=> "some object"
31
31
 
@@ -57,4 +57,4 @@ null = NullObject.new
57
57
 
58
58
  ## J-_-L
59
59
 
60
- Copyright (C) 2015 Jan Lelis <http://janlelis.com>. Released under the MIT license.
60
+ Copyright (C) 2015 Jan Lelis <https://janlelis.com>. Released under the MIT license.
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  # # #
2
2
  # Get gemspec info
3
3
 
4
- gemspec_file = Dir['*.gemspec'].first
4
+ gemspec_file = Dir['*.gemspec'].first
5
5
  gemspec = eval File.read(gemspec_file), binding, gemspec_file
6
6
  info = "#{gemspec.name} | #{gemspec.version} | " \
7
7
  "#{gemspec.runtime_dependencies.size} dependencies | " \
@@ -28,3 +28,17 @@ desc "#{gemspec.name} | IRB"
28
28
  task :irb do
29
29
  sh "irb -I ./lib -r #{gemspec.name.gsub '-','/'}"
30
30
  end
31
+
32
+
33
+ # # #
34
+ # Run specs
35
+
36
+ desc "#{gemspec.name} | Spec"
37
+ task :spec do
38
+ if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/
39
+ sh "for %f in (spec/\*.rb) do ruby spec/%f"
40
+ else
41
+ sh "for file in spec/*.rb; do ruby $file; done"
42
+ end
43
+ end
44
+ task default: :spec
@@ -1,4 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module NullPlus
2
- VERSION = "1.0.0".freeze
4
+ VERSION = "1.0.1"
3
5
  end
4
-
@@ -8,7 +8,7 @@ Gem::Specification.new do |gem|
8
8
  gem.summary = "+nil"
9
9
  gem.description = "This gem redefines Ruby's unary + operator to turn null objects into nil. By default, the unary + operator is not used by Ruby, so overloading it is not so dangerous as it might have sounded to you when you read it. Every object that returns true for null? is considered a null object."
10
10
  gem.authors = ["Jan Lelis"]
11
- gem.email = ["mail@janlelis.de"]
11
+ gem.email = ["hi@ruby.consulting"]
12
12
  gem.homepage = "https://github.com/janlelis/null_plus"
13
13
  gem.license = "MIT"
14
14
 
@@ -17,6 +17,6 @@ Gem::Specification.new do |gem|
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ["lib"]
19
19
 
20
- gem.required_ruby_version = "~> 2.0"
20
+ gem.required_ruby_version = ">= 2.0"
21
21
  gem.add_dependency "null_question", "~> 1.0"
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: null_plus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Lelis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-13 00:00:00.000000000 Z
11
+ date: 2021-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: null_question
@@ -29,13 +29,12 @@ description: This gem redefines Ruby's unary + operator to turn null objects int
29
29
  not so dangerous as it might have sounded to you when you read it. Every object
30
30
  that returns true for null? is considered a null object.
31
31
  email:
32
- - mail@janlelis.de
32
+ - hi@ruby.consulting
33
33
  executables: []
34
34
  extensions: []
35
35
  extra_rdoc_files: []
36
36
  files:
37
37
  - ".gitignore"
38
- - ".travis.yml"
39
38
  - CHANGELOG.md
40
39
  - Gemfile
41
40
  - MIT-LICENSE.txt
@@ -55,7 +54,7 @@ require_paths:
55
54
  - lib
56
55
  required_ruby_version: !ruby/object:Gem::Requirement
57
56
  requirements:
58
- - - "~>"
57
+ - - ">="
59
58
  - !ruby/object:Gem::Version
60
59
  version: '2.0'
61
60
  required_rubygems_version: !ruby/object:Gem::Requirement
@@ -64,11 +63,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
63
  - !ruby/object:Gem::Version
65
64
  version: '0'
66
65
  requirements: []
67
- rubyforge_project:
68
- rubygems_version: 2.4.6
66
+ rubygems_version: 3.2.4
69
67
  signing_key:
70
68
  specification_version: 4
71
69
  summary: "+nil"
72
70
  test_files:
73
71
  - spec/null_plus_spec.rb
74
- has_rdoc:
@@ -1,18 +0,0 @@
1
- sudo: false
2
- language: ruby
3
-
4
- script: bundle exec ruby spec/null_plus_spec.rb
5
-
6
- rvm:
7
- - 2.2
8
- - 2.1
9
- - 2.0
10
- - rbx-2
11
- - jruby-head
12
- - jruby-9000
13
-
14
- cache:
15
- - bundler
16
-
17
- # matrix:
18
- # fast_finish: true