remi-lolcats 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +1 -1
  2. data/VERSION.yml +1 -1
  3. data/bin/lolcats +57 -0
  4. metadata +5 -4
data/Rakefile CHANGED
@@ -13,7 +13,7 @@ begin
13
13
  s.description = "I Can Has API?"
14
14
  s.authors = %w( remi )
15
15
  s.files = FileList["[A-Z]*", "{lib,spec,examples,rails_generators}/**/*"]
16
- # s.executables = "neato"
16
+ s.executables = "lolcats"
17
17
  # s.add_dependency 'person-project'
18
18
  end
19
19
  rescue LoadError
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 0
2
+ :patch: 1
3
3
  :major: 0
4
4
  :minor: 1
@@ -0,0 +1,57 @@
1
+ #! /usr/bin/env ruby
2
+ #
3
+ # web app that rotates lolcats
4
+ #
5
+ %w( rubygems sinatra lolcats ).each {|lib| require lib }
6
+
7
+ puts "\n\nTo view LOLcats, open your web browser to http://localhost:4567 \n\n"
8
+
9
+ get '/' do
10
+ @lolcat = Lolcats.gimme
11
+ haml :index
12
+ end
13
+
14
+ get '/random' do
15
+ "<img src='#{ Lolcats.gimme }' />"
16
+ end
17
+
18
+ get '/application.js' do
19
+ response['Content-Type'] = 'text/javascript'
20
+ %[
21
+ $(function(){
22
+ setInterval( function(){ $('#lolcat').load('/random') }, 8000 );
23
+ });
24
+ ]
25
+ end
26
+
27
+ get '/style.css' do
28
+ response['Content-Type'] = 'text/css'
29
+ %[
30
+ div#lolcat {
31
+ text-align: center;
32
+ }
33
+ div#lolcat img {
34
+ }
35
+ ]
36
+ end
37
+
38
+ use_in_file_templates!
39
+
40
+ __END__
41
+
42
+ @@ layout
43
+
44
+ !!! XML
45
+ !!! Strict
46
+ %html
47
+ %head
48
+ %title== I Can Has LOLcats?
49
+ %script{ :src => 'http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js', :type => 'text/javascript' }
50
+ %script{ :src => '/application.js', :type => 'text/javascript' }
51
+ %link{ :href => '/style.css', :rel => 'stylesheet', type => 'text/css' }
52
+ %body
53
+ #lolcat
54
+ = yield
55
+
56
+ @@ index
57
+ %img{ :src => @lolcat }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remi-lolcats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - remi
@@ -10,13 +10,13 @@ bindir: bin
10
10
  cert_chain: []
11
11
 
12
12
  date: 2009-02-26 00:00:00 -08:00
13
- default_executable:
13
+ default_executable: lolcats
14
14
  dependencies: []
15
15
 
16
16
  description: I Can Has API?
17
17
  email: remi@remitaylor.com
18
- executables: []
19
-
18
+ executables:
19
+ - lolcats
20
20
  extensions: []
21
21
 
22
22
  extra_rdoc_files: []
@@ -26,6 +26,7 @@ files:
26
26
  - VERSION.yml
27
27
  - README.markdown
28
28
  - lib/lolcats.rb
29
+ - bin/lolcats
29
30
  has_rdoc: true
30
31
  homepage: http://github.com/remi/lolcats
31
32
  post_install_message: