Sha256: ca250054aa409a06c1021010abd80a00867d2532d7fcadd89930101b897d09c5

Contents?: true

Size: 490 Bytes

Versions: 11

Compression:

Stored size: 490 Bytes

Contents

module GGSM
  module Token
    def check_token
      ggsm_path = '.git/ggsm'
      unless File.exist?(ggsm_path)
        Dir.mkdir(ggsm_path)
      end

      config_path = "#{ggsm_path}/TOKEN"

      if !File.exist?(config_path) || '' == IO.read(config_path).strip || IO.readlines(config_path)[0].strip == ''
        file = File.new(config_path, 'w')
        file << "\n# 请输入GitLab private-token"
        file.close
        return false
      end

      return true
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ggsm-1.9.6 lib/ggsm/mr/token.rb
ggsm-1.9.5 lib/ggsm/mr/token.rb
ggsm-1.9.4 lib/ggsm/mr/token.rb
ggsm-1.9.3 lib/ggsm/mr/token.rb
ggsm-1.9.2 lib/ggsm/mr/token.rb
ggsm-1.9.1 lib/ggsm/mr/token.rb
ggsm-1.9.0 lib/ggsm/mr/token.rb
ggsm-1.8.6 lib/ggsm/mr/token.rb
ggsm-1.8.2 lib/ggsm/mr/token.rb
ggsm-1.8.1 lib/ggsm/mr/token.rb
ggsm-1.8.0 lib/ggsm/mr/token.rb