Sha256: 0bc8ed5edd91ca3a59046880605cdbf91a7bed96916722441a3ee24565fbaf74

Contents?: true

Size: 1.56 KB

Versions: 4

Compression:

Stored size: 1.56 KB

Contents

#!/usr/bin/env rake
# encoding: utf-8

require 'rubygems'
require 'bundler/setup'

require 'rake'
require 'vcr'
require 'rspec'
require 'rspec/core/rake_task'
require 'rubygems/package_task'

$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)

require 'locomotive/wagon'
require 'locomotive/wagon/version'

gemspec = eval(File.read('locomotivecms_wagon.gemspec'))
Gem::PackageTask.new(gemspec) do |pkg|
  pkg.gem_spec = gemspec
end

desc 'build the gem and release it to rubygems.org'
task release: :gem do
  sh "gem push pkg/locomotivecms_wagon-#{gemspec.version}.gem"
end

namespace :development do
  desc 'create vcr cassettes'
  task :bootstrap do
    VCR.configure do |c|
      c.cassette_library_dir = File.expand_path(File.dirname(__FILE__) + '/spec/integration/cassettes')
      c.hook_into :webmock # or :fakeweb
      c.allow_http_connections_when_no_cassette = true
    end

    FileUtils.rm_rf(File.join(File.dirname(__FILE__), 'site'))
    VCR.use_cassette('pull') do
      exit unless Locomotive::Wagon.clone('site', '.', { host: 'sample.example.com:3000', email: 'admin@locomotivecms.com', password: 'locomotive' })
    end

    Locomotive::Wagon.push('site', {host: 'sample.example.com:3000', email: 'admin@locomotivecms.com', password: 'locomotive'}, force: true, force_translations: true, data: true)
  end
end

RSpec::Core::RakeTask.new('spec:unit') do |spec|
  spec.pattern = 'spec/unit/**/*_spec.rb'

end

RSpec::Core::RakeTask.new('spec:integration') do |spec|
  spec.pattern = 'spec/integration/**/*_spec.rb'
end

task spec: ['spec:integration']

task default: :spec

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
locomotivecms_wagon-1.2.2 Rakefile
locomotivecms_wagon-1.2.1 Rakefile
locomotivecms_wagon-1.2.0 Rakefile
locomotivecms_wagon-1.1.0 Rakefile