New Upstream Release - ruby-instance-storage

Ready changes

Summary

Merged new upstream version: 2.0.0 (was: 1.0.0).

Resulting package

Built on 2022-10-15T10:51 (took 4m40s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-releases ruby-instance-storage

Lintian Result

Diff

diff --git a/Steepfile b/Steepfile
new file mode 100644
index 0000000..8343f3a
--- /dev/null
+++ b/Steepfile
@@ -0,0 +1,22 @@
+target :lib do
+  signature "sig"
+  check "lib"                       # Directory name
+  # check "Gemfile"                   # File name
+  # ignore "lib/templates/*.rb"
+  # library "pathname", "set"       # Standard libraries
+  # library "strong_json"           # Gems
+end
+
+target :test do
+  signature "sig"
+  check "test"
+end
+
+# target :spec do
+#   signature "sig", "sig-private"
+#
+#   check "spec"
+#
+#   # library "pathname", "set"       # Standard libraries
+#   # library "rspec"
+# end
diff --git a/debian/changelog b/debian/changelog
index ff32ec2..21141ae 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+ruby-instance-storage (2.0.0-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Sat, 15 Oct 2022 10:47:30 -0000
+
 ruby-instance-storage (1.0.0-4) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/patches/remove_require_bundler.patch b/debian/patches/remove_require_bundler.patch
index 00a9eae..88bc69d 100644
--- a/debian/patches/remove_require_bundler.patch
+++ b/debian/patches/remove_require_bundler.patch
@@ -2,10 +2,10 @@ Description: remove require bundler
 Author: HIGUCHI Daisuke (VDR dai) <dai@debian.org>
 Last-Update: 2015-11-02
 
-Index: ruby-instance-storage/test/instance_storage_test.rb
+Index: ruby-instance-storage.git/test/instance_storage_test.rb
 ===================================================================
---- ruby-instance-storage.orig/test/instance_storage_test.rb
-+++ ruby-instance-storage/test/instance_storage_test.rb
+--- ruby-instance-storage.git.orig/test/instance_storage_test.rb
++++ ruby-instance-storage.git/test/instance_storage_test.rb
 @@ -1,6 +1,5 @@
  # -*- coding: utf-8 -*-
  
diff --git a/instance_storage.gemspec b/instance_storage.gemspec
index 71cee24..df28528 100644
--- a/instance_storage.gemspec
+++ b/instance_storage.gemspec
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
   spec.email         = ["toshi.alternative@gmail.com"]
   spec.summary       = %q{Manage class instances with dictionary}
   spec.description   = %q{Manage class instances with dictionary.}
-  spec.homepage      = ""
+  spec.homepage      = "https://github.com/toshia/instance_storage"
   spec.license       = "MIT"
 
   spec.files         = `git ls-files -z`.split("\x0")
@@ -18,7 +18,9 @@ Gem::Specification.new do |spec|
   spec.test_files    = spec.files.grep(%r{^(test|spec|features)/})
   spec.require_paths = ["lib"]
 
-  spec.add_development_dependency "bundler", "~> 1.7"
-  spec.add_development_dependency "rake", "~> 10.0"
-  spec.add_development_dependency "minitest"
+  spec.required_ruby_version = '>= 2.6.0'
+
+  spec.add_development_dependency "bundler", "~> 2.0"
+  spec.add_development_dependency "rake", "~> 13.0"
+  spec.add_development_dependency "minitest", "~> 5.1"
 end
diff --git a/lib/instance_storage.rb b/lib/instance_storage.rb
index 833a30a..296bb80 100644
--- a/lib/instance_storage.rb
+++ b/lib/instance_storage.rb
@@ -18,7 +18,7 @@ module InstanceStorage
   end
 
   def initialize(name)
-    @name = name end
+    @name = name.to_sym end
 
   # 名前を文字列にして返す
   # ==== Return
@@ -35,7 +35,9 @@ module InstanceStorage
 
     # 定義されているインスタンスを全て削除する
     def clear!
-      @instances = @storage_lock = nil end
+      @instances = nil
+      self
+    end
 
     # インスタンス _event_name_ を返す。既に有る場合はそのインスタンス、ない場合は新しく作って返す。
     # ==== Args
@@ -82,6 +84,8 @@ module InstanceStorage
       instances_dict[name.to_sym] end
 
     def destroy(name)
-      instances_dict.delete(name.to_sym) end
+      instances_dict.delete(name.to_sym)
+      self
+    end
   end
 end
diff --git a/lib/instance_storage/version.rb b/lib/instance_storage/version.rb
index 5fee96e..fbc2dc9 100644
--- a/lib/instance_storage/version.rb
+++ b/lib/instance_storage/version.rb
@@ -1,3 +1,3 @@
 module InstanceStorage
-  VERSION = "1.0.0"
+  VERSION = "2.0.0"
 end
diff --git a/metadata.yml b/metadata.yml
deleted file mode 100644
index d9fde31..0000000
--- a/metadata.yml
+++ /dev/null
@@ -1,96 +0,0 @@
---- !ruby/object:Gem::Specification
-name: instance_storage
-version: !ruby/object:Gem::Version
-  version: 1.0.0
-platform: ruby
-authors:
-- Toshiaki Asai
-autorequire: 
-bindir: bin
-cert_chain: []
-date: 2015-08-03 00:00:00.000000000 Z
-dependencies:
-- !ruby/object:Gem::Dependency
-  name: bundler
-  requirement: !ruby/object:Gem::Requirement
-    requirements:
-    - - "~>"
-      - !ruby/object:Gem::Version
-        version: '1.7'
-  type: :development
-  prerelease: false
-  version_requirements: !ruby/object:Gem::Requirement
-    requirements:
-    - - "~>"
-      - !ruby/object:Gem::Version
-        version: '1.7'
-- !ruby/object:Gem::Dependency
-  name: rake
-  requirement: !ruby/object:Gem::Requirement
-    requirements:
-    - - "~>"
-      - !ruby/object:Gem::Version
-        version: '10.0'
-  type: :development
-  prerelease: false
-  version_requirements: !ruby/object:Gem::Requirement
-    requirements:
-    - - "~>"
-      - !ruby/object:Gem::Version
-        version: '10.0'
-- !ruby/object:Gem::Dependency
-  name: minitest
-  requirement: !ruby/object:Gem::Requirement
-    requirements:
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: '0'
-  type: :development
-  prerelease: false
-  version_requirements: !ruby/object:Gem::Requirement
-    requirements:
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: '0'
-description: Manage class instances with dictionary.
-email:
-- toshi.alternative@gmail.com
-executables: []
-extensions: []
-extra_rdoc_files: []
-files:
-- ".gitignore"
-- Gemfile
-- LICENSE.txt
-- README.md
-- Rakefile
-- instance_storage.gemspec
-- lib/instance_storage.rb
-- lib/instance_storage/version.rb
-- test/instance_storage_test.rb
-homepage: ''
-licenses:
-- MIT
-metadata: {}
-post_install_message: 
-rdoc_options: []
-require_paths:
-- lib
-required_ruby_version: !ruby/object:Gem::Requirement
-  requirements:
-  - - ">="
-    - !ruby/object:Gem::Version
-      version: '0'
-required_rubygems_version: !ruby/object:Gem::Requirement
-  requirements:
-  - - ">="
-    - !ruby/object:Gem::Version
-      version: '0'
-requirements: []
-rubyforge_project: 
-rubygems_version: 2.4.5
-signing_key: 
-specification_version: 4
-summary: Manage class instances with dictionary
-test_files:
-- test/instance_storage_test.rb
diff --git a/sig/instance_storage.rbs b/sig/instance_storage.rbs
new file mode 100644
index 0000000..951f12e
--- /dev/null
+++ b/sig/instance_storage.rbs
@@ -0,0 +1,29 @@
+# TypeProf 0.13.0
+
+# Classes
+module InstanceStorage
+  VERSION: String
+  extend InstanceStorageExtend
+
+  attr_reader name: Symbol
+  alias to_sym name
+  def self.included: (Class) -> void
+  def initialize: (Symbol|String) -> void
+  def to_s: -> String
+
+  module InstanceStorageExtend
+    @instances: Hash[Symbol, self]?
+    @storage_lock: Thread::Mutex?
+
+    def instances_dict: -> Hash[Symbol, self]
+    def storage_lock: -> Thread::Mutex
+    def clear!: -> self
+    def []: (Symbol|String) -> self
+    def instances: -> Array[self]
+    def instances_name: -> Array[Symbol]
+    def instance_exist?: (Symbol|String) -> bool
+    def instance: (Symbol|String) -> self
+    def destroy: (Symbol|String) -> self
+    def new: (Symbol|String) -> self
+  end
+end
diff --git a/test/instance_storage_test.rb b/test/instance_storage_test.rb
index b839b54..6070c30 100644
--- a/test/instance_storage_test.rb
+++ b/test/instance_storage_test.rb
@@ -5,23 +5,22 @@ require 'minitest/autorun'
 
 require 'instance_storage'
 
-describe(InstanceStorage) do
-
-  it 'get and create instance' do
+class InstanceStorageTest < MiniTest::Unit::TestCase
+  def test_get_and_create_instance
     klass = Class.new do
       include InstanceStorage end
     assert_same(klass[:foo], klass[:foo])
     refute_same(klass[:foo], klass[:bar])
   end
 
-  it "get all instances" do
+  def test_get_all_instances
     klass = Class.new do
       include InstanceStorage end
     assert_equal([], klass.instances)
     assert_equal([klass[:a], klass[:b]], klass.instances)
   end
 
-  it "get all instances name" do
+  def test_get_all_instances_name
     klass = Class.new do
       include InstanceStorage end
     assert_equal([], klass.instances_name)
@@ -30,7 +29,7 @@ describe(InstanceStorage) do
     assert_equal([:a, :b], klass.instances_name)
   end
 
-  it "destroy instance" do
+  def test_destroy_instance
     klass = Class.new do
       include InstanceStorage end
     klass[:a]
@@ -39,14 +38,14 @@ describe(InstanceStorage) do
     assert(! klass.instance_exist?(:a))
   end
 
-  it "get existing instance" do
+  def test_get_existing_instance
     klass = Class.new do
       include InstanceStorage end
     assert_nil(klass.instance(:a))
     assert_equal(klass[:a], klass.instance(:a))
   end
 
-  it "should support inherited class" do
+  def test_should_support_inherited_class
     klass = Class.new do
       include InstanceStorage end
     child = Class.new(klass)

Debdiff

[The following lists of changes regard files as different if they have different names, permissions or owners.]

Files in second set of .debs but not in first

-rw-r--r--  root/root   /usr/share/rubygems-integration/all/specifications/instance_storage-2.0.0.gemspec

Files in first set of .debs but not in second

-rw-r--r--  root/root   /usr/share/rubygems-integration/all/specifications/instance_storage-1.0.0.gemspec

Control files: lines which differ (wdiff format)

  • Ruby-Versions: all

More details

Full run details