get_geo 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +70 -0
- data/README.md +35 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/get-geo +6 -0
- data/bin/setup +8 -0
- data/get_geo.gemspec +30 -0
- data/lib/get_geo.rb +9 -0
- data/lib/get_geo/cli.rb +7 -0
- data/lib/get_geo/data.rb +11 -0
- data/lib/get_geo/printer.rb +29 -0
- data/lib/get_geo/printer/cli.rb +5 -0
- data/lib/get_geo/version.rb +3 -0
- metadata +133 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: '009f2720ec887d929f43f17013636d30004ef71534657b485837c8c7423a373b'
|
4
|
+
data.tar.gz: 350bd4d6547b3114cdd14ff7a263c9e9e01980a109b43594c803a37f77be71de
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6dd878e1de115dc868014e6b1e4ecc6686c7c5dd996ad60e58492db145cb590b7b2fa8635eca6f95001d2e1ffb3f7133f6b52c179eb5bb5ced95481f58943a75
|
7
|
+
data.tar.gz: 416d266e0f8ece2de2b51f473b48e9888bde92e121855e9438f224bc8edc6c3c7760ea50cc2a1896b552b419c4ef67c43f074f5b76045070efd8f2e9cb42e7bf
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
get_geo (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
aruba (0.14.8)
|
10
|
+
childprocess (>= 0.6.3, < 1.1.0)
|
11
|
+
contracts (~> 0.9)
|
12
|
+
cucumber (>= 1.3.19)
|
13
|
+
ffi (~> 1.9)
|
14
|
+
rspec-expectations (>= 2.99)
|
15
|
+
thor (~> 0.19)
|
16
|
+
backports (3.11.4)
|
17
|
+
builder (3.2.3)
|
18
|
+
childprocess (1.0.1)
|
19
|
+
rake (< 13.0)
|
20
|
+
contracts (0.16.0)
|
21
|
+
cucumber (3.1.2)
|
22
|
+
builder (>= 2.1.2)
|
23
|
+
cucumber-core (~> 3.2.0)
|
24
|
+
cucumber-expressions (~> 6.0.1)
|
25
|
+
cucumber-wire (~> 0.0.1)
|
26
|
+
diff-lcs (~> 1.3)
|
27
|
+
gherkin (~> 5.1.0)
|
28
|
+
multi_json (>= 1.7.5, < 2.0)
|
29
|
+
multi_test (>= 0.1.2)
|
30
|
+
cucumber-core (3.2.1)
|
31
|
+
backports (>= 3.8.0)
|
32
|
+
cucumber-tag_expressions (~> 1.1.0)
|
33
|
+
gherkin (~> 5.0)
|
34
|
+
cucumber-expressions (6.0.1)
|
35
|
+
cucumber-tag_expressions (1.1.1)
|
36
|
+
cucumber-wire (0.0.1)
|
37
|
+
diff-lcs (1.3)
|
38
|
+
ffi (1.10.0)
|
39
|
+
gherkin (5.1.0)
|
40
|
+
multi_json (1.13.1)
|
41
|
+
multi_test (0.1.2)
|
42
|
+
rake (10.5.0)
|
43
|
+
rspec (3.8.0)
|
44
|
+
rspec-core (~> 3.8.0)
|
45
|
+
rspec-expectations (~> 3.8.0)
|
46
|
+
rspec-mocks (~> 3.8.0)
|
47
|
+
rspec-core (3.8.0)
|
48
|
+
rspec-support (~> 3.8.0)
|
49
|
+
rspec-expectations (3.8.2)
|
50
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
51
|
+
rspec-support (~> 3.8.0)
|
52
|
+
rspec-mocks (3.8.0)
|
53
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
54
|
+
rspec-support (~> 3.8.0)
|
55
|
+
rspec-support (3.8.0)
|
56
|
+
thor (0.20.3)
|
57
|
+
|
58
|
+
PLATFORMS
|
59
|
+
ruby
|
60
|
+
|
61
|
+
DEPENDENCIES
|
62
|
+
aruba
|
63
|
+
bundler (~> 1.17)
|
64
|
+
cucumber
|
65
|
+
get_geo!
|
66
|
+
rake (~> 10.0)
|
67
|
+
rspec (~> 3.0)
|
68
|
+
|
69
|
+
BUNDLED WITH
|
70
|
+
1.17.2
|
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# GetGeo
|
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/get_geo`. 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 'get_geo'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install get_geo
|
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]/get_geo.
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "get_geo"
|
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/get-geo
ADDED
data/bin/setup
ADDED
data/get_geo.gemspec
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "get_geo/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "get_geo"
|
8
|
+
spec.version = GetGeo::VERSION
|
9
|
+
spec.authors = ["Eldar Iskhakov"]
|
10
|
+
spec.email = ["iskhakov.eldar95@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = 'GetGeo For workshop OOP'
|
13
|
+
spec.description = 'GetGeo For workshop OOP'
|
14
|
+
spec.homepage = 'https://github.com/eldarik/get_geo'
|
15
|
+
|
16
|
+
# Specify which files should be added to the gem when it is released.
|
17
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
18
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
19
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
+
end
|
21
|
+
spec.bindir = "bin"
|
22
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
23
|
+
spec.require_paths = ["lib"]
|
24
|
+
|
25
|
+
spec.add_development_dependency "bundler", "~> 1.17"
|
26
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
27
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
28
|
+
spec.add_development_dependency "cucumber"
|
29
|
+
spec.add_development_dependency "aruba"
|
30
|
+
end
|
data/lib/get_geo.rb
ADDED
data/lib/get_geo/cli.rb
ADDED
data/lib/get_geo/data.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
class GetGeo::Printer
|
2
|
+
attr_reader :data, :output_string
|
3
|
+
|
4
|
+
def initialize(data)
|
5
|
+
@data = data
|
6
|
+
set_output_string
|
7
|
+
end
|
8
|
+
|
9
|
+
def print
|
10
|
+
output_string
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
def set_output_string
|
15
|
+
@output_string =
|
16
|
+
<<~HEREDOC
|
17
|
+
--- GetGeo ---
|
18
|
+
#{item_line('city', data.city)}
|
19
|
+
#{item_line('country', data.country)}
|
20
|
+
#{item_line('lat', data.lat)}
|
21
|
+
#{item_line('lon', data.lon)}
|
22
|
+
#{item_line('query', data.query)}
|
23
|
+
HEREDOC
|
24
|
+
end
|
25
|
+
|
26
|
+
def item_line(label, value)
|
27
|
+
"#{label}: #{value}"
|
28
|
+
end
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,133 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: get_geo
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Eldar Iskhakov
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-02-16 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.17'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.17'
|
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: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: cucumber
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: aruba
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: GetGeo For workshop OOP
|
84
|
+
email:
|
85
|
+
- iskhakov.eldar95@gmail.com
|
86
|
+
executables:
|
87
|
+
- console
|
88
|
+
- get-geo
|
89
|
+
- setup
|
90
|
+
extensions: []
|
91
|
+
extra_rdoc_files: []
|
92
|
+
files:
|
93
|
+
- ".gitignore"
|
94
|
+
- ".rspec"
|
95
|
+
- ".travis.yml"
|
96
|
+
- Gemfile
|
97
|
+
- Gemfile.lock
|
98
|
+
- README.md
|
99
|
+
- Rakefile
|
100
|
+
- bin/console
|
101
|
+
- bin/get-geo
|
102
|
+
- bin/setup
|
103
|
+
- get_geo.gemspec
|
104
|
+
- lib/get_geo.rb
|
105
|
+
- lib/get_geo/cli.rb
|
106
|
+
- lib/get_geo/data.rb
|
107
|
+
- lib/get_geo/printer.rb
|
108
|
+
- lib/get_geo/printer/cli.rb
|
109
|
+
- lib/get_geo/version.rb
|
110
|
+
homepage: https://github.com/eldarik/get_geo
|
111
|
+
licenses: []
|
112
|
+
metadata: {}
|
113
|
+
post_install_message:
|
114
|
+
rdoc_options: []
|
115
|
+
require_paths:
|
116
|
+
- lib
|
117
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - ">="
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
122
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0'
|
127
|
+
requirements: []
|
128
|
+
rubyforge_project:
|
129
|
+
rubygems_version: 2.7.3
|
130
|
+
signing_key:
|
131
|
+
specification_version: 4
|
132
|
+
summary: GetGeo For workshop OOP
|
133
|
+
test_files: []
|