qr4r 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +6 -3
- data/lib/qr4r/version.rb +1 -1
- metadata +61 -53
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# QR Encoding via Ruby - with PNG output
|
2
2
|
|
3
|
-
Leveraging [rqrcode](http://whomwah.github.com/rqrcode/) and [mojo_magick](http://github.com/
|
3
|
+
Leveraging [rqrcode](http://whomwah.github.com/rqrcode/) and [mojo_magick](http://github.com/rcode5/mojo_magick), we've built a very thin gem that generates QR codes in a png file
|
4
4
|
|
5
5
|
# Include in your project
|
6
6
|
|
@@ -12,6 +12,8 @@ In your code, add
|
|
12
12
|
|
13
13
|
require 'qr4r'
|
14
14
|
|
15
|
+
NOTE: you'll need to have ImageMagick installed wherever you plan to run this. The gem depends on [mojo_magick](http://github.com/rcode5/mojo_magick) which uses ImageMagick commandline operations to build the final PNG image.
|
16
|
+
|
15
17
|
To use it:
|
16
18
|
|
17
19
|
Qr4r::encode(input_string, output_file_path, options)
|
@@ -20,7 +22,6 @@ To use it:
|
|
20
22
|
|
21
23
|
* :pixel_size - specify the size of each 'black' dot in the qrcode. Default = 3
|
22
24
|
* :border - specify the number of pixels to use for a white border around the outside. Default = 0
|
23
|
-
* :size - used by the qr code generation. A lower number means a smaller overall image. But it also means that you can encode fewer characters. This is computeed for you by default based on the input string size. You should not need to adjust it.
|
24
25
|
|
25
26
|
To encode the string 'qr codes are the new hotness' like this:
|
26
27
|
|
@@ -41,15 +42,17 @@ Add a fat border
|
|
41
42
|
fname = s.gsub(/\s+/,"_") + ".qr.png"
|
42
43
|
Qr4r::encode(s, fname, :border => 20)
|
43
44
|
|
45
|
+
NOTE: The current implementation or rQRCode (and therefore this wrapper library) supports encoding up to 119 characters. Beyond that, you'll need something a bit more sophisticated.
|
44
46
|
|
45
47
|
## Authors
|
46
48
|
|
47
|
-
Original author: [Jon Rogers](http://github.com/bunnymatic) [at
|
49
|
+
Original author: [Jon Rogers](http://github.com/bunnymatic) [at rcode5](http://www.rcode5.com)
|
48
50
|
|
49
51
|
Thanks to [Duncan Robertson](http://whomwah.github.com/rqrcode/) for writing rQRCode
|
50
52
|
|
51
53
|
## Contributing
|
52
54
|
* Fork the project
|
55
|
+
* Write a test for your new feature/method
|
53
56
|
* Send a pull request
|
54
57
|
* Don't bump the version or modify the gemspec. I'll do that when I merge in your mods and release a new version.
|
55
58
|
|
data/lib/qr4r/version.rb
CHANGED
metadata
CHANGED
@@ -1,60 +1,71 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: qr4r
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.4
|
4
5
|
prerelease:
|
5
|
-
version: 0.3.3
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Jon Rogers
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-09-17 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
16
15
|
name: rqrcode
|
17
|
-
|
18
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
19
17
|
none: false
|
20
|
-
requirements:
|
21
|
-
- -
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version:
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
24
22
|
type: :runtime
|
25
|
-
version_requirements: *id001
|
26
|
-
- !ruby/object:Gem::Dependency
|
27
|
-
name: mojo_magick
|
28
23
|
prerelease: false
|
29
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
25
|
none: false
|
31
|
-
requirements:
|
32
|
-
- -
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version:
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: mojo_magick
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
35
38
|
type: :runtime
|
36
|
-
version_requirements: *id002
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: rake
|
39
39
|
prerelease: false
|
40
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version:
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rake
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
46
54
|
type: :development
|
47
|
-
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
48
62
|
description: QR PNG Generator for Ruby. Leveraging RQRCode and MojoMagick modules
|
49
|
-
email:
|
63
|
+
email:
|
50
64
|
- r@2rye.com
|
51
65
|
executables: []
|
52
|
-
|
53
66
|
extensions: []
|
54
|
-
|
55
67
|
extra_rdoc_files: []
|
56
|
-
|
57
|
-
files:
|
68
|
+
files:
|
58
69
|
- .rvmrc
|
59
70
|
- Gemfile
|
60
71
|
- README.md
|
@@ -68,30 +79,27 @@ files:
|
|
68
79
|
- test/qr4r_test.rb
|
69
80
|
homepage: http://github.com/2rye/qr4r
|
70
81
|
licenses: []
|
71
|
-
|
72
82
|
post_install_message:
|
73
83
|
rdoc_options: []
|
74
|
-
|
75
|
-
require_paths:
|
84
|
+
require_paths:
|
76
85
|
- lib
|
77
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
86
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
78
87
|
none: false
|
79
|
-
requirements:
|
80
|
-
- -
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version:
|
83
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ! '>='
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
84
93
|
none: false
|
85
|
-
requirements:
|
86
|
-
- -
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version:
|
94
|
+
requirements:
|
95
|
+
- - ! '>='
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
89
98
|
requirements: []
|
90
|
-
|
91
99
|
rubyforge_project: qr4r
|
92
|
-
rubygems_version: 1.8.
|
100
|
+
rubygems_version: 1.8.23
|
93
101
|
signing_key:
|
94
102
|
specification_version: 3
|
95
|
-
summary: qr4r-0.3.
|
96
|
-
test_files:
|
103
|
+
summary: qr4r-0.3.4
|
104
|
+
test_files:
|
97
105
|
- test/qr4r_test.rb
|