Sha256: cb308cd4b04cf6d4562d4f2c0aa1ca87c96f4a98b071a33f86d0bdc04dbb4022

Contents?: true

Size: 1.1 KB

Versions: 13

Compression:

Stored size: 1.1 KB

Contents

class RSpec::GraphRunner
  module Orient
    def all(usage_style = :read_write, indices = true, &block)
      super
      orient(usage_style, indices, &block)
    end

    def orient(usage_style = :read_write, indices = true, &block)
      for_graph('orient', usage_style, indices, true, orient_graph, orient_graph2, orient_graph_no_indices, block)
    end

    protected

    def orient_graph
      return @orient_graph if @orient_graph
      path1 = File.expand_path('/tmp/spec.orient')
      dir = Pathname.new(path1)
      dir.rmtree if dir.exist?
      @orient_graph = Pacer.orient(path1, lightweight_edges: false, edge_classes: false)
    end

    # Can't use 2 graphs on 1 thread.
    def orient_graph2
      return @orient_graph2 if @orient_graph2
      @orient_graph2 = Pacer.tg
    end

    def orient_graph_no_indices
      return @orient_graph_no_indices if @orient_graph_no_indices
      path3 = File.expand_path('/tmp/spec.orient.3')
      dir = Pathname.new(path3)
      dir.rmtree if dir.exist?
      @orient_graph_no_indices = Pacer.orient(path3, lightweight_edges: false, edge_classes: false)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
pacer-orient-2.3.6-java lib/pacer-orient/rspec.rb
pacer-orient-2.3.5-java lib/pacer-orient/rspec.rb
pacer-orient-2.3.5.pre-java lib/pacer-orient/rspec.rb
pacer-orient-2.3.4.pre-java lib/pacer-orient/rspec.rb
pacer-orient-2.3.3.pre-java lib/pacer-orient/rspec.rb
pacer-orient-2.3.2.pre-java lib/pacer-orient/rspec.rb
pacer-orient-2.3.1.pre-java lib/pacer-orient/rspec.rb
pacer-orient-2.2.2.pre-java lib/pacer-orient/rspec.rb
pacer-orient-2.2.1.pre-java lib/pacer-orient/rspec.rb
pacer-orient-2.2.0.pre-java lib/pacer-orient/rspec.rb
pacer-orient-2.1.2-java lib/pacer-orient/rspec.rb
pacer-orient-2.1.1-java lib/pacer-orient/rspec.rb
pacer-orient-2.1.0-java lib/pacer-orient/rspec.rb