wilday_ui 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -4
- data/lib/wilday_ui/engine.rb +10 -0
- data/lib/wilday_ui/version.rb +1 -1
- data/lib/wilday_ui/version_check.rb +35 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70c1108ccd7d2bcd7380d152efa3d2cf14e4908f0096d45f1ff79f4c7a0da316
|
4
|
+
data.tar.gz: a6bcee81202cc1560ee159afce60ad4abc44fb757e48b3d479d5446a7cb062c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86da6a2371b63e7b078b57a5a03ac3acfd0a14889a512e32026b90cbc2b43b01706422e250f746b29728ad3ba3490b272f5e40fe04ac7f72496a2d6a44066fa4
|
7
|
+
data.tar.gz: ddeff11163331b488d1661160e815f4478c2924518a30110ae7c5b7c0f88b4cf05952398a4dcf175808140c6ea3717726aad0281c7fbb9bc0afe206bd5613323
|
data/README.md
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
# Wilday UI
|
2
2
|
|
3
|
-
Wilday UI is a simple, customizable UI component library for Ruby on Rails projects. It
|
3
|
+
Wilday UI is a simple, customizable UI component library for Ruby on Rails projects. It provides a collection of prebuilt, reusable components with customizable styles and options, making it easy to build beautiful, consistent, and maintainable user interfaces.
|
4
4
|
|
5
5
|
---
|
6
6
|
|
7
7
|
## Features
|
8
8
|
|
9
|
-
- Prebuilt, customizable
|
10
|
-
- Flexible variants, sizes, and
|
11
|
-
-
|
9
|
+
- Prebuilt, customizable UI components for common needs
|
10
|
+
- Flexible styling options with variants, sizes, and layouts
|
11
|
+
- Support for seamless integration with Rails as an engine
|
12
|
+
- Built for extensibility and framework compatibility
|
12
13
|
|
13
14
|
---
|
14
15
|
|
data/lib/wilday_ui/engine.rb
CHANGED
@@ -1,7 +1,17 @@
|
|
1
|
+
require "wilday_ui/version_check"
|
2
|
+
|
1
3
|
module WildayUi
|
2
4
|
class Engine < ::Rails::Engine
|
3
5
|
isolate_namespace WildayUi
|
4
6
|
|
7
|
+
# Automatically check for updates
|
8
|
+
initializer "wilday_ui.version_check" do
|
9
|
+
Rails.application.config.after_initialize do
|
10
|
+
Rails.logger.info "[Wilday UI] Version check initialized."
|
11
|
+
WildayUi::VersionCheck.check_for_update
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
5
15
|
# Automatically include helpers in views
|
6
16
|
initializer "wilday_ui.helpers" do
|
7
17
|
ActiveSupport.on_load(:action_view) do
|
data/lib/wilday_ui/version.rb
CHANGED
@@ -0,0 +1,35 @@
|
|
1
|
+
require "net/http"
|
2
|
+
require "json"
|
3
|
+
|
4
|
+
module WildayUi
|
5
|
+
class VersionCheck
|
6
|
+
def self.check_for_update
|
7
|
+
return unless Rails.env.development?
|
8
|
+
|
9
|
+
current_version = Gem.loaded_specs["wilday_ui"]&.version&.to_s || WildayUi::VERSION
|
10
|
+
latest_version = fetch_latest_version
|
11
|
+
|
12
|
+
if latest_version && Gem::Version.new(latest_version) > Gem::Version.new(current_version)
|
13
|
+
puts "\n\e[33m[Wilday UI] Update available!"
|
14
|
+
puts "You are using version #{current_version}, but the latest version is #{latest_version}."
|
15
|
+
puts "To update, run: `bundle update wilday_ui` or update your Gemfile to the latest version\e[0m\n"
|
16
|
+
Rails.logger.warn <<~WARNING
|
17
|
+
[Wilday UI] You are using version #{current_version}, but the latest version is #{latest_version}.
|
18
|
+
To update, run `bundle update wilday_ui` or update your Gemfile to the latest version.
|
19
|
+
WARNING
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def self.fetch_latest_version
|
26
|
+
url = URI("https://rubygems.org/api/v1/gems/wilday_ui.json")
|
27
|
+
response = Net::HTTP.get(url)
|
28
|
+
data = JSON.parse(response)
|
29
|
+
data["version"]
|
30
|
+
rescue StandardError => e
|
31
|
+
Rails.logger.info "[Wilday UI] Could not check for updates: #{e.message}"
|
32
|
+
nil
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wilday_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- davidwinalda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -60,6 +60,7 @@ files:
|
|
60
60
|
- lib/wilday_ui.rb
|
61
61
|
- lib/wilday_ui/engine.rb
|
62
62
|
- lib/wilday_ui/version.rb
|
63
|
+
- lib/wilday_ui/version_check.rb
|
63
64
|
homepage: https://github.com/davidwinalda/wildayui
|
64
65
|
licenses:
|
65
66
|
- MIT
|