-
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
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 |
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/gems/jruby-openssl/Rakefile b/gems/jruby-openssl/Rakefile | |
index c854e2a..c7cddfc 100644 | |
--- a/gems/jruby-openssl/Rakefile | |
+++ b/gems/jruby-openssl/Rakefile | |
@@ -38,7 +38,7 @@ task :java_compile do | |
end | |
sh "javac @pkg/compile_options @pkg/compile_classpath @pkg/compile_sourcefiles" | |
- sh "jar cf ../../lib/ruby/shared/jopenssl.jar -C pkg/classes/ ." | |
+ sh "jar cf lib/shared/jopenssl.jar -C pkg/classes/ ." |
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:~/tmp/rails3.2_basic$ time jruby -S bundle install | |
... | |
Your bundle is complete! It was installed into /Users/bbrowning/Downloads/torquebox-current/jruby/lib/ruby/gems/1.8 | |
real 0m51.642s | |
user 0m51.210s | |
sys 0m3.595s | |
bbrowning@bbrowning-mbp:~/tmp/rails3.2_basic$ rm Gemfile.lock | |
bbrowning@bbrowning-mbp:~/tmp/rails3.2_basic$ time jruby -X-C -S bundle install | |
... |