neo4j-rake_tasks 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 914ebd590bc305c15848a3964495e2f48cb7b119
4
- data.tar.gz: 715b564075c5248879dde37304bcb97f7cca61df
3
+ metadata.gz: f4d1b6c4bc29cd84a9e571c95d908a86a2718267
4
+ data.tar.gz: 43647c52d7105b98d28e420f4f7e9e037f20133d
5
5
  SHA512:
6
- metadata.gz: 93ea085e16181e17f274dff8e0813a310191ba8dd9bf414e8c43da7c60b04cb8ad765becc282e7027bccd1c55a366d3ee5c091a20466bef7099a62bc13456ee0
7
- data.tar.gz: 80a5d30d3c25b1b2f636a966de4b6e667757c0c7a9d36bf78450e17b9cbe4aa5b490336c725f1fd1296fd74fd07e02377c76a11efe744d81e42ce2c9a11576e7
6
+ metadata.gz: 14b391feedd026a6c21b11b7e54c674c5c8856fba5f8251080ef6e9e042a0dafff2ce0d8454f09fbc78327c2b40cd326db1038b04dc0dc5fd9133f5f501b5adc
7
+ data.tar.gz: ff11765ca8119a7ad722a5264d5d38ae2e9092ee84b8eb8b50b554a4199904959fcebd05545d165f5a5bd9a30ff541868232ad9b2617054c4449d84ffa308879
data/README.md CHANGED
@@ -84,6 +84,38 @@ The ``neo4j-rake_tasks`` gem (automatically included with the ``neo4j`` gem) inc
84
84
  Stop the Neo4j server
85
85
 
86
86
 
87
+ ## neo4j:indexes
88
+
89
+ ### Arguments
90
+
91
+ ``environment``
92
+
93
+ ### Example
94
+
95
+ ``rake neo4j:indexes[development]``
96
+
97
+ ### Description
98
+
99
+ Print out the indexes in the database
100
+
101
+
102
+
103
+ ## neo4j:constraints
104
+
105
+ ### Arguments
106
+
107
+ ``environment``
108
+
109
+ ### Example
110
+
111
+ ``rake neo4j:constraints[development]``
112
+
113
+ ### Description
114
+
115
+ Print out the constraints in the database
116
+
117
+
118
+
87
119
  ## neo4j:reset_yes_i_am_sure
88
120
 
89
121
  ### Arguments
@@ -173,12 +173,16 @@ module Neo4j
173
173
  def print_indexes_or_constraints(type)
174
174
  url = File.join(server_url, "db/data/schema/#{type}")
175
175
  data = JSON.load(open(url).read)
176
- data.sort_by {|i| i['label'] }.chunk do |index|
177
- index['label']
176
+ if data.empty?
177
+ puts "No #{type.to_s.pluralize} found"
178
+ return
179
+ end
180
+ data.sort_by {|i| i['label'] }.chunk do |value|
181
+ value['label']
178
182
  end.each do |label, indexes|
179
183
  puts "\e[36m#{label}\e[0m"
180
- indexes.each do |index|
181
- puts ' ' + index['property_keys'].join(', ')
184
+ indexes.each do |value|
185
+ puts ' ' + value['property_keys'].join(', ')
182
186
  end
183
187
  end
184
188
  end
@@ -209,7 +213,7 @@ module Neo4j
209
213
  address.prepend('http://') unless address.match(/^http:\/\//)
210
214
  end
211
215
  else
212
- port = get_config_property('org.neo4j.server.webserver.https.port')
216
+ port = get_config_property('org.neo4j.server.webserver.port')
213
217
  "http://localhost:#{port}"
214
218
  end.strip
215
219
  end
@@ -1,5 +1,5 @@
1
1
  module Neo4j
2
2
  module RakeTasks
3
- VERSION = '0.7.0'
3
+ VERSION = '0.7.1'
4
4
  end
5
5
  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.0
4
+ version: 0.7.1
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-06-29 00:00:00.000000000 Z
11
+ date: 2016-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored