neography 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +38 -0
- data/LICENSE +19 -0
- data/README.rdoc +94 -0
- data/Rakefile +2 -0
- data/lib/neography.rb +26 -0
- data/lib/neography/config.rb +152 -0
- data/lib/neography/rest.rb +241 -0
- data/lib/neography/version.rb +3 -0
- data/neography.gemspec +27 -0
- data/spec/integration/rest_index_spec.rb +55 -0
- data/spec/integration/rest_node_spec.rb +241 -0
- data/spec/integration/rest_path_spec.rb +62 -0
- data/spec/integration/rest_relationship_spec.rb +372 -0
- data/spec/spec_helper.rb +24 -0
- data/spec/support/fake_root_spec.rb +5 -0
- metadata +154 -0
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'neography'
|
2
|
+
require 'fakeweb'
|
3
|
+
|
4
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
5
|
+
|
6
|
+
FakeWeb.allow_net_connect = false
|
7
|
+
|
8
|
+
# To test against a real database:
|
9
|
+
# 1. Make sure empty database is running on your test neo4j server (bin/neo4j start)
|
10
|
+
# 2. Uncomment the next two lines
|
11
|
+
FakeWeb.clean_registry
|
12
|
+
FakeWeb.allow_net_connect = true
|
13
|
+
|
14
|
+
# 3. If you want to see more, uncomment the next few lines
|
15
|
+
# require 'net-http-spy'
|
16
|
+
# Net::HTTP.http_logger_options = {:body => true} # just the body
|
17
|
+
# Net::HTTP.http_logger_options = {:verbose => true} # see everything
|
18
|
+
|
19
|
+
def generate_text(length=8)
|
20
|
+
chars = 'abcdefghjkmnpqrstuvwxyz'
|
21
|
+
key = ''
|
22
|
+
length.times { |i| key << chars[rand(chars.length)] }
|
23
|
+
key
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,154 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: neography
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
version: 0.0.1
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Max De Marzi
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-11-20 00:00:00 -08:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: rspec
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ~>
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 2
|
30
|
+
- 0
|
31
|
+
- 0
|
32
|
+
- beta
|
33
|
+
- 22
|
34
|
+
version: 2.0.0.beta.22
|
35
|
+
type: :development
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: net-http-spy
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
- 2
|
48
|
+
- 1
|
49
|
+
version: 0.2.1
|
50
|
+
type: :development
|
51
|
+
version_requirements: *id002
|
52
|
+
- !ruby/object:Gem::Dependency
|
53
|
+
name: fakeweb
|
54
|
+
prerelease: false
|
55
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
57
|
+
requirements:
|
58
|
+
- - ~>
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
segments:
|
61
|
+
- 1
|
62
|
+
- 3
|
63
|
+
- 0
|
64
|
+
version: 1.3.0
|
65
|
+
type: :development
|
66
|
+
version_requirements: *id003
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: httparty
|
69
|
+
prerelease: false
|
70
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
71
|
+
none: false
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
segments:
|
76
|
+
- 0
|
77
|
+
- 6
|
78
|
+
- 1
|
79
|
+
version: 0.6.1
|
80
|
+
type: :runtime
|
81
|
+
version_requirements: *id004
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: json
|
84
|
+
prerelease: false
|
85
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
86
|
+
none: false
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
segments:
|
91
|
+
- 0
|
92
|
+
version: "0"
|
93
|
+
type: :runtime
|
94
|
+
version_requirements: *id005
|
95
|
+
description: A Ruby wrapper to the Neo4j Rest API see http://components.neo4j.org/neo4j-rest/ for more details.
|
96
|
+
email: maxdemarzi@gmail.com
|
97
|
+
executables: []
|
98
|
+
|
99
|
+
extensions: []
|
100
|
+
|
101
|
+
extra_rdoc_files: []
|
102
|
+
|
103
|
+
files:
|
104
|
+
- .gitignore
|
105
|
+
- Gemfile
|
106
|
+
- Gemfile.lock
|
107
|
+
- LICENSE
|
108
|
+
- README.rdoc
|
109
|
+
- Rakefile
|
110
|
+
- lib/neography.rb
|
111
|
+
- lib/neography/config.rb
|
112
|
+
- lib/neography/rest.rb
|
113
|
+
- lib/neography/version.rb
|
114
|
+
- neography.gemspec
|
115
|
+
- spec/integration/rest_index_spec.rb
|
116
|
+
- spec/integration/rest_node_spec.rb
|
117
|
+
- spec/integration/rest_path_spec.rb
|
118
|
+
- spec/integration/rest_relationship_spec.rb
|
119
|
+
- spec/spec_helper.rb
|
120
|
+
- spec/support/fake_root_spec.rb
|
121
|
+
has_rdoc: true
|
122
|
+
homepage: http://rubygems.org/gems/neography
|
123
|
+
licenses: []
|
124
|
+
|
125
|
+
post_install_message:
|
126
|
+
rdoc_options: []
|
127
|
+
|
128
|
+
require_paths:
|
129
|
+
- lib
|
130
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
131
|
+
none: false
|
132
|
+
requirements:
|
133
|
+
- - ">="
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
segments:
|
136
|
+
- 0
|
137
|
+
version: "0"
|
138
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
|
+
none: false
|
140
|
+
requirements:
|
141
|
+
- - ">="
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
segments:
|
144
|
+
- 0
|
145
|
+
version: "0"
|
146
|
+
requirements: []
|
147
|
+
|
148
|
+
rubyforge_project: neography
|
149
|
+
rubygems_version: 1.3.7
|
150
|
+
signing_key:
|
151
|
+
specification_version: 3
|
152
|
+
summary: ruby wrapper to Neo4j Rest API
|
153
|
+
test_files: []
|
154
|
+
|