Sha256: 95934af38106e801151d8d37dac504090f739bb3e198537da023323258ca016c

Contents?: true

Size: 550 Bytes

Versions: 154

Compression:

Stored size: 550 Bytes

Contents

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

      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"
      end
    end
  end
end

Version data entries

154 entries across 154 versions & 1 rubygems

Version Path
dpl-1.7.2.travis.588.1 lib/dpl/provider/npm.rb
dpl-1.7.2.travis.586.1 lib/dpl/provider/npm.rb
dpl-1.7.2.travis.584.1 lib/dpl/provider/npm.rb
dpl-1.7.2.travis.582.1 lib/dpl/provider/npm.rb
dpl-1.7.2.travis.581.1 lib/dpl/provider/npm.rb
dpl-1.7.1 lib/dpl/provider/npm.rb
dpl-1.7.2.travis.579.1 lib/dpl/provider/npm.rb
dpl-1.7.1.travis.578.1 lib/dpl/provider/npm.rb
dpl-1.7.1.travis.577.1 lib/dpl/provider/npm.rb
dpl-1.7.1.travis.575.1 lib/dpl/provider/npm.rb
dpl-1.7.1.travis.570.1 lib/dpl/provider/npm.rb
dpl-1.7.1.travis.567.1 lib/dpl/provider/npm.rb
dpl-1.7.1.travis.561.1 lib/dpl/provider/npm.rb
dpl-1.6.10.travis.560.1 lib/dpl/provider/npm.rb
dpl-1.7.0 lib/dpl/provider/npm.rb
dpl-1.6.9.travis.557.1 lib/dpl/provider/npm.rb
dpl-1.6.10.travis.558.1 lib/dpl/provider/npm.rb
dpl-1.6.9 lib/dpl/provider/npm.rb
dpl-1.6.9.travis.555.1 lib/dpl/provider/npm.rb
dpl-1.6.8.travis.554.1 lib/dpl/provider/npm.rb