mapboxkit 0.0.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
+ SHA256:
3
+ metadata.gz: 3f9c0b9e6c0f5ce7be62799b889118ad88c600dfcb9a1759093ee1b106b4ea99
4
+ data.tar.gz: d83f2736b850549e99c0a7fee3e1c73f0c4a60abd827638648dc12e4e2c096b0
5
+ SHA512:
6
+ metadata.gz: 93a9061bbec8fb4427f188ac439aaaf5062806171034fa99dcb858bbafee4c94caf6cddd925d0b136d2ac75e240963a2fbf7a67dcb54948a49ba71231cc945ab
7
+ data.tar.gz: 4a43366cc3689110d51d4c5a31a4f3febaa7c36c807ec0ae00e8c32e3c98560ce8a9776cb10a675f75e2fbb6e0aa63061f588a56a8f75889cdbae7999772e2a8
data/.env.ci ADDED
@@ -0,0 +1,2 @@
1
+ MAPBOX_ACCESS_TOKEN=__MAPBOX_ACCESS_TOKEN__
2
+ MAPBOX_USERNAME=__MAPBOX_USERNAME__
data/.env.example ADDED
@@ -0,0 +1,3 @@
1
+ MAPBOX_ACCESS_TOKEN=
2
+ MAPBOX_USERNAME=
3
+ VERBOSE=
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,19 @@
1
+ require:
2
+ - rubocop-rake
3
+ - rubocop-rspec
4
+
5
+ AllCops:
6
+ TargetRubyVersion: 3.1
7
+ NewCops: enable
8
+
9
+ Layout/HashAlignment:
10
+ EnforcedHashRocketStyle: table
11
+
12
+ Layout/LineLength:
13
+ Max: 120
14
+
15
+ RSpec/ExampleLength:
16
+ Max: 14
17
+
18
+ RSpec/MultipleExpectations:
19
+ Max: 4
data/CHANGELOG.md ADDED
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at mizokami.ryutaro@yamap.co.jp. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # Specify your gem's dependencies in mapboxkit.gemspec
6
+ gemspec
7
+
8
+ gem 'rake', '~> 13.0'
9
+
10
+ gem 'rspec', '~> 3.0'
11
+
12
+ gem 'rubocop', '~> 1.21'
13
+
14
+ gem 'rubocop-rake'
15
+
16
+ gem 'rubocop-rspec'
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 YAMAP INC.
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,55 @@
1
+ # Mapboxkit
2
+
3
+ ## Installation
4
+
5
+ Add this line to your application's Gemfile:
6
+
7
+ ```ruby
8
+ gem 'mapboxkit'
9
+ ```
10
+
11
+ And then execute:
12
+
13
+ $ bundle install
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install mapboxkit
18
+
19
+ ## Usage
20
+
21
+ ```rb
22
+ Mapboxkit.configure do |config|
23
+ config.access_token = ENV['MAPBOX_ACCESS_TOKEN']
24
+ end
25
+
26
+ # List your map's styles
27
+ Mapboxkit.styles('__your_username__')
28
+ ```
29
+
30
+ You can also create an Mapboxkit::Client instance manually.
31
+
32
+ ```rb
33
+ client = Mapboxkit::Client.new(access_token: consumer.access_token)
34
+
35
+ # List consumer's map styles
36
+ client.styles('__your_username__')
37
+ ```
38
+
39
+ ## Development
40
+
41
+ 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.
42
+
43
+ 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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
44
+
45
+ ## Contributing
46
+
47
+ Bug reports and pull requests are welcome on GitHub at https://github.com/yamap-inc/mapboxkit-rb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/yamap-inc/mapboxkit-rb/blob/main/CODE_OF_CONDUCT.md).
48
+
49
+ ## License
50
+
51
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
52
+
53
+ ## Code of Conduct
54
+
55
+ Everyone interacting in the Mapboxkit project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/yamap-inc/mapboxkit-rb/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require 'rubocop/rake_task'
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
@@ -0,0 +1,161 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'mapboxkit/client'
4
+
5
+ module Mapboxkit
6
+ class Client
7
+ #
8
+ # Mapbox Styles API
9
+ #
10
+ # https://docs.mapbox.com/api/maps/styles/
11
+ #
12
+ module Styles
13
+ #
14
+ # Retrieve a style
15
+ #
16
+ # https://docs.mapbox.com/api/maps/styles/#retrieve-a-style
17
+ #
18
+ def style(username, style_id, draft: false)
19
+ path = "styles/v1/#{username}/#{style_id}"
20
+ path = "#{path}/draft" if draft
21
+
22
+ get(path)
23
+ end
24
+
25
+ #
26
+ # List styles
27
+ #
28
+ # https://docs.mapbox.com/api/maps/styles/#list-styles
29
+ #
30
+ def styles(username, options = {})
31
+ get("styles/v1/#{username}", options)
32
+ end
33
+
34
+ #
35
+ # Retrieve a style ZIP bundle
36
+ #
37
+ # https://docs.mapbox.com/api/maps/styles/#retrieve-a-style-zip-bundle
38
+ #
39
+ def style_zip_bundle(username, style_id)
40
+ get("styles/v1/#{username}/#{style_id}")
41
+ end
42
+
43
+ #
44
+ # Create a style
45
+ #
46
+ # https://docs.mapbox.com/api/maps/styles/#response-create-a-style
47
+ #
48
+ def create_style(username, data)
49
+ post("styles/v1/#{username}", data)
50
+ end
51
+
52
+ #
53
+ # Update a style
54
+ #
55
+ # https://docs.mapbox.com/api/maps/styles/#update-a-style
56
+ #
57
+ def update_style(username, style_id, data)
58
+ patch("styles/v1/#{username}/#{style_id}", data)
59
+ end
60
+
61
+ # Delete a style
62
+ #
63
+ # https://docs.mapbox.com/api/maps/styles/#delete-a-style
64
+ #
65
+ def delete_style(username, style_id)
66
+ delete("styles/v1/#{username}/#{style_id}", {})
67
+ end
68
+
69
+ #
70
+ # Protect a style
71
+ #
72
+ # https://docs.mapbox.com/api/maps/styles/#protect-a-style
73
+ #
74
+ def protect_style(username, style_id, protect)
75
+ put("styles/v1/#{username}/#{style_id}/protected", protect.to_s, content_type: 'text/plain')
76
+ end
77
+
78
+ #
79
+ # Request embeddable HTML
80
+ #
81
+ # https://docs.mapbox.com/api/maps/styles/#request-embeddable-html
82
+ #
83
+ def embeddable_html(username, style_id, options = {})
84
+ path = "styles/v1/#{username}/#{style_id}"
85
+ path = "#{path}/draft" if options[:draft]
86
+ path = "#{path}.html"
87
+
88
+ # REVIEW: Verify if it works.
89
+ get(path, options)
90
+ end
91
+
92
+ #
93
+ # Retrieve a map's WMTS document
94
+ #
95
+ # https://docs.mapbox.com/api/maps/styles/#retrieve-a-maps-wmts-document
96
+ def wmts_document(username, style_id)
97
+ get("styles/v1/#{username}/#{style_id}/wmts")
98
+ end
99
+
100
+ #
101
+ # Retrieve a sprite image or JSON
102
+ #
103
+ # https://docs.mapbox.com/api/maps/styles/#retrieve-a-sprite-image-or-json
104
+ #
105
+ def sprite(username, style_id, sprite_id = nil, scale = nil, format = nil)
106
+ path = "styles/v1/#{username}/#{style_id}"
107
+ path = "#{path}/#{sprite_id}" if sprite_id
108
+ path = "#{path}/sprite"
109
+ path = "#{path}@#{scale}" if scale
110
+ path = "#{path}.#{format}" if format
111
+
112
+ get(path)
113
+ end
114
+
115
+ #
116
+ # Add new image to sprite
117
+ #
118
+ # https://docs.mapbox.com/api/maps/styles/#add-new-image-to-sprite
119
+ #
120
+ def add_image_to_sprite(username, style_id, icon_name, data)
121
+ put("styles/v1/#{username}/#{style_id}/sprite/#{icon_name}", data.read, content_type: 'image/svg+xml')
122
+ end
123
+
124
+ #
125
+ # Add multiple new images to sprite
126
+ #
127
+ # https://docs.mapbox.com/api/maps/styles/#add-multiple-new-images-to-sprite
128
+ #
129
+ def add_images_to_sprite(username, style_id, images)
130
+ images = images.map do |image|
131
+ io = image.fetch(:io)
132
+ filename = image.fetch(:filename)
133
+
134
+ Faraday::Multipart::FilePart.new(io, 'image/svg+xml', filename)
135
+ end
136
+
137
+ payload = { images: }
138
+
139
+ post("styles/v1/#{username}/#{style_id}/sprite", payload, content_type: 'multipart/form-data')
140
+ end
141
+
142
+ #
143
+ # Delete image from sprite
144
+ #
145
+ # https://docs.mapbox.com/api/maps/styles/#delete-image-from-sprite
146
+ #
147
+ def delete_image_from_sprite(username, style_id, icon_name)
148
+ delete("styles/v1/#{username}/#{style_id}/sprite/#{icon_name}", {}, content_type: nil)
149
+ end
150
+
151
+ #
152
+ # Delete multiple images from sprite
153
+ #
154
+ # https://docs.mapbox.com/api/maps/styles/#delete-multiple-images-from-sprite
155
+ #
156
+ def delete_images_from_sprite(username, style_id, data)
157
+ delete("styles/v1/#{username}/#{style_id}/sprite", data)
158
+ end
159
+ end
160
+ end
161
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'faraday'
4
+ require 'faraday/multipart'
5
+ require 'mapboxkit/configurable'
6
+ require 'mapboxkit/connection'
7
+ require 'mapboxkit/client/styles'
8
+
9
+ module Mapboxkit
10
+ # Client for the Mapbox API
11
+ #
12
+ # @see https://docs.mapbox.com/api/
13
+ class Client
14
+ include Configurable
15
+ include Connection
16
+
17
+ include Styles
18
+
19
+ def initialize(**options)
20
+ configure do |config|
21
+ options.each do |key, value|
22
+ next unless Configurable::Config::KEYS.include?(key)
23
+
24
+ config.public_send(:"#{key}=", value)
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'mapboxkit/client'
4
+
5
+ module Mapboxkit
6
+ #
7
+ # Configuration options the Mapboxkit::Client, defaulting to values
8
+ #
9
+ module Configurable
10
+ def config
11
+ @config ||= Config.new
12
+ end
13
+
14
+ def configure
15
+ yield(config)
16
+ end
17
+
18
+ #
19
+ # Config for the Mapboxkit::Client
20
+ #
21
+ class Config
22
+ KEYS = %i[url access_token user_agent].freeze
23
+
24
+ attr_accessor(*KEYS)
25
+
26
+ def initialize
27
+ @url = 'https://api.mapbox.com'
28
+ @access_token = ENV.fetch('MAPBOX_ACCESS_TOKEN', nil)
29
+ @user_agent = "Mapboxkit #{Mapboxkit::VERSION}"
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,84 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'mapboxkit/client'
4
+
5
+ module Mapboxkit
6
+ class Client
7
+ #
8
+ # Network layer for API clients.
9
+ #
10
+ module Connection
11
+ DEFAULT_REQUEST_CONTENT_TYPE = 'application/json'
12
+
13
+ def get(url, params = {})
14
+ response = connection.get(url, params, content_type: nil)
15
+
16
+ response.body
17
+ end
18
+
19
+ def post(url, params, **kwargs)
20
+ request(:post, url, params, **kwargs)
21
+ end
22
+
23
+ def put(url, params, **kwargs)
24
+ request(:put, url, params, **kwargs)
25
+ end
26
+
27
+ def patch(url, params, **kwargs)
28
+ request(:patch, url, params, **kwargs)
29
+ end
30
+
31
+ def delete(url, params, **kwargs)
32
+ request(:delete, url, params, **kwargs)
33
+ end
34
+
35
+ def request(method, url, params, content_type: DEFAULT_REQUEST_CONTENT_TYPE)
36
+ response = connection.public_send(method, url) do |req|
37
+ req.headers[Faraday::CONTENT_TYPE] = content_type
38
+
39
+ req.body = params
40
+ end
41
+
42
+ response.body
43
+ end
44
+
45
+ def connection
46
+ @connection ||= \
47
+ Faraday.new(url: config.url, headers: { 'User-Agent' => config.user_agent }) do |faraday|
48
+ faraday.use(AuthorizationMiddleware, config.access_token)
49
+
50
+ faraday.request(:json)
51
+
52
+ faraday.request(:multipart, flat_encode: true)
53
+
54
+ faraday.response(:logger) if ENV['VERBOSE'] == '1'
55
+
56
+ faraday.response(:json, content_type: %r{^application/(vnd\..+\+)?json$})
57
+
58
+ faraday.response(:raise_error)
59
+
60
+ faraday.adapter(Faraday.default_adapter)
61
+ end
62
+ end
63
+
64
+ #
65
+ # Authorization middleware for the connection
66
+ #
67
+ class AuthorizationMiddleware < Faraday::Middleware
68
+ def initialize(app, access_token)
69
+ @access_token = access_token
70
+
71
+ super(app)
72
+ end
73
+
74
+ def on_request(env)
75
+ return unless @access_token
76
+
77
+ env.url.then do |uri|
78
+ uri.query = [uri.query, "access_token=#{@access_token}"].compact.join('&')
79
+ end
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mapboxkit
4
+ VERSION = '0.0.1'
5
+ end
data/lib/mapboxkit.rb ADDED
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'mapboxkit/version'
4
+ require_relative 'mapboxkit/client'
5
+
6
+ # Ruby toolkit for the Mapbox API
7
+ module Mapboxkit
8
+ class Error < StandardError; end
9
+
10
+ class << self
11
+ private
12
+
13
+ def respond_to_missing?(method_name, include_private = false)
14
+ client.respond_to?(method_name, include_private)
15
+ end
16
+
17
+ def method_missing(method_name, *args, &)
18
+ if client.respond_to?(method_name)
19
+ client.send(method_name, *args, &)
20
+ else
21
+ super
22
+ end
23
+ end
24
+
25
+ def client
26
+ @client ||= Client.new
27
+ end
28
+ end
29
+ end
data/mapboxkit.gemspec ADDED
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'lib/mapboxkit/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'mapboxkit'
7
+ spec.version = Mapboxkit::VERSION
8
+ spec.authors = ['Mizokami Ryutaro']
9
+ spec.email = ['mizokami.ryutaro@yamap.co.jp']
10
+ spec.summary = 'Ruby toolkit for the Mapbox API'
11
+ spec.description = 'Ruby toolkit for the Mapbox API'
12
+ spec.homepage = 'https://github.com/yamap-inc/mapboxkit-rb'
13
+ spec.license = 'MIT'
14
+ spec.required_ruby_version = '>= 3.1.0'
15
+ spec.metadata['homepage_uri'] = spec.homepage
16
+ spec.metadata['source_code_uri'] = 'https://github.com/yamap-inc/mapboxkit-rb'
17
+ spec.metadata['changelog_uri'] = 'https://github.com/yamap-inc/mapboxkit-rb/CHANGELOG.md'
18
+ spec.metadata['rubygems_mfa_required'] = 'true'
19
+
20
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
21
+ `git ls-files -z`.split("\x0").reject do |f|
22
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
23
+ end
24
+ end
25
+
26
+ spec.bindir = 'exe'
27
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ['lib']
29
+
30
+ spec.add_dependency 'faraday'
31
+ spec.add_dependency 'faraday-multipart'
32
+
33
+ spec.add_development_dependency 'dotenv'
34
+ spec.add_development_dependency 'vcr'
35
+ spec.add_development_dependency 'webmock'
36
+ end
data/sig/mapboxkit.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Mapboxkit
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,135 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mapboxkit
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Mizokami Ryutaro
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-12-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: faraday
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: faraday-multipart
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: dotenv
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
+ - !ruby/object:Gem::Dependency
56
+ name: vcr
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: webmock
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: Ruby toolkit for the Mapbox API
84
+ email:
85
+ - mizokami.ryutaro@yamap.co.jp
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".env.ci"
91
+ - ".env.example"
92
+ - ".rspec"
93
+ - ".rubocop.yml"
94
+ - CHANGELOG.md
95
+ - CODE_OF_CONDUCT.md
96
+ - Gemfile
97
+ - LICENSE.txt
98
+ - README.md
99
+ - Rakefile
100
+ - lib/mapboxkit.rb
101
+ - lib/mapboxkit/client.rb
102
+ - lib/mapboxkit/client/styles.rb
103
+ - lib/mapboxkit/configurable.rb
104
+ - lib/mapboxkit/connection.rb
105
+ - lib/mapboxkit/version.rb
106
+ - mapboxkit.gemspec
107
+ - sig/mapboxkit.rbs
108
+ homepage: https://github.com/yamap-inc/mapboxkit-rb
109
+ licenses:
110
+ - MIT
111
+ metadata:
112
+ homepage_uri: https://github.com/yamap-inc/mapboxkit-rb
113
+ source_code_uri: https://github.com/yamap-inc/mapboxkit-rb
114
+ changelog_uri: https://github.com/yamap-inc/mapboxkit-rb/CHANGELOG.md
115
+ rubygems_mfa_required: 'true'
116
+ post_install_message:
117
+ rdoc_options: []
118
+ require_paths:
119
+ - lib
120
+ required_ruby_version: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: 3.1.0
125
+ required_rubygems_version: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: '0'
130
+ requirements: []
131
+ rubygems_version: 3.3.7
132
+ signing_key:
133
+ specification_version: 4
134
+ summary: Ruby toolkit for the Mapbox API
135
+ test_files: []