initials 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4cf0672cb32ca9c0578082938d688e501b860f82f11f5fc5f9da391f600d7b67
4
- data.tar.gz: cd64e5021b2d8546a1e83875139be27a266d776ec01f825fffd14e66122f0bc1
3
+ metadata.gz: b2dce220e10036fd5284e737264c5ed0a4f0f4e47211d4fec4812207e28dd3cf
4
+ data.tar.gz: 3eeebc342465b151e48ebd94d01e98d2f6a1bd0194851c5a2fc50d41103553af
5
5
  SHA512:
6
- metadata.gz: 715df7ec0c73a894d9cb88e00be05c90d479dc489bb7dd72f2940d0d92543e02c9acba5e70e4ae3e569a099efeaad85368ee3e74d1e1a65bbbee7d6452fe4f3a
7
- data.tar.gz: 7fe165889d701dc17d80b32b03744aa6a299b23eac88b901aea1c754f4af7d2f5143ce989ca7ae1992ff9a8d513c373cc29f01e2eb7f27bcbfb7e22cb155118a
6
+ metadata.gz: 660d98bbbb542bf6a706614ab725c63f5d2e991236ff23ddaf443ec35ef2e0709677b51f4e3d94ffc9bea81f647d8135cf206513e07617710820cba2b71b7253
7
+ data.tar.gz: ddeb25f094cae8ffd4d8d7b01dc022b71898a45df031a231051d2f18bfce8a1b5392b9ed4e3ae41dba4398087ab7856a3f2f0f21c74dabed382cb5151c93998d
@@ -31,5 +31,9 @@ jobs:
31
31
  with:
32
32
  ruby-version: ${{ matrix.ruby-version }}
33
33
  bundler-cache: true # runs 'bundle install' and caches installed gems automatically
34
- - name: Run tests
35
- run: bundle exec rake
34
+ - name: Run tests and publish code coverage
35
+ uses: paambaati/codeclimate-action@v2.7.5
36
+ env:
37
+ CC_TEST_REPORTER_ID: 9c690ab71ab481ac45785c4010ff30f93a45774e5ad6f03ec448b6e2b5bc39b4
38
+ with:
39
+ coverageCommand: bundle exec rake
data/.gitignore CHANGED
@@ -9,3 +9,6 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+
13
+ # SimpleCov reports
14
+ coverage
data/Gemfile CHANGED
@@ -4,3 +4,5 @@ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
5
  # Specify your gem's dependencies in initials.gemspec
6
6
  gemspec
7
+
8
+ gem 'simplecov', require: false, group: :test
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Initials
1
+ # ![demo](demo.png) Initials [![Maintainability](https://api.codeclimate.com/v1/badges/fb865ec4adcd0671dc48/maintainability)](https://codeclimate.com/github/thutterer/initials/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/fb865ec4adcd0671dc48/test_coverage)](https://codeclimate.com/github/thutterer/initials/test_coverage)
2
2
 
3
3
  Don't want to implement user avatar uploads but still have basic avatars to distinguish users and brigthen up your app?
4
4
 
@@ -30,7 +30,7 @@ No special configuration is required to work with Ruby on Rails, but for your co
30
30
 
31
31
  ```ruby
32
32
  def user_avatar(name, **options)
33
- Initials.svg(name, options)
33
+ Initials.svg(name, **options)
34
34
  end
35
35
  ```
36
36
 
data/demo.png ADDED
Binary file
data/lib/initials/svg.rb CHANGED
@@ -12,7 +12,7 @@ module Initials
12
12
  svg = [
13
13
  "<svg width='#{size}' height='#{size}'>",
14
14
  "<circle cx='#{size / 2}' cy='#{size / 2}' r='#{size / 2}' fill='#{fill}' />",
15
- "<text x='50%' y='50%' fill='white' fill-opacity='0.75' dominant-baseline='central' text-anchor='middle' style='font: bold #{font_size}px sans-serif;'>",
15
+ "<text x='50%' y='50%' fill='white' fill-opacity='0.75' dominant-baseline='central' text-anchor='middle' style='font: bold #{font_size}px sans-serif; user-select: none;'>",
16
16
  "#{initials}",
17
17
  "</text>",
18
18
  "</svg>"
@@ -1,3 +1,3 @@
1
1
  module Initials
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: initials
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Hutterer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-12 00:00:00.000000000 Z
11
+ date: 2021-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -69,6 +69,7 @@ files:
69
69
  - Rakefile
70
70
  - bin/console
71
71
  - bin/setup
72
+ - demo.png
72
73
  - initials.gemspec
73
74
  - lib/initials.rb
74
75
  - lib/initials/svg.rb