deelay 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in deelay.gemspec
4
+ gemspec
5
+ gem 'sinatra', "~>1.3.3"
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require 'deelay'
3
+
4
+ Deelay::DeelayApp.run!
@@ -0,0 +1,25 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "deelay/version"
4
+ require "deelay/homepage"
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "deelay"
8
+ s.version = Deelay::VERSION
9
+ s.authors = ["Grzegorz Biesiadecki"]
10
+ s.email = ["gbiesiadecki@gmail.com"]
11
+ s.homepage = Deelay::HOMEPAGE
12
+ s.summary = %q{Delaying proxy for http resources}
13
+ s.description = %q{With Deelay you can delay loading web resources with specified time}
14
+
15
+ s.rubyforge_project = "deelay"
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
+
22
+ # specify any dependencies here; for example:
23
+ s.add_development_dependency "rake"
24
+ # s.add_runtime_dependency "rest-client"
25
+ end
@@ -0,0 +1,3 @@
1
+ require "deelay/version"
2
+ require "deelay/homepage"
3
+ require "deelay/deelay_app"
@@ -0,0 +1,21 @@
1
+ require "sinatra"
2
+ require "uri"
3
+
4
+ module Deelay
5
+ class DeelayApp < Sinatra::Application
6
+ get '/' do
7
+ "Deelay app is running<BR>TODO: Add info here"
8
+ end
9
+
10
+ get '/:delay' do
11
+ delay = params[:delay].to_i
12
+ url = params[:url]
13
+
14
+ redirect('http://deelay.me/') if (url =~ URI::regexp).nil?
15
+
16
+ sleep delay
17
+ redirect url
18
+ end
19
+
20
+ end
21
+ end
@@ -0,0 +1,3 @@
1
+ module Deelay
2
+ HOMEPAGE = "http://deelay.me/"
3
+ end
@@ -0,0 +1,3 @@
1
+ module Deelay
2
+ VERSION = "0.0.3"
3
+ end
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: deelay
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Grzegorz Biesiadecki
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-09-11 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake
16
+ requirement: &70361574162940 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: *70361574162940
25
+ description: With Deelay you can delay loading web resources with specified time
26
+ email:
27
+ - gbiesiadecki@gmail.com
28
+ executables:
29
+ - deelay
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - .gitignore
34
+ - Gemfile
35
+ - Rakefile
36
+ - bin/deelay
37
+ - deelay.gemspec
38
+ - lib/deelay.rb
39
+ - lib/deelay/deelay_app.rb
40
+ - lib/deelay/homepage.rb
41
+ - lib/deelay/version.rb
42
+ homepage: http://deelay.me/
43
+ licenses: []
44
+ post_install_message:
45
+ rdoc_options: []
46
+ require_paths:
47
+ - lib
48
+ required_ruby_version: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ segments:
55
+ - 0
56
+ hash: 4173881464281230329
57
+ required_rubygems_version: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ segments:
64
+ - 0
65
+ hash: 4173881464281230329
66
+ requirements: []
67
+ rubyforge_project: deelay
68
+ rubygems_version: 1.8.15
69
+ signing_key:
70
+ specification_version: 3
71
+ summary: Delaying proxy for http resources
72
+ test_files: []