geo_combine 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +13 -0
- data/README.md +53 -0
- data/Rakefile +3 -0
- data/geo_combine.gemspec +25 -0
- data/lib/geo_combine.rb +7 -0
- data/lib/geo_combine/version.rb +3 -0
- data/lib/tasks/geo_combine.rake +36 -0
- metadata +95 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 568a1667dfa82c56c109fe121503a70a84d2f876
|
4
|
+
data.tar.gz: e0787b2029cdf7755bdf0790add73b35578d9892
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4b73e9f0895b8892ec1f87b3f2ce77e7157f6940ac4822367a8f733167b7d0496a0ca41f6e2efe4dedb49ba2a4b968e1bed05bd13971352a4fd0c02ff848502b
|
7
|
+
data.tar.gz: aec8e584e9278992a7b90e015ea8dfab83afe153160da20ec4041e5b0588df261fedb6b86d460cb375f94310a6b6c5cffba462d4c813861f3ed0d79ab019acc4
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
Copyright 2014 The Board of Trustees of the Leland Stanford Junior University.
|
2
|
+
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
you may not use this file except in compliance with the License.
|
5
|
+
You may obtain a copy of the License at
|
6
|
+
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
See the License for the specific language governing permissions and
|
13
|
+
limitations under the License.
|
data/README.md
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
# GeoCombine
|
2
|
+
|
3
|
+
A Ruby toolkit for managing geospatial metadata
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'geo_combine'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install geo_combine
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
### Clone all OpenGeoMetadata repositories
|
24
|
+
|
25
|
+
```sh
|
26
|
+
$ rake geocombine:clone
|
27
|
+
```
|
28
|
+
|
29
|
+
Will clone all edu.* OpenGeoMetadata repositories into `./tmp`
|
30
|
+
|
31
|
+
### Pull all OpenGeoMetadata repositories
|
32
|
+
|
33
|
+
```sh
|
34
|
+
$ rake geocombine:pull
|
35
|
+
```
|
36
|
+
|
37
|
+
Runs `git pull origin master` on all cloned repositories in `./tmp`
|
38
|
+
|
39
|
+
### Index all of the GeoBlacklight documents
|
40
|
+
|
41
|
+
```sh
|
42
|
+
$ rake geocombine:index
|
43
|
+
```
|
44
|
+
|
45
|
+
Indexs all of the `geoblacklight.xml` files in cloned repositories to a Solr index running at http://127.0.0.1:8983/solr
|
46
|
+
|
47
|
+
## Contributing
|
48
|
+
|
49
|
+
1. Fork it ( https://github.com/[my-github-username]/GeoCombine/fork )
|
50
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
51
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
52
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
53
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
data/geo_combine.gemspec
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'geo_combine/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "geo_combine"
|
8
|
+
spec.version = GeoCombine::VERSION
|
9
|
+
spec.authors = ["Jack Reed"]
|
10
|
+
spec.email = ["pjreed@stanford.edu"]
|
11
|
+
spec.summary = %q{A Ruby toolkit for managing geospatial metadata}
|
12
|
+
spec.description = %q{A Ruby toolkit for managing geospatial metadata}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "Apache"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency 'rsolr'
|
22
|
+
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
24
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
25
|
+
end
|
data/lib/geo_combine.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'find'
|
2
|
+
require 'net/http'
|
3
|
+
require 'json'
|
4
|
+
require 'rsolr'
|
5
|
+
|
6
|
+
namespace :geocombine do
|
7
|
+
desc 'Clone all OpenGeoMetadata repositories'
|
8
|
+
task :clone do
|
9
|
+
ogm_api_uri = URI('https://api.github.com/orgs/opengeometadata/repos')
|
10
|
+
ogm_repos = JSON.parse(Net::HTTP.get(ogm_api_uri)).map{ |repo| repo['git_url']}
|
11
|
+
ogm_repos.each do |repo|
|
12
|
+
if repo =~ /^git:\/\/github.com\/OpenGeoMetadata\/edu.*/
|
13
|
+
system "cd tmp && git clone #{repo}"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
desc '"git pull" OpenGeoMetadata repositories'
|
18
|
+
task :pull do
|
19
|
+
Dir.glob('tmp/*').map{ |dir| system "cd #{dir} && git pull origin master" if dir =~ /.*edu.*./ }
|
20
|
+
end
|
21
|
+
desc 'Index all of the GeoBlacklight documents'
|
22
|
+
task :index do
|
23
|
+
solr = RSolr.connect :url => 'http://127.0.0.1:8983/solr'
|
24
|
+
Find.find('tmp') do |path|
|
25
|
+
if path =~ /.*geoblacklight.xml$/
|
26
|
+
doc = File.read(path)
|
27
|
+
begin
|
28
|
+
solr.update data: doc
|
29
|
+
solr.commit
|
30
|
+
rescue RSolr::Error::Http => error
|
31
|
+
puts error
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
metadata
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: geo_combine
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jack Reed
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-02-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rsolr
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.7'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.7'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
description: A Ruby toolkit for managing geospatial metadata
|
56
|
+
email:
|
57
|
+
- pjreed@stanford.edu
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- Gemfile
|
64
|
+
- LICENSE.txt
|
65
|
+
- README.md
|
66
|
+
- Rakefile
|
67
|
+
- geo_combine.gemspec
|
68
|
+
- lib/geo_combine.rb
|
69
|
+
- lib/geo_combine/version.rb
|
70
|
+
- lib/tasks/geo_combine.rake
|
71
|
+
homepage: ''
|
72
|
+
licenses:
|
73
|
+
- Apache
|
74
|
+
metadata: {}
|
75
|
+
post_install_message:
|
76
|
+
rdoc_options: []
|
77
|
+
require_paths:
|
78
|
+
- lib
|
79
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
requirements: []
|
90
|
+
rubyforge_project:
|
91
|
+
rubygems_version: 2.4.5
|
92
|
+
signing_key:
|
93
|
+
specification_version: 4
|
94
|
+
summary: A Ruby toolkit for managing geospatial metadata
|
95
|
+
test_files: []
|