middleman-bower 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c17dfae49f7f7c8413023822683a56ef5a2a1900
4
- data.tar.gz: 1ce0eeafdb99bfdf67e2c396867efbadd74e301f
3
+ metadata.gz: 9b820974aa6bd9a2f3a1c878ebd443d95fb44b0e
4
+ data.tar.gz: 78cc60a0b722122d0af06359f6d4140a46ae0f9d
5
5
  SHA512:
6
- metadata.gz: c28a404745badc0f6045e962696baa7338e9323ed87622fdffa940b7a0de5b02dba0e198a4798ed4ab92f44cee57509a5d597371b5b7c8cadd1c30dcc23d12f2
7
- data.tar.gz: 1690965d66bdf09ea4291ae9fe020cd0542678108f69676e2afd60a42a8c15d1afef7f2492950356c29cd8adbf416cfaeae0b4a672a2afa76344e013a21645ff
6
+ metadata.gz: 8c8d0de21aa639ffb1a5af59239e370fe9343b84961a0f1e73ca360a5404260bfd2898807e51573f2058978bbd90ae7a95794f0796e2804591a9b674f7570070
7
+ data.tar.gz: b6f9baf6c3dca1c3559c9e15929db701ed5a04ccdd7e91b11a8a083df35c49c562e1caf13876f8b8a372f3d09f0210c66085dcf0d670842c16af60b7e9b559aa
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in middleman-bower.gemspec
4
- gemspec
4
+ gemspec
@@ -1,31 +1,18 @@
1
1
  require "middleman/bower/version"
2
+ require "sprockets/bower"
2
3
 
3
4
  module Middleman
4
5
  module Bower
5
- # Default location where bower stashes its assets.
6
- DEFAULT_ASSETS_PATH = './components'
7
-
8
6
  class << self
9
7
  # Register bower assets into the middleman sprockets asset manifest.
10
8
  def registered(app, options_hash={}, &block)
11
- # The .bowerrc file should be present in the application root.
12
- bowerrc_path = File.join(app.root, '.bowerrc')
13
-
14
- # Try to parse out the directory of bower assets if the user
15
- # has specified so in the ./.bowerrc file.
16
- bower_directory = if File.exists? bowerrc_path
17
- JSON.parse(File.read(bowerrc_path))['directory']
18
- end
19
-
20
- # Set the absolute asset path to the one we detected in the .bowerrc file or
21
- # the default bower assets path.
22
- bower_assets_path = File.join(app.root, bower_directory || DEFAULT_ASSETS_PATH)
23
-
9
+ # Create a bower manifest that we'll use to configure sprockets.
10
+ bower = ::Sprockets::Bower::Manifest.load(File.join(app.root, '.bowerrc'))
24
11
  # We have to wait for Sprockets to be initialized by Middleman
25
12
  # before we can add the bower assets path to the Sprockets path, so
26
13
  # lets set that up in the after_configuration callback.
27
14
  app.after_configuration do
28
- sprockets.append_path bower_assets_path
15
+ bower.configure sprockets
29
16
  end
30
17
  end
31
18
  alias :included :registered
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Bower
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
@@ -18,6 +18,8 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
+ spec.add_dependency "sprockets-bower", ">= 0.0.2"
22
+
21
23
  spec.add_development_dependency "bundler", "~> 1.3"
22
24
  spec.add_development_dependency "rake"
23
25
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-bower
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brad Gessler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-24 00:00:00.000000000 Z
11
+ date: 2013-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: sprockets-bower
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: 0.0.2
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 0.0.2
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement