Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update gems & Refactoring

Signed-off-by: Aymeric Brisse <aymeric.brisse@perfect-memory.com>
  • Loading branch information...
commit 305bc4deb2778ba8ba62951a2367a794226f6d96 1 parent bb5d4cb
Aymeric Brisse abrisse authored
10 Gemfile
View
@@ -1,9 +1,3 @@
-source :rubygems
+source 'https://rubygems.org'
-gem "rake"
-gem "transport"
-
-group :test do
- gem "rspec"
- gem "reek"
-end
+gemspec
41 Rakefile
View
@@ -1,43 +1,18 @@
-require 'rubygems'
-
-gem 'rspec'
-require 'rspec'
+require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
-
-gem 'reek'
require 'reek/rake/task'
-
require 'rdoc/task'
-task :default => :spec
-
-namespace :gem do
-
- desc "Builds the gem"
- task :build do
- system "gem build *.gemspec && mkdir -p pkg/ && mv *.gem pkg/"
- end
-
- desc "Builds and installs the gem"
- task :install => :build do
- system "gem install pkg/"
- end
-
+RSpec::Core::RakeTask.new(:spec) do |t|
+ t.pattern = "spec/lib/**/*_spec.rb"
end
-Reek::Rake::Task.new do |task|
- task.fail_on_error = true
-end
+Rake::RDocTask.new(:spec)
-desc "Generate the rdoc"
-Rake::RDocTask.new do |rdoc|
- rdoc.rdoc_files.add [ "README.rdoc", "lib/**/*.rb" ]
- rdoc.main = "README.rdoc"
-end
+task :default => :spec
-desc "Run all specs in spec directory"
-RSpec::Core::RakeTask.new do |task|
- task.pattern = "spec/lib/**/*_spec.rb"
+Reek::Rake::Task.new do |t|
+ t.fail_on_error = false
end
namespace :spec do
@@ -47,4 +22,4 @@ namespace :spec do
task.pattern = "spec/integration/**/*_spec.rb"
end
-end
+end
13 agraph.gemspec
View
@@ -3,9 +3,9 @@
specification = Gem::Specification.new do |specification|
specification.name = "agraph"
specification.version = "0.1.5"
- specification.date = "2011-10-10"
+ specification.date = "2013-10-10"
specification.email = "b.phifty@gmail.com"
- specification.homepage = "http://github.com/abrisse/agraph"
+ specification.homepage = "http://github.com/phifty/agraph"
specification.summary = "Client for the AllegroGraph 4.x graph database."
specification.description = "The gem provides a client for the AllegroGraph 4.x RDF graph database. Features like searching geo-spatial data, type mapping and transactions are supported."
specification.rubyforge_project = "agraph"
@@ -16,7 +16,10 @@ specification = Gem::Specification.new do |specification|
specification.require_path = "lib"
specification.required_ruby_version = ">= 1.8.7"
- specification.add_dependency "transport", ">= 1.0.0"
- specification.add_development_dependency "rspec", ">= 2"
- specification.add_development_dependency "reek", ">= 1.2"
+ specification.add_dependency "transport", '~> 1.0.5'
+ specification.add_development_dependency "rspec", '~> 2.12'
+ specification.add_development_dependency "reek", "~> 1.3"
+ specification.add_development_dependency "rake", '~> 10.0'
+ specification.add_development_dependency "rdoc", '~> 3.0'
+ specification.add_development_dependency "dotenv", '~> 0.5'
end
2  spec/integration/geo_spatial_spec.rb
View
@@ -6,7 +6,7 @@
use_real_transport!
before :each do
- @server = AllegroGraph::Server.new :username => "test", :password => "test"
+ @server = AllegroGraph::Server.new :username => ENV['AG_USER'], :password => ENV['AG_PASS']
@repository = AllegroGraph::Repository.new @server, "test_repository"
@repository.create_if_missing!
@geometric = @repository.geometric
2  spec/integration/mapping_spec.rb
View
@@ -4,7 +4,7 @@
describe "mapping" do
before :each do
- @server = AllegroGraph::Server.new :username => "test", :password => "test"
+ @server = AllegroGraph::Server.new :username => ENV['AG_USER'], :password => ENV['AG_PASS']
@repository = AllegroGraph::Repository.new @server, "test_repository"
@repository.create_if_missing!
@statements = @repository.statements
2  spec/integration/query_spec.rb
View
@@ -4,7 +4,7 @@
describe "query" do
before :each do
- @server = AllegroGraph::Server.new :username => "test", :password => "test"
+ @server = AllegroGraph::Server.new :username => ENV['AG_USER'], :password => ENV['AG_PASS']
@repository = AllegroGraph::Repository.new @server, "test_repository"
@repository.create_if_missing!
4 spec/integration/repository_spec.rb
View
@@ -6,7 +6,7 @@
use_real_transport!
before :each do
- @server = AllegroGraph::Server.new :username => "test", :password => "test"
+ @server = AllegroGraph::Server.new :username => ENV['AG_USER'], :password => ENV['AG_PASS']
@repository = AllegroGraph::Repository.new @server, "test_repository"
end
@@ -17,7 +17,7 @@
end
it "should provide a list of repositories" do
- @server.root_catalog.repositories.should == [ @repository ]
+ @server.root_catalog.repositories.should include(@repository)
end
end
8 spec/integration/server_spec.rb
View
@@ -6,15 +6,11 @@
use_real_transport!
before :each do
- @server = AllegroGraph::Server.new :username => "test", :password => "test"
+ @server = AllegroGraph::Server.new :username => ENV['AG_USER'], :password => ENV['AG_PASS']
end
it "should return the server's version" do
- @server.version.should == {
- :version => "4.3.3",
- :date => "September 30, 2011 11:55:21 GMT-0700",
- :revision => "internal reversion unknown"
- }
+ @server.version.should have_key(:version)
end
end
2  spec/integration/statements_spec.rb
View
@@ -6,7 +6,7 @@
use_real_transport!
before :each do
- @server = AllegroGraph::Server.new :username => "test", :password => "test"
+ @server = AllegroGraph::Server.new :username => ENV['AG_USER'], :password => ENV['AG_PASS']
@repository = AllegroGraph::Repository.new @server, "test_repository"
@repository.create_if_missing!
2  spec/integration/transactions_spec.rb
View
@@ -6,7 +6,7 @@
use_real_transport!
before :each do
- @server = AllegroGraph::Server.new :username => "test", :password => "test"
+ @server = AllegroGraph::Server.new :username => ENV['AG_USER'], :password => ENV['AG_PASS']
@repository = AllegroGraph::Repository.new @server, "test_repository"
@repository.create_if_missing!
2  spec/lib/allegro_graph/catalog_spec.rb
View
@@ -5,7 +5,7 @@
before :each do
fake_transport!
- @server = AllegroGraph::Server.new :username => "test", :password => "test"
+ @server = AllegroGraph::Server.new :username => ENV['AG_USER'], :password => ENV['AG_PASS']
@catalog = AllegroGraph::Catalog.new @server, "test_catalog"
end
2  spec/lib/allegro_graph/proxy/geometric_spec.rb
View
@@ -5,7 +5,7 @@
before :each do
fake_transport!
- @server = AllegroGraph::Server.new :username => "test", :password => "test"
+ @server = AllegroGraph::Server.new :username => ENV['AG_USER'], :password => ENV['AG_PASS']
@catalog = AllegroGraph::Catalog.new @server, "test_catalog"
@repository = AllegroGraph::Repository.new @catalog, "test_repository"
@geometric = AllegroGraph::Proxy::Geometric.new @repository
2  spec/lib/allegro_graph/proxy/mapping_spec.rb
View
@@ -5,7 +5,7 @@
before :each do
fake_transport!
- @server = AllegroGraph::Server.new :username => "test", :password => "test"
+ @server = AllegroGraph::Server.new :username => ENV['AG_USER'], :password => ENV['AG_PASS']
@catalog = AllegroGraph::Catalog.new @server, "test_catalog"
@repository = AllegroGraph::Repository.new @catalog, "test_repository"
@mapping = AllegroGraph::Proxy::Mapping.new @repository
2  spec/lib/allegro_graph/proxy/query_spec.rb
View
@@ -5,7 +5,7 @@
before :each do
fake_transport!
- @server = AllegroGraph::Server.new :username => "test", :password => "test"
+ @server = AllegroGraph::Server.new :username => ENV['AG_USER'], :password => ENV['AG_PASS']
@catalog = AllegroGraph::Catalog.new @server, "test_catalog"
@repository = AllegroGraph::Repository.new @catalog, "test_repository"
@query = AllegroGraph::Proxy::Query.new @repository
2  spec/lib/allegro_graph/proxy/statements_spec.rb
View
@@ -5,7 +5,7 @@
before :each do
fake_transport!
- @server = AllegroGraph::Server.new :username => "test", :password => "test"
+ @server = AllegroGraph::Server.new :username => ENV['AG_USER'], :password => ENV['AG_PASS']
@catalog = AllegroGraph::Catalog.new @server, "test_catalog"
@repository = AllegroGraph::Repository.new @catalog, "test_repository"
@statements = AllegroGraph::Proxy::Statements.new @repository
2  spec/lib/allegro_graph/repository_spec.rb
View
@@ -5,7 +5,7 @@
before :each do
fake_transport!
- @server = AllegroGraph::Server.new :username => "test", :password => "test"
+ @server = AllegroGraph::Server.new :username => ENV['AG_USER'], :password => ENV['AG_PASS']
@catalog = AllegroGraph::Catalog.new @server, "test_catalog"
@repository = AllegroGraph::Repository.new @catalog, "test_repository"
end
8 spec/lib/allegro_graph/server_spec.rb
View
@@ -5,7 +5,7 @@
before :each do
fake_transport!
- @server = AllegroGraph::Server.new :username => "test", :password => "test"
+ @server = AllegroGraph::Server.new :username => ENV['AG_USER'], :password => ENV['AG_PASS']
end
describe "==" do
@@ -21,13 +21,13 @@
end
end
-
+
describe "server" do
-
+
it "should return the server itself" do
@server.server.should == @server
end
-
+
end
describe "request_http" do
2  spec/lib/allegro_graph/session_spec.rb
View
@@ -5,7 +5,7 @@
before :each do
fake_transport!
- @session = AllegroGraph::Session.new :url => "http://session:5555", :username => "test", :password => "test"
+ @session = AllegroGraph::Session.new :url => "http://session:5555", :username => ENV['AG_USER'], :password => ENV['AG_PASS']
end
describe "request_http" do
3  spec/spec_helper.rb
View
@@ -1,7 +1,8 @@
require 'rubygems'
-gem 'rspec', '>= 2'
require 'rspec'
require 'transport/spec'
+require 'dotenv'
+Dotenv.load
require File.join(File.dirname(__FILE__), "..", "lib", "allegro_graph")
require File.join(File.dirname(__FILE__), "fake_transport_helper")
Please sign in to comment.
Something went wrong with that request. Please try again.