Sha256: 2bb239ba5fc7593642088a8bfd7f4e99e5118b0e6665ec029a3e6a6005cce55a

Contents?: true

Size: 490 Bytes

Versions: 12

Compression:

Stored size: 490 Bytes

Contents

module DNGG
  module Token
    def check_token
      ggsm_path = '.git/dngg'
      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

12 entries across 12 versions & 1 rubygems

Version Path
dngg-1.0.1 lib/dngg/mr/token.rb
dngg-1.0.0 lib/dngg/mr/token.rb
dngg-0.1.0 lib/dngg/mr/token.rb
dngg-0.0.9 lib/dngg/mr/token.rb
dngg-0.0.8 lib/dngg/mr/token.rb
dngg-0.0.7 lib/dngg/mr/token.rb
dngg-0.0.6 lib/dngg/mr/token.rb
dngg-0.0.5 lib/dngg/mr/token.rb
dngg-0.0.4 lib/dngg/mr/token.rb
dngg-0.0.3 lib/dngg/mr/token.rb
dngg-0.0.2 lib/dngg/mr/token.rb
dngg-0.0.1 lib/dngg/mr/token.rb