gitlab-development-kit 0.2.11 → 0.2.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db463a96b5d0f8bca71fcb5ba61e019985403cfde2677fff138b507c355d2da7
4
- data.tar.gz: ae4f0852a1e2d19c5999c75815742901dfaf1f397f50e8c58a24974c91cf03a3
3
+ metadata.gz: fce4dd74b2f32c9cbf4519336c9b731158cb34c5570d83805fbeff74aab2c209
4
+ data.tar.gz: 3b86852c3e15145a1c5c4617a05827cb4b9b7159be8c684107e0e85f57a389a2
5
5
  SHA512:
6
- metadata.gz: 1372bb27ee7a8461a4c9dfcb0b7083eee84d420fedf94ebe4815290e7ee42b8b3aad9f3fb985b0140fabfe7eabf5f192d6d7f4b12426f999b500161734ef747e
7
- data.tar.gz: 291032043e2f088398bbb06b7f44faf88154ef8e9f863877113d6004d9786108c4b8f04b90b26019bd4e153d542651ab80ac35e8579635a62f5de00952b4cd58
6
+ metadata.gz: 245d0650689fca386f65d623fce71c5a6884b65faddd731daedb622b39fa3e7c2677218be24709bebe7d9e091dc89263fe5f8b0b4fd82e46a1beb8e125bea12a
7
+ data.tar.gz: 14c63e2ab27736a16e7356f4b39b65f125949447f38cab27f90b99249a340f2ad876293b536d3d12544c6e56a380ebd15668bf8e727ccaea51fdd4a20fc2bfce
data/bin/gdk CHANGED
@@ -13,12 +13,10 @@ require 'gitlab_development_kit'
13
13
  # installed outside the gitlab-development-kit repository with 'gem
14
14
  # install'. Edit lib/gdk.rb to define new commands.
15
15
  module GDK
16
- DOTFILE = File.expand_path('~/.gdk.yml')
17
- TRUSTED_KEY = 'trusted_directories'
18
16
  ROOT_CHECK_FILE = '.gdk-install-root'
19
17
  DEFAULT_INIT_DIRECTORY = File.join(Dir.pwd, 'gitlab-development-kit')
20
18
 
21
- def self.launcher_main # rubocop:disable Metrics/CyclomaticComplexity
19
+ def self.launcher_main
22
20
  case ARGV.first
23
21
  when 'init'
24
22
  if ARGV.count > 2 || (ARGV.count == 2 && (ARGV[1] == '-help' || ARGV[1] == '--help'))
@@ -36,14 +34,7 @@ module GDK
36
34
  end
37
35
 
38
36
  cmd = %W[git clone https://gitlab.com/gitlab-org/gitlab-development-kit.git #{directory}]
39
- system(*cmd) && trust!(directory) && remember!(directory)
40
- when 'trust'
41
- if ARGV.count != 2
42
- puts 'Usage: gdk trust DIR'
43
- return false
44
- end
45
-
46
- trust!(ARGV[1])
37
+ system(*cmd) && remember!(directory)
47
38
  else
48
39
  if print_version?
49
40
  puts VERSION
@@ -57,12 +48,6 @@ module GDK
57
48
  return false
58
49
  end
59
50
 
60
- unless trusted?
61
- warn_not_trusted_dir
62
-
63
- return false
64
- end
65
-
66
51
  load(File.join(gdk_root, 'lib/gdk.rb'))
67
52
  GDK.main
68
53
  end
@@ -80,17 +65,6 @@ module GDK
80
65
  NOT_A_GDK_DIR
81
66
  end
82
67
 
83
- def self.warn_not_trusted_dir
84
- warn <<~NOT_A_TRUSTED_GDK_DIR
85
-
86
- This GitLab Development Kit root directory is not known to the "gdk"
87
- command. To mark it as trusted run:
88
-
89
- gdk trust #{gdk_root}
90
-
91
- NOT_A_TRUSTED_GDK_DIR
92
- end
93
-
94
68
  def self.gdk_root
95
69
  @gdk_root ||= find_root(Dir.pwd)
96
70
  end
@@ -113,28 +87,6 @@ module GDK
113
87
  end
114
88
  end
115
89
 
116
- def self.trusted?
117
- trusted_directories = load_dotfile[TRUSTED_KEY] || []
118
- !!trusted_directories.include?(File.realpath(gdk_root))
119
- end
120
-
121
- def self.trust!(directory)
122
- directory = File.realpath(directory)
123
- config = load_dotfile
124
- config[TRUSTED_KEY] ||= []
125
-
126
- if config[TRUSTED_KEY].include?(directory)
127
- puts "#{directory} is already in #{TRUSTED_KEY} in #{DOTFILE}"
128
- else
129
- config[TRUSTED_KEY] << directory
130
- config[TRUSTED_KEY].uniq!
131
- puts "Adding #{directory} to #{TRUSTED_KEY} in #{DOTFILE}"
132
- File.open(DOTFILE, 'w') { |f| YAML.dump(config, f) }
133
- end
134
-
135
- true
136
- end
137
-
138
90
  def self.load_dotfile
139
91
  File.open(DOTFILE, File::RDONLY | File::CREAT) do |f|
140
92
  YAML.safe_load(f)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GDK
4
- GEM_VERSION = '0.2.11'
4
+ GEM_VERSION = '0.2.12'
5
5
  VERSION = "GitLab Development Kit #{GEM_VERSION}"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-development-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ version: 0.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Vosmaer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-04-20 00:00:00.000000000 Z
12
+ date: 2021-04-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake