qrcodeable 1.0.2 → 1.0.3

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
  SHA1:
3
- metadata.gz: 5e0687a8556dd0ceb06b30bbba60b3237ecdc47f
4
- data.tar.gz: df6ccc2ff007448fe9873183ea1d5c5fb57c6b73
3
+ metadata.gz: 628fd6a1f1b4e1fecdb2e62a84cb6e542bc7af35
4
+ data.tar.gz: b2ade24352a5010a6808dcc52a55213d09558552
5
5
  SHA512:
6
- metadata.gz: db1ec9c539196bc49f2afe3645765647a0fe83fb2c36ece84abee30c11ed0ea7c77e56468447a65a2cce3725d3714a8897a0cfc80d41482b76839722c5699b3a
7
- data.tar.gz: 63d8dcda9713b3f3551b8c76d2afa22d4320ef1b1a49a943ca4c565f62ce133d5896e0865973df189321d7c63b3af6a8237cfbd6596cf9abf5d82d9ac021d8a3
6
+ metadata.gz: fce11a7d6c65004dde2276f2c8c8744cef46534c858bb7e2c3119886eda8ba6a29da6279b531ad8375c69ce84c08afbae94c0accce4263f95e6896fc7adea36c
7
+ data.tar.gz: c826c37b5b8ce027d956a1e53479ba479e5e2494aefaf75dc29c848f3aa16433f522993b5e1c38bc3e492b0a04142e236c9cb1622b6d4360c98e6f37b261a0ac
data/.gitignore CHANGED
@@ -8,3 +8,4 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  README.html
11
+ .DS_Store
data/README.md CHANGED
@@ -30,10 +30,16 @@ to your model. You will need to add column `key` in your model using migration.
30
30
 
31
31
  Options :
32
32
 
33
- - `identifier`. A QRCode value used to generate QRCOde. Default value is `:key`
34
- - `print_path`. Default direcory for this gem. Default value is `"qrcodes/download"`
33
+ - `identifier`. A QRCode value used to generate QRCOde. Default value is `:key`.
34
+ - `print_path`. Default direcory for this gem. Default value is `"qrcodes/download"`.
35
35
  - `expire_mode`. Set to `true` if you want QRCode have expired_date. Default value is `false`.
36
- - `expire_column`. You will need to add column `:expired_date` using migration if you set `expire_mode` to `true`. Default value is `:expired_date`
36
+ - `expire_column`. You will need to add column `:expired_date` using migration if you set `expire_mode` to `true`. Default value is `:expired_date`.
37
+
38
+ Available methods :
39
+
40
+ - `print_qrcode` print qrcode, return `print_path`. You can add to callback or event send_file from controller.
41
+ - `qrcode_path` show qrcode_path, return `print_path`.
42
+ - `qrcode_expired?` check whether it is expired or not, return boolean.
37
43
 
38
44
  ## Examples
39
45
 
@@ -89,7 +95,21 @@ qrcodeable expired_mode: true, expire_column: :due_date
89
95
  - can expiring
90
96
  - expire_colum `:due_date`
91
97
 
98
+ ### Example 6
99
+ ```ruby
100
+ class Product < ApplicationRecord
101
+ qrcodeable expired_mode: true
102
+ end
103
+
104
+ @product = Product.new(name: "Yellow Jacket", key: "1234567890", expired_date: (Time.now+5.days))
92
105
 
106
+ @product.print_qrcode
107
+
108
+ @product.qrcode_path
109
+
110
+ @product.qrcode_expired?
111
+
112
+ ```
93
113
 
94
114
  ## TODO:
95
115
 
@@ -1,3 +1,3 @@
1
1
  module Qrcodeable
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qrcodeable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - yunanhelmy