bungee_gum 0.1.0 → 0.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
2
  SHA256:
3
- metadata.gz: dc5e896fdf75166b78155c92c6f269b6838165b54774e38ceacf01bf64d64fde
4
- data.tar.gz: d2f6c2c592193a40f877a0d124a29490ee2ac726336d3d300596fb553d541edd
3
+ metadata.gz: 8ae22162c661f9110076197536f5564484106c8e56e0064ee6b8e44bcb3eb685
4
+ data.tar.gz: 3352664eb21397a0ac84ec2bc3eee87f0168ec89385d6b11e6d25a61378f8df8
5
5
  SHA512:
6
- metadata.gz: d628f43d4ea4ed99f129f81ab4c68fd3d638a5c4c4608d98233ebaafa5ec0796d51d7e20065e543e65c9ddea23f4c5411544edc9b53a743fb859ec5bd72a7142
7
- data.tar.gz: f97c69d2ea9b2c9c55927969d92c536f38f2da856a032001de85b6c28101997ca1119f438db1bc6ae06617ea4cd76e8f05b310fc6bdb2d772aa813622f7d63f6
6
+ metadata.gz: cb71f3ea731a8873fcc029c3f9b0f933fa1e498a160a35ad903d73669a7dfbe29f8708083d8488fbfc7992c52a3d9163228027cb0057a21ca53a3ac8253556e3
7
+ data.tar.gz: 9363193534c251c1d3bf2b454c45c469b5df57190a0b2eef1f718b0c35775720685b19e02c8df7ba0ba347fa1430e8aba5819dc61dadd91c423663fd6198f382
data/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.2] - 2024-04-08
4
+
5
+ ### Fixed
6
+
7
+ - Fixed a bug where bungee_gum would not build as expected when run for the first time.
8
+ - Revised the README.
9
+
10
+ ## [0.1.1] - 2023-12-12
11
+
12
+ ### Fixed
13
+
14
+ - Fixed a bug where the program would terminate abnormally if options were not specified.
15
+ - Fixed a bug where the `log` directory was not created if it did not exist.
16
+ - Renamed `log` directory to `logs` directory.
17
+
3
18
  ## [0.1.0] - 2023-12-06
4
19
 
5
20
  - Initial release
data/CODE_OF_CONDUCT.md CHANGED
@@ -39,7 +39,7 @@ This Code of Conduct applies within all community spaces, and also applies when
39
39
 
40
40
  ## Enforcement
41
41
 
42
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at 2787780+jinroq@users.noreply.github.com. All complaints will be reviewed and investigated promptly and fairly.
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at jinroq@users.noreply.github.com. All complaints will be reviewed and investigated promptly and fairly.
43
43
 
44
44
  All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
45
 
data/README.md CHANGED
@@ -1,22 +1,28 @@
1
- # BungeeGum
1
+ # Bungee Gum
2
2
 
3
- This gem is a build
3
+ ## Description
4
4
 
5
- ## Installation
5
+ Bungee Gum collects Ruby building and testing logs.
6
6
 
7
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
7
+ This gem gets the latest source code from the [ruby/ruby](https://github.com/ruby/ruby) master branch. Then, build source codes in the same way as ["Building Ruby"](https://docs.ruby-lang.org/en/master/contributing/building_ruby_md.html). And also run tests (i.e. `make test-all`). For build dependencies, see [Dependencies](https://docs.ruby-lang.org/en/master/contributing/building_ruby_md.html#label-Dependencies).
8
8
 
9
- Install the gem and add to the application's Gemfile by executing:
9
+ Log files are compressed as `.gz` and saved in `logs` directory. `logs` directory will be created in the same directory as the directory where Bungee Gum is executed.
10
10
 
11
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
11
+ ## Installation
12
12
 
13
13
  If bundler is not being used to manage dependencies, install the gem by executing:
14
14
 
15
- $ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
15
+ $ gem install bungee_gum
16
+
17
+ Install the gem and add to the application's Gemfile by executing:
18
+
19
+ $ bundle add bungee_gum
16
20
 
17
21
  ## Usage
18
22
 
19
- TODO: Write usage instructions here
23
+ If you installed it yourself:
24
+
25
+ $ bgum
20
26
 
21
27
  ## Development
22
28
 
@@ -22,7 +22,7 @@ class BungeeGum::RubyBuild
22
22
  @working_dir = {}
23
23
  @now = Time.now.strftime('%Y%m%d%H%M%S')
24
24
  @opt = OptionParser.new
25
- @opt.version = '0.0.1'
25
+ @opt.version = BungeeGum::VERSION
26
26
  end
27
27
 
28
28
  def run
@@ -33,37 +33,39 @@ class BungeeGum::RubyBuild
33
33
  param[:only] = {}
34
34
  param[:skip] = {}
35
35
 
36
- opt.on('--with-universalparser', 'Add `--with-universalparser` if you also would like to build with Universal Parser mode enabled.') {|v|
36
+ @opt.on('--with-universalparser', 'Add `--with-universalparser` if you also would like to build with Universal Parser mode enabled.') {|v|
37
37
  param[:with][:up] = v
38
38
  params << '--with-universalparser'
39
39
  }
40
- opt.on('--only-universalparser', 'Add `--only-universalparser` if you would like to build with only Universal Parser mode enabled. This option can not be used in conjunction with other options.') {|v|
40
+ @opt.on('--only-universalparser', 'Add `--only-universalparser` if you would like to build with only Universal Parser mode enabled. This option can not be used in conjunction with other options.') {|v|
41
41
  param[:only][:up] = v
42
42
  params << '--only-universalparser'
43
43
  }
44
- opt.on('--with-yjit', 'Add `--with-yjit` if you also would like to build with YJIT mode enabled.') {|v|
44
+ @opt.on('--with-yjit', 'Add `--with-yjit` if you also would like to build with YJIT mode enabled.') {|v|
45
45
  param[:with][:yjit] = v
46
46
  params << '--with-yjit'
47
47
  }
48
- opt.on('--only-yjit', 'Add `--only-yjit` if you would like to build with only YJIT mode enabled. This option can not be used in conjunction with other options.') {|v|
48
+ @opt.on('--only-yjit', 'Add `--only-yjit` if you would like to build with only YJIT mode enabled. This option can not be used in conjunction with other options.') {|v|
49
49
  param[:only][:yjit] = v
50
50
  params << '--only-yjit'
51
51
  }
52
- opt.on('--with-rjit', 'Add `--with-rjit` if you also would like to build with RJIT mode enabled.') {|v|
52
+ @opt.on('--with-rjit', 'Add `--with-rjit` if you also would like to build with RJIT mode enabled.') {|v|
53
53
  param[:with][:rjit] = v
54
54
  params << '--with-rjit'
55
55
  }
56
- opt.on('--only-rjit', 'Add `--only-rjit` if you would like to build with only RJIT mode enabled. This option can not be used in conjunction with other options.') {|v|
56
+ @opt.on('--only-rjit', 'Add `--only-rjit` if you would like to build with only RJIT mode enabled. This option can not be used in conjunction with other options.') {|v|
57
57
  param[:only][:rjit] = v
58
58
  params << '--only-rjit'
59
59
  }
60
- opt.on('--all-build', 'Add `--all-build` if you would like to build with all modes enabled.') {|v|
60
+ @opt.on('--all-build', 'Add `--all-build` if you would like to build with all modes enabled.') {|v|
61
61
  param[:all_build] = v
62
62
  params << '--all-build'
63
63
  }
64
- opt.parse!(ARGV)
64
+ @opt.parse!(ARGV)
65
65
 
66
- if !param[:with].empty? || !param[:all_build] || param[:only].keys.size > 1
66
+ if param[:only].keys.size > 1 ||
67
+ (param[:only].keys.size == 1 && !param[:with].empty?) ||
68
+ (param[:only].keys.size == 1 && !!param[:all_build])
67
69
  puts "`--only-universalparser` can not be used in conjunction with other options." if params.include?('--only-universalparser')
68
70
  puts "`--only-yjit` can not be used in conjunction with other options." if params.include?('--only-yjit')
69
71
  puts "`--only-rjit` can not be used in conjunction with other options." if params.include?('--only-rjit')
@@ -73,6 +75,7 @@ class BungeeGum::RubyBuild
73
75
 
74
76
  clone_or_pull(LOCAL_RUBY_REPOSITORY, true)
75
77
  Dir.mkdir(INSTALL_PREFIX_BASE, 0755) unless Dir.exist?(INSTALL_PREFIX_BASE)
78
+ Dir.mkdir('logs', 0755) unless Dir.exist?('./logs')
76
79
  if param[:only].keys.size == 0
77
80
  clone_or_pull(FOR_BUILD_REPOSITORY)
78
81
  fork {
@@ -118,34 +121,31 @@ class BungeeGum::RubyBuild
118
121
 
119
122
  private
120
123
 
121
- attr_accessor :working_dir
122
- attr_reader :base_ruby_repo, :now, :opt
123
-
124
124
  def clone_or_pull(repo_dir, from_gh = false)
125
125
  key = repo_dir.to_sym
126
- working_dir[key] = "#{Dir.pwd}/#{repo_dir}"
127
- wd = working_dir[key]
126
+ @working_dir[key] = "#{Dir.pwd}/#{repo_dir}"
127
+ wd = @working_dir[key]
128
128
  if Dir.exist?("#{wd}/.git")
129
- g = Git.open(wd, :log => Logger.new(STDOUT))
129
+ g = Git.open(wd, log: Logger.new(STDOUT))
130
130
  g.pull
131
131
  else
132
132
  if from_gh
133
133
  Git.clone(GITHUB_RUBY_REPOSITORY, repo_dir)
134
134
  else
135
- Git.clone(base_ruby_repo, repo_dir)
135
+ Git.clone(@base_ruby_repo, repo_dir)
136
136
  end
137
137
  end
138
138
  end
139
139
 
140
140
  def make_and_test(repo_dir, build_type, configure_option)
141
- wd = working_dir[repo_dir.to_sym]
141
+ wd = @working_dir[repo_dir.to_sym]
142
142
  current_dir = Dir.pwd
143
143
 
144
- build_gz = "#{current_dir}/log/ruby-#{build_type}-build.#{now}.log.gz"
145
- test_gz = "#{current_dir}/log/ruby-#{build_type}-test.#{now}.log.gz"
144
+ build_gz = "#{current_dir}/logs/ruby-#{build_type}-build.#{@now}.log.gz"
145
+ test_gz = "#{current_dir}/logs/ruby-#{build_type}-test.#{@now}.log.gz"
146
146
 
147
147
  Dir.chdir(wd) do
148
- unless Dir.exist?("#{current_dir}/configure")
148
+ unless File.exist?('configure')
149
149
  system('./autogen.sh > /dev/null 2>&1')
150
150
  system("./configure #{configure_option} > /dev/null 2>&1")
151
151
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BungeeGum
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bungee_gum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - jinroq
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-06 00:00:00.000000000 Z
11
+ date: 2024-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: git
@@ -24,9 +24,11 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.18'
27
- description: TBE
27
+ description: This gem gets the latest source code from the ruby/ruby master branch
28
+ at GitHub. Then, build source codes in the same way as "Building Ruby" at Ruby Reference
29
+ Manual. And also run tests (i.e. execute to `make test-all`).
28
30
  email:
29
- - 2787780+jinroq@users.noreply.github.com
31
+ - jinroq@users.noreply.github.com
30
32
  executables:
31
33
  - bgum
32
34
  extensions: []
@@ -42,13 +44,14 @@ files:
42
44
  - lib/bungee_gum/ruby_build.rb
43
45
  - lib/bungee_gum/version.rb
44
46
  - sig/bungee_gum.rbs
45
- homepage: https://github.com/jinroq/bungee_gum
47
+ homepage: https://rubygems.org/gems/bungee_gum
46
48
  licenses:
47
49
  - MIT
48
50
  metadata:
49
- homepage_uri: https://github.com/jinroq/bungee_gum
51
+ homepage_uri: https://rubygems.org/gems/bungee_gum
50
52
  source_code_uri: https://github.com/jinroq/bungee_gum
51
53
  changelog_uri: https://github.com/jinroq/bungee_gum/blob/main/CHANGELOG.md
54
+ bug_tracker_uri: https://github.com/jinroq/bungee_gum/issues
52
55
  post_install_message:
53
56
  rdoc_options: []
54
57
  require_paths:
@@ -64,8 +67,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
67
  - !ruby/object:Gem::Version
65
68
  version: '0'
66
69
  requirements: []
67
- rubygems_version: 3.4.10
70
+ rubygems_version: 3.5.7
68
71
  signing_key:
69
72
  specification_version: 4
70
- summary: This gem is a build tool.
73
+ summary: This gem collects Ruby building and testing logs.
71
74
  test_files: []