From 69d987697e9c0b2add49e4c452a3f0afb7e37ab7 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Tue, 16 Feb 2021 21:04:06 -0800 Subject: [PATCH 01/22] Upgrade mruby-file-stat --- build_config.rb.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_config.rb.lock b/build_config.rb.lock index 4706475..393e5c2 100644 --- a/build_config.rb.lock +++ b/build_config.rb.lock @@ -27,7 +27,7 @@ builds: https://github.com/ksss/mruby-file-stat.git: url: https://github.com/ksss/mruby-file-stat.git branch: master - commit: 66cf135ff9642d96a6127a79b307f6314e606deb + commit: b81bc71a6f2ddd424fd5e544d2cccd289d4d7545 version: 0.0.0 https://github.com/k0kubun/mruby-hashie.git: url: https://github.com/k0kubun/mruby-hashie.git From bb2e449941180b7097febd45f2491ae6a10e747c Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Tue, 16 Feb 2021 21:31:09 -0800 Subject: [PATCH 02/22] Allow defining top-level modules without :: --- mrblib/mitamae/recipe.rb | 20 ++++++++++++-------- spec/integration/namespace_spec.rb | 20 ++++++++++++++++++++ spec/recipes/namespace.rb | 6 ++++++ spec/recipes/toplevel_module.rb | 6 ++++++ spec/recipes/variables.rb | 15 +++++++++++++++ 5 files changed, 59 insertions(+), 8 deletions(-) create mode 100644 spec/integration/namespace_spec.rb create mode 100644 spec/recipes/namespace.rb create mode 100644 spec/recipes/toplevel_module.rb create mode 100644 spec/recipes/variables.rb diff --git a/mrblib/mitamae/recipe.rb b/mrblib/mitamae/recipe.rb index 0c10e68..c15ea9e 100644 --- a/mrblib/mitamae/recipe.rb +++ b/mrblib/mitamae/recipe.rb @@ -37,20 +37,24 @@ def root def eval_file(path, variables) src = File.read(path) context = RecipeContext.new(self, variables) - InstanceEval.new(src, path, 1, receiver: context).call + InstanceEval.new(src, path, 1, context: context).call end - # For #instance_eval with TOPLEVEL_BINDING class InstanceEval - def initialize(*args, receiver:) - @args = args - @receiver = receiver + def initialize(src, path, lineno, context:) + # Using instance_eval + eval to allow top-level class/module definition without `::`. + # To pass args without introducing any local/instance variables, this code is also eval-ed. + @code = <<-RUBY + @context.instance_eval do + eval(#{src.dump}, nil, #{path.dump}, #{lineno}) + end + RUBY + @context = context end + # This method has no local variables to avoid spilling them to recipes. def call - # When we call #instance_eval, we should not have local variables. - # Otherwise a recipe may see the local variables by default. - @receiver.instance_eval(*@args) + eval(@code) end end end diff --git a/spec/integration/namespace_spec.rb b/spec/integration/namespace_spec.rb new file mode 100644 index 0000000..1f507c6 --- /dev/null +++ b/spec/integration/namespace_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +describe 'namespace' do + before(:all) do + apply_recipe('namespace') + end + + describe file('/tmp/toplevel_module') do + it { should exist } + it { should be_file } + its(:content) { should eq 'helper' } + end + + describe file('/tmp/instance_variables') do + it { should exist } + it { should be_file } + # @recipe is for backward compatibility. @variables should not be defined. + its(:content) { should eq '[:@recipe, :@variables]' } + end +end diff --git a/spec/recipes/namespace.rb b/spec/recipes/namespace.rb new file mode 100644 index 0000000..2f79a65 --- /dev/null +++ b/spec/recipes/namespace.rb @@ -0,0 +1,6 @@ +include_recipe 'toplevel_module' +file '/tmp/toplevel_module' do + content ToplevelModule.helper +end + +include_recipe 'variables' diff --git a/spec/recipes/toplevel_module.rb b/spec/recipes/toplevel_module.rb new file mode 100644 index 0000000..465d191 --- /dev/null +++ b/spec/recipes/toplevel_module.rb @@ -0,0 +1,6 @@ +# Testing you don't need to write `module ::ToplevelModule` +module ToplevelModule + def self.helper + 'helper' + end +end diff --git a/spec/recipes/variables.rb b/spec/recipes/variables.rb new file mode 100644 index 0000000..df51b71 --- /dev/null +++ b/spec/recipes/variables.rb @@ -0,0 +1,15 @@ +node.reverse_merge!( + variables: { + # #binding is not supported in mruby + # lvars: binding.local_variables, + ivars: instance_variables, + } +) + +# file '/tmp/local_variables' do +# content node[:variables][:lvars].to_s +# end + +file '/tmp/instance_variables' do + content node[:variables][:ivars].to_s +end From db1c29ada42d7f676d923a77e17f4d79c2bfc163 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Tue, 16 Feb 2021 21:33:14 -0800 Subject: [PATCH 03/22] Version 1.12.1 --- CHANGELOG.md | 4 ++++ mrblib/mitamae/version.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2228c6b..fa47e13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v1.12.1 + +- Allow defining top-level modules without `::` in recipes + ## v1.12.0 - Upgrade mruby from v2.0.1 to v2.1.2 diff --git a/mrblib/mitamae/version.rb b/mrblib/mitamae/version.rb index 9aadb6d..2736aac 100644 --- a/mrblib/mitamae/version.rb +++ b/mrblib/mitamae/version.rb @@ -1,3 +1,3 @@ module MItamae - VERSION = '1.12.0' + VERSION = '1.12.1' end From 34dfda27b5e965dd50b7c1b0b16dd0c6d6688415 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sat, 27 Feb 2021 00:55:24 -0800 Subject: [PATCH 04/22] Update mruby-tempfile for mruby 3 --- build_config.rb.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_config.rb.lock b/build_config.rb.lock index 393e5c2..23a194a 100644 --- a/build_config.rb.lock +++ b/build_config.rb.lock @@ -62,7 +62,7 @@ builds: https://github.com/k0kubun/mruby-tempfile.git: url: https://github.com/k0kubun/mruby-tempfile.git branch: master - commit: 26273b9f884bb4c9e58ba83010ccd5b4258fb82e + commit: 77736581bf971717aa2259144cf17bbb88b8d6b6 version: 0.0.0 https://github.com/mrbgems/mruby-yaml.git: url: https://github.com/mrbgems/mruby-yaml.git From 450f6a447708e87e94059f9743a73734efac668d Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 3 Mar 2021 23:37:27 -0800 Subject: [PATCH 05/22] Add FUNDING.yml --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..36c8bcb --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: k0kubun From c039ec0741da49e9e1b875e6cb2bf82ff540744e Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 3 Mar 2021 23:39:39 -0800 Subject: [PATCH 06/22] Update mruby-open3 --- build_config.rb.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_config.rb.lock b/build_config.rb.lock index 23a194a..9a149d1 100644 --- a/build_config.rb.lock +++ b/build_config.rb.lock @@ -42,7 +42,7 @@ builds: https://github.com/k0kubun/mruby-open3.git: url: https://github.com/k0kubun/mruby-open3.git branch: master - commit: b2dba93fdbd60dcff8aa20b6c56014ac89d267ad + commit: d6ab1bcd13446661c2e134ad8343caba9d15e59a version: 0.0.0 https://github.com/fastly/mruby-optparse.git: url: https://github.com/fastly/mruby-optparse.git From eeab9211c9f7227c1b627ea1dbc0d77efd470d9f Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Fri, 5 Mar 2021 12:17:00 -0800 Subject: [PATCH 07/22] mruby 3.0.0 --- Rakefile | 36 +++++++++++++++++++++++++++++++++++- spec/recipes/variables.rb | 2 +- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 7aee1ba..400c424 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,7 @@ require 'fileutils' require 'shellwords' -MRUBY_VERSION = '2.1.2' +MRUBY_VERSION = '3.0.0' file :mruby do if RUBY_PLATFORM.match(/solaris/) @@ -10,6 +10,40 @@ file :mruby do sh "curl -L --fail --retry 3 --retry-delay 1 https://github.com/mruby/mruby/archive/#{MRUBY_VERSION}.tar.gz -s -o - | tar zxf -" FileUtils.mv("mruby-#{MRUBY_VERSION}", 'mruby') end + + # Patch: https://github.com/mruby/mruby/pull/5318 + if MRUBY_VERSION = '3.0.0' + Dir.chdir('mruby') do + IO.popen(['patch', '-p1'], 'w') do |io| + io.write(<<-'EOS') +diff --git a/lib/mruby/build.rb b/lib/mruby/build.rb +index d6eabd79..a7973280 100644 +--- a/lib/mruby/build.rb ++++ b/lib/mruby/build.rb +@@ -320,12 +320,16 @@ EOS + return @mrbcfile if @mrbcfile + gem_name = "mruby-bin-mrbc" +- gem = @gems[gem_name] +- gem ||= (host = MRuby.targets["host"]) && host.gems[gem_name] +- unless gem +- fail "external mrbc or mruby-bin-mrbc gem in current('#{@name}') or 'host' build is required" ++ if (gem = @gems[gem_name]) ++ @mrbcfile = exefile("#{gem.build.build_dir}/bin/mrbc") ++ elsif !host? && (host = MRuby.targets["host"]) ++ if (gem = host.gems[gem_name]) ++ @mrbcfile = exefile("#{gem.build.build_dir}/bin/mrbc") ++ elsif host.mrbcfile_external? ++ @mrbcfile = host.mrbcfile ++ end + end +- @mrbcfile = exefile("#{gem.build.build_dir}/bin/mrbc") ++ @mrbcfile || fail("external mrbc or mruby-bin-mrbc gem in current('#{@name}') or 'host' build is required") + end + def mrbcfile=(path) + EOS + end + end + end end DOCKCROSS_TARGETS = %w[ diff --git a/spec/recipes/variables.rb b/spec/recipes/variables.rb index df51b71..f8d257f 100644 --- a/spec/recipes/variables.rb +++ b/spec/recipes/variables.rb @@ -2,7 +2,7 @@ variables: { # #binding is not supported in mruby # lvars: binding.local_variables, - ivars: instance_variables, + ivars: instance_variables.sort, } ) From 42e0e79af4fdd5ef6e7cc92867c9a54cf58e2dae Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Fri, 5 Mar 2021 12:27:25 -0800 Subject: [PATCH 08/22] Fix the patch --- Rakefile | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/Rakefile b/Rakefile index 400c424..33e9c79 100644 --- a/Rakefile +++ b/Rakefile @@ -12,16 +12,14 @@ file :mruby do end # Patch: https://github.com/mruby/mruby/pull/5318 - if MRUBY_VERSION = '3.0.0' - Dir.chdir('mruby') do - IO.popen(['patch', '-p1'], 'w') do |io| - io.write(<<-'EOS') -diff --git a/lib/mruby/build.rb b/lib/mruby/build.rb -index d6eabd79..a7973280 100644 ---- a/lib/mruby/build.rb -+++ b/lib/mruby/build.rb -@@ -320,12 +320,16 @@ EOS + if MRUBY_VERSION == '3.0.0' + IO.popen(['patch', '-p0'], 'w') do |io| + io.write(<<-'EOS') +--- mruby/lib/mruby/build.rb 2021-03-05 00:07:35.000000000 -0800 ++++ mruby/lib/mruby/build.rb 2021-03-05 12:25:15.159190950 -0800 +@@ -320,12 +320,16 @@ return @mrbcfile if @mrbcfile + gem_name = "mruby-bin-mrbc" - gem = @gems[gem_name] - gem ||= (host = MRuby.targets["host"]) && host.gems[gem_name] @@ -39,9 +37,9 @@ index d6eabd79..a7973280 100644 - @mrbcfile = exefile("#{gem.build.build_dir}/bin/mrbc") + @mrbcfile || fail("external mrbc or mruby-bin-mrbc gem in current('#{@name}') or 'host' build is required") end + def mrbcfile=(path) - EOS - end + EOS end end end From 09cdaed2dee84372fb85053838e1e92647655846 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Fri, 5 Mar 2021 12:37:04 -0800 Subject: [PATCH 09/22] Version 1.12.2 --- CHANGELOG.md | 3 +++ mrblib/mitamae/version.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa47e13..4696c6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v1.12.2 +- Upgrade mruby from v2.1.2 to v3.0.0 + ## v1.12.1 - Allow defining top-level modules without `::` in recipes diff --git a/mrblib/mitamae/version.rb b/mrblib/mitamae/version.rb index 2736aac..00632a9 100644 --- a/mrblib/mitamae/version.rb +++ b/mrblib/mitamae/version.rb @@ -1,3 +1,3 @@ module MItamae - VERSION = '1.12.1' + VERSION = '1.12.2' end From 13e811084a2c52098fcdf3596bd2e79d73372b60 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Fri, 12 Mar 2021 09:37:18 -0800 Subject: [PATCH 10/22] Remove the missing CONTRIBUTING.md link --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8feebf5..3ebf334 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,12 @@ See [CHANGELOG.md](./CHANGELOG.md). ## Contributing -Please refer to [CONTRIBUTING.md](./CONTRIBUTING.md). +When you develop your local changes, you can write an integration test under [`spec/`](./spec) and run it like: + +``` +bundle install +bundle exec rake test:integration +``` ## License From c16d3447da0ce2915d474a8accaf40045ec396c3 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Fri, 12 Mar 2021 09:39:32 -0800 Subject: [PATCH 11/22] Note about Docker --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3ebf334..cc38b69 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,8 @@ bundle install bundle exec rake test:integration ``` +This requires Docker on your local environment. + ## License [MIT License](./LICENSE) From d70d14555ec4485af0d70a02c577d741a89124ff Mon Sep 17 00:00:00 2001 From: Taisuke Miyazaki Date: Sat, 13 Mar 2021 18:41:30 +0900 Subject: [PATCH 12/22] add color option (#112) Close #111 --- mrblib/mitamae/cli.rb | 1 + mrblib/mitamae/cli/local.rb | 5 ++++- mrblib/mitamae/logger.rb | 6 ++++-- spec/integration/color_spec.rb | 7 +++++++ spec/recipes/color.rb | 1 + 5 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 spec/integration/color_spec.rb create mode 100644 spec/recipes/color.rb diff --git a/mrblib/mitamae/cli.rb b/mrblib/mitamae/cli.rb index c8fb15c..d2a1305 100644 --- a/mrblib/mitamae/cli.rb +++ b/mrblib/mitamae/cli.rb @@ -56,6 +56,7 @@ def print_help [--shell=SHELL] # Default: /bin/sh -l, [--log-level=LOG_LEVEL] # Default: info [--plugins=PATH] # Default: ./plugins + [--color, --no-color] # Default: true Run mitamae locally HELP diff --git a/mrblib/mitamae/cli/local.rb b/mrblib/mitamae/cli/local.rb index 6c0727e..964cbd8 100644 --- a/mrblib/mitamae/cli/local.rb +++ b/mrblib/mitamae/cli/local.rb @@ -8,6 +8,7 @@ class Local shell: '/bin/sh', log_level: 'info', plugins: './plugins', + color: true, } def initialize(args) @@ -21,7 +22,7 @@ def run exit 1 end - MItamae.logger = Logger.new(@options[:log_level]) + MItamae.logger = Logger.new(@options[:log_level], @options[:color]) MItamae.logger.info 'Starting mitamae...' Plugin.plugins_path = File.expand_path(@options[:plugins]) @@ -49,6 +50,8 @@ def parse_options(args) opt.on('--shell=VAL') { |v| @options[:shell] = v } opt.on('--log-level=VAL') { |v| @options[:log_level] = v } opt.on('--plugins=VAL') { |v| @options[:plugins] = v } + opt.on('--color') { |v| @options[:color] = true } + opt.on('--no-color') { |v| @options[:color] = false } opt.parse!(args.dup) end end diff --git a/mrblib/mitamae/logger.rb b/mrblib/mitamae/logger.rb index a35a8eb..7663579 100644 --- a/mrblib/mitamae/logger.rb +++ b/mrblib/mitamae/logger.rb @@ -19,9 +19,9 @@ class Logger clear: nil, } - attr_reader :level + attr_reader :level, :enable_color - def initialize(severity) + def initialize(severity, enable_color) case severity.to_s.downcase when 'debug' @level = DEBUG @@ -40,6 +40,7 @@ def initialize(severity) end @indent_level = 0 @color = :clear + @enable_color = enable_color end def debug? @@ -127,6 +128,7 @@ def add(severity, message) end def colorize(severity, str) + return str unless @enable_color color = case severity when :error diff --git a/spec/integration/color_spec.rb b/spec/integration/color_spec.rb new file mode 100644 index 0000000..76350b1 --- /dev/null +++ b/spec/integration/color_spec.rb @@ -0,0 +1,7 @@ +require 'spec_helper' + +describe 'no-color' do + it 'is appliable' do + expect { apply_recipe('color', options: %w[--no-color], redirect: { out: "/tmp/color-result-file" }) }.to_not raise_error + end +end diff --git a/spec/recipes/color.rb b/spec/recipes/color.rb new file mode 100644 index 0000000..e076346 --- /dev/null +++ b/spec/recipes/color.rb @@ -0,0 +1 @@ +execute("echo -n Hello") From e4da4bdd4f965d829fa15af1c57268c6b9e3c8db Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sat, 13 Mar 2021 01:47:16 -0800 Subject: [PATCH 13/22] Tweak the interface a little * Avoid exposing unused attr_reader * Prefer `colored` internally to be a bit more consistent with Itamae::Logger::Formatter. --- mrblib/mitamae/cli/local.rb | 2 +- mrblib/mitamae/logger.rb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mrblib/mitamae/cli/local.rb b/mrblib/mitamae/cli/local.rb index 964cbd8..f604efe 100644 --- a/mrblib/mitamae/cli/local.rb +++ b/mrblib/mitamae/cli/local.rb @@ -22,7 +22,7 @@ def run exit 1 end - MItamae.logger = Logger.new(@options[:log_level], @options[:color]) + MItamae.logger = Logger.new(@options[:log_level], colored: @options[:color]) MItamae.logger.info 'Starting mitamae...' Plugin.plugins_path = File.expand_path(@options[:plugins]) diff --git a/mrblib/mitamae/logger.rb b/mrblib/mitamae/logger.rb index 7663579..b68b2a5 100644 --- a/mrblib/mitamae/logger.rb +++ b/mrblib/mitamae/logger.rb @@ -19,9 +19,9 @@ class Logger clear: nil, } - attr_reader :level, :enable_color + attr_reader :level - def initialize(severity, enable_color) + def initialize(severity, colored: true) case severity.to_s.downcase when 'debug' @level = DEBUG @@ -40,7 +40,7 @@ def initialize(severity, enable_color) end @indent_level = 0 @color = :clear - @enable_color = enable_color + @colored = colored end def debug? @@ -128,7 +128,7 @@ def add(severity, message) end def colorize(severity, str) - return str unless @enable_color + return str unless @colored color = case severity when :error From f6c3ded6066adf3c8147e5f5c7c90748b09c69bd Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sat, 13 Mar 2021 01:49:41 -0800 Subject: [PATCH 14/22] Version 1.12.3 --- CHANGELOG.md | 5 +++++ mrblib/mitamae/version.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4696c6c..5afaebc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ +## v1.12.3 + +- Add `--no-color` option to disable colors + ## v1.12.2 + - Upgrade mruby from v2.1.2 to v3.0.0 ## v1.12.1 diff --git a/mrblib/mitamae/version.rb b/mrblib/mitamae/version.rb index 00632a9..260bff8 100644 --- a/mrblib/mitamae/version.rb +++ b/mrblib/mitamae/version.rb @@ -1,3 +1,3 @@ module MItamae - VERSION = '1.12.2' + VERSION = '1.12.3' end From 21137a20666462a2557fdf0087109d6835f9026b Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sat, 24 Apr 2021 23:13:30 -0700 Subject: [PATCH 15/22] Specinfra v2.82.25 --- build_config.rb.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_config.rb.lock b/build_config.rb.lock index 9a149d1..e86982b 100644 --- a/build_config.rb.lock +++ b/build_config.rb.lock @@ -57,7 +57,7 @@ builds: https://github.com/k0kubun/mruby-specinfra.git: url: https://github.com/k0kubun/mruby-specinfra.git branch: master - commit: f29062376e4cdca4c21401e1ed8a8551206be9e6 + commit: 6581261797b38bc7698f27c22733f74fcc102b30 version: 0.0.0 https://github.com/k0kubun/mruby-tempfile.git: url: https://github.com/k0kubun/mruby-tempfile.git From c7e2398764979ed45e94629475251156c07de800 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sat, 24 Apr 2021 23:14:40 -0700 Subject: [PATCH 16/22] Version 1.12.4 --- CHANGELOG.md | 5 +++++ mrblib/mitamae/version.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5afaebc..5c7b509 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## v1.12.4 + +- Upgrade specinfra [from v2.82.23 to v2.82.25](https://github.com/mizzy/specinfra/compare/v2.82.23...v2.82.25) + - Fix `undefined method 'basename' (NoMethodError)` in `package` resources + ## v1.12.3 - Add `--no-color` option to disable colors diff --git a/mrblib/mitamae/version.rb b/mrblib/mitamae/version.rb index 260bff8..c00ee3f 100644 --- a/mrblib/mitamae/version.rb +++ b/mrblib/mitamae/version.rb @@ -1,3 +1,3 @@ module MItamae - VERSION = '1.12.3' + VERSION = '1.12.4' end From c89cebf520832389064a897c73c1185e45ba6bcd Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 10 May 2021 19:52:28 -0700 Subject: [PATCH 17/22] Update mruby-yaml No impact. Just testing. --- build_config.rb.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_config.rb.lock b/build_config.rb.lock index e86982b..1333cc5 100644 --- a/build_config.rb.lock +++ b/build_config.rb.lock @@ -67,7 +67,7 @@ builds: https://github.com/mrbgems/mruby-yaml.git: url: https://github.com/mrbgems/mruby-yaml.git branch: master - commit: 0606652a6e99d902cd3101cf2d757a7c0c37a7fd + commit: 9f4408d4d46ffc8668ea07cc9c6249f33114d3a9 version: 0.1.0 https://github.com/k0kubun/mruby-erb.git: url: https://github.com/k0kubun/mruby-erb.git From 7b14eebd48e854555d9418636bfa9e3bc2afc2d5 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Thu, 3 Jun 2021 11:02:11 -0700 Subject: [PATCH 18/22] Version 1.12.5 --- CHANGELOG.md | 5 +++++ mrblib/mitamae/version.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c7b509..0936c94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## v1.12.5 + +- Upgrade mruby-yaml + - No impact for behaviors. You can build this mitamae without curl to fetch libyaml. + ## v1.12.4 - Upgrade specinfra [from v2.82.23 to v2.82.25](https://github.com/mizzy/specinfra/compare/v2.82.23...v2.82.25) diff --git a/mrblib/mitamae/version.rb b/mrblib/mitamae/version.rb index c00ee3f..8c6c263 100644 --- a/mrblib/mitamae/version.rb +++ b/mrblib/mitamae/version.rb @@ -1,3 +1,3 @@ module MItamae - VERSION = '1.12.4' + VERSION = '1.12.5' end From 56616db4070360b01c31d58b492dee14cab658a2 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Thu, 3 Jun 2021 11:41:09 -0700 Subject: [PATCH 19/22] Use gpatch for solaris --- Rakefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 33e9c79..f8be028 100644 --- a/Rakefile +++ b/Rakefile @@ -6,14 +6,16 @@ MRUBY_VERSION = '3.0.0' file :mruby do if RUBY_PLATFORM.match(/solaris/) sh "git clone --branch=#{MRUBY_VERSION} https://github.com/mruby/mruby" + patch = 'gpatch' else sh "curl -L --fail --retry 3 --retry-delay 1 https://github.com/mruby/mruby/archive/#{MRUBY_VERSION}.tar.gz -s -o - | tar zxf -" FileUtils.mv("mruby-#{MRUBY_VERSION}", 'mruby') + patch = 'patch' end # Patch: https://github.com/mruby/mruby/pull/5318 if MRUBY_VERSION == '3.0.0' - IO.popen(['patch', '-p0'], 'w') do |io| + IO.popen([patch, '-p0'], 'w') do |io| io.write(<<-'EOS') --- mruby/lib/mruby/build.rb 2021-03-05 00:07:35.000000000 -0800 +++ mruby/lib/mruby/build.rb 2021-03-05 12:25:15.159190950 -0800 From a318e20ebd3f0be560d2ac0e4f506e1676a03fc4 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Thu, 3 Jun 2021 11:41:32 -0700 Subject: [PATCH 20/22] Version 1.12.6 --- CHANGELOG.md | 4 ++++ mrblib/mitamae/version.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0936c94..cd53496 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v1.12.6 + +- Fix a build issue for Solaris + ## v1.12.5 - Upgrade mruby-yaml diff --git a/mrblib/mitamae/version.rb b/mrblib/mitamae/version.rb index 8c6c263..483db8c 100644 --- a/mrblib/mitamae/version.rb +++ b/mrblib/mitamae/version.rb @@ -1,3 +1,3 @@ module MItamae - VERSION = '1.12.5' + VERSION = '1.12.6' end From a198740ef0d29174caacdb94be19ea63e89a992c Mon Sep 17 00:00:00 2001 From: Sorah Fukumori Date: Wed, 16 Jun 2021 07:33:26 +0900 Subject: [PATCH 21/22] bundle mruby-enum-ext (#114) --- mrbgem.rake | 1 + 1 file changed, 1 insertion(+) diff --git a/mrbgem.rake b/mrbgem.rake index 905c03a..264262a 100644 --- a/mrbgem.rake +++ b/mrbgem.rake @@ -7,6 +7,7 @@ MRuby::Gem::Specification.new('mitamae') do |spec| spec.summary = 'mitamae' spec.bins = ['mitamae'] + spec.add_dependency 'mruby-enum-ext', core: 'mruby-enum-ext' spec.add_dependency 'mruby-enumerator', core: 'mruby-enumerator' spec.add_dependency 'mruby-eval', core: 'mruby-eval' spec.add_dependency 'mruby-exit', core: 'mruby-exit' From 282ab8f22e5dbfa115c79441821713b7dc8d623d Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Tue, 15 Jun 2021 15:34:29 -0700 Subject: [PATCH 22/22] Version 1.12.7 --- CHANGELOG.md | 4 ++++ mrblib/mitamae/version.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd53496..495fe68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v1.12.7 + +- Add mruby-enum-ext + ## v1.12.6 - Fix a build issue for Solaris diff --git a/mrblib/mitamae/version.rb b/mrblib/mitamae/version.rb index 483db8c..b6b6ebe 100644 --- a/mrblib/mitamae/version.rb +++ b/mrblib/mitamae/version.rb @@ -1,3 +1,3 @@ module MItamae - VERSION = '1.12.6' + VERSION = '1.12.7' end