google_font_url 0.1.3 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2aa451b5309ea7c1c1d9f418ff16343110984e3e15d5457194e271989c8980b9
4
- data.tar.gz: da9982668ef5eca95c6c8c64646c4d18daada31ef4a06b4ca037a63f2c4b47da
3
+ metadata.gz: 2360e5f172eb1f8c4bceab598e68a5423fe5b5f61aa6c7aa217e5c3ea74c32bc
4
+ data.tar.gz: 894820aef45224431dfbab2caa47889d9df83496210fe3e60777291f99accad8
5
5
  SHA512:
6
- metadata.gz: 20f2616a44743e3d38b7ee0c43bc27a75c2219ffbef7d9aca74ed3ffc3196bc7888d39e73229436beb85e2ae9006f101b8f228c03f1a6f52615d1a547657b61c
7
- data.tar.gz: f4b397a7ef6d8494aa713b883b965f596d2d6bd2253a2ab35c2bb406e7f79f0c8c8b5d91b4578c1b762fbbfba2ce1987f79c6e586acf75fc4a1156bd20db3c9b
6
+ metadata.gz: 837efbc84f0510931000852e411833d57f409120397a152ed38a8131cd5a0fb18e53e1f24606d3cb2eef3defec631af231cd83a00233a6db4e408a48b6e97275
7
+ data.tar.gz: 83bb60143be90f3c3b67941bde55ba4671e8222d75653dc5e8d96371e345436f75b0b2176efb74c3295a473f912d7962eccfc89cf95021a32b98b5775bbf1cd6
data/README.md CHANGED
@@ -1,12 +1,12 @@
1
- # GoogleFontUrl
1
+ # Google Font Url Extractor
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
3
+ To make all available Google Fonts selectable in a Rails application and save their corresponding CSS links, follow these steps:
4
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/google_font_url`. To experiment with that code, run `bin/console` for an interactive prompt.
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 `require 'google_font_url/generator'`. To experiment with that code, run `bin/console` for an interactive prompt.
6
6
 
7
7
  ## Installation
8
8
 
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_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.
9
+ `Use in class: require 'google_font_url/generator'` .
10
10
 
11
11
  Install the gem and add to the application's Gemfile by executing:
12
12
 
@@ -17,7 +17,22 @@ gem 'google_font_url'
17
17
  If bundler is not being used to manage dependencies, install the gem by executing:
18
18
 
19
19
  ```bash
20
- gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
20
+ GoogleFontUrl::Generator.generate
21
+ [["ABeeZee", "https://fonts.googleapis.com/css2?family=ABeeZee:ital,wght@0,400;1,400&display=swap"],
22
+ ["ADLaM Display", "https://fonts.googleapis.com/css2?family=ADLaM+Display:wght@400&display=swap"],.....
23
+ ```
24
+ ```bash
25
+ GoogleFontUrl::Generator.all
26
+ [{"family"=>"ABeeZee",
27
+ "variants"=>["regular", "italic"],
28
+ "subsets"=>["latin", "latin-ext"],
29
+ "version"=>"v22",
30
+ "lastModified"=>"2024-09-04",
31
+ "files"=>{"regular"=>"https://fonts.gstatic.com/s/abeezee/v22/esDR31xSG-6AGleN6tKukbcHCpE.ttf", "italic"=>"https://fonts.gstatic.com/s/abeezee/v22/esDT31xSG-6AGleN2tCklZUCGpG-GQ.ttf"},
32
+ "category"=>"sans-serif",
33
+ "kind"=>"webfonts#webfont",
34
+ "menu"=>"https://fonts.gstatic.com/s/abeezee/v22/esDR31xSG-6AGleN2tOklQ.ttf",
35
+ "css_style_link"=>"https://fonts.googleapis.com/css2?family=ABeeZee:ital,wght@0,400;1,400&display=swap"},.....
21
36
  ```
22
37
 
23
38
  ## Usage
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "lib/google_font_url/version"
4
+ require_relative "lib/google_font_url/generator"
4
5
 
5
6
  Gem::Specification.new do |spec|
6
7
  spec.name = "google_font_url"
@@ -9,7 +10,7 @@ Gem::Specification.new do |spec|
9
10
  spec.authors = ["mrmalvi"]
10
11
  spec.email = ["malviyak00@gmail.com"]
11
12
  spec.summary = "A gem to generate Google Fonts URLs dynamically." # Short summary
12
- spec.description = "This gem provides a simple way to generate Google Fonts URLs with custom font names and weights for embedding fonts into your web projects." # Long description
13
+ spec.description = "This gem provides a simple way to generate Google Fonts URLs with custom font names, weights, and variants. It supports embedding fonts into your web projects effortlessly by generating URLs or complete CSS links, ensuring compatibility with all font styles and weights available in the Google Fonts library."
13
14
  spec.homepage = "https://github.com/mrmalvi/google_font_url"
14
15
  spec.required_ruby_version = ">= 3.0.0"
15
16
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GoogleFontUrl
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.5"
5
5
  end
@@ -0,0 +1,3 @@
1
+ module GoogleFontUrl
2
+ class Error < StandardError; end
3
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_font_url
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - mrmalvi
@@ -67,7 +67,9 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0.18'
69
69
  description: This gem provides a simple way to generate Google Fonts URLs with custom
70
- font names and weights for embedding fonts into your web projects.
70
+ font names, weights, and variants. It supports embedding fonts into your web projects
71
+ effortlessly by generating URLs or complete CSS links, ensuring compatibility with
72
+ all font styles and weights available in the Google Fonts library.
71
73
  email:
72
74
  - malviyak00@gmail.com
73
75
  executables: []
@@ -82,6 +84,7 @@ files:
82
84
  - bin/setup
83
85
  - data/fonts_data.yml
84
86
  - google_font_url.gemspec
87
+ - lib/google_font_url.rb
85
88
  - lib/google_font_url/generator.rb
86
89
  - lib/google_font_url/utils.rb
87
90
  - lib/google_font_url/version.rb