rqrcode_kingblade 0.2.0 → 0.2.1

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
- SHA1:
3
- metadata.gz: 9858eab18b0f3be266cc5a4a35a3fcbe47e61255
4
- data.tar.gz: b2398f8ce82a97691dba457c3c7656f3adc84f27
2
+ SHA256:
3
+ metadata.gz: a59fc2360112967bedb22b9c354e49c5ae2372e84263597031639ba4494c80cb
4
+ data.tar.gz: 29dd5fc5d509f2a80d62d65cf04e3f9c1352707f04c45ee68b448c056f5507a9
5
5
  SHA512:
6
- metadata.gz: 7c48736d44e3a0938a05e4a7943323f1db4d814798282edc495fd58a1efb15f5cb227e2049ad7e64818ebdc258430ea70b0ced381d5680f7527a8ccee250562f
7
- data.tar.gz: 5e1cc98f8f37cf47cc664895315792c0a088dc1bfecadbd53403f9ef92eb4e33a766ec56e10e3453936a95b1461ee95d6ace8b44d2cf34cd1479f4346f067252
6
+ metadata.gz: 786ce2e735e3849fcf0a9321e92530493d48c335831c4720a84400b528ca8c236c12630cec00bc42b1d06e162e4778d5f358d499714fe6bc19e560a75369d69b
7
+ data.tar.gz: 1bab27786325a62a2d689f933ae415997572ad36e42ccb4cac9f6c827b7df60d9b0b2cc04107a10c8d40ea1afe4709b302a0b310ed8e91c613968404febc0a71
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 nmoriya
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/lib/kb_colors.rb CHANGED
@@ -8,7 +8,17 @@ class KbColors
8
8
  def initialize(opts = {})
9
9
  @kb_colors = Array.new()
10
10
  @title = ""
11
- @header = "Copyright RUIFAN"
11
+ case opts[:kb_version]
12
+ when "KBX3"
13
+ @header = "Copyright RUIFAN"
14
+ ;;
15
+ when "KBX5"
16
+ @header = "Copyright RUIFAN:KBX5"
17
+ ;;
18
+ else
19
+ @header = "Copyright RUIFAN"
20
+ end
21
+
12
22
  @max_length = 15
13
23
  if opts[:title]
14
24
  @title = opts[:title]
@@ -1,3 +1,3 @@
1
1
  module RqrcodeKingblade
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -8,6 +8,7 @@ module RqrcodeKingblade
8
8
  def initialize
9
9
  @kb_colors = KbColors.new
10
10
  @kb_colors.title = "test"
11
+ @kb_version = "KBX5"
11
12
  @filename = "test.png"
12
13
  end
13
14
 
@@ -26,7 +27,11 @@ module RqrcodeKingblade
26
27
  end
27
28
 
28
29
  def to_img
29
- RQRCode::QRCode.new(@kb_colors.to_s, :size => 14 , :level => 'h').to_img
30
+ RQRCode::QRCode.new(@kb_colors.to_s, :size => 14 , :level => 'h').as_img
31
+ end
32
+
33
+ def to_svg
34
+ RQRCode::QRCode.new(@kb_colors.to_s, :size => 14 , :level => 'h').as_svg
30
35
  end
31
36
  end
32
37
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rqrcode_kingblade
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - inpwjp
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-15 00:00:00.000000000 Z
11
+ date: 2022-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rqrcode_png
@@ -63,6 +63,7 @@ files:
63
63
  - ".travis.yml"
64
64
  - Gemfile
65
65
  - Guardfile
66
+ - LICENSE.txt
66
67
  - README.md
67
68
  - Rakefile
68
69
  - bin/console
@@ -91,8 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
92
  - !ruby/object:Gem::Version
92
93
  version: '0'
93
94
  requirements: []
94
- rubyforge_project:
95
- rubygems_version: 2.4.5
95
+ rubygems_version: 3.0.8
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: make qrcode for the kingblade III.