Sha256: 4adecc4af82a97ec327f6bc985b54c4b958eae6089fb6db6e8404c28efb05639

Contents?: true

Size: 750 Bytes

Versions: 5

Compression:

Stored size: 750 Bytes

Contents

# encoding: utf-8

require 'thor'

module Daiku
  class Plugins
    class Vcr
      class CLI < ::Thor::Group
        include ::Thor::Actions
        argument :app

        def self.source_root
          File.expand_path('../', __FILE__)
        end

        def config
          template('_templates/vcr_helper.rb.tt', "#{app}/spec/vcr_helper.rb")
          empty_directory("#{app}/spec/_cassettes")
          create_file("#{app}/spec/_cassettes/.gitkeep", "")
        end

        def gemfile
          insert_into_file "#{app}/Gemfile", after: "  gem 'mocha', require: 'mocha/setup'\n" do
            "  gem 'vcr', require: false\n" +
            "  gem 'webmock', '< 1.12', require: false\n"
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
daiku-0.2.2 lib/daiku/plugins/vcr/cli.rb
daiku-0.2.1 lib/daiku/plugins/vcr/cli.rb
daiku-0.2.0 lib/daiku/plugins/vcr/cli.rb
daiku-0.1.1 lib/daiku/plugins/vcr/cli.rb
daiku-0.1.0 lib/daiku/plugins/vcr/cli.rb