mapbox-gl-rails 0.47.0 → 0.48.0

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.
@@ -0,0 +1,50 @@
1
+ require 'test_helper'
2
+
3
+ class MapboxRailsDirectionsPluginTest < ActionDispatch::IntegrationTest
4
+ teardown { clean_sprockets_cache }
5
+
6
+ def plugin
7
+ :directions
8
+ end
9
+
10
+ test "javascript are served" do
11
+ get "/assets/mapbox-gl-#{plugin}.js"
12
+ assert_mapbox_gl_plugin(response)
13
+ end
14
+
15
+ test "stylesheets are served" do
16
+ get "/assets/mapbox-gl-#{plugin}.css"
17
+ assert_mapbox_gl_css_plugin(response)
18
+ end
19
+
20
+ test "stylesheet is available in a css sprockets require" do
21
+ get "/assets/sprockets-require.css"
22
+ assert_mapbox_gl_css_plugin(response)
23
+ end
24
+
25
+ test "stylesheet is available in a sass import" do
26
+ get "/assets/sass-import.css"
27
+ assert_mapbox_gl_css_plugin(response)
28
+ end
29
+
30
+ test "stylesheet is available in a scss import" do
31
+ get "/assets/scss-import.css"
32
+ assert_mapbox_gl_css_plugin(response)
33
+ end
34
+
35
+ private
36
+
37
+ def clean_sprockets_cache
38
+ FileUtils.rm_rf File.expand_path("../dummy/tmp", __FILE__)
39
+ end
40
+
41
+ def assert_mapbox_gl_css_plugin(response, pattern = /mapbox-directions-origin/)
42
+ assert_response :success
43
+ assert_match(pattern, response.body)
44
+ end
45
+
46
+ def assert_mapbox_gl_plugin(response, pattern = /fetchDirections/)
47
+ assert_response :success
48
+ assert_match(pattern, response.body)
49
+ end
50
+ end
@@ -0,0 +1,50 @@
1
+ require 'test_helper'
2
+
3
+ class MapboxRailsDrawPluginTest < ActionDispatch::IntegrationTest
4
+ teardown { clean_sprockets_cache }
5
+
6
+ def plugin
7
+ :draw
8
+ end
9
+
10
+ test "javascript are served" do
11
+ get "/assets/mapbox-gl-#{plugin}.js"
12
+ assert_mapbox_gl_plugin(response)
13
+ end
14
+
15
+ test "stylesheets are served" do
16
+ get "/assets/mapbox-gl-#{plugin}.css"
17
+ assert_mapbox_gl_css_plugin(response)
18
+ end
19
+
20
+ test "stylesheet is available in a css sprockets require" do
21
+ get "/assets/sprockets-require.css"
22
+ assert_mapbox_gl_css_plugin(response)
23
+ end
24
+
25
+ test "stylesheet is available in a sass import" do
26
+ get "/assets/sass-import.css"
27
+ assert_mapbox_gl_css_plugin(response)
28
+ end
29
+
30
+ test "stylesheet is available in a scss import" do
31
+ get "/assets/scss-import.css"
32
+ assert_mapbox_gl_css_plugin(response)
33
+ end
34
+
35
+ private
36
+
37
+ def clean_sprockets_cache
38
+ FileUtils.rm_rf File.expand_path("../dummy/tmp", __FILE__)
39
+ end
40
+
41
+ def assert_mapbox_gl_css_plugin(response, pattern = /ctrl-draw-btn/)
42
+ assert_response :success
43
+ assert_match(pattern, response.body)
44
+ end
45
+
46
+ def assert_mapbox_gl_plugin(response, pattern = /ctrl-draw-btn/)
47
+ assert_response :success
48
+ assert_match(pattern, response.body)
49
+ end
50
+ end
@@ -0,0 +1,50 @@
1
+ require 'test_helper'
2
+
3
+ class MapboxRailsGeocoderPluginTest < ActionDispatch::IntegrationTest
4
+ teardown { clean_sprockets_cache }
5
+
6
+ def plugin
7
+ :geocoder
8
+ end
9
+
10
+ test "javascript are served" do
11
+ get "/assets/mapbox-gl-#{plugin}.js"
12
+ assert_mapbox_gl_plugin(response)
13
+ end
14
+
15
+ test "stylesheets are served" do
16
+ get "/assets/mapbox-gl-#{plugin}.css"
17
+ assert_mapbox_gl_css_plugin(response)
18
+ end
19
+
20
+ test "stylesheet is available in a css sprockets require" do
21
+ get "/assets/sprockets-require.css"
22
+ assert_mapbox_gl_css_plugin(response)
23
+ end
24
+
25
+ test "stylesheet is available in a sass import" do
26
+ get "/assets/sass-import.css"
27
+ assert_mapbox_gl_css_plugin(response)
28
+ end
29
+
30
+ test "stylesheet is available in a scss import" do
31
+ get "/assets/scss-import.css"
32
+ assert_mapbox_gl_css_plugin(response)
33
+ end
34
+
35
+ private
36
+
37
+ def clean_sprockets_cache
38
+ FileUtils.rm_rf File.expand_path("../dummy/tmp", __FILE__)
39
+ end
40
+
41
+ def assert_mapbox_gl_css_plugin(response, pattern = /mapboxgl-ctrl-geocoder/)
42
+ assert_response :success
43
+ assert_match(pattern, response.body)
44
+ end
45
+
46
+ def assert_mapbox_gl_plugin(response, pattern = /ctrl-geocoder/)
47
+ assert_response :success
48
+ assert_match(pattern, response.body)
49
+ end
50
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mapbox-gl-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.47.0
4
+ version: 0.48.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikita Bulai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-24 00:00:00.000000000 Z
11
+ date: 2018-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3.2'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '5.3'
22
+ version: '6.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '3.2'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '5.3'
32
+ version: '6.0'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: activesupport
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -84,7 +84,15 @@ files:
84
84
  - LICENSE
85
85
  - README.md
86
86
  - Rakefile
87
+ - app/assets/javascripts/mapbox-gl-compare.js
88
+ - app/assets/javascripts/mapbox-gl-directions.js
89
+ - app/assets/javascripts/mapbox-gl-draw.js
90
+ - app/assets/javascripts/mapbox-gl-geocoder.js
87
91
  - app/assets/javascripts/mapbox-gl.js
92
+ - app/assets/stylesheets/mapbox-gl-compare.scss
93
+ - app/assets/stylesheets/mapbox-gl-directions.scss
94
+ - app/assets/stylesheets/mapbox-gl-draw.scss
95
+ - app/assets/stylesheets/mapbox-gl-geocoder.scss
88
96
  - app/assets/stylesheets/mapbox-gl.scss
89
97
  - lib/mapbox-gl-rails.rb
90
98
  - lib/mapbox-gl/rails.rb
@@ -92,6 +100,7 @@ files:
92
100
  - lib/mapbox-gl/rails/version.rb
93
101
  - lib/mapbox-gl/updater.rb
94
102
  - mapbox-gl-rails.gemspec
103
+ - plugins.yaml
95
104
  - test/dummy/.gitignore
96
105
  - test/dummy/app/assets/stylesheets/sass-import.css.sass
97
106
  - test/dummy/app/assets/stylesheets/scss-import.css.scss
@@ -104,6 +113,10 @@ files:
104
113
  - test/dummy/config/environment.rb
105
114
  - test/dummy/config/initializers/secret_token.rb
106
115
  - test/dummy/config/routes.rb
116
+ - test/mapbox-gl-compare-plugin_test.rb
117
+ - test/mapbox-gl-directions-plugin_test.rb
118
+ - test/mapbox-gl-draw-plugin_test.rb
119
+ - test/mapbox-gl-geocoder-plugin_test.rb
107
120
  - test/mapbox-gl-rails_test.rb
108
121
  - test/test_helper.rb
109
122
  homepage: https://github.com/nbulaj/mapbox-gl-rails
@@ -143,5 +156,9 @@ test_files:
143
156
  - test/dummy/config/environment.rb
144
157
  - test/dummy/config/initializers/secret_token.rb
145
158
  - test/dummy/config/routes.rb
159
+ - test/mapbox-gl-compare-plugin_test.rb
160
+ - test/mapbox-gl-directions-plugin_test.rb
161
+ - test/mapbox-gl-draw-plugin_test.rb
162
+ - test/mapbox-gl-geocoder-plugin_test.rb
146
163
  - test/mapbox-gl-rails_test.rb
147
164
  - test/test_helper.rb