neighbourhood-interface 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2263415f7b6cc8b3f0dde315a9ac93d3dd18d718
4
+ data.tar.gz: b676c316fa49d5a533e6fa11daddbb47cb714ec2
5
+ SHA512:
6
+ metadata.gz: f586cea4163d4657685b338aebae46868fd15466220453624e8c4fd941d0f9ce1169e465ad8c5aa7bf5f88c60cdabfac7aa486594e2df0319b6d590f7bafb590
7
+ data.tar.gz: bbf4b414c1f10e60bb27455b5be9373131dfdaafaf75045c7ba5b3adf0ce738934937282fdd2670698e19af65e6cbaa82202058822937e355a984c662fdeb460
data/.DS_Store ADDED
Binary file
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in neighbourhood-interface.gemspec
4
+ gemspec
5
+ gem 'rake'
6
+ gem 'rspec'
data/Gemfile.lock ADDED
@@ -0,0 +1,37 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ neighbourhood-interface (0.1.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ diff-lcs (1.3)
10
+ grpc-tools (1.3.4)
11
+ rake (12.0.0)
12
+ rspec (3.7.0)
13
+ rspec-core (~> 3.7.0)
14
+ rspec-expectations (~> 3.7.0)
15
+ rspec-mocks (~> 3.7.0)
16
+ rspec-core (3.7.0)
17
+ rspec-support (~> 3.7.0)
18
+ rspec-expectations (3.7.0)
19
+ diff-lcs (>= 1.2.0, < 2.0)
20
+ rspec-support (~> 3.7.0)
21
+ rspec-mocks (3.7.0)
22
+ diff-lcs (>= 1.2.0, < 2.0)
23
+ rspec-support (~> 3.7.0)
24
+ rspec-support (3.7.0)
25
+
26
+ PLATFORMS
27
+ ruby
28
+
29
+ DEPENDENCIES
30
+ bundler (~> 1.12)
31
+ grpc-tools
32
+ neighbourhood-interface!
33
+ rake
34
+ rspec
35
+
36
+ BUNDLED WITH
37
+ 1.16.0
data/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # Neighbourhood::Interface
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/neighbourhood/interface`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'neighbourhood-interface'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install neighbourhood-interface
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/neighbourhood-interface.
36
+
data/Rakefile ADDED
@@ -0,0 +1,7 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
7
+ Dir.glob('lib/tasks/*.rake').each { |r| load r}
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "neighbourhood/interface"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/dump.rdb ADDED
Binary file
@@ -0,0 +1,7 @@
1
+ require "neighbourhood/interface/version"
2
+
3
+ module Neighbourhood
4
+ module Interface
5
+ # Your code goes here...
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ module Neighbourhood
2
+ module Interface
3
+ VERSION = "0.1.1"
4
+ end
5
+ end
@@ -0,0 +1,37 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: neighbourhood.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "neighbourhood.NeighbourHoodServiceRequest" do
8
+ optional :latitude, :string, 1
9
+ optional :longitude, :string, 2
10
+ optional :max_distance_in_metres, :int32, 3
11
+ end
12
+ add_message "neighbourhood.SubCategoryResponse" do
13
+ optional :name, :string, 1
14
+ optional :lat, :string, 2
15
+ optional :lng, :string, 3
16
+ optional :rating, :string, 4
17
+ optional :distance, :int64, 5
18
+ optional :distance_in_text, :string, 6
19
+ optional :sub_category, :string, 7
20
+ optional :travel_time, :int64, 8
21
+ optional :polyline, :string, 9
22
+ end
23
+ add_message "neighbourhood.CategoryResponse" do
24
+ optional :category, :string, 1
25
+ repeated :data, :message, 2, "neighbourhood.SubCategoryResponse"
26
+ end
27
+ add_message "neighbourhood.NeighbourHoodServiceResponse" do
28
+ repeated :response, :message, 1, "neighbourhood.CategoryResponse"
29
+ end
30
+ end
31
+
32
+ module Neighbourhood
33
+ NeighbourHoodServiceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("neighbourhood.NeighbourHoodServiceRequest").msgclass
34
+ SubCategoryResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("neighbourhood.SubCategoryResponse").msgclass
35
+ CategoryResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("neighbourhood.CategoryResponse").msgclass
36
+ NeighbourHoodServiceResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("neighbourhood.NeighbourHoodServiceResponse").msgclass
37
+ end
@@ -0,0 +1,22 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: neighbourhood.proto for package 'neighbourhood'
3
+
4
+ require 'grpc'
5
+ require 'neighbourhood_pb'
6
+
7
+ module Neighbourhood
8
+ module NeighbourhoodService
9
+ class Service
10
+
11
+ include GRPC::GenericService
12
+
13
+ self.marshal_class_method = :encode
14
+ self.unmarshal_class_method = :decode
15
+ self.service_name = 'neighbourhood.NeighbourhoodService'
16
+
17
+ rpc :FindNearbyPlaces, NeighbourHoodServiceRequest, NeighbourHoodServiceResponse
18
+ end
19
+
20
+ Stub = Service.rpc_stub_class
21
+ end
22
+ end
@@ -0,0 +1,23 @@
1
+ require 'rake'
2
+
3
+ namespace :proto do
4
+ desc 'Compiles Protocol Buffers'
5
+ task :compile do
6
+ selected_file_name = ENV['FILE']
7
+
8
+ if selected_file_name
9
+ selected_file_path = "proto/neighbourhood/#{selected_file_name}"
10
+ grpc_compile [selected_file_path]
11
+ else
12
+ file_list = Rake::FileList.new('proto/neighbourhood/**/*.proto')
13
+ grpc_compile file_list
14
+ end
15
+ end
16
+ end
17
+
18
+ def grpc_compile file_list
19
+ until file_list.empty?
20
+ file = file_list.pop
21
+ exec("grpc_tools_ruby_protoc -I proto/neighbourhood/ --ruby_out=lib/neighbourhood/ --grpc_out=lib/neighbourhood/ #{file}")
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'neighbourhood/interface/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "neighbourhood-interface"
8
+ spec.version = Neighbourhood::Interface::VERSION
9
+ spec.authors = ["yourname"]
10
+ spec.email = ["yourname@domain.com"]
11
+
12
+ spec.summary = "neighbourhood Summary"
13
+ spec.description = "neighbourhood Description"
14
+
15
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
16
+ spec.bindir = "exe"
17
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
18
+ spec.require_paths = ["lib","lib/neighbourhood"]
19
+
20
+ spec.add_development_dependency "bundler", "~> 1.12"
21
+ spec.add_development_dependency "rake", "~> 10.0"
22
+ spec.add_development_dependency "grpc-tools"
23
+ end
@@ -0,0 +1,34 @@
1
+ syntax = "proto3";
2
+
3
+ package neighbourhood;
4
+
5
+ service NeighbourhoodService {
6
+ rpc FindNearbyPlaces (NeighbourHoodServiceRequest) returns (NeighbourHoodServiceResponse) {}
7
+ }
8
+
9
+ message NeighbourHoodServiceRequest {
10
+ string latitude = 1;
11
+ string longitude = 2;
12
+ int32 max_distance_in_metres = 3; // Result will be limited to places under this radius.
13
+ }
14
+
15
+ message SubCategoryResponse{
16
+ string name = 1;
17
+ string lat = 2;
18
+ string lng = 3;
19
+ string rating = 4;
20
+ int64 distance = 5;
21
+ string distance_in_text = 6;
22
+ string sub_category = 7;
23
+ int64 travel_time = 8;
24
+ string polyline = 9;
25
+ }
26
+
27
+ message CategoryResponse {
28
+ string category = 1;
29
+ repeated SubCategoryResponse data = 2;
30
+ }
31
+
32
+ message NeighbourHoodServiceResponse {
33
+ repeated CategoryResponse response = 1;
34
+ }
metadata ADDED
@@ -0,0 +1,101 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: neighbourhood-interface
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - yourname
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-02-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.12'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.12'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: grpc-tools
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: neighbourhood Description
56
+ email:
57
+ - yourname@domain.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".DS_Store"
63
+ - Gemfile
64
+ - Gemfile.lock
65
+ - README.md
66
+ - Rakefile
67
+ - bin/console
68
+ - bin/setup
69
+ - dump.rdb
70
+ - lib/neighbourhood/interface.rb
71
+ - lib/neighbourhood/interface/version.rb
72
+ - lib/neighbourhood/neighbourhood_pb.rb
73
+ - lib/neighbourhood/neighbourhood_services_pb.rb
74
+ - lib/tasks/compile_proto.rake
75
+ - neighbourhood-interface.gemspec
76
+ - proto/neighbourhood/neighbourhood.proto
77
+ homepage:
78
+ licenses: []
79
+ metadata: {}
80
+ post_install_message:
81
+ rdoc_options: []
82
+ require_paths:
83
+ - lib
84
+ - lib/neighbourhood
85
+ required_ruby_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ required_rubygems_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ requirements: []
96
+ rubyforge_project:
97
+ rubygems_version: 2.5.1
98
+ signing_key:
99
+ specification_version: 4
100
+ summary: neighbourhood Summary
101
+ test_files: []