mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-22 17:47:11 +03:00
fixed resolution of jquery/tether versions for docs by relying on .bower.json instead of bower.json. Added assertions so we don't get another cryptic message on resolutions of these variables.
This commit is contained in:
parent
8ee26b7158
commit
e8b5cd3700
12
Gemfile.lock
12
Gemfile.lock
|
@ -12,11 +12,11 @@ GEM
|
|||
mercenary (~> 0.3.3)
|
||||
rouge (~> 1.7)
|
||||
safe_yaml (~> 1.0)
|
||||
jekyll-redirect-from (0.9.0)
|
||||
jekyll-redirect-from (0.9.1)
|
||||
jekyll (>= 2.0)
|
||||
jekyll-sass-converter (1.3.0)
|
||||
sass (~> 3.2)
|
||||
jekyll-seo-tag (0.1.3)
|
||||
jekyll-sass-converter (1.4.0)
|
||||
sass (~> 3.4)
|
||||
jekyll-seo-tag (0.1.4)
|
||||
jekyll (>= 2.0)
|
||||
jekyll-sitemap (0.9.0)
|
||||
jekyll-watch (1.3.0)
|
||||
|
@ -28,12 +28,12 @@ GEM
|
|||
rb-inotify (>= 0.9)
|
||||
mercenary (0.3.5)
|
||||
rainbow (2.0.0)
|
||||
rb-fsevent (0.9.6)
|
||||
rb-fsevent (0.9.7)
|
||||
rb-inotify (0.9.5)
|
||||
ffi (>= 0.5.0)
|
||||
rouge (1.10.1)
|
||||
safe_yaml (1.0.4)
|
||||
sass (3.4.19)
|
||||
sass (3.4.21)
|
||||
scss_lint (0.43.2)
|
||||
rainbow (~> 2.0)
|
||||
sass (~> 3.4.15)
|
||||
|
|
|
@ -20,8 +20,8 @@ module Variables
|
|||
metadata_files = {
|
||||
'bower' => '../bower.json',
|
||||
'package' => '../package.json',
|
||||
'bower_jquery' => '../bower_components/jquery/bower.json',
|
||||
'bower_tether' => '../bower_components/tether/bower.json'
|
||||
'bower_jquery' => '../bower_components/jquery/.bower.json',
|
||||
'bower_tether' => '../bower_components/tether/.bower.json'
|
||||
}
|
||||
|
||||
metadata_files.each do |metadata, path|
|
||||
|
@ -29,12 +29,21 @@ module Variables
|
|||
site.data[metadata] = contents
|
||||
end
|
||||
|
||||
# some quick access to common variables (instead of diving into package and bower)
|
||||
# validate and provide some quick access to common variables (instead of diving into package and bower)
|
||||
name = site.data['package']['name']
|
||||
assert_not_nil :name, name
|
||||
|
||||
version = site.data['package']['version']
|
||||
assert_not_nil :version, version
|
||||
|
||||
bootstrap_version = site.data['bower']['dependencies']['bootstrap']
|
||||
assert_not_nil :bootstrap_version, bootstrap_version
|
||||
|
||||
tether_version = site.data['bower_tether']['version']
|
||||
assert_not_nil :tether_version, tether_version
|
||||
|
||||
jquery_version = site.data['bower_jquery']['version']
|
||||
assert_not_nil :jquery_version, jquery_version
|
||||
|
||||
site.data['name'] = name
|
||||
site.data['version'] = version
|
||||
|
@ -68,5 +77,9 @@ module Variables
|
|||
# puts repo
|
||||
# puts version
|
||||
end
|
||||
|
||||
def assert_not_nil(name, value)
|
||||
raise "Expected #{name} to be not nil." if value.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env ruby
|
||||
#
|
||||
|
||||
# for debugging plugins only, otherwise entirely unused.
|
||||
|
||||
require 'rubygems'
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user