-
Make sure your Gemfile.lock is not committed to your OpenShift git repository.
-
Copy the pre_build file to .openshift/action_hooks/pre_build
-
Add .openshift/action_hooks/pre_build to git, set the executable bit, and push your changes
git add .openshift/action_hooks/pre_build git update-index --chmod=+x .openshift/action_hooks/pre_build git commit -m "Add bundle_install in pre_build hook" git push
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Jubille started with: | |
| # jubilee -p 8080 -e production | |
| # | |
| # Note that the Jubilee console outputs quite a few errors like below during | |
| # the test: | |
| # | |
| # Jan 03, 2014 2:15:31 PM org.vertx.java.core.logging.impl.JULLogDelegate error | |
| # SEVERE: Unhandled exception | |
| # java.nio.channels.ClosedChannelException |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| run lambda { |env| | |
| [200, { 'Content-Type' => 'text/plain' }, ["hello world\n"]] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source 'https://rubygems.org' | |
| gem 'jruby-openssl', '0.9.3' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MessagingStatsService | |
| def start | |
| Thread.new do | |
| until @done | |
| queues.each do |queue| | |
| counter = org.hornetq.api.core.management.MessageCounterInfo.from_json(queue.list_message_counter) | |
| puts "Queue #{queue.name} count: #{counter.count} countDelta: #{counter.count_delta} depth: #{counter.depth} depth_delta: #{counter.depth_delta}" | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'erb' | |
| NUM_THREADS = 400 | |
| puts "Thread with string" | |
| threads = NUM_THREADS.times.map { | |
| Thread.new do | |
| '1' | |
| end | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bbrowning@bbrowning-mbp:~$ curl -I http://localhost:8080/posts/ | |
| HTTP/1.1 200 OK | |
| Server: Apache-Coyote/1.1 | |
| Set-Cookie: foobar=k5wDvCA2jZvAlwqb2HgFMdsX; Domain=foobar.com; Expires=Fri, 08-Feb-2013 18:17:44 GMT; Path=/baz; Secure; HttpOnly | |
| X-UA-Compatible: IE=Edge | |
| ETag: "903b327bb0b526d7d9b6b4d8344fc56f" | |
| Cache-Control: max-age=0, private, must-revalidate | |
| X-Request-Id: 9cac85c7ee32c524896767ff8ce730ca | |
| X-Runtime: 0.796000 | |
| Content-Type: text/html;charset=utf-8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/gem-proxy/src/main/java/de/saumya/mojo/proxy/Controller.java b/gem-proxy/src/main/java/de/saumya/mojo/proxy/Controller.java | |
| index a9a46b5..0e54554 100644 | |
| --- a/gem-proxy/src/main/java/de/saumya/mojo/proxy/Controller.java | |
| +++ b/gem-proxy/src/main/java/de/saumya/mojo/proxy/Controller.java | |
| @@ -31,7 +31,7 @@ public class Controller { | |
| private static final String SHA1 = ".sha1"; | |
| - private static final String RUBYGEMS_URL = "http://rubygems.org/gems"; | |
| + private static final String RUBYGEMS_URL = "https://rubygems.org/gems"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| queue = TorqueBox::Messaging::Queue.new('/queue/foo') | |
| options = { :startup_timeout => 500, :persistent => false, :tx => false } | |
| normalized_options = queue.normalize_options(options) | |
| queue.wait_for_destination(options[:startup_timeout]) do | |
| queue.with_session(options) do |session| | |
| # loop here and publish each message | |
| 5.times { session.publish(queue, Time.now.to_s, normalized_options) } | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TORQUEBOX_SERVER=standalone.xml | |
| TORQUEBOX_HOME=/opt/torquebox | |
| RUN=yes |