awesome_map_marker 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +3 -0
- data/.rubocop.yml +36 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +104 -0
- data/Rakefile +6 -0
- data/app/assets/fonts/fa-brands-400.ttf +0 -0
- data/app/assets/fonts/fa-regular-400.ttf +0 -0
- data/app/assets/fonts/fa-solid-900.ttf +0 -0
- data/app/assets/images/base.png +0 -0
- data/app/assets/images/icon-base.png +0 -0
- data/awesome_map_marker.gemspec +45 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/config/fab.yml +829 -0
- data/config/far.yml +303 -0
- data/config/fas.yml +1871 -0
- data/lib/awesome_map_marker/version.rb +3 -0
- data/lib/awesome_map_marker.rb +137 -0
- metadata +137 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e17ce290a5a22712c1997184b23253c0010ac8a1d3d642573f748849de784b6c
|
4
|
+
data.tar.gz: b95e4ab182de6a90330d9d0b5adc34491319681f89b926aefc293ebf6c780013
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b8c37cec0c700033391194f0a7dfab2f58d49e791c5fe58ad2bbfead37a9b23c40d87447955c84de42c896f2d29fa5115bf43eab1d853db7dbdf7fbc503eccad
|
7
|
+
data.tar.gz: a8cca96f6aa41588e51fc578abeb5f942f6759086cdb126e9e4849fbeba85830e2a0e38737d262f5901d2db78eec9a8dc9bd614aa19beb73a14919c35d2dd9df
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# This file overrides https://github.com/bbatsov/rubocop/blob/master/config/default.yml
|
2
|
+
|
3
|
+
# Use UTF-8 as the source file encoding.
|
4
|
+
Encoding:
|
5
|
+
Enabled: false
|
6
|
+
|
7
|
+
# Limit lines to 80 characters.
|
8
|
+
LineLength:
|
9
|
+
Enabled: false
|
10
|
+
|
11
|
+
# Avoid methods longer than 10 lines of code
|
12
|
+
MethodLength:
|
13
|
+
Enabled: false
|
14
|
+
|
15
|
+
# Favor modifier if/unless usage when you have a single-line body.
|
16
|
+
IfUnlessModifier:
|
17
|
+
Enabled: false
|
18
|
+
|
19
|
+
# Favor modifier while/until usage when you have a single-line body.
|
20
|
+
WhileUntilModifier:
|
21
|
+
Enabled: false
|
22
|
+
|
23
|
+
# Preferred collection methods.
|
24
|
+
CollectionMethods:
|
25
|
+
Enabled: false
|
26
|
+
|
27
|
+
# Don't interpolate global, instance and class variables directly in strings.
|
28
|
+
VariableInterpolation:
|
29
|
+
Enabled: false
|
30
|
+
|
31
|
+
# Use only ascii symbols in comments.
|
32
|
+
AsciiComments:
|
33
|
+
Enabled: false
|
34
|
+
|
35
|
+
Metrics/AbcSize:
|
36
|
+
Enabled: false
|
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at matsunaga@iarchitect.co.jp. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 松永和男
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,104 @@
|
|
1
|
+
# AwesomeMapMarker
|
2
|
+
|
3
|
+
AwesomeMapMarker is a library that generates markers from Fontawesome 5 for plotting on maps such as Google Map, Open Street Map and iOS App etc.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'awesome_map_marker'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install awesome_map_marker
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
require 'awesome_map_marker'
|
26
|
+
|
27
|
+
image = AwesomeMapMarker.generate
|
28
|
+
|
29
|
+
#image is MiniMagick::Image
|
30
|
+
image.write('/path/to/save')
|
31
|
+
```
|
32
|
+
|
33
|
+
In the case of no parameter, such a marker is generated.
|
34
|
+
|
35
|
+
<img src="https://user-images.githubusercontent.com/2704723/52211823-4f47f280-28ce-11e9-985c-da6eb7a97f30.png"/>
|
36
|
+
|
37
|
+
### Parameters
|
38
|
+
|
39
|
+
Parameter is Hash.
|
40
|
+
|
41
|
+
| parameter | TH |
|
42
|
+
| ---- | ---- |
|
43
|
+
| :type | Fontawsome type. : Only ":fas" (solid) and ":fab" (brand) can be specified. ":solid", ":brand" can also be specified. Default is ":fas". |
|
44
|
+
| :name | Fontawesome font name. such as "fa-smile-beam". Default is "fa-map-marker-alt". |
|
45
|
+
| :fill_color | Hex color string. such as "#ff0000". Default is - ![#1589F0](https://placehold.it/15/e45340/000000?text=+) "#e45340". |
|
46
|
+
| :size | Square side length. Default is 128. If you specify a value greater than 2048, it will be 2048.|
|
47
|
+
|
48
|
+
|
49
|
+
### Return value
|
50
|
+
|
51
|
+
This method returns MiniMagick::Image.
|
52
|
+
|
53
|
+
If it can not be generated, return nil.
|
54
|
+
|
55
|
+
|
56
|
+
#### Solid icon
|
57
|
+
|
58
|
+
```ruby
|
59
|
+
image = AwesomeMapMarker.generate(type: :fas,
|
60
|
+
name: 'fa-smile-beam',
|
61
|
+
fill_color: '#5e4fab')
|
62
|
+
```
|
63
|
+
|
64
|
+
<img src="https://user-images.githubusercontent.com/2704723/52199531-bc955c80-28a9-11e9-9d60-77f562fd9e8d.png" width="128"/>
|
65
|
+
|
66
|
+
|
67
|
+
#### Brand icon
|
68
|
+
|
69
|
+
```ruby
|
70
|
+
image = AwesomeMapMarker.generate(type: :fab,
|
71
|
+
name: 'fa-github',
|
72
|
+
fill_color: '#000000')
|
73
|
+
```
|
74
|
+
|
75
|
+
<img src="https://user-images.githubusercontent.com/2704723/52200171-5a3d5b80-28ab-11e9-9958-6e5142bc8c12.png" width="128"/>
|
76
|
+
|
77
|
+
#### Size
|
78
|
+
|
79
|
+
```ruby
|
80
|
+
image = AwesomeMapMarker.generate( type: :fas,
|
81
|
+
name: 'fa-pastafarianism',
|
82
|
+
fill_color: '#b23892',
|
83
|
+
size: 64)
|
84
|
+
```
|
85
|
+
<img src="https://user-images.githubusercontent.com/2704723/52200581-81485d00-28ac-11e9-97f8-7aad9e251152.png" width="64"/>
|
86
|
+
|
87
|
+
## Development
|
88
|
+
|
89
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
90
|
+
|
91
|
+
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).
|
92
|
+
|
93
|
+
## Contributing
|
94
|
+
|
95
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/kazuomatz/awesome_map_marker. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
96
|
+
|
97
|
+
## License
|
98
|
+
|
99
|
+
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
100
|
+
- All font files licensed under [SIL OFL 1.1](http://scripts.sil.org/OFL)
|
101
|
+
|
102
|
+
## Code of Conduct
|
103
|
+
|
104
|
+
Everyone interacting in the AwesomeMapMarker project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/awesome_map_marker/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,45 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "awesome_map_marker/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "awesome_map_marker"
|
8
|
+
spec.version = AwesomeMapMarker::VERSION
|
9
|
+
spec.authors = ["Kazuo Matsunaga"]
|
10
|
+
spec.email = ["getlasterror@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{AwesomeMapMarker is a library that generates markers from Fontawesome 5. }
|
13
|
+
spec.description = %q{Generate marker for plotting on maps such as Google Map, Open Street Map and iOS App etc. }
|
14
|
+
spec.homepage = "https://github.com/kazuomatz"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
#if spec.respond_to?(:metadata)
|
20
|
+
#spec.metadata["allowed_push_host"] = "https://github.com/kazuomatz"
|
21
|
+
|
22
|
+
#spec.metadata["homepage_uri"] = spec.homepage
|
23
|
+
#spec.metadata["source_code_uri"] = "https://github.com/kazuomatz/AwesomeMapMarker"
|
24
|
+
#spec.metadata["changelog_uri"] = "https://github.com/kazuomatz/AwesomeMapMarker/CHANGELOG.md"
|
25
|
+
#else
|
26
|
+
#raise "RubyGems 2.0 or newer is required to protect against " \
|
27
|
+
# "public gem pushes."
|
28
|
+
#end
|
29
|
+
|
30
|
+
# Specify which files should be added to the gem when it is released.
|
31
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
32
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
33
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
34
|
+
end
|
35
|
+
spec.bindir = "exe"
|
36
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
37
|
+
spec.require_paths = ["lib"]
|
38
|
+
|
39
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
40
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
41
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
42
|
+
spec.add_development_dependency "rubocop"
|
43
|
+
|
44
|
+
spec.add_runtime_dependency 'mini_magick', '~> 4.8'
|
45
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "awesome_map_marker"
|
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__)
|