gravatar_helper 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 5e4cd996fc6a9dc46441d9d8d32bf479f52ad3252ff251cb5289deecb0a42326
4
+ data.tar.gz: dcba065738256548eab3430adfeb4eff0bdd8ebc4cb520deedf5eff1401a3bcb
5
+ SHA512:
6
+ metadata.gz: c21ed452642a848e610e7c7966123e7b0e8482fcb4d14fd5b9b794ea6d430bda423a6526abc7766a29c43a23638f70c19af7a60890e9989cfd0e63b8b7be5266
7
+ data.tar.gz: 5d9a06622012335f07eba1926867dffb154bd7dfdcfece34db0114907dc7d13d1fcbefa0c99d080a10194e8bbbd1a90d1c9ea9333c038a2e19191870e4f7acf8
data/.idea/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
4
+ # Editor-based HTTP Client requests
5
+ /httpRequests/
6
+ # Datasource local storage ignored files
7
+ /dataSources/
8
+ /dataSources.local.xml
@@ -0,0 +1,71 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="ModuleRunConfigurationManager">
4
+ <shared />
5
+ </component>
6
+ <component name="NewModuleRootManager">
7
+ <content url="file://$MODULE_DIR$">
8
+ <sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
9
+ <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
10
+ <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
11
+ </content>
12
+ <orderEntry type="inheritedJdk" />
13
+ <orderEntry type="sourceFolder" forTests="false" />
14
+ <orderEntry type="library" scope="PROVIDED" name="actioncable (v7.0.5.1, rbenv: 3.1.2) [gem]" level="application" />
15
+ <orderEntry type="library" scope="PROVIDED" name="actionmailbox (v7.0.5.1, rbenv: 3.1.2) [gem]" level="application" />
16
+ <orderEntry type="library" scope="PROVIDED" name="actionmailer (v7.0.5.1, rbenv: 3.1.2) [gem]" level="application" />
17
+ <orderEntry type="library" scope="PROVIDED" name="actionpack (v7.0.5.1, rbenv: 3.1.2) [gem]" level="application" />
18
+ <orderEntry type="library" scope="PROVIDED" name="actiontext (v7.0.5.1, rbenv: 3.1.2) [gem]" level="application" />
19
+ <orderEntry type="library" scope="PROVIDED" name="actionview (v7.0.5.1, rbenv: 3.1.2) [gem]" level="application" />
20
+ <orderEntry type="library" scope="PROVIDED" name="activejob (v7.0.5.1, rbenv: 3.1.2) [gem]" level="application" />
21
+ <orderEntry type="library" scope="PROVIDED" name="activemodel (v7.0.5.1, rbenv: 3.1.2) [gem]" level="application" />
22
+ <orderEntry type="library" scope="PROVIDED" name="activerecord (v7.0.5.1, rbenv: 3.1.2) [gem]" level="application" />
23
+ <orderEntry type="library" scope="PROVIDED" name="activestorage (v7.0.5.1, rbenv: 3.1.2) [gem]" level="application" />
24
+ <orderEntry type="library" scope="PROVIDED" name="activesupport (v7.0.5.1, rbenv: 3.1.2) [gem]" level="application" />
25
+ <orderEntry type="library" scope="PROVIDED" name="builder (v3.2.4, rbenv: 3.1.2) [gem]" level="application" />
26
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v2.4.14, rbenv: 3.1.2) [gem]" level="application" />
27
+ <orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.2.2, rbenv: 3.1.2) [gem]" level="application" />
28
+ <orderEntry type="library" scope="PROVIDED" name="crass (v1.0.6, rbenv: 3.1.2) [gem]" level="application" />
29
+ <orderEntry type="library" scope="PROVIDED" name="date (v3.3.3, rbenv: 3.1.2) [gem]" level="application" />
30
+ <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.5.0, rbenv: 3.1.2) [gem]" level="application" />
31
+ <orderEntry type="library" scope="PROVIDED" name="erubi (v1.12.0, rbenv: 3.1.2) [gem]" level="application" />
32
+ <orderEntry type="library" scope="PROVIDED" name="globalid (v1.1.0, rbenv: 3.1.2) [gem]" level="application" />
33
+ <orderEntry type="library" scope="PROVIDED" name="i18n (v1.14.1, rbenv: 3.1.2) [gem]" level="application" />
34
+ <orderEntry type="library" scope="PROVIDED" name="loofah (v2.21.3, rbenv: 3.1.2) [gem]" level="application" />
35
+ <orderEntry type="library" scope="PROVIDED" name="mail (v2.8.1, rbenv: 3.1.2) [gem]" level="application" />
36
+ <orderEntry type="library" scope="PROVIDED" name="marcel (v1.0.2, rbenv: 3.1.2) [gem]" level="application" />
37
+ <orderEntry type="library" scope="PROVIDED" name="method_source (v1.0.0, rbenv: 3.1.2) [gem]" level="application" />
38
+ <orderEntry type="library" scope="PROVIDED" name="mini_mime (v1.1.2, rbenv: 3.1.2) [gem]" level="application" />
39
+ <orderEntry type="library" scope="PROVIDED" name="minitest (v5.18.1, rbenv: 3.1.2) [gem]" level="application" />
40
+ <orderEntry type="library" scope="PROVIDED" name="net-imap (v0.3.6, rbenv: 3.1.2) [gem]" level="application" />
41
+ <orderEntry type="library" scope="PROVIDED" name="net-pop (v0.1.2, rbenv: 3.1.2) [gem]" level="application" />
42
+ <orderEntry type="library" scope="PROVIDED" name="net-protocol (v0.2.1, rbenv: 3.1.2) [gem]" level="application" />
43
+ <orderEntry type="library" scope="PROVIDED" name="net-smtp (v0.3.3, rbenv: 3.1.2) [gem]" level="application" />
44
+ <orderEntry type="library" scope="PROVIDED" name="nio4r (v2.5.9, rbenv: 3.1.2) [gem]" level="application" />
45
+ <orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.15.2, rbenv: 3.1.2) [gem]" level="application" />
46
+ <orderEntry type="library" scope="PROVIDED" name="racc (v1.7.1, rbenv: 3.1.2) [gem]" level="application" />
47
+ <orderEntry type="library" scope="PROVIDED" name="rack (v2.2.7, rbenv: 3.1.2) [gem]" level="application" />
48
+ <orderEntry type="library" scope="PROVIDED" name="rack-test (v2.1.0, rbenv: 3.1.2) [gem]" level="application" />
49
+ <orderEntry type="library" scope="PROVIDED" name="rails (v7.0.5.1, rbenv: 3.1.2) [gem]" level="application" />
50
+ <orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v2.0.3, rbenv: 3.1.2) [gem]" level="application" />
51
+ <orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.6.0, rbenv: 3.1.2) [gem]" level="application" />
52
+ <orderEntry type="library" scope="PROVIDED" name="railties (v7.0.5.1, rbenv: 3.1.2) [gem]" level="application" />
53
+ <orderEntry type="library" scope="PROVIDED" name="rake (v13.0.6, rbenv: 3.1.2) [gem]" level="application" />
54
+ <orderEntry type="library" scope="PROVIDED" name="rspec (v3.12.0, rbenv: 3.1.2) [gem]" level="application" />
55
+ <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.12.2, rbenv: 3.1.2) [gem]" level="application" />
56
+ <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.12.3, rbenv: 3.1.2) [gem]" level="application" />
57
+ <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.12.5, rbenv: 3.1.2) [gem]" level="application" />
58
+ <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.12.1, rbenv: 3.1.2) [gem]" level="application" />
59
+ <orderEntry type="library" scope="PROVIDED" name="thor (v1.2.2, rbenv: 3.1.2) [gem]" level="application" />
60
+ <orderEntry type="library" scope="PROVIDED" name="timeout (v0.4.0, rbenv: 3.1.2) [gem]" level="application" />
61
+ <orderEntry type="library" scope="PROVIDED" name="tzinfo (v2.0.6, rbenv: 3.1.2) [gem]" level="application" />
62
+ <orderEntry type="library" scope="PROVIDED" name="websocket-driver (v0.7.5, rbenv: 3.1.2) [gem]" level="application" />
63
+ <orderEntry type="library" scope="PROVIDED" name="websocket-extensions (v0.1.5, rbenv: 3.1.2) [gem]" level="application" />
64
+ <orderEntry type="library" scope="PROVIDED" name="zeitwerk (v2.6.8, rbenv: 3.1.2) [gem]" level="application" />
65
+ </component>
66
+ <component name="RakeTasksCache">
67
+ <option name="myRootTask">
68
+ <RakeTaskImpl id="rake" />
69
+ </option>
70
+ </component>
71
+ </module>
data/.idea/misc.xml ADDED
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectRootManager" version="2" project-jdk-name="rbenv: 3.1.2" project-jdk-type="RUBY_SDK" />
4
+ </project>
data/.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/gravatar_helper.iml" filepath="$PROJECT_DIR$/.idea/gravatar_helper.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
data/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ </component>
6
+ </project>
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # GravatarHelper
2
+
3
+ TODO: Delete this and the text below, and describe your gem
4
+
5
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/gravatar_helper`. To experiment with that code, run `bin/console` for an interactive prompt.
6
+
7
+ ## Installation
8
+
9
+ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
+
11
+ Install the gem and add to the application's Gemfile by executing:
12
+
13
+ $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
14
+
15
+ If bundler is not being used to manage dependencies, install the gem by executing:
16
+
17
+ $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Development
24
+
25
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
26
+
27
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
28
+
29
+ ## Contributing
30
+
31
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/gravatar_helper.
data/Rakefile ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ task default: %i[]
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GravatarHelper
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+ require_relative "gravatar_helper/version"
3
+ require "gravatar_helper"
4
+ require 'active_support'
5
+ require 'active_support/concern'
6
+ require 'active_support/core_ext/module/attribute_accessors'
7
+ require 'active_support/core_ext/module/delegation'
8
+ require 'active_support/core_ext/class/attribute'
9
+ require 'action_view/helpers'
10
+
11
+
12
+ module GravatarHelper
13
+ class Error < StandardError; end
14
+
15
+ class Generator
16
+ def self.generate(user, options = { size: 80 })
17
+ email_address = user.email.downcase
18
+ hash = Digest::MD5.hexdigest(email_address)
19
+ size = options[:size]
20
+ gravatar_url = "https://www.gravatar.com/avatar/#{hash}?s=#{size}"
21
+ view = DummyView.new
22
+ view.image_tag(gravatar_url, alt: user.username, class: "rounded mx-auto d-block shadow")
23
+ end
24
+
25
+ class DummyView
26
+ include ActionView::Helpers::AssetTagHelper
27
+ end
28
+ end
29
+ end
30
+
31
+
@@ -0,0 +1,4 @@
1
+ module GravatarHelper
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,95 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gravatar_helper
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Marcel Schmidt
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-06-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.2'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '5.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '5.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: activesupport
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 7.0.5.1
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 7.0.5.1
55
+ description:
56
+ email:
57
+ - marcel.schmidt@sapiens.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".idea/.gitignore"
63
+ - ".idea/gravatar_helper.iml"
64
+ - ".idea/misc.xml"
65
+ - ".idea/modules.xml"
66
+ - ".idea/vcs.xml"
67
+ - README.md
68
+ - Rakefile
69
+ - lib/gravatar_helper.rb
70
+ - lib/gravatar_helper/version.rb
71
+ - sig/gravatar_helper.rbs
72
+ homepage: https://github.com/maschmidtdev/gravatar_helper
73
+ licenses: []
74
+ metadata:
75
+ allowed_push_host: https://rubygems.org/
76
+ post_install_message:
77
+ rdoc_options: []
78
+ require_paths:
79
+ - lib
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: 2.6.0
85
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ requirements: []
91
+ rubygems_version: 3.3.7
92
+ signing_key:
93
+ specification_version: 4
94
+ summary: Test gem for generating gravatar image tag.
95
+ test_files: []