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.12.travis.784.4 lib/dpl/provider/npm.rb
dpl-1.7.12.travis.783.4 lib/dpl/provider/npm.rb
dpl-1.7.12.travis.774.4 lib/dpl/provider/npm.rb
dpl-1.7.12.travis.773.4 lib/dpl/provider/npm.rb
dpl-1.7.12.travis.766.4 lib/dpl/provider/npm.rb
dpl-1.7.12.travis.764.4 lib/dpl/provider/npm.rb
dpl-1.7.12.travis.763.4 lib/dpl/provider/npm.rb
dpl-1.7.12.travis.762.4 lib/dpl/provider/npm.rb
dpl-1.7.12.travis.748.4 lib/dpl/provider/npm.rb
dpl-1.7.12.travis.742.4 lib/dpl/provider/npm.rb
dpl-1.7.12.travis.734.4 lib/dpl/provider/npm.rb
dpl-1.7.11.travis.733.4 lib/dpl/provider/npm.rb
dpl-1.7.11 lib/dpl/provider/npm.rb
dpl-1.7.10 lib/dpl/provider/npm.rb
dpl-1.7.11.travis.726.4 lib/dpl/provider/npm.rb
dpl-1.7.10.travis.725.4 lib/dpl/provider/npm.rb
dpl-1.7.10.travis.701.4 lib/dpl/provider/npm.rb
dpl-1.7.10.travis.700.4 lib/dpl/provider/npm.rb
dpl-1.7.10.travis.699.1 lib/dpl/provider/npm.rb
dpl-1.7.10.travis.694.1 lib/dpl/provider/npm.rb