rubynew 1.1 → 1.2

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: a6063f5baba77f1be01af65181e27d24e40feb84
4
- data.tar.gz: 41664657d14639f6d299873b6b51d32c9064c0c1
2
+ SHA256:
3
+ metadata.gz: 6100a33a0748bdc2bf4f7a6c7c33fc998d6df88ec93fdd2032b5132b6b904878
4
+ data.tar.gz: 31e466dcb6b233f3fc75190afa2704e6eba3d8569aa65ea3684ad8635f5fa0ec
5
5
  SHA512:
6
- metadata.gz: 2941e817ff57c3852d80bdaf89654994c4772aa21e54fbb75aa966c1ddd58d90f93fa12de414285c9c66b54f64eff03fa81b1d3d874641566f5fc481d962cbe8
7
- data.tar.gz: c099b1c63f3c16c6aaa683993488f77375fdcf5db4a80723d99b9ae868983ed7e41d5c5d26989f6b13b6638895518c97578d28ccc4c63e32e00898f6881ebd85
6
+ metadata.gz: 1c8e66a37e227d3a36784caad40fdfcd34ee3b47435a4a5e9f4f7fd1fbe234eda0ab51ea6262e0042b387c15e7a1819ac24601565accd7121c000460938883c1
7
+ data.tar.gz: aa53ba20c7b172084b30d1248fb3cf63b1a1996c524623f416b7362824d3c2ae2822d28cdb50df3df69c98a62d55530a7185d73bd3e5e51ad23704e66f03423c
data/README.md CHANGED
@@ -57,6 +57,10 @@ To contribute:
57
57
 
58
58
  ## History
59
59
 
60
+ 2025-01-25 v1.2
61
+ * Replace deprecated methods to support modern Ruby.
62
+
63
+
60
64
  2016-08-21 v1.1
61
65
 
62
66
  * Added `README.md`, `LICENSE`, and `Gemfile`
data/Rakefile CHANGED
@@ -1,10 +1,12 @@
1
1
  require "bundler/gem_tasks"
2
2
 
3
- require 'rake/testtask'
3
+ require "minitest/test_task"
4
4
 
5
- Rake::TestTask.new do |t|
5
+ Minitest::TestTask.create(:test) do |t|
6
6
  t.libs << "test"
7
- t.test_files = FileList['test/*_test.rb']
8
- t.verbose = true
7
+ t.libs << "lib"
8
+ t.warning = false
9
+ t.test_globs = ["test/**/*_test.rb"]
9
10
  end
10
11
 
12
+ task :default => :test
data/bin/rubynew CHANGED
@@ -5,7 +5,7 @@ require "rubynew"
5
5
  folder = ARGV[0]
6
6
 
7
7
  def banner
8
- puts "rubynew v#{Rubynew::VERSION} (C) 2015-2016 Brian P Hogan"
8
+ puts "rubynew v#{Rubynew::VERSION} (C) 2015-2025 Brian P Hogan"
9
9
  end
10
10
 
11
11
  banner
@@ -25,7 +25,7 @@ Example:
25
25
  rubynew awesome_project
26
26
  }
27
27
  else
28
- if File.exists?(folder)
28
+ if File.exist?(folder)
29
29
  puts "This folder already exists. Please specify a folder that doesn't exist."
30
30
  else
31
31
  project = Rubynew::Project.new(folder)
@@ -33,6 +33,5 @@ else
33
33
  puts "\nCreated new Ruby project in #{folder}.\n\n"
34
34
  puts "To use this project, type: \n\n\tcd #{folder}\n\nInstall dependencies with\n\n\tbundle install\n\nand run tests with\n\n\trake test\n\n"
35
35
  puts "Run the program with \n\n\truby bin/#{folder}\n\n"
36
-
37
36
  end
38
37
  end
@@ -39,7 +39,7 @@ module Rubynew
39
39
  def render_template_to_file(template, context)
40
40
  t = File.read(template)
41
41
  File.open(template, "w") do |f|
42
- f << ERB.new(t, nil, "-").result(context)
42
+ f << ERB.new(t, trim_mode:"-").result(context)
43
43
  end
44
44
  end
45
45
 
@@ -1,3 +1,3 @@
1
1
  module Rubynew
2
- VERSION = "1.1"
2
+ VERSION = "1.2"
3
3
  end
data/rubynew.gemspec CHANGED
@@ -12,6 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.description = %q{Ruby project generator. Creates bin/, lib/ and test/ folders with a module and a Rakefile so you can quickly develop an app with tests.}
13
13
  spec.homepage = "http://github.com/napcs/rubynew"
14
14
  spec.license = "MIT"
15
+ spec.required_ruby_version = '>= 3.0.0'
15
16
 
16
17
  spec.files = [
17
18
  "bin/rubynew",
@@ -39,7 +40,8 @@ Gem::Specification.new do |spec|
39
40
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
40
41
  spec.require_paths = ["lib"]
41
42
 
42
- spec.add_development_dependency "bundler", "~> 1.6"
43
- spec.add_development_dependency "rake"
44
- spec.add_development_dependency "minitest"
43
+ spec.add_development_dependency "bundler", "~> 2"
44
+ spec.add_development_dependency "rake", "~> 10"
45
+ spec.add_development_dependency "minitest", "~> 5"
46
+ spec.add_development_dependency 'minitest-reporters', "~> 1.7"
45
47
  end
data/template/Gemfile CHANGED
@@ -2,6 +2,8 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'rake'
4
4
 
5
- gem 'minitest', group: :test
6
- gem 'minitest-reporters', group: :test
5
+ group :test do
6
+ gem 'minitest'
7
+ gem 'minitest-reporters'
8
+ end
7
9
 
data/template/Rakefile CHANGED
@@ -1,9 +1,10 @@
1
- require "rake/testtask"
1
+ require "minitest/test_task"
2
2
 
3
- Rake::TestTask.new do |t|
3
+ Minitest::TestTask.create(:test) do |t|
4
4
  t.libs << "test"
5
- t.test_files = FileList["test/*_test.rb"]
6
- t.verbose = true
5
+ t.libs << "lib"
6
+ t.warning = false
7
+ t.test_globs = ["test/**/*_test.rb"]
7
8
  end
8
9
 
9
10
  task :default => :test
data/test/rubynew_test.rb CHANGED
@@ -1,9 +1,9 @@
1
- require 'minitest/autorun'
2
1
  require 'rubynew/project'
3
2
 
3
+ require "test_helper"
4
4
  require 'pathname'
5
5
  # Not really a unit test - more of an integration test.
6
- class RubynewTest < MiniTest::Test
6
+ class RubynewTest < Minitest::Test
7
7
 
8
8
  def setup
9
9
  @folder = "tmpproject"
@@ -33,7 +33,7 @@ class RubynewTest < MiniTest::Test
33
33
  Rubynew::Project.new(@folder).create
34
34
 
35
35
  file = Pathname.new(File.join(@folder, "Rakefile"))
36
- assert file.read.include?("require \"rake/testtask\"")
36
+ assert file.read.include?("require \"minitest/test_task\"")
37
37
  end
38
38
 
39
39
  def test_class_has_constant_name
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubynew
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.1'
4
+ version: '1.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Hogan
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-21 00:00:00.000000000 Z
11
+ date: 2025-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,42 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.6'
19
+ version: '2'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.6'
26
+ version: '2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '10'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '10'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '5'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '5'
55
+ - !ruby/object:Gem::Dependency
56
+ name: minitest-reporters
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
46
60
  - !ruby/object:Gem::Version
47
- version: '0'
61
+ version: '1.7'
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - ">="
66
+ - - "~>"
53
67
  - !ruby/object:Gem::Version
54
- version: '0'
68
+ version: '1.7'
55
69
  description: Ruby project generator. Creates bin/, lib/ and test/ folders with a module
56
70
  and a Rakefile so you can quickly develop an app with tests.
57
71
  email:
@@ -84,7 +98,7 @@ homepage: http://github.com/napcs/rubynew
84
98
  licenses:
85
99
  - MIT
86
100
  metadata: {}
87
- post_install_message:
101
+ post_install_message:
88
102
  rdoc_options: []
89
103
  require_paths:
90
104
  - lib
@@ -92,18 +106,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
92
106
  requirements:
93
107
  - - ">="
94
108
  - !ruby/object:Gem::Version
95
- version: '0'
109
+ version: 3.0.0
96
110
  required_rubygems_version: !ruby/object:Gem::Requirement
97
111
  requirements:
98
112
  - - ">="
99
113
  - !ruby/object:Gem::Version
100
114
  version: '0'
101
115
  requirements: []
102
- rubyforge_project:
103
- rubygems_version: 2.5.1
104
- signing_key:
116
+ rubygems_version: 3.5.22
117
+ signing_key:
105
118
  specification_version: 4
106
119
  summary: Generate new Ruby projects with tests.
107
120
  test_files:
108
121
  - test/rubynew_test.rb
109
- has_rdoc: