This file contains 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 'http://gemcutter.org' | |
gem 'mysql', '2.8.1' | |
# gem 'tmail', '1.2.6' #dependency of rails, not caught by bundler | |
gem 'rails', '2.3.5' | |
gem 'capistrano', '2.5.14' | |
gem 'youtube-g', '0.5.0', :require => 'youtube_g' | |
gem 'i18n', '0.3.3' |
This file contains 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
def self.translate_route(route, route_name = nil) | |
new_routes = [] | |
new_named_routes = {} | |
# if root_route?(route) && prefix_on_default_locale | |
# add the root route "as is" in addition to the translated versions | |
new_routes << route | |
new_named_routes[route_name] = route | |
# end |
This file contains 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/Gemfile b/Gemfile | |
index e69de29..4da2bc8 100644 | |
--- a/Gemfile | |
+++ b/Gemfile | |
@@ -0,0 +1,43 @@ | |
+source 'http://gemcutter.org' | |
+ | |
+gem 'builder', '2.1.2' | |
+gem 'mysql', '2.8.1' | |
+ |
This file contains 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
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then | |
s.add_runtime_dependency(%q<rails>, [">= 2.2"]) | |
else | |
s.add_dependency(%q<rails>, [">= 2.2"]) | |
end | |
else | |
s.add_dependency(%q<rails>, [">= 2.2"]) | |
end |
This file contains 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
Cucumber::Rake::Task.new(:rcov) do |t| | |
t.rcov = true | |
t.rcov_opts = %w{--rails --exclude osx\/objc,gems\/,spec\/} | |
t.rcov_opts << %[-o "features_rcov"] | |
end |
This file contains 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
When /^(\d+) (minutes|hours|days) pass$/ do |amount, unit| | |
now = Time.now | |
Time.stubs(:now).returns(now + amount.to_i.send(unit.to_sym)) | |
end | |
When /^going back (\d+) (minutes|hours|days)$/ do |minutes| | |
now = Time.now | |
Time.stubs(:now).returns(now - amount.to_i.send(unit.to_sym)) | |
end |
This file contains 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
#!/usr/bin/env ruby -J-Xmn512m -J-Xms2048m -J-Xmx2048m | |
# Profile these different versions (e.g. with VisualVM) | |
# jruby 1.5.6: watch the number of classes rise with every iteration. Eventually PermGen space will be exhausted. | |
# jruby 1.6.0.rc1: the classes get garbage collected regularly. | |
require "rubygems" | |
require 'neo4j' #1.0.0.beta.26 | |
class Node |
This file contains 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 "rubygems" | |
require "neo4j" | |
#domain model | |
class Waypoint | |
include Neo4j::NodeMixin | |
#the persistent properties of this class | |
property :name, :lon, :lat | |
#friend relationships to other persons | |
has_n :roads |
This file contains 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 "http://rubygems.org" | |
gem 'neography' | |
gem 'activesupport', '~>2.3.4', :require => 'active_support' | |
gem 'i18n' | |
group :test do | |
gem 'test-unit', :require => 'test/unit' | |
gem 'minitest' | |
gem 'dm-core' |
This file contains 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
import javax.ws.rs.DELETE; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.PathParam; | |
import javax.ws.rs.Produces; | |
import javax.ws.rs.core.Context; | |
import javax.ws.rs.core.Response; | |
import org.neo4j.graphdb.Node; | |
import org.neo4j.graphdb.Transaction; | |
import org.neo4j.server.NeoServer; |
OlderNewer