place_kitten 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ pkg/*
2
+ *.gem
3
+ .bundle
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in place_kitten.gemspec
4
+ gemspec
data/README.markdown ADDED
@@ -0,0 +1,21 @@
1
+ # PlaceKitten - awesome kittens as placeholders
2
+
3
+ So you want to use the awesome placekitten.com service from Ruby?
4
+ This is what you want to use!
5
+
6
+ ## Usage
7
+
8
+ require 'place_kitten'
9
+ PlaceKitten.kitten_for(800, 600) # Get a url for a 800 by 600 kitten image
10
+
11
+ ## Usage from rails
12
+
13
+ Put the following in your Gemfile
14
+ gem 'place_kitten'
15
+ and run bundle install
16
+
17
+ From your views you can now display kittens like this:
18
+ image_tag(Placekitten.kitten_for(800,600))
19
+
20
+ ## Wanna help?
21
+ This is git. Fork it, hack away, tell me about it!
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,6 @@
1
+ module PlaceKitten
2
+ # Returns a url to the kitten placeholder of the requested size
3
+ def self.kitten_for(width=1200,height=1800)
4
+ "http://placekitten.com/#{width}/#{height}"
5
+ end
6
+ end
@@ -0,0 +1,3 @@
1
+ module PlaceKitten
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,21 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "place_kitten/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "place_kitten"
7
+ s.version = PlaceKitten::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Wijnand Wiersma"]
10
+ s.email = ["wijnand@videre.net"]
11
+ s.homepage = "https://github.com/Wijnand/PlaceKitten"
12
+ s.summary = %q{Small helper for using the placekitten.com service from a ruby app}
13
+ s.description = %q{Small helper for using the placekitten.com service from a ruby app}
14
+
15
+ s.rubyforge_project = "place_kitten"
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.require_paths = ["lib"]
21
+ end
metadata ADDED
@@ -0,0 +1,71 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: place_kitten
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 1
9
+ version: 0.0.1
10
+ platform: ruby
11
+ authors:
12
+ - Wijnand Wiersma
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2011-02-28 00:00:00 +01:00
18
+ default_executable:
19
+ dependencies: []
20
+
21
+ description: Small helper for using the placekitten.com service from a ruby app
22
+ email:
23
+ - wijnand@videre.net
24
+ executables: []
25
+
26
+ extensions: []
27
+
28
+ extra_rdoc_files: []
29
+
30
+ files:
31
+ - .gitignore
32
+ - Gemfile
33
+ - README.markdown
34
+ - Rakefile
35
+ - lib/place_kitten.rb
36
+ - lib/place_kitten/version.rb
37
+ - place_kitten.gemspec
38
+ has_rdoc: true
39
+ homepage: https://github.com/Wijnand/PlaceKitten
40
+ licenses: []
41
+
42
+ post_install_message:
43
+ rdoc_options: []
44
+
45
+ require_paths:
46
+ - lib
47
+ required_ruby_version: !ruby/object:Gem::Requirement
48
+ none: false
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ segments:
53
+ - 0
54
+ version: "0"
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ segments:
61
+ - 0
62
+ version: "0"
63
+ requirements: []
64
+
65
+ rubyforge_project: place_kitten
66
+ rubygems_version: 1.3.7
67
+ signing_key:
68
+ specification_version: 3
69
+ summary: Small helper for using the placekitten.com service from a ruby app
70
+ test_files: []
71
+