Sha256: 228e71d4e86ee57bfd0a42e6dede5290745d7659a22414775fdae46e1bd1a73c

Contents?: true

Size: 667 Bytes

Versions: 1

Compression:

Stored size: 667 Bytes

Contents

module ContributorsStats::UserData

  # fill in user data using minimal possible set of data
  class Simple

    # fill in user data using minimal possible set of data
    def self.load(login, data, contributions)
      {
        'avatar_url'    => data['avatar_url'],
        'name'          => login,
        'url'           => data['url'],
        'html_url'      => profile_url(login),
        'contributions' => contributions
      }
    end
    # build github profile url for the given user name
    # @param username [String]
    # @return [String] github profile url
    def self.profile_url(username)
      "https://github.com/#{username}"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
contributors_stats-1.0.0 lib/plugins/contributors_stats/user_data/simple.rb