bower-vendor 0.0.7 → 0.0.8
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.
- data/README.md +3 -3
- data/lib/bower-vendor/version.rb +1 -1
- data/lib/generators/bower_vendor/install_generator.rb +8 -4
- metadata +3 -3
data/README.md
CHANGED
@@ -112,8 +112,8 @@ reference in our application. It might look something like this:
|
|
112
112
|
components/widgets/.ilikedonuts
|
113
113
|
|
114
114
|
However, if we instead vendor the bower package by executing
|
115
|
-
`rails g bower_vendor:install`, we end up with just the following
|
116
|
-
to our project space:
|
115
|
+
`rails g bower_vendor:install --force-clean`, we end up with just the following
|
116
|
+
files added to our project space:
|
117
117
|
|
118
118
|
vendor/assets/javascripts/widgets/widgets.js
|
119
119
|
vendor/assets/stylesheets/widgets/widgets.css
|
@@ -123,7 +123,7 @@ Much nicer.
|
|
123
123
|
Simply `require` them in your `application.js` or `application.css`:
|
124
124
|
|
125
125
|
```javascript
|
126
|
-
//= require '
|
126
|
+
//= require 'widgets/widgets'
|
127
127
|
```
|
128
128
|
|
129
129
|
### Advanced bower.json
|
data/lib/bower-vendor/version.rb
CHANGED
@@ -47,16 +47,20 @@ class BowerVendor::InstallGenerator < Rails::Generators::Base
|
|
47
47
|
err = <<-eos
|
48
48
|
The '#{package}' package has a missing 'main' attribute, and cannot be handled automatically.
|
49
49
|
Please encourage the maintainer to fix the package, and in the mean time, try overriding the
|
50
|
-
sources in your 'bower.json'
|
50
|
+
sources in your 'bower.json' with one of more of the following files.\n
|
51
51
|
eos
|
52
|
-
|
52
|
+
err = set_color(err, :red, :bold)
|
53
|
+
err << set_color(Dir.glob(File.join(source, '**', '*')).map{|p| p.gsub(/#{source + File::SEPARATOR}/, "\t")}.join("\n"), :cyan)
|
54
|
+
raise Thor::Error, err
|
53
55
|
elsif File.directory? source
|
54
56
|
err = <<-eos
|
55
57
|
The '#{package}' package has a broken 'main' attribute that specifies a directory (#{source}).
|
56
58
|
Please encourage the maintainer to fix the package, and in the mean time, try overriding the
|
57
|
-
sources in your 'bower.json'.
|
59
|
+
sources in your 'bower.json' with one of more of the following files.
|
58
60
|
eos
|
59
|
-
|
61
|
+
err = set_color(err, :red, :bold)
|
62
|
+
err << set_color(Dir.glob(File.join(source, '**', '*')).map{|p| p.gsub(/#{source + File::SEPARATOR}/, "\t")}.join("\n"), :cyan)
|
63
|
+
raise Thor::Error, err
|
60
64
|
end
|
61
65
|
file_ext = File.extname(source)
|
62
66
|
case file_ext
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bower-vendor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-06-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ruby-bower
|
@@ -85,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
85
|
version: '0'
|
86
86
|
segments:
|
87
87
|
- 0
|
88
|
-
hash:
|
88
|
+
hash: 2187090030571334688
|
89
89
|
requirements: []
|
90
90
|
rubyforge_project:
|
91
91
|
rubygems_version: 1.8.25
|