gitlab-development-kit 0.2.15 → 0.2.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/gdk +3 -63
  3. data/lib/gitlab_development_kit.rb +2 -2
  4. metadata +37 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 623c7a6318eea8a02347b741e6163d7c1d579780bfffa3bcfd3b8b9e329ec78f
4
- data.tar.gz: 0f1598e2527fd128dd59d602fbc52b6f83574573fd350435c04e525cc5a559e2
3
+ metadata.gz: d687b6a957cc588178dc0683c87f5200598236aa39c6506bfd6a8a2a4fb55fbb
4
+ data.tar.gz: 8d4648ce1683cecc5ac6e0c9afb0d0b6cfd1939821254fc5094f536279f4d461
5
5
  SHA512:
6
- metadata.gz: a97000f4d2cb543f54fd125ee08bc99eb066f9372a511eda5751a535da1534ed20b6bc0d71b69a8bdd2ec84f341e59bed3ae4f2faa2607d59e86339608ebd0a4
7
- data.tar.gz: 2d6120cec65575a344ae632dcef3e7f1b819246b94561dc5199d4a37178014a418190028da61f1601edf9370a42b5e76f2a0b69d0284062de8dcf746007c90fd
6
+ metadata.gz: '097c5c0d35ba04f065acc980a4ad46b8d1c2620003670aad3c7262b98f09052578319a4c5dc84c2d615d100492b32eccbcf24f89f9179110367cb14e40a1e3c5'
7
+ data.tar.gz: adbfda9a13caa581d9d31b976b6e72822981ce13535ee020ebdcdb27752d1efc54488ea93201f9ced237544b2ac85ca2e8956689dea4a06a7441d1e1ce4e5f16
data/bin/gdk CHANGED
@@ -14,8 +14,6 @@ require 'gitlab_development_kit'
14
14
  # installed outside the gitlab-development-kit repository with 'gem
15
15
  # install'. Edit lib/gdk.rb to define new commands.
16
16
  module GDK
17
- # TODO: Touching .gdk-install-root will be redundant shortly.
18
- ROOT_CHECK_FILE = '.gdk-install-root'
19
17
  DEFAULT_INIT_DIRECTORY = File.join(Dir.pwd, 'gitlab-development-kit')
20
18
 
21
19
  module CommandBasic
@@ -26,7 +24,6 @@ module GDK
26
24
 
27
25
  def run
28
26
  return GDK::CommandBasic::Version.new.run if gdk_version?
29
- return GDK::CommandBasic::Init.new(args[1..]).run if gdk_init?
30
27
 
31
28
  if gdk_root
32
29
  require(gdk_root.join('lib/gdk.rb'))
@@ -45,16 +42,15 @@ module GDK
45
42
  warn <<~NOT_A_GDK_DIR
46
43
 
47
44
  The current working directory is not inside a gitlab-development-kit
48
- installation. Use 'cd' to go to your gitlab-development-kit or create
49
- a new one with 'gdk init'.
45
+ installation. Use 'cd' to go to your gitlab-development-kit.
50
46
 
51
- gdk init [DIRECTORY] # Default: #{DEFAULT_INIT_DIRECTORY}
47
+ # Default: #{DEFAULT_INIT_DIRECTORY}
52
48
 
53
49
  NOT_A_GDK_DIR
54
50
  end
55
51
 
56
52
  def gdk_root
57
- @gdk_root ||= find_root(Pathname.new(ENV['PWD']))
53
+ @gdk_root ||= find_root(Pathname.new(ENV.fetch('PWD', nil)))
58
54
  end
59
55
 
60
56
  def gdk_version?
@@ -62,10 +58,6 @@ module GDK
62
58
  %w[version --version].include?(args.first) && !gdk_root
63
59
  end
64
60
 
65
- def gdk_init?
66
- args.first == 'init'
67
- end
68
-
69
61
  def find_root(current)
70
62
  if current.join('GDK_ROOT').exist?
71
63
  current.realpath
@@ -83,58 +75,6 @@ module GDK
83
75
  true
84
76
  end
85
77
  end
86
-
87
- class Init
88
- def initialize(args)
89
- @args = args
90
- end
91
-
92
- def run
93
- warn("INFO: 'gdk init' is deprecated and will be removed in a future update.")
94
-
95
- if show_help?
96
- puts('Usage: gdk init [DIR]')
97
-
98
- return true
99
- end
100
-
101
- directory = new_gdk_directory
102
- if new_gdk_directory_invalid?(directory)
103
- warn("ERROR: The proposed new GDK directory '#{directory}' is invalid because it begins with a dash.")
104
-
105
- return false
106
- end
107
-
108
- if clone_gdk(directory)
109
- puts("INFO: Successfully git cloned the GDK into '#{directory}'.")
110
- true
111
- else
112
- warn("ERROR: An error occurred while attempting to git clone the GDK into '#{directory}'.")
113
- false
114
- end
115
- end
116
-
117
- private
118
-
119
- attr_reader :args
120
-
121
- def show_help?
122
- args.count > 1 || (args & %w[-help --help]).any?
123
- end
124
-
125
- def new_gdk_directory_invalid?(directory)
126
- directory.start_with?('-')
127
- end
128
-
129
- def new_gdk_directory
130
- args.count == 1 ? args.first : GDK::DEFAULT_INIT_DIRECTORY
131
- end
132
-
133
- def clone_gdk(directory)
134
- cmd = "git clone https://gitlab.com/gitlab-org/gitlab-development-kit.git #{directory}"
135
- system(*cmd)
136
- end
137
- end
138
78
  end
139
79
  end
140
80
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GDK
4
- GEM_VERSION = '0.2.15'
5
- VERSION = "GitLab Development Kit #{GEM_VERSION}"
4
+ GEM_VERSION = '0.2.17'
5
+ VERSION = "GitLab Development Kit #{GEM_VERSION}".freeze
6
6
  end
metadata CHANGED
@@ -1,16 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-development-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.15
4
+ version: 0.2.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Vosmaer
8
8
  - GitLab
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-12-15 00:00:00.000000000 Z
12
+ date: 2024-03-04 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: gitlab-sdk
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: 0.2.2
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: 0.2.2
14
28
  - !ruby/object:Gem::Dependency
15
29
  name: rake
16
30
  requirement: !ruby/object:Gem::Requirement
@@ -25,6 +39,20 @@ dependencies:
25
39
  - - "~>"
26
40
  - !ruby/object:Gem::Version
27
41
  version: '13.0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: sentry-ruby
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '5.11'
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '5.11'
28
56
  description: CLI for GitLab Development Kit.
29
57
  email:
30
58
  - gitlab_rubygems@gitlab.com
@@ -38,8 +66,9 @@ files:
38
66
  homepage: https://gitlab.com/gitlab-org/gitlab-development-kit
39
67
  licenses:
40
68
  - MIT
41
- metadata: {}
42
- post_install_message:
69
+ metadata:
70
+ rubygems_mfa_required: 'true'
71
+ post_install_message:
43
72
  rdoc_options: []
44
73
  require_paths:
45
74
  - lib
@@ -47,15 +76,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
47
76
  requirements:
48
77
  - - ">="
49
78
  - !ruby/object:Gem::Version
50
- version: 2.7.2
79
+ version: 3.0.5
51
80
  required_rubygems_version: !ruby/object:Gem::Requirement
52
81
  requirements:
53
82
  - - ">="
54
83
  - !ruby/object:Gem::Version
55
84
  version: '0'
56
85
  requirements: []
57
- rubygems_version: 3.3.26
58
- signing_key:
86
+ rubygems_version: 3.5.6
87
+ signing_key:
59
88
  specification_version: 4
60
89
  summary: CLI for GitLab Development Kit
61
90
  test_files: []