Sha256: ff71307d2e02333948ffe938c2df68484ade636dd0641031617c14a84d07be84

Contents?: true

Size: 988 Bytes

Versions: 37

Compression:

Stored size: 988 Bytes

Contents

require 'bundler'
require 'open3'
require 'uri'
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:spec)

RSpec::Core::RakeTask.new(:doc) do |t|
  t.rspec_opts = "--format doc"
end

task :default => :spec

BUILD_DIR = 'pkg'

def bundler
  @bundler ||= Bundler::GemHelper.new
end

def execute(cmd)
  Open3.popen2e(ENV, cmd) do |stdin, stdout_err, wait_thru|
    puts $_ while stdout_err.gets
    wait_thru.value.exitstatus
  end
end

def name
  bundler.gemspec.name
end

def version
  bundler.gemspec.version
end

def allowed_push_host
  bundler.gemspec.metadata['allowed_push_host'] || String.new
end

def gem_server
  URI.parse(allowed_push_host).host
end

def resultant_gem
  "#{BUILD_DIR}/#{name}-#{version}.gem"
end

desc "Lint gem"
task :lint do
  exit(execute('bundle exec rubocop lib'))
end

desc "Build gem"
task :build do
  bundler.build_gem
end

desc "Clean all builds"
task :clean do
  FileUtils.rm_rf BUILD_DIR if File.exist? BUILD_DIR
end

Version data entries

37 entries across 37 versions & 2 rubygems

Version Path
terradactyl-1.8.2 Rakefile
terradactyl-terraform-1.8.2 Rakefile
terradactyl-1.8.1 Rakefile
terradactyl-terraform-1.8.1 Rakefile
terradactyl-1.8.0 Rakefile
terradactyl-terraform-1.8.0 Rakefile
terradactyl-1.7.0 Rakefile
terradactyl-terraform-1.7.0 Rakefile
terradactyl-1.6.0 Rakefile
terradactyl-terraform-1.6.0 Rakefile
terradactyl-1.5.0 Rakefile
terradactyl-terraform-1.5.0 Rakefile
terradactyl-1.4.2 Rakefile
terradactyl-terraform-1.4.1 Rakefile
terradactyl-1.4.1 Rakefile
terradactyl-terraform-1.4.0 Rakefile
terradactyl-1.4.0 Rakefile
terradactyl-1.3.0 Rakefile
terradactyl-terraform-1.3.0 Rakefile
terradactyl-1.2.1 Rakefile