mapbox-gl-rails 0.44.1 → 0.44.2

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.
@@ -1,3 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
- require 'mapbox-gl/rails'
1
+ # frozen_string_literal: true
2
+
3
+ require 'mapbox-gl/rails'
@@ -1,9 +1,9 @@
1
- # frozen_string_literal: true
2
-
3
- require 'mapbox-gl/rails/version'
4
- require 'mapbox-gl/rails/engine'
5
-
6
- module MapboxGl
7
- module Rails
8
- end
9
- end
1
+ # frozen_string_literal: true
2
+
3
+ require 'mapbox-gl/rails/version'
4
+ require 'mapbox-gl/rails/engine'
5
+
6
+ module MapboxGl
7
+ module Rails
8
+ end
9
+ end
@@ -1,8 +1,8 @@
1
- # frozen_string_literal: true
2
-
3
- module MapboxGl
4
- module Rails
5
- class Engine < ::Rails::Engine
6
- end
7
- end
8
- end
1
+ # frozen_string_literal: true
2
+
3
+ module MapboxGl
4
+ module Rails
5
+ class Engine < ::Rails::Engine
6
+ end
7
+ end
8
+ end
@@ -1,25 +1,25 @@
1
- # frozen_string_literal: true
2
-
3
- module MapboxGl
4
- module Rails
5
- ##
6
- # Mapbox GL JS & gem version.
7
- def self.gem_version
8
- Gem::Version.new VERSION::STRING
9
- end
10
-
11
- ##
12
- # ProxyFetcher gem semantic versioning.
13
- module VERSION
14
- # Major version number
15
- MAJOR = 0
16
- # Minor version number
17
- MINOR = 44
18
- # Smallest version number
19
- TINY = 1
20
-
21
- # Full version number
22
- STRING = [MAJOR, MINOR, TINY].compact.join('.')
23
- end
24
- end
25
- end
1
+ # frozen_string_literal: true
2
+
3
+ module MapboxGl
4
+ module Rails
5
+ ##
6
+ # Mapbox GL JS & gem version.
7
+ def self.gem_version
8
+ Gem::Version.new VERSION::STRING
9
+ end
10
+
11
+ ##
12
+ # ProxyFetcher gem semantic versioning.
13
+ module VERSION
14
+ # Major version number
15
+ MAJOR = 0
16
+ # Minor version number
17
+ MINOR = 44
18
+ # Smallest version number
19
+ TINY = 2
20
+
21
+ # Full version number
22
+ STRING = [MAJOR, MINOR, TINY].compact.join('.')
23
+ end
24
+ end
25
+ end
@@ -1,24 +1,24 @@
1
- # frozen_string_literal: true
2
-
3
- require 'thor'
4
-
5
- class Updater < Thor
6
- include Thor::Actions
7
-
8
- # Base assets storage URL
9
- BASE_URL = 'https://api.tiles.mapbox.com/mapbox-gl-js'.freeze
10
-
11
- desc 'update assets', 'update assets from the MapBox S3 storage'
12
- def update
13
- self.destination_root = 'app/assets'
14
-
15
- get File.join(BASE_URL, "v#{MapboxGl::Rails::VERSION::STRING}/mapbox-gl-dev.js"), 'javascripts/mapbox-gl.js'
16
- get File.join(BASE_URL, "v#{MapboxGl::Rails::VERSION::STRING}/mapbox-gl.css"), 'stylesheets/mapbox-gl.css'
17
-
18
- inside destination_root do
19
- run('sass-convert -F css -T scss stylesheets/mapbox-gl.css stylesheets/mapbox-gl.scss')
20
- end
21
-
22
- remove_file 'stylesheets/mapbox-gl.css'
23
- end
24
- end
1
+ # frozen_string_literal: true
2
+
3
+ require 'thor'
4
+
5
+ class Updater < Thor
6
+ include Thor::Actions
7
+
8
+ # Base assets storage URL
9
+ BASE_URL = 'https://api.tiles.mapbox.com/mapbox-gl-js'.freeze
10
+
11
+ desc 'update assets', 'update assets from the MapBox S3 storage'
12
+ def update
13
+ self.destination_root = 'app/assets'
14
+
15
+ get File.join(BASE_URL, "v#{MapboxGl::Rails::VERSION::STRING}/mapbox-gl-dev.js"), 'javascripts/mapbox-gl.js'
16
+ get File.join(BASE_URL, "v#{MapboxGl::Rails::VERSION::STRING}/mapbox-gl.css"), 'stylesheets/mapbox-gl.css'
17
+
18
+ inside destination_root do
19
+ run('sass-convert -F css -T scss stylesheets/mapbox-gl.css stylesheets/mapbox-gl.scss')
20
+ end
21
+
22
+ remove_file 'stylesheets/mapbox-gl.css'
23
+ end
24
+ end
@@ -1,28 +1,27 @@
1
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
2
- require File.expand_path('../lib/mapbox-gl/rails/version', __FILE__)
3
-
4
- Gem::Specification.new do |gem|
5
- gem.name = 'mapbox-gl-rails'
6
- gem.version = MapboxGl::Rails.gem_version
7
- gem.date = '2018-02-25'
8
-
9
- gem.authors = ['Nikita Bulai']
10
- gem.email = ['bulajnikita@gmail.com']
11
- gem.description = 'mapbox-gl-rails provides Mapbox GL JS sources and stylesheets as a ' \
12
- 'Rails engine for use with the asset pipeline.'
13
- gem.summary = 'an asset gemification of the Mapbox GL JS library'
14
- gem.homepage = 'https://github.com/nbulaj/mapbox-gl-rails'
15
- gem.license = 'MIT'
16
-
17
- gem.files = `git ls-files`.split("\n").reject { |f| f =~ /^gemfiles|^\..+/ }
18
- gem.test_files = `git ls-files -- test/*`.split("\n")
19
- gem.require_paths = ['lib']
20
-
21
- gem.add_dependency 'railties', '>= 3.2', '< 5.3'
22
-
23
- gem.add_development_dependency 'activesupport'
24
- gem.add_development_dependency 'sass-rails'
25
- gem.add_development_dependency 'thor'
26
-
27
- gem.required_ruby_version = '>= 1.9.3'
28
- end
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
2
+ require File.expand_path('../lib/mapbox-gl/rails/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.name = 'mapbox-gl-rails'
6
+ gem.version = MapboxGl::Rails.gem_version
7
+
8
+ gem.authors = ['Nikita Bulai']
9
+ gem.email = ['bulajnikita@gmail.com']
10
+ gem.description = 'mapbox-gl-rails provides Mapbox GL JS sources and stylesheets as a ' \
11
+ 'Rails engine for use with the asset pipeline.'
12
+ gem.summary = 'an asset gemification of the Mapbox GL JS library'
13
+ gem.homepage = 'https://github.com/nbulaj/mapbox-gl-rails'
14
+ gem.license = 'MIT'
15
+
16
+ gem.files = `git ls-files`.split("\n").reject { |f| f =~ /^gemfiles|^\..+/ }
17
+ gem.test_files = `git ls-files -- test/*`.split("\n")
18
+ gem.require_paths = ['lib']
19
+
20
+ gem.add_dependency 'railties', '>= 3.2', '< 5.3'
21
+
22
+ gem.add_development_dependency 'activesupport'
23
+ gem.add_development_dependency 'sass-rails'
24
+ gem.add_development_dependency 'thor'
25
+
26
+ gem.required_ruby_version = '>= 1.9.3'
27
+ end
@@ -1,2 +1,2 @@
1
- /log
2
- /tmp
1
+ /log
2
+ /tmp
@@ -1 +1 @@
1
- @import mapbox-gl
1
+ @import mapbox-gl
@@ -1 +1 @@
1
- @import 'mapbox-gl';
1
+ @import 'mapbox-gl';
@@ -1,3 +1,3 @@
1
- /*
2
- *= require mapbox-gl
3
- */
1
+ /*
2
+ *= require mapbox-gl
3
+ */
@@ -1,2 +1,2 @@
1
- class PagesController < ActionController::Base
2
- end
1
+ class PagesController < ActionController::Base
2
+ end
@@ -1,4 +1,4 @@
1
- # This file is used by Rack-based servers to start the application.
2
-
3
- require ::File.expand_path('../config/environment', __FILE__)
4
- run Dummy::Application
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Dummy::Application
@@ -1,19 +1,19 @@
1
- require File.expand_path('../boot', __FILE__)
2
-
3
- # require 'rails/all'
4
- require 'sprockets/railtie'
5
-
6
- Bundler.require(:default, :development)
7
-
8
- module Dummy
9
- class Application < Rails::Application
10
- config.encoding = 'utf-8'
11
- config.assets.enabled = true
12
- config.assets.version = '1.0'
13
-
14
- # replacement for environments/*.rb
15
- config.active_support.deprecation = :stderr
16
- config.eager_load = false
17
- config.active_support.test_order = :random rescue nil
18
- end
19
- end
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ # require 'rails/all'
4
+ require 'sprockets/railtie'
5
+
6
+ Bundler.require(:default, :development)
7
+
8
+ module Dummy
9
+ class Application < Rails::Application
10
+ config.encoding = 'utf-8'
11
+ config.assets.enabled = true
12
+ config.assets.version = '1.0'
13
+
14
+ # replacement for environments/*.rb
15
+ config.active_support.deprecation = :stderr
16
+ config.eager_load = false
17
+ config.active_support.test_order = :random rescue nil
18
+ end
19
+ end
@@ -1,10 +1,10 @@
1
- require 'rubygems'
2
- gemfile = File.expand_path('../../../../Gemfile', __FILE__)
3
-
4
- if File.exist?(gemfile)
5
- ENV['BUNDLE_GEMFILE'] = gemfile
6
- require 'bundler'
7
- Bundler.setup
8
- end
9
-
10
- $:.unshift File.expand_path('../../../../lib', __FILE__)
1
+ require 'rubygems'
2
+ gemfile = File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ if File.exist?(gemfile)
5
+ ENV['BUNDLE_GEMFILE'] = gemfile
6
+ require 'bundler'
7
+ Bundler.setup
8
+ end
9
+
10
+ $:.unshift File.expand_path('../../../../lib', __FILE__)
@@ -1,5 +1,5 @@
1
- # Load the rails application
2
- require File.expand_path('../application', __FILE__)
3
-
4
- # Initialize the rails application
5
- Dummy::Application.initialize!
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Dummy::Application.initialize!
@@ -1,8 +1,8 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Your secret key for verifying the integrity of signed cookies.
4
- # If you change this key, all old signed cookies will become invalid!
5
- # Make sure the secret is at least 30 characters and all random,
6
- # no regular words or you'll be exposed to dictionary attacks.
7
- Dummy::Application.config.secret_token = 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef'
8
- Dummy::Application.config.secret_key_base = 'deadbeef' if Dummy::Application.config.respond_to?(:secret_key_base)
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ Dummy::Application.config.secret_token = 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef'
8
+ Dummy::Application.config.secret_key_base = 'deadbeef' if Dummy::Application.config.respond_to?(:secret_key_base)
@@ -1,3 +1,3 @@
1
- Dummy::Application.routes.draw do
2
- root to: 'pages#index'
3
- end
1
+ Dummy::Application.routes.draw do
2
+ root to: 'pages#index'
3
+ end
@@ -1,55 +1,55 @@
1
- require 'test_helper'
2
-
3
- class MapboxRailsTest < ActionDispatch::IntegrationTest
4
- teardown { clean_sprockets_cache }
5
-
6
- test 'engine is loaded' do
7
- assert_equal ::Rails::Engine, MapboxGl::Rails::Engine.superclass
8
- end
9
-
10
- test 'javascript are served' do
11
- get '/assets/mapbox-gl.js'
12
- assert_mapbox_gl_js(response)
13
- end
14
-
15
- test 'javascript of valid version' do
16
- get '/assets/mapbox-gl.js'
17
- assert_mapbox_gl_js(response, MapboxGl::Rails::VERSION::STRING)
18
- end
19
-
20
- test 'stylesheets are served' do
21
- get '/assets/mapbox-gl.css'
22
- assert_mapbox_gl_css(response)
23
- end
24
-
25
- test 'stylesheet is available in a css sprockets require' do
26
- get '/assets/sprockets-require.css'
27
- assert_mapbox_gl_css(response)
28
- end
29
-
30
- test 'stylesheet is available in a sass import' do
31
- get '/assets/sass-import.css'
32
- assert_mapbox_gl_css(response)
33
- end
34
-
35
- test 'stylesheet is available in a scss import' do
36
- get '/assets/scss-import.css'
37
- assert_mapbox_gl_css(response)
38
- end
39
-
40
- private
41
-
42
- def clean_sprockets_cache
43
- FileUtils.rm_rf File.expand_path('../dummy/tmp', __FILE__)
44
- end
45
-
46
- def assert_mapbox_gl_css(response, pattern = /mapboxgl-map/)
47
- assert_response :success
48
- assert_match(pattern, response.body)
49
- end
50
-
51
- def assert_mapbox_gl_js(response, pattern = /window\.mapboxgl/)
52
- assert_response :success
53
- assert_match(pattern, response.body)
54
- end
55
- end
1
+ require 'test_helper'
2
+
3
+ class MapboxRailsTest < ActionDispatch::IntegrationTest
4
+ teardown { clean_sprockets_cache }
5
+
6
+ test 'engine is loaded' do
7
+ assert_equal ::Rails::Engine, MapboxGl::Rails::Engine.superclass
8
+ end
9
+
10
+ test 'javascript are served' do
11
+ get '/assets/mapbox-gl.js'
12
+ assert_mapbox_gl_js(response)
13
+ end
14
+
15
+ test 'javascript of valid version' do
16
+ get '/assets/mapbox-gl.js'
17
+ assert_mapbox_gl_js(response, MapboxGl::Rails::VERSION::STRING)
18
+ end
19
+
20
+ test 'stylesheets are served' do
21
+ get '/assets/mapbox-gl.css'
22
+ assert_mapbox_gl_css(response)
23
+ end
24
+
25
+ test 'stylesheet is available in a css sprockets require' do
26
+ get '/assets/sprockets-require.css'
27
+ assert_mapbox_gl_css(response)
28
+ end
29
+
30
+ test 'stylesheet is available in a sass import' do
31
+ get '/assets/sass-import.css'
32
+ assert_mapbox_gl_css(response)
33
+ end
34
+
35
+ test 'stylesheet is available in a scss import' do
36
+ get '/assets/scss-import.css'
37
+ assert_mapbox_gl_css(response)
38
+ end
39
+
40
+ private
41
+
42
+ def clean_sprockets_cache
43
+ FileUtils.rm_rf File.expand_path('../dummy/tmp', __FILE__)
44
+ end
45
+
46
+ def assert_mapbox_gl_css(response, pattern = /mapboxgl-map/)
47
+ assert_response :success
48
+ assert_match(pattern, response.body)
49
+ end
50
+
51
+ def assert_mapbox_gl_js(response, pattern = /window\.mapboxgl/)
52
+ assert_response :success
53
+ assert_match(pattern, response.body)
54
+ end
55
+ end