Sha256: ddba40755d813a571a51b8c99daa7e85c3b1e0ba87ee97c7e7f94275f8ce0423

Contents?: true

Size: 455 Bytes

Versions: 4

Compression:

Stored size: 455 Bytes

Contents

# coding: utf-8

module Synvert
  # Manage synvert snippets.
  class Snippet
    # synchronize snippets from github.
    def self.sync
      snippets_path = Core::Configuration.instance.get :default_snippets_path
      if File.exist?(snippets_path)
        FileUtils.cd snippets_path
        `git pull --rebase --quiet`
      else
        `git clone https://github.com/xinminlabs/synvert-snippets.git #{snippets_path} --quiet`
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
synvert-0.4.0 lib/synvert/snippet.rb
synvert-0.2.0 lib/synvert/snippet.rb
synvert-0.1.1 lib/synvert/snippet.rb
synvert-0.1.0 lib/synvert/snippet.rb