Skip to content

Commit fa7531d

Browse files
committed
First commit extracting code from neo4j-coore
0 parents  commit fa7531d

21 files changed

+1105
-0
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Change Log
2+
All notable changes to this project will be documented in this file.
3+
This file should follow the standards specified on [http://keepachangelog.com/]
4+
This project adheres to [Semantic Versioning](http://semver.org/).
5+
6+
## [Unreleased][unreleased]
7+
- Nothing yet, placeholder
8+

Gemfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
source 'https://rubygems.org'
2+
3+
gemspec
4+
5+
group 'test' do
6+
gem 'coveralls', require: false
7+
gem 'simplecov-html', require: false
8+
gem 'rake'
9+
gem 'rspec'
10+
gem 'rspec-its'
11+
gem 'guard-rspec', require: false
12+
end

Gemfile.lock

+127
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
PATH
2+
remote: .
3+
specs:
4+
neo4j-rake_tasks (0.0.1)
5+
colored
6+
7+
GEM
8+
remote: https://rubygems.org/
9+
specs:
10+
ast (2.0.0)
11+
astrolabe (1.3.0)
12+
parser (>= 2.2.0.pre.3, < 3.0)
13+
coderay (1.1.0)
14+
colored (1.2)
15+
coveralls (0.8.2)
16+
json (~> 1.8)
17+
rest-client (>= 1.6.8, < 2)
18+
simplecov (~> 0.10.0)
19+
term-ansicolor (~> 1.3)
20+
thor (~> 0.19.1)
21+
diff-lcs (1.2.5)
22+
docile (1.1.5)
23+
domain_name (0.5.24)
24+
unf (>= 0.0.5, < 1.0.0)
25+
ffi (1.9.10)
26+
formatador (0.2.5)
27+
guard (2.12.8)
28+
formatador (>= 0.2.4)
29+
listen (>= 2.7, <= 4.0)
30+
lumberjack (~> 1.0)
31+
nenv (~> 0.1)
32+
notiffany (~> 0.0)
33+
pry (>= 0.9.12)
34+
shellany (~> 0.0)
35+
thor (>= 0.18.1)
36+
guard-compat (1.2.1)
37+
guard-rspec (4.6.0)
38+
guard (~> 2.1)
39+
guard-compat (~> 1.1)
40+
rspec (>= 2.99.0, < 4.0)
41+
guard-rubocop (1.2.0)
42+
guard (~> 2.0)
43+
rubocop (~> 0.20)
44+
http-cookie (1.0.2)
45+
domain_name (~> 0.5)
46+
json (1.8.3)
47+
listen (3.0.1)
48+
rb-fsevent (>= 0.9.3)
49+
rb-inotify (>= 0.9)
50+
lumberjack (1.0.9)
51+
method_source (0.8.2)
52+
mime-types (2.6.1)
53+
nenv (0.2.0)
54+
netrc (0.10.3)
55+
notiffany (0.0.6)
56+
nenv (~> 0.1)
57+
shellany (~> 0.0)
58+
parser (2.3.0.pre.2)
59+
ast (>= 1.1, < 3.0)
60+
powerpack (0.1.1)
61+
pry (0.10.1)
62+
coderay (~> 1.1.0)
63+
method_source (~> 0.8.1)
64+
slop (~> 3.4)
65+
rainbow (2.0.0)
66+
rake (10.4.2)
67+
rb-fsevent (0.9.5)
68+
rb-inotify (0.9.5)
69+
ffi (>= 0.5.0)
70+
rest-client (1.8.0)
71+
http-cookie (>= 1.0.2, < 2.0)
72+
mime-types (>= 1.16, < 3.0)
73+
netrc (~> 0.7)
74+
rspec (3.3.0)
75+
rspec-core (~> 3.3.0)
76+
rspec-expectations (~> 3.3.0)
77+
rspec-mocks (~> 3.3.0)
78+
rspec-core (3.3.1)
79+
rspec-support (~> 3.3.0)
80+
rspec-expectations (3.3.0)
81+
diff-lcs (>= 1.2.0, < 2.0)
82+
rspec-support (~> 3.3.0)
83+
rspec-its (1.2.0)
84+
rspec-core (>= 3.0.0)
85+
rspec-expectations (>= 3.0.0)
86+
rspec-mocks (3.3.1)
87+
diff-lcs (>= 1.2.0, < 2.0)
88+
rspec-support (~> 3.3.0)
89+
rspec-support (3.3.0)
90+
rubocop (0.32.1)
91+
astrolabe (~> 1.3)
92+
parser (>= 2.2.2.5, < 3.0)
93+
powerpack (~> 0.1)
94+
rainbow (>= 1.99.1, < 3.0)
95+
ruby-progressbar (~> 1.4)
96+
ruby-progressbar (1.7.5)
97+
shellany (0.0.1)
98+
simplecov (0.10.0)
99+
docile (~> 1.1.0)
100+
json (~> 1.8)
101+
simplecov-html (~> 0.10.0)
102+
simplecov-html (0.10.0)
103+
slop (3.6.0)
104+
term-ansicolor (1.3.2)
105+
tins (~> 1.0)
106+
thor (0.19.1)
107+
tins (1.5.4)
108+
unf (0.1.4)
109+
unf_ext
110+
unf_ext (0.0.7.1)
111+
112+
PLATFORMS
113+
ruby
114+
115+
DEPENDENCIES
116+
coveralls
117+
guard
118+
guard-rspec
119+
guard-rubocop
120+
neo4j-rake_tasks!
121+
pry
122+
rake
123+
rspec
124+
rspec-its
125+
rubocop
126+
simplecov
127+
simplecov-html

Guardfile

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# A sample Guardfile
2+
# More info at https://github.com/guard/guard#readme
3+
4+
## Uncomment and set this to only include directories you want to watch
5+
# directories %w(app lib config test spec feature)
6+
7+
## Uncomment to clear the screen before every task
8+
# clearing :on
9+
10+
## Guard internally checks for changes in the Guardfile and exits.
11+
## If you want Guard to automatically start up again, run guard in a
12+
## shell loop, e.g.:
13+
##
14+
## $ while bundle exec guard; do echo "Restarting Guard..."; done
15+
##
16+
## Note: if you are using the `directories` clause above and you are not
17+
## watching the project directory ('.'), the you will want to move the Guardfile
18+
## to a watched dir and symlink it back, e.g.
19+
#
20+
# $ mkdir config
21+
# $ mv Guardfile config/
22+
# $ ln -s config/Guardfile .
23+
#
24+
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
25+
26+
guard :rubocop, cli: '--auto-correct --display-cop-names' do
27+
watch(/.+\.rb$/)
28+
watch(%r{(?:.+/)?\.rubocop.*\.yml$}) { |m| File.dirname(m[0]) }
29+
end
30+
31+
guard :rspec, cmd: 'bundle exec rspec' do
32+
watch(%r{^spec/.+_spec\.rb$})
33+
watch(%r{^lib/(.+)\.rb}) { |m| "spec/lib/#{m[1]}_spec.rb" }
34+
watch('spec/spec_helper.rb') { 'spec' }
35+
end

LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2012 Andreas Ronge
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

README.md

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
2+
Rake tasks for managing a Neo4j database with your Ruby project
3+
4+
5+
Rake Tasks
6+
==========
7+
8+
The ``neo4j-rake_tasks`` gem (automatically included with the ``neo4j`` gem) includes some rake tasks which make it easy to install and manage a Neo4j server in the same directory as your Ruby project.
9+
10+
## neo4j:install
11+
12+
### Arguments
13+
14+
``version`` and ``environment`` (environment default is `development`)
15+
16+
### Example
17+
18+
``rake neo4j:install[community-latest,development]``
19+
20+
... or to get a specific version
21+
22+
``rake neo4j:install[community-2.2.3,development]``
23+
24+
### Description
25+
26+
Downloads and installs Neo4j into ``$PROJECT_DIR/db/neo4j/<environment>/``
27+
28+
## neo4j:config
29+
30+
### Arguments
31+
32+
``environment`` and ``port``
33+
34+
### Example
35+
36+
``rake neo4j:config[development,7000]``
37+
38+
### Description
39+
40+
Configure the port which Neo4j runs on. This affects the HTTP REST interface and the web console address.
41+
42+
43+
## neo4j:start
44+
45+
### Arguments
46+
47+
``environment``
48+
49+
### Example
50+
51+
``rake neo4j:start[development]``
52+
53+
### Description
54+
55+
Start the Neo4j server
56+
57+
58+
## neo4j:start_no_wait
59+
60+
### Arguments
61+
62+
``environment``
63+
64+
### Example
65+
66+
``rake neo4j:start_no_wait[development]``
67+
68+
### Description
69+
70+
Start the Neo4j server with the ``start-no-wait`` command
71+
72+
## neo4j:stop
73+
74+
### Arguments
75+
76+
``environment``
77+
78+
### Example
79+
80+
``rake neo4j:stop[development]``
81+
82+
### Description
83+
84+
Stop the Neo4j server
85+
86+

Rakefile

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
require 'rake'
2+
require 'bundler/gem_tasks'
3+
4+
desc 'Run specs'
5+
task 'spec' do
6+
success = system('rspec spec')
7+
abort('RSpec neo4j-core failed') unless success
8+
end
9+
10+
desc 'Generate coverage report'
11+
task 'coverage' do
12+
ENV['COVERAGE'] = 'true'
13+
rm_rf 'coverage/'
14+
task = Rake::Task['spec']
15+
task.reenable
16+
task.invoke
17+
end
18+
19+
task default: [:spec]
20+
21+
# require 'coveralls/rake/task'
22+
# Coveralls::RakeTask.new
23+
# task :test_with_coveralls => [:spec, 'coveralls:push']
24+
#
25+
# task :default => ['test_with_coveralls']

coverage/.last_run.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"result": {
3+
"covered_percent": 40.0
4+
}
5+
}

0 commit comments

Comments
 (0)