Skip to content

test #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 138 commits into
base: master
Choose a base branch
from
Open

test #15

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
98aba7f
test
drogus Dec 13, 2012
15e6a60
test
drogus Dec 13, 2012
0e4a673
Remove after_test
drogus Dec 13, 2012
cea7533
test
drogus Dec 14, 2012
6b2c44c
Flood log with dots
drogus Dec 14, 2012
0a6a6a2
test
drogus Dec 14, 2012
55e7167
test
drogus Dec 14, 2012
b6b2435
More slow dots
drogus Dec 17, 2012
9637148
Enable testing gh-pages
drogus Dec 18, 2012
cd858b9
test
drogus Dec 19, 2012
f26dc1e
test
drogus Dec 20, 2012
729d6f2
test
drogus Dec 20, 2012
62619d1
test
drogus Dec 20, 2012
d9a9643
test
drogus Dec 20, 2012
b32c018
test
drogus Dec 20, 2012
6e3d0e4
test
drogus Dec 20, 2012
0952f44
test
drogus Dec 20, 2012
339b46d
test
drogus Dec 21, 2012
0193c9a
Campfire notifications
drogus Dec 21, 2012
d3ee53a
test
drogus Dec 21, 2012
8b750cb
Add encrypted ENV variable
drogus Dec 21, 2012
72f08a7
test
drogus Dec 21, 2012
6d67901
test
drogus Dec 21, 2012
f0b0984
test
drogus Dec 21, 2012
3a33adb
test
drogus Dec 21, 2012
400eac3
test
drogus Dec 21, 2012
b036e98
test
drogus Dec 21, 2012
8805ac2
test
drogus Dec 21, 2012
ff16585
test
drogus Dec 21, 2012
a84fe13
test
drogus Dec 21, 2012
8936cc3
test
drogus Dec 21, 2012
5937340
test
drogus Dec 22, 2012
46b4ff5
Update .travis.yml
svenfuchs Dec 22, 2012
cd966d6
test
drogus Jan 14, 2013
2d1d738
Update Rakefile
svenfuchs Jan 18, 2013
1732eff
I hear Svens got a lovely bunch of coconuts
joshk Feb 3, 2013
c2b4576
test
drogus Feb 3, 2013
d5a0953
test
drogus Feb 3, 2013
f4711b1
test
drogus Feb 3, 2013
d754412
test
drogus Feb 3, 2013
2d1bc67
test
drogus Feb 3, 2013
46f2d71
test
drogus Feb 3, 2013
98fecc7
test
drogus Feb 3, 2013
bfc68ff
test
drogus Feb 3, 2013
aebabbb
test
drogus Feb 3, 2013
908b8e3
test
drogus Feb 3, 2013
7efc00e
test
drogus Feb 3, 2013
a2f6594
test
drogus Feb 3, 2013
194923f
test
drogus Feb 4, 2013
e3614bf
test
drogus Feb 4, 2013
6e3d0c5
test
drogus Feb 4, 2013
69d6137
test
drogus Feb 5, 2013
ac8a4d8
test
drogus Feb 5, 2013
989c9c5
test
drogus Feb 5, 2013
a554df3
test
drogus Feb 5, 2013
07ef425
test
drogus Feb 5, 2013
d8964b7
test
drogus Feb 5, 2013
2f901ec
test
drogus Feb 5, 2013
ad05bbe
test
drogus Feb 5, 2013
4c62642
test
drogus Feb 5, 2013
ff1f7ee
test
drogus Feb 6, 2013
0141626
test
drogus Feb 6, 2013
2abb90c
test
drogus Feb 6, 2013
a9cc394
test
drogus Feb 6, 2013
5c2488f
test
drogus Feb 6, 2013
2aac807
test
drogus Feb 6, 2013
693b055
test
drogus Feb 6, 2013
447d0b2
test
drogus Feb 6, 2013
ae569b4
test
drogus Feb 6, 2013
3728185
test
drogus Feb 6, 2013
f3f50c3
test
drogus Feb 6, 2013
fe9bde2
test
drogus Feb 6, 2013
041aa29
test
drogus Feb 6, 2013
a66658d
test
drogus Feb 8, 2013
5ab5917
test
drogus Feb 8, 2013
6f1d144
test
drogus Feb 8, 2013
e50b4de
test
drogus Feb 9, 2013
0f10fe7
test
drogus Feb 9, 2013
dbfc7c9
Long log is long
drogus Feb 12, 2013
b5366a6
test
drogus Feb 13, 2013
40c2ba7
Long log is long
drogus Feb 13, 2013
2a154a0
test
drogus Feb 13, 2013
9c867b8
Test secure env vars
drogus Feb 18, 2013
78f9e12
Shorter log
svenfuchs Feb 21, 2013
c0acedd
Create log_output.rb
svenfuchs Feb 24, 2013
53866f0
Update Rakefile
svenfuchs Feb 24, 2013
0e8d2fb
Update log_output.rb
svenfuchs Feb 27, 2013
2c9e140
Update log_output.rb
svenfuchs Feb 27, 2013
847209d
test
drogus Feb 28, 2013
6b8016f
test
drogus Feb 28, 2013
3b64cf3
test
drogus Feb 28, 2013
6352969
Add a lot of dots
drogus Mar 4, 2013
21af142
test
drogus Mar 4, 2013
57e590e
test
drogus Mar 4, 2013
7494e98
test
drogus Mar 4, 2013
799c78f
test
drogus Mar 4, 2013
2cdc480
test
drogus Mar 4, 2013
62ddf72
test
drogus Mar 4, 2013
2893e6f
ZOMG, even more dots
drogus Mar 4, 2013
d7d537a
test
drogus Mar 4, 2013
bae5474
test
drogus Mar 4, 2013
41bcaa9
no dots
drogus Mar 4, 2013
2eba807
test
drogus Mar 4, 2013
976f170
test
drogus Mar 9, 2013
de1a589
test
drogus Mar 9, 2013
f5c1a49
test
drogus Mar 9, 2013
59a55e6
test
drogus Mar 9, 2013
e1e56c0
test
drogus Mar 9, 2013
c90093d
test
drogus Mar 9, 2013
b911b31
Update log_output.rb
svenfuchs Mar 12, 2013
bf0a29a
Update log_output.rb
svenfuchs Mar 12, 2013
2b68464
Update .travis.yml
svenfuchs Mar 12, 2013
98c49af
test
drogus Mar 25, 2013
3a69521
test
drogus Apr 11, 2013
79f3bf4
test
drogus Apr 12, 2013
2de6d64
test
drogus Apr 12, 2013
cac8fde
test
drogus Apr 12, 2013
87ff35c
Update Rakefile
rkh Apr 24, 2013
dbdcb91
Bring back Flowdock and HipChat
roidrage May 5, 2013
cd85ad9
Fail
drogus May 6, 2013
295d3a6
test
drogus May 6, 2013
60e41f8
test
drogus May 6, 2013
0e50b65
test
drogus May 6, 2013
a0a5fa2
test
drogus May 6, 2013
c30f63c
test
drogus May 6, 2013
9ba3918
test
drogus May 6, 2013
7c14de2
test
drogus May 6, 2013
19d7daf
Pass
drogus May 6, 2013
eb5f049
test
drogus May 6, 2013
62027ac
test
drogus May 6, 2013
de2a875
add an non existant gem
joshk May 18, 2013
f82c855
remove my fake gem
joshk May 23, 2013
1631e16
more output
joshk May 24, 2013
c43cfba
Update Rakefile
joshk May 24, 2013
5e30aa5
Add secure string
drogus Jun 7, 2013
fbcd727
test
drogus Jun 7, 2013
6ab85d4
test1
drogus Jun 7, 2013
c6d6581
Not so much output
drogus Jun 7, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 23 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,48 @@ language: ruby
rvm:
- 1.9.3
branches:
only: master
only:
- master
- gh-pages
notifications:
email: false
irc:
channels: "irc.freenode.org#travisstaging"
template: "[STAGING] %{repository} (%{commit}) %{build_url} : %{message}"
# irc:
# channels: "irc.freenode.org#travisstaging"
# template: "[STAGING] %{repository} (%{commit}) %{build_url} : %{message}"
flowdock: e533e9b0984a1cc7650579ab7aaab158
hipchat: "a21b28b2863acbee3ccb17da36a173@Travis CI"
webhooks:
urls: http://requestb.in/1guktrt1
on_start: always
on_finish: always
# campfire:
# on_success: 'always'
# on_failure: 'always'
# rooms:
# - secure: "wsimFvFeiaecL+H6f/c4omWkuU/fPnHPZMclWGkZUU6AGNpphuodyPJnFI63\nvGsIlcNcTTVUi0smmQJIVV3jQT9nU/Dr3ULodPD7Wj0NX6kkRFqAGgBJEZ1f\n/NwAlRXxg+Sx3HlGIUitsxILLGJ4lCWVRPPj7Ux63HRaA/MEWSs="
# webhooks:
# urls: http://requestb.in/1guktrt1
# on_start: always
# on_finish: always

script:
# - bundle exec rspec spec
- "git clone https://github.com/travis-repos/test-project-1.git"
- rake

before_script:
- "echo $FOO"
- "echo 'Before script'"
- "sudo service postgresql restart"

after_script:
- "echo 'After script'"
- printenv

after_success:
- "echo 'After success'"

after_failure:
- "echo 'After failure'"

after_test:
- "echo 'Yupi'"
- "echo 'Splendid'"
- printenv

# env:
# global:
# - FOO: bar
env:
global:
- secure: "JHG1MTxDt3+a8Pee/qPLSq0n1z4S5TrV4+Zmy3OVMqJY6+45wMu4BB0gru89\nOPWQwe0ifm8IHehP5pUeqQegBAyUm9Iz6iDkL2nxcL0tPQe1rmFB9GrL2mmC\nxeoIgN7m5eJmgzhSJAfIXoHDr79sJx5DQnrc971C/xrA8nZHQoU="
# SECURE_STRING=foo
- secure: "Mr30S+kPmT+tXI372+xrZI2XL7bupjm1+TvKkYr8m0Hfy7LZgZ2cg0+Yk42p\nHQvTIveo9Yceh+Rpl0hnyPv+xxxjYrnRpplQ4+ovsThU6YQaXh4pLiy4LVXC\nNUA0I7bg4iZoAajUoGcCRBuo9P50YZgclUXti/Ndc3JRv4qlFAA="
37 changes: 22 additions & 15 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
require 'rake' # we need rake!!

task :test do
1.upto 20 do
print '.'
sleep 0.1
end
puts ''

puts "\u001b[31mhow deep is your love, "
1.upto 20 do
sleep 0.3
puts 'your love, '
$stdout.flush
end
puts "how deep is your love, i really need to know\u001b[0m", ''
#sleep 3
puts 'about 500 miles, and about 500 more'
exit 1
puts 'output'
#20.times { load 'log_output.rb' }
# 1.upto 100 do
# print '.'
# sleep 0.1
# end
# puts ''

# # 50000.times do |i|
# # puts "This log will be very long and will most likely freeze the browser :( (#{i})"
# # end
# puts '.' * 100

# puts "\u001b[31mhow deep is your love, "
# 1.upto 20 do
# sleep 0.3
# puts 'your love, '
# $stdout.flush
# end
# puts "how deep is your love, i really need to know\u001b[0m", ''
# #sleep 3
# puts 'about 500 miles, and about 500 more'
end

task :default => :test
77 changes: 77 additions & 0 deletions log_output.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# puts 'simulating git fetch (compressing objects)'
# 1.upto(99) do |i|
# print "remote: Compressing objects: #{i.to_s.rjust(3)}% (1/34) \e[K\r"
# end
# print "remote: Compressing objects: 100% (1/1), done.\e[K\r\n"

# puts 'simulating git fetch (unpacking objects)'
# 1.upto(99) do |i|
# print "remote: Unpacking objects: #{i.to_s.rjust(3)}% (1/43) \r"
# end
# print "remote: Unpacking objects: 100% (1/43) \r\n"
# puts

puts 'progress on one same line (faster)'
1.upto(200) do |i|
print "#{i}|"; sleep(0.025)
end

puts; puts
puts 'progress on one same line (slower)'
1.upto(20) do |i|
print "#{i}|"; sleep(0.5)
end

# puts; puts
# puts 'separate lines (faster)'
# 1.upto(100) do |i|
# puts "line #{i}"; sleep(0.025)
# end

# puts; puts
# puts 'separate lines (slower)'
# 1.upto(20) do |i|
# puts "line #{i}"; sleep(0.5)
# end

codes = {
fmt: {
nil => 'no format',
1 => 'bold',
3 => 'italic',
4 => 'underline',
},
fg: {
nil => 'no foreground',
30 => 'fg-black',
33 => 'fg-yellow',
90 => 'fg-grey',
},
bg: {
nil => 'no background',
40 => 'bg-black',
41 => 'bg-red',
42 => 'bg-green',
44 => 'bg-blue',
47 => 'bg-white'
}
}

puts; puts
puts 'ansi'

order = [:bg, :fg, :fmt]
keys = codes[order[0]].keys.product(codes[order[1]].keys).product(codes[order[2]].keys)
string = keys.map do |keys|
keys = keys.flatten
next if keys[0] == keys[1]
stuff = order.zip(keys)
string = stuff.map { |type, key| codes[type][key] }.join(', ')
format = stuff.map { |type, key| "\033[#{key}m" if key }.compact.join
"#{format}#{string}\033[0m"
end.compact.join("\n")

string.scan(/.{1,50}/m).each do |chunk|
print chunk
sleep(0.1)
end