Sha256: 1fcb9fe6278830ab20e7462517cfe8d8affc8ec9750c0e28248d768cbf611bf7

Contents?: true

Size: 896 Bytes

Versions: 12

Compression:

Stored size: 896 Bytes

Contents

# frozen_string_literal: true
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'open-uri'

require_relative './build/build_client'

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

task default: :spec

desc 'Regenerates the client starting from the JSON Hyperschema'
task :regenerate do
  BuildClient.new(
    open('https://site-api.datocms.com/docs/site-api-hyperschema.json').read,
    'site',
    %w(session item)
  ).build

  BuildClient.new(
    open('https://site-api.datocms.com/docs/account-api-hyperschema.json').read,
    'account',
    %w(session item)
  ).build
end

desc 'Open an irb (or pry) session preloaded with this gem'
task :console do
  begin
    require 'pry'
    gem_name = File.basename(Dir.pwd)
    sh %(pry -I lib -r #{gem_name}.rb)
  rescue LoadError => _
    sh %(irb -rubygems -I lib -r #{gem_name}.rb)
  end
end

require 'rubocop/rake_task'
RuboCop::RakeTask.new

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
dato-0.1.20 Rakefile
dato-0.1.19 Rakefile
dato-0.1.18 Rakefile
dato-0.1.17 Rakefile
dato-0.1.16 Rakefile
dato-0.1.15 Rakefile
dato-0.1.14 Rakefile
dato-0.1.13 Rakefile
dato-0.1.12 Rakefile
dato-0.1.11 Rakefile
dato-0.1.10 Rakefile
dato-0.1.9 Rakefile