Sha256: a051443d5e1cb8be522a8db373a834ca21601930d2b5537ecbe94136bd9edfd7

Contents?: true

Size: 530 Bytes

Versions: 9

Compression:

Stored size: 530 Bytes

Contents

# frozen_string_literal: true

module Dopstick
  module Generator
    module NPM
      class Options < Generator::Options
        using Refinements

        def user_name
          `npm get init.author.name`.chomp.presence ||
            super
        end

        def user_email
          `npm get init.author.email`.chomp.presence ||
            super
        end

        def user_url
          `npm get init.author.url`.chomp.presence ||
            "https://github.com/#{github_user}"
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
dopstick-0.0.12 lib/dopstick/generator/npm/options.rb
dopstick-0.0.11 lib/dopstick/generator/npm/options.rb
dopstick-0.0.10 lib/dopstick/generator/npm/options.rb
dopstick-0.0.9 lib/dopstick/generator/npm/options.rb
dopstick-0.0.8 lib/dopstick/generator/npm/options.rb
dopstick-0.0.7 lib/dopstick/generator/npm/options.rb
dopstick-0.0.6 lib/dopstick/generator/npm/options.rb
dopstick-0.0.5 lib/dopstick/generator/npm/options.rb
dopstick-0.0.4 lib/dopstick/generator/npm/options.rb