Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

Commit

Permalink
Including rails gem
Browse files Browse the repository at this point in the history
  • Loading branch information
reu committed Mar 15, 2011
1 parent 5e0a21e commit e769d66
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Expand Up @@ -2,3 +2,5 @@ source "http://rubygems.org"

# Specify your gem's dependencies in traptcha.gemspec
gemspec

gem "rails", "~> 3.0.0"
5 changes: 5 additions & 0 deletions Gemfile.lock
Expand Up @@ -17,10 +17,15 @@ GEM
rspec-expectations (2.5.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.5.0)
thor (0.14.6)
treetop (1.4.9)
polyglot (>= 0.3.1)
tzinfo (0.3.24)

PLATFORMS
ruby

DEPENDENCIES
rails (~> 3.0.0)
rspec (~> 2.5.0)
traptcha!
5 changes: 5 additions & 0 deletions lib/traptcha.rb
Expand Up @@ -20,6 +20,11 @@ def default_wave_amplitude=(amplitude)
@@default_wave_amplitude = amplitude
end
end
mattr_accessor :default_wave_variation
@@default_wave_variation = (20..90)

mattr_accessor :default_wave_amplitude
@@default_wave_amplitude = 5

def self.setup
yield self
Expand Down
2 changes: 2 additions & 0 deletions lib/traptcha/image.rb
@@ -1,5 +1,7 @@
module Traptcha
class Image
delegate :to_png, :to => :output

def initialize(text, options = {})
@text = text
@canvas = Magick::Image.new(150, 100)
Expand Down

0 comments on commit e769d66

Please sign in to comment.