ggem 1.8.1 → 1.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 78af14258ae315c8ee616b840770779d1084d591
4
- data.tar.gz: 227aff8e65f1aca57f6a9b18e30fd67da6c967f2
3
+ metadata.gz: 47b788c7af22b10dae04d58149767be30d8ff7fb
4
+ data.tar.gz: 60b3328e31c1ec8f17622281805a6ca824b0c8e8
5
5
  SHA512:
6
- metadata.gz: 9652f4d234a556ce6259f83aad0208b1b6ab175ef07b1a426408873ec01d669c55463daf7e91e8d50d840ad0fcc552eafe5934489a2db1320e3af518975d6ff9
7
- data.tar.gz: adbb62ae9184ec3ddf508b7a80a6633154de627c41ed60b212567ab026d28642ed6a8827a9ecff82995466e6fc32fb6077711b7a0fec070df65ac168d1fd2d24
6
+ metadata.gz: e18f2ed64b8a280b01106864e3f098e0828f95ac39994d204214a6e161009ce35d875205bb551ef46dcfefc15e6cbdce9bf1b1c92c3821540e68d42fa4deb3b6
7
+ data.tar.gz: d55e6b25e1bb96baa96eaa08e6d132661f2469804d973af8b9978cfc6998038d2665df5903935e00d865270da3677c76043e498ed68ab1e1ebf91c3cae6458e4
@@ -225,7 +225,8 @@ class GGem::CLI
225
225
 
226
226
  def run(argv, *args)
227
227
  super
228
- @build_command.run(argv)
228
+ @build_command.run([])
229
+
229
230
  notify("#{@spec.name} #{@spec.version} installed to system gems") do
230
231
  @spec.run_install_cmd
231
232
  end
@@ -254,7 +255,7 @@ class GGem::CLI
254
255
 
255
256
  def run(argv, *args)
256
257
  super
257
- @build_command.run(argv)
258
+ @build_command.run([])
258
259
 
259
260
  @stdout.puts "Pushing #{@spec.gem_file_name} to #{@spec.push_host}..."
260
261
  notify("#{@spec.gem_file_name} received.") do
@@ -359,8 +360,8 @@ class GGem::CLI
359
360
 
360
361
  def run(argv, *args)
361
362
  super
362
- @tag_command.run(argv)
363
- @push_command.run(argv)
363
+ @tag_command.run(self.clirb.opts['force-tag'] ? ['--force-tag'] : [])
364
+ @push_command.run([])
364
365
  end
365
366
 
366
367
  def summary
@@ -1,3 +1,3 @@
1
1
  module GGem
2
- VERSION = "1.8.1"
2
+ VERSION = "1.8.3"
3
3
  end
@@ -252,6 +252,7 @@ class GGem::CLI
252
252
 
253
253
  class IOCommandTests < UnitTests
254
254
  setup do
255
+ @argv = [Factory.string]
255
256
  @stdout, @stderr = IOSpy.new, IOSpy.new
256
257
  end
257
258
  subject{ @cmd }
@@ -524,7 +525,6 @@ class GGem::CLI
524
525
  Assert.stub(BuildCommand, :new){ |*args| @build_spy = CommandSpy.new(*args) }
525
526
 
526
527
  @command_class = InstallCommand
527
- @argv = []
528
528
  @cmd = @command_class.new
529
529
  end
530
530
 
@@ -545,7 +545,7 @@ class GGem::CLI
545
545
  assert_equal exp, subject.help
546
546
  end
547
547
 
548
- should "build a build command using its argv" do
548
+ should "build a build command" do
549
549
  assert @build_spy
550
550
  end
551
551
 
@@ -554,7 +554,7 @@ class GGem::CLI
554
554
  subject.run(@argv, @stdout, @stderr)
555
555
 
556
556
  assert_true @build_spy.run_called
557
- assert_equal @argv, @build_spy.argv
557
+ assert_equal [], @build_spy.argv
558
558
  assert_true @spec_spy.run_install_cmd_called
559
559
 
560
560
  exp = ENV['DEBUG'] == '1' ? "install\ninstall cmd was run\n" : ''
@@ -583,7 +583,6 @@ class GGem::CLI
583
583
  Assert.stub(BuildCommand, :new){ |*args| @build_spy = CommandSpy.new(*args) }
584
584
 
585
585
  @command_class = PushCommand
586
- @argv = []
587
586
  @cmd = @command_class.new
588
587
  end
589
588
 
@@ -604,7 +603,7 @@ class GGem::CLI
604
603
  assert_equal exp, subject.help
605
604
  end
606
605
 
607
- should "build a build command using its argv" do
606
+ should "build a build command" do
608
607
  assert @build_spy
609
608
  end
610
609
 
@@ -613,7 +612,7 @@ class GGem::CLI
613
612
  subject.run(@argv, @stdout, @stderr)
614
613
 
615
614
  assert_true @build_spy.run_called
616
- assert_equal @argv, @build_spy.argv
615
+ assert_equal [], @build_spy.argv
617
616
  assert_true @spec_spy.run_push_cmd_called
618
617
 
619
618
  exp = "Pushing #{@spec_spy.gem_file_name} to #{@spec_spy.push_host}...\n"
@@ -663,8 +662,8 @@ class GGem::CLI
663
662
  end
664
663
 
665
664
  should "be a git repo, gemspec, force tag option command" do
666
- assert_kind_of GitRepoCommand, subject
667
- assert_kind_of GemspecCommand, subject
665
+ assert_kind_of GitRepoCommand, subject
666
+ assert_kind_of GemspecCommand, subject
668
667
  assert_kind_of ForceTagOptionCommand, subject
669
668
  end
670
669
 
@@ -724,7 +723,7 @@ class GGem::CLI
724
723
  err_on = [:run_validate_clean_cmd, :run_validate_committed_cmd].sample
725
724
  Assert.stub(@repo_spy, err_on){ raise GGem::GitRepo::CmdError, err_msg }
726
725
 
727
- subject.run(['-f'], @stdout, @stderr)
726
+ subject.run([['--force-tag', '-f'].sample], @stdout, @stderr)
728
727
  exp = "There are files that need to be committed first.\n" \
729
728
  "Forcing tag anyway...\n"
730
729
  assert_equal exp, @stderr.read
@@ -773,12 +772,11 @@ class GGem::CLI
773
772
  Assert.stub(PushCommand, :new){ |*args| @push_spy = CommandSpy.new(*args) }
774
773
 
775
774
  @command_class = ReleaseCommand
776
- @argv = []
777
775
  @cmd = @command_class.new
778
776
  end
779
777
 
780
778
  should "be a gemspec, force tag option command" do
781
- assert_kind_of GemspecCommand, subject
779
+ assert_kind_of GemspecCommand, subject
782
780
  assert_kind_of ForceTagOptionCommand, subject
783
781
  end
784
782
 
@@ -797,7 +795,7 @@ class GGem::CLI
797
795
  assert_equal exp, subject.help
798
796
  end
799
797
 
800
- should "build a tag and push command using its argv" do
798
+ should "build a tag and push command" do
801
799
  [@tag_spy, @push_spy].each do |spy|
802
800
  assert spy
803
801
  end
@@ -806,10 +804,22 @@ class GGem::CLI
806
804
  should "run the tag and push command when run" do
807
805
  subject.run(@argv, @stdout, @stderr)
808
806
 
809
- [@tag_spy, @push_spy].each do |spy|
810
- assert_true spy.run_called
811
- assert_equal @argv, spy.argv
812
- end
807
+ assert_true @tag_spy.run_called
808
+ assert_equal [], @tag_spy.argv
809
+
810
+ assert_true @push_spy.run_called
811
+ assert_equal [], @push_spy.argv
812
+ end
813
+
814
+ should "pass any force-tag option to the tag cmd but not the release cmd" do
815
+ force_tag_argv = [['--force-tag', '-f'].sample]
816
+ subject.run(force_tag_argv, @stdout, @stderr)
817
+
818
+ assert_true @tag_spy.run_called
819
+ assert_equal ['--force-tag'], @tag_spy.argv
820
+
821
+ assert_true @push_spy.run_called
822
+ assert_equal [], @push_spy.argv
813
823
  end
814
824
 
815
825
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ggem
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1
4
+ version: 1.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kelly Redding