ruby_version 1.0.2 → 1.0.3

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
2
  SHA256:
3
- metadata.gz: 2b3046b81b110bebbb85da258c0e72195d5dcf80c0d9109d551a54d67569a83f
4
- data.tar.gz: dd671ff3279a0fe1820303a59f3a37891cbd127b0ca3feedee8f73fb29c39884
3
+ metadata.gz: 638ad3323f1fd645d94320298e3441e483a5e228a1c40de4d20e7f708e323637
4
+ data.tar.gz: 6938c2031090ff97524b6863f9b4a02ac52c588375e9da935d366bf4472594b5
5
5
  SHA512:
6
- metadata.gz: a7b1f2f6bbd3ee1dfff29eacbc12480346a0aa2fab8fcb5b2a66e1f2403d5f66555a3f3061f95afc9d646ef4e148de4a11ef451f1ce517dec7af54d0e9335d49
7
- data.tar.gz: 52bc2e8b823c10d94bdf9db6b8dba0c391c128b056a5e14e54a8f919fe60fb7fabd26c91066097f784b75ebcc777ea48c9c79e455985b3a8bc05df25962a78e4
6
+ metadata.gz: 110b3bde50d6ba3fc79fb625351569a9d4d8b8781690b62b8335b93a47efaec8b207a15b506dc896a6b82bd5a4bfdd1393e50fe249eb37f962feef2b8a1f043f
7
+ data.tar.gz: 959ba07ad1c3d7a6c728554156d7007f0802bacb2d7d1a92e61004bf8f060c07f59b781af9cd538892ed0c2e5bd1ba01dfc6198fe5ef5845a8e0ee63eeda8493
data/ChangeLog.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 1.0.3 / 2023-04-07
4
+
5
+ * Remove old gem versions (`pkg` dir) from release
6
+
3
7
  ## 1.0.2 / 2020-01-04
4
8
 
5
9
  * Freeze string literals
data/Gemfile CHANGED
@@ -2,3 +2,10 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
+ ### ### ###
6
+
7
+ # 3.2 workaround for RSpec 2.99, see https://bugs.ruby-lang.org/issues/17391
8
+ def File.exists?(f)exist?(f)end unless defined? File.exists?
9
+
10
+ ### ### ###
11
+
data/Gemfile.lock CHANGED
@@ -1,16 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby_version (1.0.2)
4
+ ruby_version (1.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- diff-lcs (1.3)
10
- json (1.8.6)
11
- rake (10.5.0)
12
- rdoc (3.12.2)
13
- json (~> 1.4)
9
+ diff-lcs (1.4.4)
10
+ rake (13.0.6)
14
11
  rspec (2.99.0)
15
12
  rspec-core (~> 2.99.0)
16
13
  rspec-expectations (~> 2.99.0)
@@ -19,17 +16,14 @@ GEM
19
16
  rspec-expectations (2.99.2)
20
17
  diff-lcs (>= 1.1.3, < 2.0)
21
18
  rspec-mocks (2.99.4)
22
- rubygems-tasks (0.2.4)
23
19
 
24
20
  PLATFORMS
25
21
  ruby
26
22
 
27
23
  DEPENDENCIES
28
- rake (~> 10.1)
29
- rdoc (~> 3.0)
30
- rspec (~> 2.4)
24
+ rake (>= 12.0)
25
+ rspec (~> 2.99)
31
26
  ruby_version!
32
- rubygems-tasks (~> 0.2)
33
27
 
34
28
  BUNDLED WITH
35
- 2.0.2
29
+ 2.2.22
@@ -1,8 +1,9 @@
1
- = RubyVersion {<img src="https://travis-ci.org/janlelis/ruby_version.png" />}[https://travis-ci.org/janlelis/ruby_version]
1
+ # RubyVersion [<img src="https://badge.fury.io/rb/ruby_version.svg" alt="Gem Version" />](https://badge.fury.io/rb/ruby_version) [<img src="https://github.com/janlelis/ruby_version/workflows/Test/badge.svg" />](https://github.com/janlelis/ruby_version/actions?query=workflow%3ATest)
2
2
 
3
- Provides a +RubyVersion+ to simplify checking for the right Ruby version in your programs.
3
+ Provides a `RubyVersion` to simplify checking for the right Ruby version in
4
+ your programs.
4
5
 
5
- == Setup
6
+ ## Setup
6
7
 
7
8
  On your command-line:
8
9
 
@@ -12,7 +13,7 @@ In Ruby:
12
13
 
13
14
  require 'ruby_version'
14
15
 
15
- == Usage
16
+ ## Usage
16
17
 
17
18
  # Output RUBY_VERSION
18
19
  RubyVersion.to_s
@@ -39,12 +40,12 @@ In Ruby:
39
40
  RubyVersion.patchlevel # => 249
40
41
  RubyVersion.description # => "ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]"
41
42
 
42
- == Also See
43
+ ## Also See
43
44
 
44
- https://github.com/janlelis/ruby_engine |
45
- https://github.com/janlelis/ruby_info |
46
- https://github.com/rdp/os
45
+ - https://github.com/janlelis/ruby_engine
46
+ - https://github.com/janlelis/ruby_info
47
+ - https://github.com/rdp/os
47
48
 
48
- == J-_-L
49
+ ## J-_-L
49
50
 
50
51
  Copyright (c) 2010-2014 Jan Lelis. MIT License. Originated from the zucker gem.
data/Rakefile CHANGED
@@ -1,36 +1,39 @@
1
- # encoding: utf-8
2
-
3
- require 'rubygems'
4
-
5
- begin
6
- require 'bundler'
7
- rescue LoadError => e
8
- warn e.message
9
- warn "Run `gem install bundler` to install Bundler."
10
- exit -1
1
+ # # #
2
+ # Get gemspec info
3
+
4
+ gemspec_file = Dir['*.gemspec'].first
5
+ gemspec = eval File.read(gemspec_file), binding, gemspec_file
6
+ info = "#{gemspec.name} | #{gemspec.version} | " \
7
+ "#{gemspec.runtime_dependencies.size} dependencies | " \
8
+ "#{gemspec.files.size} files"
9
+
10
+ # # #
11
+ # Gem build and install task
12
+
13
+ desc info
14
+ task :gem do
15
+ puts info + "\n\n"
16
+ print " "; sh "gem build #{gemspec_file}"
17
+ FileUtils.mkdir_p 'pkg'
18
+ FileUtils.mv "#{gemspec.name}-#{gemspec.version}.gem", 'pkg'
19
+ puts; sh %{gem install --no-document pkg/#{gemspec.name}-#{gemspec.version}.gem}
11
20
  end
12
21
 
13
- begin
14
- Bundler.setup(:development)
15
- rescue Bundler::BundlerError => e
16
- warn e.message
17
- warn "Run `bundle install` to install missing gems."
18
- exit e.status_code
19
- end
22
+ # # #
23
+ # Start an IRB session with the gem loaded
20
24
 
21
- require 'rake'
25
+ desc "#{gemspec.name} | IRB"
26
+ task :irb do
27
+ sh "irb -I ./lib -r #{gemspec.name.gsub '-','/'}"
28
+ end
22
29
 
23
- require 'rubygems/tasks'
24
- Gem::Tasks.new
30
+ # # #
31
+ # Spec
25
32
 
26
- require 'rdoc/task'
27
- RDoc::Task.new do |rdoc|
28
- rdoc.title = "ruby_version"
33
+ desc "Run specs"
34
+ task :spec do
35
+ sh "rspec"
29
36
  end
30
- task :doc => :rdoc
31
-
32
- require 'rspec/core/rake_task'
33
- RSpec::Core::RakeTask.new
34
37
 
35
38
  task :test => :spec
36
39
  task :default => :spec
data/lib/ruby_version.rb CHANGED
@@ -4,7 +4,7 @@ require 'date'
4
4
  require 'time'
5
5
 
6
6
  module RubyVersion
7
- VERSION = '1.0.2'
7
+ VERSION = '1.0.3'
8
8
 
9
9
  class << self
10
10
  def to_s
data/ruby_version.gemspec CHANGED
@@ -12,13 +12,12 @@ Gem::Specification.new do |gem|
12
12
  gem.email = ["hi@ruby.consulting"]
13
13
  gem.homepage = "https://github.com/janlelis/ruby_version"
14
14
 
15
- gem.files = Dir['{**/}{.*,*}'].select { |path| File.file?(path) }
15
+ gem.files = Dir['{**/}{.*,*}'].select { |path| File.file?(path) && path !~ /^pkg/ }
16
16
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ['lib']
19
+ gem.metadata = { "rubygems_mfa_required" => "true" }
19
20
 
20
- gem.add_development_dependency 'rake', '~> 10.1'
21
- gem.add_development_dependency 'rdoc', '~> 3.0'
22
- gem.add_development_dependency 'rspec', '~> 2.4'
23
- gem.add_development_dependency 'rubygems-tasks', '~> 0.2'
21
+ gem.add_development_dependency 'rake', '>= 12.0'
22
+ gem.add_development_dependency 'rspec', '~> 2.99'
24
23
  end
metadata CHANGED
@@ -1,71 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_version
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Lelis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-04 00:00:00.000000000 Z
11
+ date: 2023-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '10.1'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '10.1'
27
- - !ruby/object:Gem::Dependency
28
- name: rdoc
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
17
+ - - ">="
32
18
  - !ruby/object:Gem::Version
33
- version: '3.0'
19
+ version: '12.0'
34
20
  type: :development
35
21
  prerelease: false
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
38
- - - "~>"
24
+ - - ">="
39
25
  - !ruby/object:Gem::Version
40
- version: '3.0'
26
+ version: '12.0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: rspec
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: '2.4'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '2.4'
55
- - !ruby/object:Gem::Dependency
56
- name: rubygems-tasks
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '0.2'
33
+ version: '2.99'
62
34
  type: :development
63
35
  prerelease: false
64
36
  version_requirements: !ruby/object:Gem::Requirement
65
37
  requirements:
66
38
  - - "~>"
67
39
  - !ruby/object:Gem::Version
68
- version: '0.2'
40
+ version: '2.99'
69
41
  description: Provides a RubyVersion class which offers a convenient DSL for checking
70
42
  for the right Ruby version
71
43
  email:
@@ -76,23 +48,21 @@ extra_rdoc_files: []
76
48
  files:
77
49
  - ".gitignore"
78
50
  - ".rspec"
79
- - ".travis.yml"
80
51
  - ChangeLog.md
81
52
  - Gemfile
82
53
  - Gemfile.lock
83
54
  - LICENSE.txt
84
- - README.rdoc
55
+ - README.md
85
56
  - Rakefile
86
57
  - lib/ruby_version.rb
87
- - pkg/ruby_version-1.0.0.gem
88
- - pkg/ruby_version-1.0.1.gem
89
58
  - ruby_version.gemspec
90
59
  - spec/ruby_version_spec.rb
91
60
  - spec/spec_helper.rb
92
61
  homepage: https://github.com/janlelis/ruby_version
93
62
  licenses:
94
63
  - MIT
95
- metadata: {}
64
+ metadata:
65
+ rubygems_mfa_required: 'true'
96
66
  post_install_message:
97
67
  rdoc_options: []
98
68
  require_paths:
@@ -108,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
78
  - !ruby/object:Gem::Version
109
79
  version: '0'
110
80
  requirements: []
111
- rubygems_version: 3.0.6
81
+ rubygems_version: 3.4.4
112
82
  signing_key:
113
83
  specification_version: 4
114
84
  summary: Adds the RubyVersion pseudo-constant.
data/.travis.yml DELETED
@@ -1,17 +0,0 @@
1
- sudo: false
2
- language: ruby
3
-
4
- rvm:
5
- - 2.7
6
- - 2.6
7
- - 2.5
8
- - 2.4
9
- - 2.3
10
- - 2.2
11
- - 2.1
12
- - 2.0
13
- - 1.9
14
- - ruby-head
15
- - jruby-9.2.9.0
16
- - jruby-head
17
- - truffleruby
Binary file
Binary file