Skip to content

Commit

Permalink
Update a few things
Browse files Browse the repository at this point in the history
  • Loading branch information
samvincent committed May 22, 2011
1 parent eac76c4 commit 23bd0e7
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ test/dummy/db/*.sqlite3
test/dummy/log/*.log
test/dummy/tmp/
Gemfile.lock
*.gem
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
5 changes: 5 additions & 0 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]

----------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
15 changes: 11 additions & 4 deletions rqrcode_rails3.gemspec
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]"
s.homepage = "http://github.com/samvincent/rqrcode-rails3"
s.version = "0.1.1"

s.add_dependency 'rqrcode', '>= 0.3.3'
end
4 changes: 2 additions & 2 deletions test/integration/navigation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down

0 comments on commit 23bd0e7

Please sign in to comment.