Sha256: 24582bcf057b016dd25d279e7c90675cb1ba9f44a51723dddfca77771ab1fc31

Contents?: true

Size: 583 Bytes

Versions: 14

Compression:

Stored size: 583 Bytes

Contents

module DPL
  class Provider
    class NPM < Provider
      NPMRC_FILE = '~/.npmrc'
      experimental "NPM"

      def needs_key?
        false
      end

      def check_app
      end

      def setup_auth
        File.open(File.expand_path(NPMRC_FILE), 'w') do |f|
          f.puts("_auth = #{option(:api_key)}")
          f.puts("email = #{option(:email)}")
        end
      end

      def check_auth
        setup_auth
        log "Authenticated with email #{option(:email)}"
      end

      def push_app
        context.shell "npm publish --force"
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
dpl-1.5.1.travis.182.2 lib/dpl/provider/npm.rb
dpl-1.5.1.travis.180.2 lib/dpl/provider/npm.rb
dpl-1.5.1.travis.174.2 lib/dpl/provider/npm.rb
dpl-1.5.1.travis.173.2 lib/dpl/provider/npm.rb
dpl-1.5.1.travis.167.2 lib/dpl/provider/npm.rb
dpl-1.5.0 lib/dpl/provider/npm.rb
dpl-1.5.0.travis.166.2 lib/dpl/provider/npm.rb
dpl-1.5.0.travis.164.2 lib/dpl/provider/npm.rb
dpl-1.4.9.travis.163.2 lib/dpl/provider/npm.rb
dpl-1.4.9 lib/dpl/provider/npm.rb
dpl-1.4.9.travis.151.2 lib/dpl/provider/npm.rb
dpl-1.4.8 lib/dpl/provider/npm.rb
dpl-1.4.8.travis.150.2 lib/dpl/provider/npm.rb
dpl-1.4.8.travis.148.2 lib/dpl/provider/npm.rb