README.md in flayyer-1.0.0 vs README.md in flayyer-1.1.0

- old
+ new

@@ -1,10 +1,10 @@ # flayyer-ruby -This gem is agnostic to any Ruby framework. +This gem is agnostic to any Ruby framework and has zero external dependencies. -To create a template please refer to: [flayyer.com](https://flayyer.com?ref=flayyer-ruby) +To create a FLAYYER template please refer to: [flayyer.com](https://flayyer.com?ref=flayyer-ruby) ## Installation Add this line to your application's Gemfile: @@ -12,35 +12,39 @@ gem 'flayyer' ``` And then execute: - $ bundle install +```sh +bundle install +``` Or install it yourself as: - $ gem install flayyer +```sh +gem install flayyer +``` ## Usage After installing the gem you can format URL as: ```ruby require 'flayyer' flayyer = Flayyer::FlayyerURL.create do |f| - f.tenant = 'flayyer' + f.tenant = 'tenant' f.deck = 'deck' f.template = 'template' f.variables = { title: 'Hello world!' } end # Use this image in your <head/> tags url = flayyer.href -# > https://flayyer.host/v2/flayyer/deck/template.jpeg?__v=1596906866&title=Hello+world%21 +# > https://flayyer.io/v2/tenant/deck/template.jpeg?__v=1596906866&title=Hello+world%21 ``` Variables can be complex arrays and hashes. ```ruby @@ -53,16 +57,16 @@ ], } end ``` -**IMPORTANT: variables should be serializable.** +**IMPORTANT: variables must be serializable.** To decode the URL for debugging purposes: ```ruby print(CGI.unescape(url)) -# > https://flayyer.host/v2/flayyer/deck/template.jpeg?title=Hello+world!&__v=123 +# > https://flayyer.io/v2/tenant/deck/template.jpeg?title=Hello+world!&__v=123 ``` ## Ruby on Rails Ruby on Rails will try to safely render strings into the HTML. Any FLAYYER string is already safe-serialized and should not be serialized again.