Sha256: f2e6505465b33f5a1a164ce401e543447fffdd74689e3214e6fd1d24480be8ea

Contents?: true

Size: 648 Bytes

Versions: 31

Compression:

Stored size: 648 Bytes

Contents

class Lono::Blueprint
  module Helper
    extend Memoist

    def user_info
      git_author_name = git_installed? ? `git config user.name`.chomp : ""
      git_user_email = git_installed? ? `git config user.email`.chomp : ""
      github_username = git_installed? ? `git config github.user`.chomp : ""

      {
        :author           => git_author_name.empty? ? "TODO: Write your name" : git_author_name,
        :email            => git_user_email.empty? ? "TODO: Write your email address" : git_user_email,
        :github_username  => github_username.empty? ? "[USERNAME]" : github_username,
      }
    end
    memoize :user_info
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
lono-6.1.11 lib/lono/blueprint/helper.rb
lono-6.1.10 lib/lono/blueprint/helper.rb
lono-6.1.9 lib/lono/blueprint/helper.rb
lono-6.1.8 lib/lono/blueprint/helper.rb
lono-6.1.7 lib/lono/blueprint/helper.rb
lono-6.1.6 lib/lono/blueprint/helper.rb
lono-6.1.5 lib/lono/blueprint/helper.rb
lono-6.1.4 lib/lono/blueprint/helper.rb
lono-6.1.3 lib/lono/blueprint/helper.rb
lono-6.1.2 lib/lono/blueprint/helper.rb
lono-6.1.1 lib/lono/blueprint/helper.rb
lono-6.1.0 lib/lono/blueprint/helper.rb
lono-6.0.1 lib/lono/blueprint/helper.rb
lono-6.0.0 lib/lono/blueprint/helper.rb
lono-5.3.4 lib/lono/blueprint/helper.rb
lono-5.3.3 lib/lono/blueprint/helper.rb
lono-5.3.2 lib/lono/blueprint/helper.rb
lono-5.3.1 lib/lono/blueprint/helper.rb
lono-5.3.0 lib/lono/blueprint/helper.rb
lono-5.2.8 lib/lono/blueprint/helper.rb