From f8938c83608efd064a4723a790a584d1c77786fc Mon Sep 17 00:00:00 2001 From: gintama91 Date: Fri, 28 Jul 2023 19:16:08 +0530 Subject: [PATCH] update readme and add example update readme and add examples --- README.md | 53 +++++++++++++++++++++++------------------ examples/new_window.rb | 3 +++ lib/wry_ruby/version.rb | 2 +- wry_ruby.gemspec | 4 +--- 4 files changed, 35 insertions(+), 27 deletions(-) create mode 100644 examples/new_window.rb diff --git a/README.md b/README.md index f4a16fa..2fa5efc 100644 --- a/README.md +++ b/README.md @@ -1,49 +1,56 @@ # WryRuby -WryRuby is a project that provides experimental Ruby bindings for the [Tauri Wry library]https://github.com/tauri-apps/wry). It aims to facilitate using Wry functionality in Ruby applications. +[![License](https://img.shields.io/github/license/gintama91/wry_ruby)](https://opensource.org/licenses/MIT) +[![Issues](https://img.shields.io/github/issues/gintama91/wry_ruby)](https://github.com/gintama91/wry_ruby/issues) +[![Stars](https://img.shields.io/github/stars/gintama91/wry_ruby)](https://github.com/gintama91/wry_ruby/stargazers) -**Note: This PROJECT and README is a work in progress and will be updated later.** +## Overview -**Please note that the tests in this project are expected to fail in a continuous integration (CI) environment due to the inability to render graphics or open a display in a headless environment.**(currently looking for ways to work this) +WryRuby is an **EXPERIMENTAL** Ruby project that provides ruby bindings for [Tauri's Wry library](https://github.com/tauri-apps/wry). Its main objective is to streamline the integration of Wry's functionality into Ruby applications, offering developers an exceptional toolkit for building dynamic desktop applications. -## Usage +**Please Note: This project and README are constantly evolving, and updates will be made frequently to deliver the best experience to our users.** -(TODO: Add usage instructions) +## 🚀 Features -Currently, WryRuby supports the following features: +- **`Trayid`**: Simplified creation of system tray icons. +- **`New Window`**: Easy window creation for your Ruby application. +- **`Clipboard`**: Access to the system clipboard with convenience. +- **`Event Loop`**: Create and manage application event loops. *(Currently, only `new` is supported)*. +- **`window_with_html`**: Create new windows with HTML content. -- **Trayid**: Provides functionality for creating system tray icons. -- **New Window**: Allows creating new windows for your application. -- **Clipboard**: Provides access to the system clipboard. -- **Event Loop**: Allows creating and managing event loops for your application. as of now only new +## 📝 Usage -To see examples of how to use these features in Ruby, please refer to the tests directory in this project. +For examples and usage instructions, please refer to the `tests` directory or `examples` directory. -## Installation +## 💻 Installation -To use WryRuby in your Ruby project, you can add it as a dependency in your Gemfile: +To get started with WryRuby, you can install it using: -```ruby -gem 'wry_ruby' +```bash +gem install wry_ruby ``` -Then, run the following command to install the gem: +### 🛠️ Development Setup + +To contribute to the development of WryRuby, ensure you have Ruby and Rust installed on your system. Refer to the `.rust-version` and `.ruby-version` files for specific version requirements. + +Install the dependencies based on your platform from [here](https://github.com/tauri-apps/wry#platform-specific-notes) ```bash +git clone https://github.com/gintama91/wry_ruby.git bundle install ``` -Alternatively, you can install it directly using gem: +To run examples: ```bash -gem install wry_ruby +ruby examples/new_window.rb # Replace with the specific example name ``` -## Contributing - -Bug reports and pull requests are welcome on GitHub at https://github.com/gintama91/wry_ruby +## Contributing ❤️ -## License +We welcome bug reports and pull requests on our [GitHub repository](https://github.com/gintama91/wry_ruby). Join us in improving and expanding the capabilities of WryRuby. -The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). +## License 📜 +WryRuby is an open-source project licensed under the [MIT License](https://opensource.org/licenses/MIT). Feel free to use it and contribute to the community. diff --git a/examples/new_window.rb b/examples/new_window.rb new file mode 100644 index 0000000..39ee554 --- /dev/null +++ b/examples/new_window.rb @@ -0,0 +1,3 @@ +require_relative "../lib/wry_ruby/wry_ruby" + +new_window("Hello Wry", 100, 400, true, 3) diff --git a/lib/wry_ruby/version.rb b/lib/wry_ruby/version.rb index 93db609..ecfcd30 100644 --- a/lib/wry_ruby/version.rb +++ b/lib/wry_ruby/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module WryRuby - VERSION = "0.1.0" + VERSION = "0.0.1" end diff --git a/wry_ruby.gemspec b/wry_ruby.gemspec index a47ffa0..338d809 100644 --- a/wry_ruby.gemspec +++ b/wry_ruby.gemspec @@ -5,7 +5,7 @@ require_relative "lib/wry_ruby/version" Gem::Specification.new do |spec| spec.name = "wry_ruby" spec.version = WryRuby::VERSION - spec.authors = ["gintama91"] + spec.authors = ["Pavan Nambi"] spec.email = ["pavannambi0408@gmail.com"] spec.summary = "Ruby bindings for Wry." @@ -15,8 +15,6 @@ Gem::Specification.new do |spec| spec.required_ruby_version = ">= 2.6.0" spec.required_rubygems_version = ">= 3.3.11" - spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'" - spec.metadata["homepage_uri"] = spec.homepage spec.metadata["source_code_uri"] = "https://github.com/gintama91/wry_ruby" # spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."