ruby_version 1.0.1 → 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
- SHA1:
3
- metadata.gz: f337975091999833b65c1006c8c3fddfe607cdd8
4
- data.tar.gz: 22575d38a75b5ff6e41caa7085ed0e0c4f657364
2
+ SHA256:
3
+ metadata.gz: 638ad3323f1fd645d94320298e3441e483a5e228a1c40de4d20e7f708e323637
4
+ data.tar.gz: 6938c2031090ff97524b6863f9b4a02ac52c588375e9da935d366bf4472594b5
5
5
  SHA512:
6
- metadata.gz: 1fc1f396adef6cc6c7feadf0a4506b0dda7a07e1b8239415e5fdc55e3b493c2bab16a15a4d875d9bf0ae10ca685b1baf0196f5e31d1e074d651de91fdaa4f5c8
7
- data.tar.gz: e15947a112ff63bfb5db232c3fcf1ca66073d0a09f74142b0c89cdfe163a2d74fe303675dab8e8da31cd55d328bd436089893c47d639e810e7daf624a1321f29
6
+ metadata.gz: 110b3bde50d6ba3fc79fb625351569a9d4d8b8781690b62b8335b93a47efaec8b207a15b506dc896a6b82bd5a4bfdd1393e50fe249eb37f962feef2b8a1f043f
7
+ data.tar.gz: 959ba07ad1c3d7a6c728554156d7007f0802bacb2d7d1a92e61004bf8f060c07f59b781af9cd538892ed0c2e5bd1ba01dfc6198fe5ef5845a8e0ee63eeda8493
data/ChangeLog.md ADDED
@@ -0,0 +1,19 @@
1
+ # Change Log
2
+
3
+ ## 1.0.3 / 2023-04-07
4
+
5
+ * Remove old gem versions (`pkg` dir) from release
6
+
7
+ ## 1.0.2 / 2020-01-04
8
+
9
+ * Freeze string literals
10
+
11
+ ## 1.0.1 / 2014-01-15
12
+
13
+ * Fix VERSION constant
14
+ * Add RubyVersion.revision method
15
+
16
+ ## 1.0.0 / 2014-01-14
17
+
18
+ * Moved from zucker 13.1 gem into its own gem
19
+
data/Gemfile CHANGED
@@ -2,8 +2,10 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- platform :rbx do
6
- gem 'rubysl-date'
7
- gem 'rubysl-singleton'
8
- end
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
+ ### ### ###
9
11
 
data/Gemfile.lock CHANGED
@@ -1,37 +1,29 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby_version (1.0.1)
4
+ ruby_version (1.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- diff-lcs (1.2.5)
10
- json (1.8.1)
11
- rake (10.1.1)
12
- rdoc (3.12.2)
13
- json (~> 1.4)
14
- rspec (2.14.1)
15
- rspec-core (~> 2.14.0)
16
- rspec-expectations (~> 2.14.0)
17
- rspec-mocks (~> 2.14.0)
18
- rspec-core (2.14.7)
19
- rspec-expectations (2.14.4)
9
+ diff-lcs (1.4.4)
10
+ rake (13.0.6)
11
+ rspec (2.99.0)
12
+ rspec-core (~> 2.99.0)
13
+ rspec-expectations (~> 2.99.0)
14
+ rspec-mocks (~> 2.99.0)
15
+ rspec-core (2.99.2)
16
+ rspec-expectations (2.99.2)
20
17
  diff-lcs (>= 1.1.3, < 2.0)
21
- rspec-mocks (2.14.4)
22
- rubygems-tasks (0.2.4)
23
- rubysl-date (2.0.6)
24
- rubysl-singleton (2.0.0)
18
+ rspec-mocks (2.99.4)
25
19
 
26
20
  PLATFORMS
27
21
  ruby
28
22
 
29
23
  DEPENDENCIES
30
- bundler (~> 1.0)
31
- rake (~> 10.1)
32
- rdoc (~> 3.0)
33
- rspec (~> 2.4)
24
+ rake (>= 12.0)
25
+ rspec (~> 2.99)
34
26
  ruby_version!
35
- rubygems-tasks (~> 0.2)
36
- rubysl-date
37
- rubysl-singleton
27
+
28
+ BUNDLED WITH
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
@@ -1,8 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'date'
2
4
  require 'time'
3
5
 
4
6
  module RubyVersion
5
- VERSION = '1.0.1'
7
+ VERSION = '1.0.3'
6
8
 
7
9
  class << self
8
10
  def to_s
data/ruby_version.gemspec CHANGED
@@ -6,20 +6,18 @@ Gem::Specification.new do |gem|
6
6
  gem.name = "ruby_version"
7
7
  gem.version = RubyVersion::VERSION
8
8
  gem.summary = 'Adds the RubyVersion pseudo-constant.'
9
- gem.description = 'Provides a RubyVersion class to simplify checking for the right Ruby version in your programs.'
9
+ gem.description = 'Provides a RubyVersion class which offers a convenient DSL for checking for the right Ruby version'
10
10
  gem.license = "MIT"
11
11
  gem.authors = ["Jan Lelis"]
12
- gem.email = "mail@janlelis.de"
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 'bundler', '~> 1.0'
21
- gem.add_development_dependency 'rake', '~> 10.1'
22
- gem.add_development_dependency 'rdoc', '~> 3.0'
23
- gem.add_development_dependency 'rspec', '~> 2.4'
24
- gem.add_development_dependency 'rubygems-tasks', '~> 0.2'
21
+ gem.add_development_dependency 'rake', '>= 12.0'
22
+ gem.add_development_dependency 'rspec', '~> 2.99'
25
23
  end
@@ -35,7 +35,7 @@ describe 'RubyVersion' do
35
35
  end
36
36
 
37
37
  it 'also allows to check for the release dates' do
38
- RubyVersion.is.older_than( Date.today ).should == true
38
+ RubyVersion.is.older_than( Date.today + 365 ).should == true
39
39
  RubyVersion.is.newer_than( '2000-01-01' ).should == true
40
40
  end
41
41
  end
metadata CHANGED
@@ -1,110 +1,68 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_version
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
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: 2014-01-17 00:00:00.000000000 Z
11
+ date: 2023-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: rake
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
- - - "~>"
17
+ - - ">="
32
18
  - !ruby/object:Gem::Version
33
- version: '10.1'
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: '10.1'
41
- - !ruby/object:Gem::Dependency
42
- name: rdoc
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '3.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '3.0'
26
+ version: '12.0'
55
27
  - !ruby/object:Gem::Dependency
56
28
  name: rspec
57
29
  requirement: !ruby/object:Gem::Requirement
58
30
  requirements:
59
31
  - - "~>"
60
32
  - !ruby/object:Gem::Version
61
- version: '2.4'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '2.4'
69
- - !ruby/object:Gem::Dependency
70
- name: rubygems-tasks
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '0.2'
33
+ version: '2.99'
76
34
  type: :development
77
35
  prerelease: false
78
36
  version_requirements: !ruby/object:Gem::Requirement
79
37
  requirements:
80
38
  - - "~>"
81
39
  - !ruby/object:Gem::Version
82
- version: '0.2'
83
- description: Provides a RubyVersion class to simplify checking for the right Ruby
84
- version in your programs.
85
- email: mail@janlelis.de
40
+ version: '2.99'
41
+ description: Provides a RubyVersion class which offers a convenient DSL for checking
42
+ for the right Ruby version
43
+ email:
44
+ - hi@ruby.consulting
86
45
  executables: []
87
46
  extensions: []
88
47
  extra_rdoc_files: []
89
48
  files:
90
49
  - ".gitignore"
91
50
  - ".rspec"
92
- - ".travis.yml"
93
- - ChangeLog.rdoc
51
+ - ChangeLog.md
94
52
  - Gemfile
95
53
  - Gemfile.lock
96
54
  - LICENSE.txt
97
- - README.rdoc
55
+ - README.md
98
56
  - Rakefile
99
57
  - lib/ruby_version.rb
100
- - pkg/ruby_version-1.0.0.gem
101
58
  - ruby_version.gemspec
102
59
  - spec/ruby_version_spec.rb
103
60
  - spec/spec_helper.rb
104
61
  homepage: https://github.com/janlelis/ruby_version
105
62
  licenses:
106
63
  - MIT
107
- metadata: {}
64
+ metadata:
65
+ rubygems_mfa_required: 'true'
108
66
  post_install_message:
109
67
  rdoc_options: []
110
68
  require_paths:
@@ -120,8 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
78
  - !ruby/object:Gem::Version
121
79
  version: '0'
122
80
  requirements: []
123
- rubyforge_project:
124
- rubygems_version: 2.2.1
81
+ rubygems_version: 3.4.4
125
82
  signing_key:
126
83
  specification_version: 4
127
84
  summary: Adds the RubyVersion pseudo-constant.
data/.travis.yml DELETED
@@ -1,14 +0,0 @@
1
- language: ruby
2
-
3
- rvm:
4
- #- ruby-head (travis error)
5
- - 2.1.0
6
- - 2.0.0
7
- - 1.9.3
8
- - 1.9.2
9
- - 1.8.7
10
- - ree
11
- - jruby
12
- - jruby-19mode
13
- - jruby-18mode
14
- - rbx
data/ChangeLog.rdoc DELETED
@@ -1,7 +0,0 @@
1
- === 1.0.1 / 2014-01-15
2
- * Fix VERSION constant
3
- * Add RubyVersion.revision method
4
-
5
- === 1.0.0 / 2014-01-14
6
- * Moved from zucker 13.1 gem into its own gem
7
-
Binary file