z-rqr 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ *.log
2
+ *.swp
3
+ *.swo
4
+ *.o
5
+ .config
6
+ pkg/
7
+ InstalledFiles
8
+ ext/rqr/Makefile
9
+ ext/rqr/QR.bundle
10
+ ext/rqr/conftest.dSYM/
data/History.txt ADDED
@@ -0,0 +1,8 @@
1
+ == 0.1.1 2008-05-26
2
+
3
+ * Update API.
4
+
5
+ == 0.1.0 2008-05-23
6
+
7
+ * 1 major enhancement:
8
+ * Initial release
data/License.txt ADDED
@@ -0,0 +1,23 @@
1
+ Note: Original QR_Encode.h and QR_Encode.cpp are free license. (by Psytec Inc)
2
+
3
+ Copyright (c) 2008 Ryota Maruko, Keiko Soezima
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.
23
+
data/Manifest.txt ADDED
@@ -0,0 +1,29 @@
1
+ History.txt
2
+ License.txt
3
+ Manifest.txt
4
+ README.txt
5
+ Rakefile
6
+ config/hoe.rb
7
+ config/requirements.rb
8
+ ext/rqr/QR_Encode.cpp
9
+ ext/rqr/QR_Encode.h
10
+ ext/rqr/extconf.rb
11
+ ext/rqr/qr.i
12
+ ext/rqr/qr_draw.h
13
+ ext/rqr/qr_draw_jpeg.cpp
14
+ ext/rqr/qr_draw_jpeg.h
15
+ ext/rqr/qr_draw_png.cpp
16
+ ext/rqr/qr_draw_png.h
17
+ ext/rqr/qr_draw_ps.cpp
18
+ ext/rqr/qr_draw_ps.h
19
+ ext/rqr/qr_draw_tiff.cpp
20
+ ext/rqr/qr_draw_tiff.h
21
+ ext/rqr/qr_wrap.cxx
22
+ ext/rqr/win2ansi.h
23
+ lib/rqr.rb
24
+ lib/rqr/errors.rb
25
+ lib/rqr/qrcode.rb
26
+ lib/rqr/version.rb
27
+ setup.rb
28
+ test/test_helper.rb
29
+ test/test_rqr.rb
data/README.txt ADDED
@@ -0,0 +1,87 @@
1
+ == rqr
2
+
3
+ * http://rubyforge.org/projects/rqr/
4
+
5
+ == DESCRIPTION:
6
+
7
+ A ruby library to create QR code image. Output: PS, JPEG, PNG, EPS, TIFF.
8
+
9
+ == SYNOPSIS:
10
+
11
+ require "rubygem"
12
+ require "rqrcode"
13
+
14
+ qr = RQR::QRCode.new()
15
+
16
+ #Define a file format with extensions.
17
+ qr.save("http://www.google.com", "path/to/qrcode.jpg")
18
+
19
+ #Define a file format with symbol.
20
+ qr.save("http://www.yahoo.com", "path/to/qrcodefile", :png)
21
+
22
+
23
+ #QRCode options
24
+ #Use options with hash values.
25
+ #:level L:0, M:1(default), Q:2, H:3
26
+ #:version S:0(default), M:1, L:2
27
+ #:auto_extent true|false auto extent if over version size
28
+ #:masking masking pattern 0-7, -1(default auto)
29
+ #:length data length
30
+ #:module_size module size (pixel)
31
+ #:eps_preview true|false
32
+
33
+ #This sample creates a EPS with preview.
34
+ qr = QRCode.new(:eps_preview => true, :auto_extent=false)
35
+ qr.save("http://www.ebay.com", "path/to/qrcode.eps")
36
+
37
+ == REQUIREMENTS:
38
+
39
+ * libjpeg
40
+ * libpng
41
+ * libtiff
42
+
43
+ == Note:
44
+ If using OSX, Use Fink(http://www.finkproject.org) Universal Binary libs.
45
+ * sudo fink install libjpeg
46
+ * sudo fink install libpng
47
+ * sudo fink install libtiff
48
+
49
+ or use MacPorts (http://www.macports.com)
50
+ * sudo port install jpeg
51
+ * sudo fink install libpng
52
+ * sudo fink install libtiff
53
+
54
+
55
+ == INSTALL:
56
+
57
+
58
+ * "cd" to this folder
59
+ * "rake package" (install the required gems if requested)
60
+ * "cd pkg"
61
+ * "sudo gem install rqr"
62
+
63
+
64
+ == LICENSE:
65
+
66
+ (The MIT License)
67
+
68
+ Copyright (c) 2008 Ryota Maruko, Keiko Soezima
69
+
70
+ Permission is hereby granted, free of charge, to any person obtaining
71
+ a copy of this software and associated documentation files (the
72
+ 'Software'), to deal in the Software without restriction, including
73
+ without limitation the rights to use, copy, modify, merge, publish,
74
+ distribute, sublicense, and/or sell copies of the Software, and to
75
+ permit persons to whom the Software is furnished to do so, subject to
76
+ the following conditions:
77
+
78
+ The above copyright notice and this permission notice shall be
79
+ included in all copies or substantial portions of the Software.
80
+
81
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
82
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
83
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
84
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
85
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
86
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
87
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,4 @@
1
+ require 'config/requirements'
2
+ require 'config/hoe' # setup Hoe + all gem configuration
3
+
4
+ Dir['tasks/**/*.rake'].each { |rake| load rake }
data/config/hoe.rb ADDED
@@ -0,0 +1,71 @@
1
+ require 'rqr/version'
2
+
3
+ AUTHOR = 'Ryota Maruko' # can also be an array of Authors
4
+ EMAIL = "pools _at_ rubyforge _dot_ org"
5
+ DESCRIPTION = "A ruby library to create qrcode. Output: PS, JPEG, PNG, EPS, TIFF."
6
+ GEM_NAME = 'rqr' # what ppl will type to install your gem
7
+ RUBYFORGE_PROJECT = 'rqr' # The unix name for your project
8
+ HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
9
+ DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
10
+
11
+ @config_file = "~/.rubyforge/user-config.yml"
12
+ @config = nil
13
+ RUBYFORGE_USERNAME = "unknown"
14
+ def rubyforge_username
15
+ unless @config
16
+ begin
17
+ @config = YAML.load(File.read(File.expand_path(@config_file)))
18
+ rescue
19
+ puts <<-EOS
20
+ ERROR: No rubyforge config file found: #{@config_file}
21
+ Run 'rubyforge setup' to prepare your env for access to Rubyforge
22
+ - See http://newgem.rubyforge.org/rubyforge.html for more details
23
+ EOS
24
+ exit
25
+ end
26
+ end
27
+ RUBYFORGE_USERNAME.replace @config["username"]
28
+ end
29
+
30
+
31
+ REV = nil
32
+ # UNCOMMENT IF REQUIRED:
33
+ # REV = `svn info`.each {|line| if line =~ /^Revision:/ then k,v = line.split(': '); break v.chomp; else next; end} rescue nil
34
+ VERS = RQR::VERSION::STRING + (REV ? ".#{REV}" : "")
35
+ RDOC_OPTS = ['--quiet', '--title', 'rqr documentation',
36
+ "--opname", "index.html",
37
+ "--line-numbers",
38
+ "--main", "README",
39
+ "--inline-source"]
40
+
41
+ class Hoe
42
+ def extra_deps
43
+ @extra_deps.reject! { |x| Array(x).first == 'hoe' }
44
+ @extra_deps
45
+ end
46
+ end
47
+
48
+ # Generate all the Rake tasks
49
+ # Run 'rake -T' to see list of generated tasks (from gem root directory)
50
+ $hoe = Hoe.new(GEM_NAME, VERS) do |p|
51
+ p.developer(AUTHOR, EMAIL)
52
+ p.description = DESCRIPTION
53
+ p.summary = DESCRIPTION
54
+ p.url = HOMEPATH
55
+ p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
56
+ p.test_globs = ["test/**/test_*.rb"]
57
+ p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.
58
+
59
+ # == Optional
60
+ p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
61
+ #p.extra_deps = [] # An array of rubygem dependencies [name, version], e.g. [ ['active_support', '>= 1.3.1'] ]
62
+
63
+ #p.spec_extras = {} # A hash of extra values to set in the gemspec.
64
+ p.spec_extras[:extensions] = ['ext/rqr/extconf.rb']
65
+
66
+ end
67
+
68
+ CHANGES = $hoe.paragraphs_of('History.txt', 0..1).join("\\n\\n")
69
+ PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}"
70
+ $hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
71
+ $hoe.rsync_args = '-av --delete --ignore-errors'
@@ -0,0 +1,15 @@
1
+ require 'fileutils'
2
+ include FileUtils
3
+
4
+ require 'rubygems'
5
+ %w[rake hoe newgem rubigen].each do |req_gem|
6
+ begin
7
+ require req_gem
8
+ rescue LoadError
9
+ puts "This Rakefile requires the '#{req_gem}' RubyGem."
10
+ puts "Installation: gem install #{req_gem} -y"
11
+ exit
12
+ end
13
+ end
14
+
15
+ $:.unshift(File.join(File.dirname(__FILE__), %w[.. lib]))