1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/ostruct] Create OpenStruct::VERSION

This commit is contained in:
Marc-Andre Lafortune 2019-12-22 19:40:32 -05:00
parent 49d94248eb
commit 9be3295d53
3 changed files with 17 additions and 2 deletions

View file

@ -72,6 +72,9 @@
# the objects that are created, as there is much more overhead in the setting
# of these properties compared to using a Hash or a Struct.
#
require_relative 'ostruct/version'
class OpenStruct
#

View file

@ -1,8 +1,15 @@
# frozen_string_literal: true
begin
require_relative "lib/ostruct/version"
rescue LoadError
# for Ruby core repository
require_relative "version"
end
Gem::Specification.new do |spec|
spec.name = "ostruct"
spec.version = "0.1.0"
spec.version = OpenStruct::VERSION
spec.authors = ["Marc-Andre Lafortune"]
spec.email = ["ruby-core@marc-andre.ca"]
@ -11,7 +18,7 @@ Gem::Specification.new do |spec|
spec.homepage = "https://github.com/ruby/ostruct"
spec.license = "BSD-2-Clause"
spec.files = [".gitignore", ".travis.yml", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "bin/console", "bin/setup", "lib/ostruct.rb", "ostruct.gemspec"]
spec.files = [".gitignore", ".travis.yml", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "bin/console", "bin/setup", "lib/ostruct.rb", "lib/ostruct/version.rb", "ostruct.gemspec"]
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

5
lib/ostruct/version.rb Normal file
View file

@ -0,0 +1,5 @@
# frozen_string_literal: true
class OpenStruct
VERSION = "0.1.0"
end