ggem 1.8.1 → 1.9.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,13 +2,11 @@ require "assert"
2
2
  require "ggem/gem"
3
3
 
4
4
  class GGem::Gem
5
-
6
5
  class UnitTests < Assert::Context
7
6
  desc "GGem::Gem"
8
7
  setup do
9
8
  @gem_class = GGem::Gem
10
9
  end
11
-
12
10
  end
13
11
 
14
12
  class InitTests < UnitTests
@@ -29,12 +27,10 @@ class GGem::Gem
29
27
 
30
28
  should "complain if no name is provided" do
31
29
  assert_raises(NoNameError) do
32
- @gem_class.new(TMP_PATH, [nil, ''].sample)
30
+ @gem_class.new(TMP_PATH, [nil, ""].sample)
33
31
  end
34
32
  end
35
33
 
36
34
  # most of the gem's behavior is covered in the system tests
37
-
38
35
  end
39
-
40
36
  end
@@ -1,11 +1,10 @@
1
1
  require "assert"
2
2
  require "ggem/gemspec"
3
3
 
4
- require 'ggem/version'
5
- require 'test/support/cmd_tests_helpers'
4
+ require "ggem/version"
5
+ require "test/support/cmd_tests_helpers"
6
6
 
7
7
  class GGem::Gemspec
8
-
9
8
  class UnitTests < Assert::Context
10
9
  desc "GGem::Gemspec"
11
10
  setup do
@@ -14,15 +13,15 @@ class GGem::Gemspec
14
13
  subject{ @gemspec_class }
15
14
 
16
15
  should "know the push host meta key" do
17
- assert_equal 'allowed_push_host', subject::PUSH_HOST_META_KEY
16
+ assert_equal "allowed_push_host", subject::PUSH_HOST_META_KEY
18
17
  end
19
18
 
20
19
  should "use Rubygems as its default push host" do
21
- assert_equal 'https://rubygems.org', subject::DEFAULT_PUSH_HOST
20
+ assert_equal "https://rubygems.org", subject::DEFAULT_PUSH_HOST
22
21
  end
23
22
 
24
23
  should "know which dir to build gems to" do
25
- assert_equal 'pkg', subject::BUILD_TO_DIRNAME
24
+ assert_equal "pkg", subject::BUILD_TO_DIRNAME
26
25
  end
27
26
 
28
27
  should "know its exceptions" do
@@ -30,13 +29,12 @@ class GGem::Gemspec
30
29
  assert subject::LoadError < ArgumentError
31
30
  assert subject::CmdError < RuntimeError
32
31
  end
33
-
34
32
  end
35
33
 
36
34
  class InitTests < UnitTests
37
35
  desc "when init"
38
36
  setup do
39
- @gem1_root_path = TEST_SUPPORT_PATH.join('gem1')
37
+ @gem1_root_path = TEST_SUPPORT_PATH.join("gem1")
40
38
  @spec = @gemspec_class.new(@gem1_root_path)
41
39
  end
42
40
  subject{ @spec }
@@ -46,12 +44,12 @@ class GGem::Gemspec
46
44
  should have_imeths :run_build_cmd, :run_install_cmd, :run_push_cmd
47
45
 
48
46
  should "know its attrs" do
49
- exp = @gem1_root_path.join('gem1.gemspec')
47
+ exp = @gem1_root_path.join("gem1.gemspec")
50
48
  assert_equal exp, subject.path
51
49
 
52
- assert_equal 'gem1', subject.name
53
- assert_equal '0.1.0', subject.version.to_s
54
- assert_equal 'v0.1.0', subject.version_tag
50
+ assert_equal "gem1", subject.name
51
+ assert_equal "0.1.0", subject.version.to_s
52
+ assert_equal "v0.1.0", subject.version_tag
55
53
 
56
54
  exp = "#{subject.name}-#{subject.version}.gem"
57
55
  assert_equal exp, subject.gem_file_name
@@ -65,20 +63,20 @@ class GGem::Gemspec
65
63
  assert_equal @gemspec_class::DEFAULT_PUSH_HOST, subject.push_host
66
64
 
67
65
  # gem2 has a meta host specified, so that is used over the default
68
- gem2_spec = @gemspec_class.new(TEST_SUPPORT_PATH.join('gem2'))
69
- assert_equal 'http://gems.example.com', gem2_spec.push_host
66
+ gem2_spec = @gemspec_class.new(TEST_SUPPORT_PATH.join("gem2"))
67
+ assert_equal "http://gems.example.com", gem2_spec.push_host
70
68
 
71
69
  # prefer the env push hosts over configured and default hosts
72
- prev_env_push_host = ENV['GGEM_PUSH_HOST']
73
- ENV['GGEM_PUSH_HOST'] = Factory.string
74
- spec = @gemspec_class.new(TEST_SUPPORT_PATH.join(['gem1', 'gem2'].sample))
75
- assert_equal ENV['GGEM_PUSH_HOST'], spec.push_host
76
- ENV['GGEM_PUSH_HOST'] = prev_env_push_host
70
+ prev_env_push_host = ENV["GGEM_PUSH_HOST"]
71
+ ENV["GGEM_PUSH_HOST"] = Factory.string
72
+ spec = @gemspec_class.new(TEST_SUPPORT_PATH.join(["gem1", "gem2"].sample))
73
+ assert_equal ENV["GGEM_PUSH_HOST"], spec.push_host
74
+ ENV["GGEM_PUSH_HOST"] = prev_env_push_host
77
75
  end
78
76
 
79
77
  should "complain if the given gemspec root doesn't exist" do
80
78
  assert_raises(NotFoundError) do
81
- @gemspec_class.new('path/that-is/not-found')
79
+ @gemspec_class.new("path/that-is/not-found")
82
80
  end
83
81
  end
84
82
 
@@ -87,16 +85,15 @@ class GGem::Gemspec
87
85
  @gemspec_class.new(TEST_SUPPORT_PATH)
88
86
  end
89
87
  end
90
-
91
88
  end
92
89
 
93
90
  class CmdTests < InitTests
94
91
  include GGem::CmdTestsHelpers
92
+
95
93
  setup do
96
94
  @exp_build_path = @gem1_root_path.join(subject.gem_file_name)
97
95
  @exp_pkg_path = @gem1_root_path.join(@gemspec_class::BUILD_TO_DIRNAME, subject.gem_file_name)
98
96
  end
99
-
100
97
  end
101
98
 
102
99
  class RunBuildCmdTests < CmdTests
@@ -116,7 +113,6 @@ class GGem::Gemspec
116
113
  should "complain if any system cmds are not successful" do
117
114
  assert_exp_cmds_error(CmdError){ subject.run_build_cmd }
118
115
  end
119
-
120
116
  end
121
117
 
122
118
  class RunInstallCmdTests < CmdTests
@@ -132,7 +128,6 @@ class GGem::Gemspec
132
128
  should "complain if the system cmd is not successful" do
133
129
  assert_exp_cmds_error(CmdError){ subject.run_install_cmd }
134
130
  end
135
-
136
131
  end
137
132
 
138
133
  class RunPushCmdTests < CmdTests
@@ -148,7 +143,5 @@ class GGem::Gemspec
148
143
  should "complain if the system cmd is not successful" do
149
144
  assert_exp_cmds_error(CmdError){ subject.run_push_cmd }
150
145
  end
151
-
152
146
  end
153
-
154
147
  end
@@ -1,10 +1,9 @@
1
1
  require "assert"
2
2
  require "ggem/git_repo"
3
3
 
4
- require 'test/support/cmd_tests_helpers'
4
+ require "test/support/cmd_tests_helpers"
5
5
 
6
6
  class GGem::GitRepo
7
-
8
7
  class UnitTests < Assert::Context
9
8
  desc "GGem::GitRepo"
10
9
  setup do
@@ -16,13 +15,12 @@ class GGem::GitRepo
16
15
  assert subject::NotFoundError < ArgumentError
17
16
  assert subject::CmdError < RuntimeError
18
17
  end
19
-
20
18
  end
21
19
 
22
20
  class InitTests < UnitTests
23
21
  desc "when init"
24
22
  setup do
25
- @repo_path = TEST_SUPPORT_PATH.join('gem1')
23
+ @repo_path = TEST_SUPPORT_PATH.join("gem1")
26
24
  @repo = @git_repo_class.new(@repo_path)
27
25
  end
28
26
  subject{ @repo }
@@ -36,12 +34,10 @@ class GGem::GitRepo
36
34
  should "know its path" do
37
35
  assert_equal @repo_path, subject.path
38
36
  end
39
-
40
37
  end
41
38
 
42
39
  class CmdTests < InitTests
43
40
  include GGem::CmdTestsHelpers
44
-
45
41
  end
46
42
 
47
43
  class RunInitCmdTests < CmdTests
@@ -49,7 +45,7 @@ class GGem::GitRepo
49
45
  setup do
50
46
  @exp_cmds_run = [
51
47
  "cd #{@repo_path} && git init",
52
- "cd #{@repo_path} && git add --all && git add -f *.gitkeep"
48
+ "cd #{@repo_path} && git add --all && git add -f *.keep"
53
49
  ]
54
50
  end
55
51
 
@@ -60,7 +56,6 @@ class GGem::GitRepo
60
56
  should "complain if any system cmds are not successful" do
61
57
  assert_exp_cmds_error(CmdError){ subject.run_init_cmd }
62
58
  end
63
-
64
59
  end
65
60
 
66
61
  class RunValidateCleanCmdTests < CmdTests
@@ -78,7 +73,6 @@ class GGem::GitRepo
78
73
  should "complain if any system cmds are not successful" do
79
74
  assert_exp_cmds_error(CmdError){ subject.run_validate_clean_cmd }
80
75
  end
81
-
82
76
  end
83
77
 
84
78
  class RunValidateCommittedCmdTests < CmdTests
@@ -96,7 +90,6 @@ class GGem::GitRepo
96
90
  should "complain if any system cmds are not successful" do
97
91
  assert_exp_cmds_error(CmdError){ subject.run_validate_committed_cmd }
98
92
  end
99
-
100
93
  end
101
94
 
102
95
  class RunPushCmdTests < CmdTests
@@ -115,7 +108,6 @@ class GGem::GitRepo
115
108
  should "complain if any system cmds are not successful" do
116
109
  assert_exp_cmds_error(CmdError){ subject.run_push_cmd }
117
110
  end
118
-
119
111
  end
120
112
 
121
113
  class RunAddVersionTagCmdTests < CmdTests
@@ -136,7 +128,6 @@ class GGem::GitRepo
136
128
  should "complain if any system cmds are not successful" do
137
129
  assert_exp_cmds_error(CmdError){ subject.run_add_version_tag_cmd(@version, @tag) }
138
130
  end
139
-
140
131
  end
141
132
 
142
133
  class RunRmTagCmdTests < CmdTests
@@ -156,7 +147,5 @@ class GGem::GitRepo
156
147
  should "complain if any system cmds are not successful" do
157
148
  assert_exp_cmds_error(CmdError){ subject.run_rm_tag_cmd(@tag) }
158
149
  end
159
-
160
150
  end
161
-
162
151
  end
metadata CHANGED
@@ -1,59 +1,67 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ggem
3
- version: !ruby/object:Gem::Version
4
- version: 1.8.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.9.2
5
5
  platform: ruby
6
- authors:
6
+ authors:
7
7
  - Kelly Redding
8
8
  - Collin Redding
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2016-06-01 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- prerelease: false
17
- requirement: &id001 !ruby/object:Gem::Requirement
18
- requirements:
19
- - - ~>
20
- - !ruby/object:Gem::Version
21
- version: 2.16.1
22
- type: :development
12
+ date: 2020-08-25 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
23
15
  name: assert
24
- version_requirements: *id001
25
- - !ruby/object:Gem::Dependency
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: 2.18.2
21
+ type: :development
26
22
  prerelease: false
27
- requirement: &id002 !ruby/object:Gem::Requirement
28
- requirements:
29
- - - ~>
30
- - !ruby/object:Gem::Version
31
- version: 0.1.0
32
- type: :runtime
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: 2.18.2
28
+ - !ruby/object:Gem::Dependency
33
29
  name: much-plugin
34
- version_requirements: *id002
35
- - !ruby/object:Gem::Dependency
36
- prerelease: false
37
- requirement: &id003 !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ~>
40
- - !ruby/object:Gem::Version
41
- version: 3.0.1
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: 0.2.2
42
35
  type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: 0.2.2
42
+ - !ruby/object:Gem::Dependency
43
43
  name: scmd
44
- version_requirements: *id003
45
- description: "\"Juh Gem\", baby! (a gem utility CLI)"
46
- email:
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: 3.0.3
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: 3.0.3
56
+ description: '"Juh Gem", baby! (a gem utility CLI)'
57
+ email:
47
58
  - kelly@kellyredding.com
48
59
  - collin.redding@me.com
49
- executables:
60
+ executables:
50
61
  - ggem
51
62
  extensions: []
52
-
53
63
  extra_rdoc_files: []
54
-
55
- files:
56
- - .gitignore
64
+ files:
57
65
  - Gemfile
58
66
  - LICENSE
59
67
  - README.md
@@ -74,9 +82,11 @@ files:
74
82
  - lib/ggem/template_file/gitignore.erb
75
83
  - lib/ggem/template_file/lib.rb.erb
76
84
  - lib/ggem/template_file/lib_version.rb.erb
85
+ - lib/ggem/template_file/ruby-version.erb
77
86
  - lib/ggem/template_file/test_helper.rb.erb
78
87
  - lib/ggem/template_file/test_support_factory.rb.erb
79
88
  - lib/ggem/version.rb
89
+ - log/.keep
80
90
  - test/helper.rb
81
91
  - test/support/cmd_tests_helpers.rb
82
92
  - test/support/factory.rb
@@ -89,32 +99,29 @@ files:
89
99
  - test/unit/gemspec_tests.rb
90
100
  - test/unit/git_repo_tests.rb
91
101
  homepage: http://github.com/redding/ggem
92
- licenses:
102
+ licenses:
93
103
  - MIT
94
104
  metadata: {}
95
-
96
105
  post_install_message:
97
106
  rdoc_options: []
98
-
99
- require_paths:
107
+ require_paths:
100
108
  - lib
101
- required_ruby_version: !ruby/object:Gem::Requirement
102
- requirements:
103
- - &id004
104
- - ">="
105
- - !ruby/object:Gem::Version
106
- version: "0"
107
- required_rubygems_version: !ruby/object:Gem::Requirement
108
- requirements:
109
- - *id004
109
+ required_ruby_version: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - "~>"
112
+ - !ruby/object:Gem::Version
113
+ version: '2.5'
114
+ required_rubygems_version: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
110
119
  requirements: []
111
-
112
- rubyforge_project:
113
- rubygems_version: 2.6.4
120
+ rubygems_version: 3.1.2
114
121
  signing_key:
115
122
  specification_version: 4
116
- summary: "\"Juh Gem\", baby! (a gem utility CLI)"
117
- test_files:
123
+ summary: '"Juh Gem", baby! (a gem utility CLI)'
124
+ test_files:
118
125
  - test/helper.rb
119
126
  - test/support/cmd_tests_helpers.rb
120
127
  - test/support/factory.rb
data/.gitignore DELETED
@@ -1,19 +0,0 @@
1
- *.gem
2
- *.log
3
- *.rbc
4
- .rbx/
5
- .bundle
6
- .config
7
- .yardoc
8
- Gemfile.lock
9
- InstalledFiles
10
- _yardoc
11
- coverage
12
- doc/
13
- lib/bundler/man
14
- pkg
15
- rdoc
16
- spec/reports
17
- test/tmp
18
- test/version_tmp
19
- tmp