From f9c3bfcfc098797a5b79b3861034a71e057c71e6 Mon Sep 17 00:00:00 2001 From: Ufuk Kayserilioglu Date: Tue, 14 Sep 2021 01:14:41 +0300 Subject: [PATCH] Replace all `sync` in headers with `gem` --- lib/tapioca/generator.rb | 6 +++--- spec/tapioca/cli/gem_spec.rb | 12 ++++++------ spec/tapioca/cli/generate_spec.rb | 6 +++--- spec/tapioca/cli/require_spec.rb | 4 ++-- spec/tapioca/cli/sync_spec.rb | 6 +++--- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/tapioca/generator.rb b/lib/tapioca/generator.rb index 63909d37f..f675bb457 100644 --- a/lib/tapioca/generator.rb +++ b/lib/tapioca/generator.rb @@ -73,7 +73,7 @@ def build_requires say("Done", :green) say("All requires from this application have been written to #{name}.", [:green, :bold]) - cmd = set_color("#{Config::DEFAULT_COMMAND} sync", :yellow, :bold) + cmd = set_color("#{Config::DEFAULT_COMMAND} gem", :yellow, :bold) say("Please review changes and commit them, then run `#{cmd}`.", [:green, :bold]) end @@ -537,7 +537,7 @@ def compile_gem_rbi(gem) rbi_body_content = compiler.compile(gem) content = String.new content << rbi_header( - "#{Config::DEFAULT_COMMAND} sync", + "#{Config::DEFAULT_COMMAND} gem #{gem.name}", reason: "types exported from the `#{gem.name}` gem", strictness: strictness ) @@ -670,7 +670,7 @@ def perform_sync_verification diff[filename] = gem_rbi_exists?(gem_name) ? :changed : :added end - report_diff_and_exit_if_out_of_date(diff, "sync") + report_diff_and_exit_if_out_of_date(diff, "gem") end sig { params(diff: T::Hash[String, Symbol], command: String).void } diff --git a/spec/tapioca/cli/gem_spec.rb b/spec/tapioca/cli/gem_spec.rb index 8cf374a36..55186bfe6 100644 --- a/spec/tapioca/cli/gem_spec.rb +++ b/spec/tapioca/cli/gem_spec.rb @@ -10,7 +10,7 @@ class GemSpec < CliSpec FOO_RBI = <<~CONTENTS # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `foo` gem. - # Please instead update this file by running `bin/tapioca sync`. + # Please instead update this file by running `bin/tapioca gem foo`. # typed: true @@ -26,7 +26,7 @@ def bar(a = T.unsafe(nil), b: T.unsafe(nil), **opts); end BAR_RBI = <<~CONTENTS # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `bar` gem. - # Please instead update this file by running `bin/tapioca sync`. + # Please instead update this file by running `bin/tapioca gem bar`. # typed: true @@ -42,7 +42,7 @@ def bar(a = T.unsafe(nil), b: T.unsafe(nil), **opts); end BAZ_RBI = <<~CONTENTS # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `baz` gem. - # Please instead update this file by running `bin/tapioca sync`. + # Please instead update this file by running `bin/tapioca gem baz`. # typed: true @@ -315,7 +315,7 @@ class Foo::Secret; end assert_equal(<<~CONTENTS.chomp, File.read("#{outdir}/qux@0.5.0.rbi")) # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `qux` gem. - # Please instead update this file by running `bin/tapioca sync`. + # Please instead update this file by running `bin/tapioca gem qux`. # typed: true @@ -463,7 +463,7 @@ class Foo::Secret; end Checking for out-of-date RBIs... RBI files are out-of-date. In your development environment, please run: - `bin/tapioca sync` + `bin/tapioca gem` Once it is complete, be sure to commit and push any changes Reason: @@ -493,7 +493,7 @@ class Foo::Secret; end Checking for out-of-date RBIs... RBI files are out-of-date. In your development environment, please run: - `bin/tapioca sync` + `bin/tapioca gem` Once it is complete, be sure to commit and push any changes Reason: diff --git a/spec/tapioca/cli/generate_spec.rb b/spec/tapioca/cli/generate_spec.rb index 6eec17611..8d56e7e2a 100644 --- a/spec/tapioca/cli/generate_spec.rb +++ b/spec/tapioca/cli/generate_spec.rb @@ -10,7 +10,7 @@ class GenerateSpec < CliSpec FOO_RBI = <<~CONTENTS # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `foo` gem. - # Please instead update this file by running `bin/tapioca sync`. + # Please instead update this file by running `bin/tapioca gem foo`. # typed: true @@ -26,7 +26,7 @@ def bar(a = T.unsafe(nil), b: T.unsafe(nil), **opts); end BAR_RBI = <<~CONTENTS # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `bar` gem. - # Please instead update this file by running `bin/tapioca sync`. + # Please instead update this file by running `bin/tapioca gem bar`. # typed: true @@ -42,7 +42,7 @@ def bar(a = T.unsafe(nil), b: T.unsafe(nil), **opts); end BAZ_RBI = <<~CONTENTS # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `baz` gem. - # Please instead update this file by running `bin/tapioca sync`. + # Please instead update this file by running `bin/tapioca gem baz`. # typed: true diff --git a/spec/tapioca/cli/require_spec.rb b/spec/tapioca/cli/require_spec.rb index 50a9bd39c..cc3d52149 100644 --- a/spec/tapioca/cli/require_spec.rb +++ b/spec/tapioca/cli/require_spec.rb @@ -39,7 +39,7 @@ class RequireSpec < CliSpec assert_equal(<<~OUTPUT, output) Compiling sorbet/tapioca/require.rb, this may take a few seconds... Done All requires from this application have been written to sorbet/tapioca/require.rb. - Please review changes and commit them, then run `bin/tapioca sync`. + Please review changes and commit them, then run `bin/tapioca gem`. OUTPUT assert_path_exists(repo_path / "sorbet/tapioca/require.rb") @@ -69,7 +69,7 @@ class RequireSpec < CliSpec assert_equal(<<~OUTPUT, output) Compiling sorbet/tapioca/require.rb, this may take a few seconds... Done All requires from this application have been written to sorbet/tapioca/require.rb. - Please review changes and commit them, then run `bin/tapioca sync`. + Please review changes and commit them, then run `bin/tapioca gem`. OUTPUT assert_path_exists(repo_path / "sorbet/tapioca/require.rb") diff --git a/spec/tapioca/cli/sync_spec.rb b/spec/tapioca/cli/sync_spec.rb index ad4b05ced..d7f886e63 100644 --- a/spec/tapioca/cli/sync_spec.rb +++ b/spec/tapioca/cli/sync_spec.rb @@ -84,7 +84,7 @@ class SyncSpec < CliSpec assert_equal(<<~CONTENTS.chomp, File.read("#{outdir}/qux@0.5.0.rbi")) # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `qux` gem. - # Please instead update this file by running `bin/tapioca sync`. + # Please instead update this file by running `bin/tapioca gem qux`. # typed: true @@ -231,7 +231,7 @@ class SyncSpec < CliSpec Checking for out-of-date RBIs... RBI files are out-of-date. In your development environment, please run: - `bin/tapioca sync` + `bin/tapioca gem` Once it is complete, be sure to commit and push any changes Reason: @@ -261,7 +261,7 @@ class SyncSpec < CliSpec Checking for out-of-date RBIs... RBI files are out-of-date. In your development environment, please run: - `bin/tapioca sync` + `bin/tapioca gem` Once it is complete, be sure to commit and push any changes Reason: