From 23bd0e707ea78b13dc079d411c76779f27162da6 Mon Sep 17 00:00:00 2001 From: Sam Vincent Date: Sun, 22 May 2011 08:55:58 -0700 Subject: [PATCH] Update a few things --- .gitignore | 1 + Gemfile | 2 +- README.rdoc | 5 +++++ Rakefile | 2 +- rqrcode_rails3.gemspec | 15 +++++++++++---- test/integration/navigation_test.rb | 4 ++-- 6 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 6d9dd6b..172ea2f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ test/dummy/db/*.sqlite3 test/dummy/log/*.log test/dummy/tmp/ Gemfile.lock +*.gem diff --git a/Gemfile b/Gemfile index 1d1e7f7..4ed00c2 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source "http://rubygems.org" gem "rails", ">= 3.0.0" -gem "capybara" #, ">= 0.4.0" +gem "capybara", ">= 0.4.0" gem "sqlite3" gem "rqrcode" diff --git a/README.rdoc b/README.rdoc index eb36708..981d24c 100644 --- a/README.rdoc +++ b/README.rdoc @@ -20,6 +20,11 @@ In your controller actions, you can return a QRCode that links to the current pa format.svg { render :qrcode => request.url } format.png { render :qrcode => request.url } end + +---------------------------------------- + +This project was inspired by the first chapter in José Valim's book "Crafting Rails Applications." +QR Codes are encoded by 'rqrcode' [https://github.com/whomwah/rqrcode] ---------------------------------------- diff --git a/Rakefile b/Rakefile index a6302f6..323c992 100644 --- a/Rakefile +++ b/Rakefile @@ -22,7 +22,7 @@ task :default => :test Rake::RDocTask.new(:rdoc) do |rdoc| rdoc.rdoc_dir = 'rdoc' - rdoc.title = 'Rqrcode-svg' + rdoc.title = 'rqrcode-rails3' rdoc.options << '--line-numbers' << '--inline-source' rdoc.rdoc_files.include('README.rdoc') rdoc.rdoc_files.include('lib/**/*.rb') diff --git a/rqrcode_rails3.gemspec b/rqrcode_rails3.gemspec index f795a05..24213cf 100644 --- a/rqrcode_rails3.gemspec +++ b/rqrcode_rails3.gemspec @@ -1,9 +1,16 @@ # Provide a simple gemspec so you can easily use your enginex # project in your rails apps through git. Gem::Specification.new do |s| - s.name = "rqrcode-rails3" - s.summary = "Render QR Codes with Rails 3" + s.name = "rqrcode-rails3" + s.summary = "Render QR Codes with Rails 3" s.description = "Render QR Codes with Rails 3" - s.files = Dir["{app,lib,config}/**/*"] + ["MIT-LICENSE", "Rakefile", "Gemfile", "README.rdoc"] - s.version = "0.1.0" + + s.files = Dir["{app,lib,config}/**/*"] + ["MIT-LICENSE", "Rakefile", "Gemfile", "README.rdoc"] + + s.author = "Sam Vincent" + s.email = "sam.vincent@mac.com" + s.homepage = "http://github.com/samvincent/rqrcode-rails3" + s.version = "0.1.1" + + s.add_dependency 'rqrcode', '>= 0.3.3' end \ No newline at end of file diff --git a/test/integration/navigation_test.rb b/test/integration/navigation_test.rb index efb4413..4077668 100644 --- a/test/integration/navigation_test.rb +++ b/test/integration/navigation_test.rb @@ -5,14 +5,14 @@ class NavigationTest < ActiveSupport::IntegrationCase assert_kind_of Dummy::Application, Rails.application end - test 'svg request sends a svg as file' do + test 'svg request returns an SVG file' do visit home_path click_link 'SVG' assert_equal 'image/svg+xml; charset=utf-8', headers['Content-Type'] assert_equal File.read('test/support/data/qrcode.svg'), page.body end - test 'png request sends a png as file' do + test 'png request returns an PNG file' do visit home_path click_link 'PNG' assert_equal 'image/png; charset=utf-8', headers['Content-Type']