This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * The first commented line is your dabblet’s title | |
| */ | |
| body { | |
| -webkit-perspective: 900; | |
| background:#E7E7E7; | |
| } | |
| .doorway { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * The first commented line is your dabblet’s title | |
| */ | |
| body { | |
| -webkit-perspective: 900; | |
| background:#E7E7E7; | |
| } | |
| .doorway { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| should "process :original style first" do | |
| file = File.new(File.join(File.dirname(__FILE__), "fixtures", "50x50.png"), 'rb') | |
| rebuild_class :styles => { :small => '100x>', :original => '42x42#' } | |
| dummy = Dummy.new | |
| dummy.avatar = file | |
| dummy.save | |
| # :small avatar should be 42px wide (processed original), not 50px (preprocessed original) | |
| assert_equal "42", `identify -format "%w" "#{dummy.avatar.path(:small)}"`.strip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| should "save the files as the right formats and sizes" do | |
| [[:large, 400, 61, "PNG"], | |
| [:medium, 100, 15, "GIF"], | |
| [:small, 32, 32, "JPEG"]].each do |style| | |
| cmd = %Q[identify -format "%w %h %b %m" "#{@attachment.path(style.first)}"] | |
| out = `#{cmd}` | |
| width, height, size, format = out.split(" ") | |
| assert_equal style[1].to_s, width.to_s | |
| assert_equal style[2].to_s, height.to_s | |
| assert_equal style[3].to_s, format.to_s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def test_sets_settings_with_hash | |
| user = User.create :name => 'Mr. Foo' | |
| user.settings[:three] = 3 | |
| user.settings = { :one => 1, :two => 2 } | |
| assert_equal 1, user.settings[:one] | |
| assert_equal 2, user.settings[:two] | |
| assert_equal 3, user.settings[:three] # ensure existing settings remain intact | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * The first commented line is your dabblet’s title | |
| */ | |
| body { | |
| -webkit-perspective: 900; | |
| background:#E7E7E7; | |
| } | |
| .doorway { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * The first commented line is your dabblet’s title | |
| */ | |
| background: #f06; | |
| background: linear-gradient(45deg, #f06, yellow); | |
| min-height:100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * The first commented line is your dabblet’s title | |
| */ | |
| body { | |
| -webkit-perspective: 900; | |
| background:#E7E7E7; | |
| } | |
| .doorway { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source "http://rubygems.org" | |
| gem 'json' | |
| gem 'ri_cal' | |
| gem 'tzinfo' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BEGIN:VCALENDAR | |
| PRODID;X-RICAL-TZSOURCE=TZINFO:-//com.denhaven2/NONSGML ri_cal gem//EN | |
| CALSCALE:GREGORIAN | |
| VERSION:2.0 | |
| BEGIN:VEVENT | |
| DTEND;VALUE=DATE-TIME:20120423T180000 | |
| DTSTART;VALUE=DATE-TIME:20120423T173000 | |
| DESCRIPTION:Rich Hickey\, the author of <a href="http://clojure.org/">Clo | |
| jure</a> and designer of <a href="http://datomic.com/">Datomic</a>\, is | |
| a software developer with over 20 years of experience in various domains |
OlderNewer