Skip to content
# This plays asciicast (v1 format - https://github.com/asciinema/asciinema/blob/master/doc/asciicast-v1.md) in your terminal:
# ruby play.rb asciicast.json
require 'json'
JSON.parse(File.read(ARGV[0]))['stdout'].each do |frame|
sleep frame[0]
STDOUT.write frame[1]
STDOUT.flush
end
smtp_settings:
:address: "smtp.gmail.com"
:port: 587
:enable_starttls_auto: true
:user_name: "joe@gmail.com"
:password: "8s7df7syfysu"
:authentication: :plain
:domain: "gmail.com"
(deftest changes-at-test
(let [frames [[2 :a] [4 :b] [6 :c]]]
(is (= (changes-at frames 0) nil))
(is (= (changes-at frames 1) nil))
(is (= (changes-at frames 2) :a))
(is (= (changes-at frames 3) :a))
(is (= (changes-at frames 4) :a))
(is (= (changes-at frames 5) :a))
(is (= (changes-at frames 6) :b))
(is (= (changes-at frames 7) :b))
> player.test_runner.runner()
core.cljs:116
Testing player.view-test
core.cljs:116
FAIL in (fg-color-test) (at http:21956:204)
core.cljs:116 expected: (= (v/fg-color 1 false) 111)
core.cljs:116 actual: (not (= 1 111))
core.cljs:116
Ran 6 tests containing 34 assertions.
core.cljs:116 1 failures, 0 errors.
Running ClojureScript test: test
Loading URL: env/test/unit-test.html
Running test.
Testing player.view-test
FAIL in (fg-color-test) (:)
expected: (= (v/fg-color 1 false) 111)
actual: (not (= 1 111))
~ % brew info asciinema
asciinema: stable 1.0.0 (bottled), HEAD
https://asciinema.org/
Not installed
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/asciinema.rb
==> Dependencies
Build: go ✘
require 'json'
require 'open3'
class Hash
def slice *keys
select{|k| keys.member?(k)}
end
end
class Stdout
FROM ubuntu:14.04
RUN apt-get -y update
RUN apt-get -y install nginx
ADD example.conf /etc/nginx/conf.d/example.conf
RUN echo "daemon off;" >>/etc/nginx/nginx.conf
EXPOSE 3000
CMD ["/usr/sbin/nginx"]
Install ansible on your laptop, then:
ansible-playbook -i production site.yml
After running this confirm ruby version on the server:
ubuntu@srv-blah:~$ which ruby
/usr/bin/ruby
ubuntu@srv-blah:~$ ruby -v
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux-gnu]
Something went wrong with that request. Please try again.