optimus_prime 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e9948403e82a31ee6872df5159c5bced232979b3
4
- data.tar.gz: b93e43ddde2fc6c2d5b9359101d6435026dccf83
3
+ metadata.gz: f522b0e37c978683f8a7014b740295db07b42495
4
+ data.tar.gz: 0ca45620a218ec54f55806d302c37ccce1fe5ddc
5
5
  SHA512:
6
- metadata.gz: c7be92898c1a4891df828d50868a4bed82fd3f2c737e6b928f142003f649e764ca842406cbd79e4adfe12fc246958a4b079c187fad62c3751e0d4baab2ccf273
7
- data.tar.gz: 92e2d929f0d35c431a6ef77c054ee65a999d3f7bcc8b8f1209b4c0b50a2d45f675016f7bf347c665ddf842628ac5787a9d78fb819083dc884fc2bd3d903e35d4
6
+ metadata.gz: 75351fd22cfc8c54c06001fa6439603a2198385e7e78cc7b453bee0003d82fadaec558b90455ca7cfdf1d65f2d4beec8bddd0409c5abc785ec307a5dafc42b3e
7
+ data.tar.gz: 803d7ffd117cd262e294ab4e3dea32cb54559309c79cfac33944110bbf561bc2b8b159874e2615ba60423d32b108c84433021353a63ddf41b11ce60e582280fe
data/lib/optimus_prime.rb CHANGED
@@ -9,8 +9,8 @@ module OptimusPrime
9
9
  end
10
10
 
11
11
  def self.start_server
12
- `mkdir -p ./tmp/pids` unless system("ls ./tmp/pids/")
13
- return `echo 'Optimus is already priming :)'` if `ls ./tmp/pids`.include?("optimus_prime.pid")
12
+ `mkdir -p ./tmp/pids`
13
+ return `echo 'Optimus is already priming :)'` if system("ls ./tmp/pids/optimus_prime.pid")
14
14
  path = `pwd`.chomp
15
15
  if system("cd #{optimus_prime_path} && echo '\nStarting Optimus Prime\n' && thin start -p 7002 -P #{path}/tmp/pids/optimus_prime.pid -l #{path}/optimus_prime.log -d -D")
16
16
  while :starting_server
@@ -11,8 +11,14 @@ module OptimusPrime
11
11
  post "/get/*" do
12
12
  path = self.env["REQUEST_URI"].sub("/get/", "")
13
13
  response = responses[path]
14
+
15
+ if response[:constraint]
16
+ constraint = eval(response[:constraint])
17
+ return 404 unless constraint
18
+ end
19
+
14
20
  return 404 if response.nil?
15
- content_type(response[:content_type] || :html)
21
+ content_type(response[:content_type])
16
22
  status(response[:status_code])
17
23
  response[:body]
18
24
  end
@@ -21,14 +27,14 @@ module OptimusPrime
21
27
  path = self.env["REQUEST_URI"].sub("/get/", "")
22
28
  response = responses[path]
23
29
  return 404 if response.nil?
24
- content_type(response[:content_type] || :html)
30
+ content_type(response[:content_type])
25
31
  status(response[:status_code])
26
32
  response[:body]
27
33
  end
28
34
 
29
35
  post "/prime" do
30
36
  path = params["path_name"]
31
- responses[path] = { content_type: params["content_type"], body: params["response"], status_code: (params["status_code"] || 200) }
37
+ responses[path] = { content_type: (params["content_type"] || :html), body: params["response"], status_code: (params["status_code"] || 200), constraint: (params["constraint"] || false) }
32
38
  201
33
39
  end
34
40
 
@@ -1,3 +1,3 @@
1
1
  module OptimusPrime
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/optimus_prime.log CHANGED
@@ -703,3 +703,503 @@ Maximum connections set to 1024
703
703
  Listening on 0.0.0.0:7002, CTRL+C to stop
704
704
  Waiting for 1 connection(s) to finish, can take up to 30 sec, CTRL+C to stop now
705
705
  Exiting!
706
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
707
+ Using rack adapter
708
+ Thin web server (v1.6.2 codename Doc Brown)
709
+ Debugging ON
710
+ Maximum connections set to 1024
711
+ Listening on 0.0.0.0:7002, CTRL+C to stop
712
+ Exiting!
713
+ /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
714
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_server'
715
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/tcp_server.rb:16:in `connect'
716
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:63:in `block in start'
717
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
718
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
719
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
720
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
721
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
722
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:87:in `start'
723
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
724
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
725
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
726
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
727
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
728
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
729
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
730
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
731
+ Using rack adapter
732
+ Thin web server (v1.6.2 codename Doc Brown)
733
+ Debugging ON
734
+ Maximum connections set to 1024
735
+ Listening on 0.0.0.0:7002, CTRL+C to stop
736
+ Exiting!
737
+ /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
738
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_server'
739
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/tcp_server.rb:16:in `connect'
740
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:63:in `block in start'
741
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
742
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
743
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
744
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
745
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
746
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:87:in `start'
747
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
748
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
749
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
750
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
751
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
752
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
753
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
754
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
755
+ Using rack adapter
756
+ Thin web server (v1.6.2 codename Doc Brown)
757
+ Debugging ON
758
+ Maximum connections set to 1024
759
+ Listening on 0.0.0.0:7002, CTRL+C to stop
760
+ Exiting!
761
+ /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
762
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_server'
763
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/tcp_server.rb:16:in `connect'
764
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:63:in `block in start'
765
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
766
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
767
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
768
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
769
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
770
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:87:in `start'
771
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
772
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
773
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
774
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
775
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
776
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
777
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
778
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
779
+ Using rack adapter
780
+ Thin web server (v1.6.2 codename Doc Brown)
781
+ Debugging ON
782
+ Maximum connections set to 1024
783
+ Listening on 0.0.0.0:7002, CTRL+C to stop
784
+ Exiting!
785
+ /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
786
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_server'
787
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/tcp_server.rb:16:in `connect'
788
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:63:in `block in start'
789
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
790
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
791
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
792
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
793
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
794
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:87:in `start'
795
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
796
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
797
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
798
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
799
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
800
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
801
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
802
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
803
+ Using rack adapter
804
+ Thin web server (v1.6.2 codename Doc Brown)
805
+ Debugging ON
806
+ Maximum connections set to 1024
807
+ Listening on 0.0.0.0:7002, CTRL+C to stop
808
+ Exiting!
809
+ /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
810
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_server'
811
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/tcp_server.rb:16:in `connect'
812
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:63:in `block in start'
813
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
814
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
815
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
816
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
817
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
818
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:87:in `start'
819
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
820
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
821
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
822
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
823
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
824
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
825
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
826
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
827
+ Using rack adapter
828
+ Thin web server (v1.6.2 codename Doc Brown)
829
+ Debugging ON
830
+ Maximum connections set to 1024
831
+ Listening on 0.0.0.0:7002, CTRL+C to stop
832
+ Exiting!
833
+ /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
834
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_server'
835
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/tcp_server.rb:16:in `connect'
836
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:63:in `block in start'
837
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
838
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
839
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
840
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
841
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
842
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:87:in `start'
843
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
844
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
845
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
846
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
847
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
848
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
849
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
850
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
851
+ Using rack adapter
852
+ Thin web server (v1.6.2 codename Doc Brown)
853
+ Debugging ON
854
+ Maximum connections set to 1024
855
+ Listening on 0.0.0.0:7002, CTRL+C to stop
856
+ Exiting!
857
+ /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
858
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_server'
859
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/tcp_server.rb:16:in `connect'
860
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:63:in `block in start'
861
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
862
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
863
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
864
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
865
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
866
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:87:in `start'
867
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
868
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
869
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
870
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
871
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
872
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
873
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
874
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
875
+ Using rack adapter
876
+ Thin web server (v1.6.2 codename Doc Brown)
877
+ Debugging ON
878
+ Maximum connections set to 1024
879
+ Listening on 0.0.0.0:7002, CTRL+C to stop
880
+ Exiting!
881
+ /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
882
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_server'
883
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/tcp_server.rb:16:in `connect'
884
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:63:in `block in start'
885
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
886
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
887
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
888
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
889
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
890
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:87:in `start'
891
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
892
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
893
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
894
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
895
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
896
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
897
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
898
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
899
+ Using rack adapter
900
+ Thin web server (v1.6.2 codename Doc Brown)
901
+ Debugging ON
902
+ Maximum connections set to 1024
903
+ Listening on 0.0.0.0:7002, CTRL+C to stop
904
+ Exiting!
905
+ /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
906
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_server'
907
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/tcp_server.rb:16:in `connect'
908
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:63:in `block in start'
909
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
910
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
911
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
912
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
913
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
914
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:87:in `start'
915
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
916
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
917
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
918
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
919
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
920
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
921
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
922
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
923
+ Using rack adapter
924
+ Thin web server (v1.6.2 codename Doc Brown)
925
+ Debugging ON
926
+ Maximum connections set to 1024
927
+ Listening on 0.0.0.0:7002, CTRL+C to stop
928
+ Exiting!
929
+ /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
930
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_server'
931
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/tcp_server.rb:16:in `connect'
932
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:63:in `block in start'
933
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
934
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
935
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
936
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
937
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
938
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:87:in `start'
939
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
940
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
941
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
942
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
943
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
944
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
945
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
946
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
947
+ Using rack adapter
948
+ Thin web server (v1.6.2 codename Doc Brown)
949
+ Debugging ON
950
+ Maximum connections set to 1024
951
+ Listening on 0.0.0.0:7002, CTRL+C to stop
952
+ Exiting!
953
+ /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
954
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_server'
955
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/tcp_server.rb:16:in `connect'
956
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:63:in `block in start'
957
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
958
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
959
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
960
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
961
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
962
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:87:in `start'
963
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
964
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
965
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
966
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
967
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
968
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
969
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
970
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
971
+ Using rack adapter
972
+ Thin web server (v1.6.2 codename Doc Brown)
973
+ Debugging ON
974
+ Maximum connections set to 1024
975
+ Listening on 0.0.0.0:7002, CTRL+C to stop
976
+ Exiting!
977
+ /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
978
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_server'
979
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/tcp_server.rb:16:in `connect'
980
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:63:in `block in start'
981
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
982
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
983
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
984
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
985
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
986
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:87:in `start'
987
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
988
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
989
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
990
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
991
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
992
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
993
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
994
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
995
+ Using rack adapter
996
+ Thin web server (v1.6.2 codename Doc Brown)
997
+ Debugging ON
998
+ Maximum connections set to 1024
999
+ Listening on 0.0.0.0:7002, CTRL+C to stop
1000
+ Exiting!
1001
+ /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
1002
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_server'
1003
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/tcp_server.rb:16:in `connect'
1004
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:63:in `block in start'
1005
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
1006
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
1007
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
1008
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
1009
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
1010
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:87:in `start'
1011
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
1012
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
1013
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
1014
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
1015
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
1016
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
1017
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
1018
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
1019
+ Using rack adapter
1020
+ Thin web server (v1.6.2 codename Doc Brown)
1021
+ Debugging ON
1022
+ Maximum connections set to 1024
1023
+ Listening on 0.0.0.0:7002, CTRL+C to stop
1024
+ Exiting!
1025
+ /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
1026
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_server'
1027
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/tcp_server.rb:16:in `connect'
1028
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:63:in `block in start'
1029
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
1030
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
1031
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
1032
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
1033
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
1034
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:87:in `start'
1035
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
1036
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
1037
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
1038
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
1039
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
1040
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
1041
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
1042
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
1043
+ Using rack adapter
1044
+ Thin web server (v1.6.2 codename Doc Brown)
1045
+ Debugging ON
1046
+ Maximum connections set to 1024
1047
+ Listening on 0.0.0.0:7002, CTRL+C to stop
1048
+ Exiting!
1049
+ /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
1050
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_server'
1051
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/tcp_server.rb:16:in `connect'
1052
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:63:in `block in start'
1053
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
1054
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
1055
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
1056
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
1057
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
1058
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:87:in `start'
1059
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
1060
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
1061
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
1062
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
1063
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
1064
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
1065
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
1066
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
1067
+ Using rack adapter
1068
+ Thin web server (v1.6.2 codename Doc Brown)
1069
+ Debugging ON
1070
+ Maximum connections set to 1024
1071
+ Listening on 0.0.0.0:7002, CTRL+C to stop
1072
+ Exiting!
1073
+ /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
1074
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_server'
1075
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/tcp_server.rb:16:in `connect'
1076
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:63:in `block in start'
1077
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
1078
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
1079
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
1080
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
1081
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
1082
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:87:in `start'
1083
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
1084
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
1085
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
1086
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
1087
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
1088
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
1089
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
1090
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
1091
+ Using rack adapter
1092
+ Thin web server (v1.6.2 codename Doc Brown)
1093
+ Debugging ON
1094
+ Maximum connections set to 1024
1095
+ Listening on 0.0.0.0:7002, CTRL+C to stop
1096
+ Exiting!
1097
+ /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
1098
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_server'
1099
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/tcp_server.rb:16:in `connect'
1100
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:63:in `block in start'
1101
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
1102
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
1103
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
1104
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
1105
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
1106
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:87:in `start'
1107
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
1108
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
1109
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
1110
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
1111
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
1112
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
1113
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
1114
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
1115
+ Using rack adapter
1116
+ Thin web server (v1.6.2 codename Doc Brown)
1117
+ Debugging ON
1118
+ Maximum connections set to 1024
1119
+ Listening on 0.0.0.0:7002, CTRL+C to stop
1120
+ Exiting!
1121
+ /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
1122
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_server'
1123
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/tcp_server.rb:16:in `connect'
1124
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:63:in `block in start'
1125
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
1126
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
1127
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
1128
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
1129
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
1130
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:87:in `start'
1131
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
1132
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
1133
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
1134
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
1135
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
1136
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
1137
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
1138
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
1139
+ Using rack adapter
1140
+ Thin web server (v1.6.2 codename Doc Brown)
1141
+ Debugging ON
1142
+ Maximum connections set to 1024
1143
+ Listening on 0.0.0.0:7002, CTRL+C to stop
1144
+ Exiting!
1145
+ /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
1146
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_server'
1147
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/tcp_server.rb:16:in `connect'
1148
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:63:in `block in start'
1149
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
1150
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
1151
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
1152
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
1153
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
1154
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/controllers/controller.rb:87:in `start'
1155
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
1156
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
1157
+ from /Users/user/.rvm/gems/ruby-2.1.1/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
1158
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `load'
1159
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/thin:23:in `<main>'
1160
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
1161
+ from /Users/user/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
1162
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
1163
+ Using rack adapter
1164
+ Thin web server (v1.6.2 codename Doc Brown)
1165
+ Debugging ON
1166
+ Maximum connections set to 1024
1167
+ Listening on 0.0.0.0:7002, CTRL+C to stop
1168
+ Exiting!
1169
+ /Users/user/.rvm/gems/ruby-2.1.1@order-tracking/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
1170
+ from /Users/user/.rvm/gems/ruby-2.1.1@order-tracking/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_server'
1171
+ from /Users/user/.rvm/gems/ruby-2.1.1@order-tracking/gems/thin-1.6.2/lib/thin/backends/tcp_server.rb:16:in `connect'
1172
+ from /Users/user/.rvm/gems/ruby-2.1.1@order-tracking/gems/thin-1.6.2/lib/thin/backends/base.rb:63:in `block in start'
1173
+ from /Users/user/.rvm/gems/ruby-2.1.1@order-tracking/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `call'
1174
+ from /Users/user/.rvm/gems/ruby-2.1.1@order-tracking/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
1175
+ from /Users/user/.rvm/gems/ruby-2.1.1@order-tracking/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
1176
+ from /Users/user/.rvm/gems/ruby-2.1.1@order-tracking/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
1177
+ from /Users/user/.rvm/gems/ruby-2.1.1@order-tracking/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
1178
+ from /Users/user/.rvm/gems/ruby-2.1.1@order-tracking/gems/thin-1.6.2/lib/thin/controllers/controller.rb:87:in `start'
1179
+ from /Users/user/.rvm/gems/ruby-2.1.1@order-tracking/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
1180
+ from /Users/user/.rvm/gems/ruby-2.1.1@order-tracking/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
1181
+ from /Users/user/.rvm/gems/ruby-2.1.1@order-tracking/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
1182
+ from /Users/user/.rvm/gems/ruby-2.1.1@order-tracking/bin/thin:23:in `load'
1183
+ from /Users/user/.rvm/gems/ruby-2.1.1@order-tracking/bin/thin:23:in `<main>'
1184
+ from /Users/user/.rvm/gems/ruby-2.1.1@order-tracking/bin/ruby_executable_hooks:15:in `eval'
1185
+ from /Users/user/.rvm/gems/ruby-2.1.1@order-tracking/bin/ruby_executable_hooks:15:in `<main>'
1186
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
1187
+ Using rack adapter
1188
+ Thin web server (v1.6.2 codename Doc Brown)
1189
+ Debugging ON
1190
+ Maximum connections set to 1024
1191
+ Listening on 0.0.0.0:7002, CTRL+C to stop
1192
+ Exiting!
1193
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
1194
+ Using rack adapter
1195
+ Thin web server (v1.6.2 codename Doc Brown)
1196
+ Debugging ON
1197
+ Maximum connections set to 1024
1198
+ Listening on 0.0.0.0:7002, CTRL+C to stop
1199
+ Exiting!
1200
+ Writing PID to /Users/user/dev/optimus_prime/tmp/pids/optimus_prime.pid
1201
+ Using rack adapter
1202
+ Thin web server (v1.6.2 codename Doc Brown)
1203
+ Debugging ON
1204
+ Maximum connections set to 1024
1205
+ Listening on 0.0.0.0:7002, CTRL+C to stop
@@ -89,4 +89,24 @@ describe OptimusPrime do
89
89
 
90
90
  end
91
91
 
92
+ context "Asserting on request content" do
93
+
94
+ it "returns a 404 if the request body does not match the assertion" do
95
+ op.prime("user", { username: "Test" }.to_json, content_type: :json, constraint: "request.body.string.include?('ahahah')")
96
+
97
+ response = ::Faraday.post('http://localhost:7002/get/user', "I am a body")
98
+
99
+ expect( response.status ).to eq 404
100
+ end
101
+
102
+ it "returns a 200 if the request body does match the assertion" do
103
+ op.prime("user", { username: "Test" }.to_json, content_type: :json, constraint: "request.body.string.include?('I am a body')")
104
+
105
+ response = ::Faraday.post('http://localhost:7002/get/user', "I am a body")
106
+
107
+ expect( response.status ).to eq 200
108
+ end
109
+
110
+ end
111
+
92
112
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: optimus_prime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antonio Nalesso
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-11 00:00:00.000000000 Z
11
+ date: 2014-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler