neo4j-rake_tasks 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/neo4j/rake_tasks/server_manager.rb +7 -7
- data/lib/neo4j/rake_tasks/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37fa19c17f8499ddc7191355745ac5431e71b18b
|
4
|
+
data.tar.gz: a1edc9a3b7200044229706bb1d68f44f129c9a50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ef7d48f7bc0de5fc367759885394a78b13407ddac91954d5b062417d2fe56a62832dffa704832802ab725dac1a54eca2657bece5843b935fe19013f0c8c6358
|
7
|
+
data.tar.gz: 961e16b84b77a70a2d0dc69c3b9247cfe18716c2ab9331423047e9ebe4c1dfe0a1d1f7845ae5cab12de6d661dc46d602c654ec7db0640c129b797ab9b9db3b8f
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'pathname'
|
2
|
+
require 'ostruct'
|
2
3
|
|
3
4
|
module Neo4j
|
4
5
|
module RakeTasks
|
@@ -172,17 +173,16 @@ module Neo4j
|
|
172
173
|
|
173
174
|
def print_indexes_or_constraints(type)
|
174
175
|
url = File.join(server_url, "db/data/schema/#{type}")
|
175
|
-
data = JSON.load(open(url).read)
|
176
|
+
data = JSON.load(open(url).read).map(&OpenStruct.method(:new))
|
176
177
|
if data.empty?
|
177
178
|
puts "No #{type.to_s.pluralize} found"
|
178
179
|
return
|
179
180
|
end
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
puts ' ' + value['property_keys'].join(', ')
|
181
|
+
criteria = -> (i) { i.label || i.relationshipType }
|
182
|
+
data.sort_by(&criteria).chunk(&criteria).each do |label_or_type, rows|
|
183
|
+
puts "\e[36m#{label_or_type}\e[0m"
|
184
|
+
rows.each do |row|
|
185
|
+
puts " #{row.type + ': ' if row.type}#{row.property_keys.join(', ')}"
|
186
186
|
end
|
187
187
|
end
|
188
188
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neo4j-rake_tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Underwood
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored
|