bower-rails 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -6
- data/lib/bower-rails.rb +1 -1
- data/lib/generators/bower_rails/initialize/initialize_generator.rb +13 -5
- data/lib/generators/bower_rails/initialize/templates/Bowerfile +4 -0
- data/lib/generators/bower_rails/initialize/templates/bower.json +4 -1
- data/lib/generators/bower_rails/initialize/templates/bower_rails.rb +6 -0
- metadata +18 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d18d9ca48d1438cf86e7d8effff84410300bb0f8
|
4
|
+
data.tar.gz: 77bdfb89794820ff714e879006daa84ec7cb8002
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7664df0469ff3e0d3e5b97327f0a6e99b3c7c790dbbe244262b625394c4e8ebc52660db962dde90888e227ef2edea3b52e3c70b42e71efdd2e13430aa6fb356c
|
7
|
+
data.tar.gz: 7a87fe21e8d47e61d5a08fd5ebb53e73155ffbc2095d32494281678907939b16b75ab9ea4db69db645efa4cdbf7e040c6a8cb08a5ab52ea3bc2028298cb8acc6
|
data/README.md
CHANGED
@@ -22,7 +22,7 @@ Check out [changelog][] for the latest changes and releases.
|
|
22
22
|
in Gemfile
|
23
23
|
|
24
24
|
``` Ruby
|
25
|
-
gem "bower-rails", "~> 0.7.
|
25
|
+
gem "bower-rails", "~> 0.7.1"
|
26
26
|
```
|
27
27
|
|
28
28
|
##JSON configuration
|
@@ -32,10 +32,10 @@ Bower-rails now supports the standard [bower package](https://github.com/bower/b
|
|
32
32
|
To install dependencies into both `lib` and `vendor` directories, run the initializer to generate a custom bower.json:
|
33
33
|
|
34
34
|
``` Bash
|
35
|
-
rails g bower_rails:initialize
|
35
|
+
rails g bower_rails:initialize json
|
36
36
|
```
|
37
37
|
|
38
|
-
This will generate a special bower.json that combines two standard bower packages into one. Simply specify your dependencies under each folder name to install them into the corresponding directories.
|
38
|
+
This will generate a `config/initializers/bower_rails.rb` config file and a special bower.json that combines two standard bower packages into one. Simply specify your dependencies under each folder name to install them into the corresponding directories.
|
39
39
|
|
40
40
|
**example bower.json file**
|
41
41
|
|
@@ -59,7 +59,13 @@ This will generate a special bower.json that combines two standard bower package
|
|
59
59
|
|
60
60
|
##Ruby DSL configuration
|
61
61
|
|
62
|
-
The Ruby DSL configuration is a Bowerfile at the project's root with DSL syntax similar to Bundler.
|
62
|
+
The Ruby DSL configuration is a Bowerfile at the project's root with DSL syntax similar to Bundler.
|
63
|
+
|
64
|
+
Run the initializer to generate a sample Bowerfile inside the Rails root and a `config/initializers/bower_rails.rb` config file:
|
65
|
+
|
66
|
+
``` Bash
|
67
|
+
rails g bower_rails:initialize
|
68
|
+
```
|
63
69
|
|
64
70
|
**Example Bowerfile**
|
65
71
|
|
@@ -90,13 +96,13 @@ assets_path "assets/javascript"
|
|
90
96
|
# Puts files under ./vendor/assets/js/bower_components
|
91
97
|
group :vendor, :assets_path => "assets/js" do
|
92
98
|
asset "jquery" # Assummes it's latests
|
93
|
-
asset "backbone", "1.
|
99
|
+
asset "backbone", "1.1.1"
|
94
100
|
end
|
95
101
|
|
96
102
|
# Puts files under ./lib/assets/javascript/bower_components
|
97
103
|
group :lib do
|
98
104
|
asset "jquery"
|
99
|
-
asset "backbone", "1.
|
105
|
+
asset "backbone", "1.1.1"
|
100
106
|
end
|
101
107
|
```
|
102
108
|
NOTE: Available groups are `:lib` and `:vendor`. Others are not allowed according to the Rails convention.
|
data/lib/bower-rails.rb
CHANGED
@@ -1,14 +1,22 @@
|
|
1
1
|
module BowerRails
|
2
2
|
module Generators
|
3
3
|
class InitializeGenerator < Rails::Generators::Base
|
4
|
-
desc
|
4
|
+
desc 'Adds a boilerplate bower.json or Bowerfile to the root of Rails project and an empty initializer'
|
5
|
+
source_root File.expand_path('../templates', __FILE__)
|
6
|
+
argument :config_file, :type => :string, :default => 'bowerfile'
|
5
7
|
|
6
|
-
def
|
7
|
-
|
8
|
+
def create_config_file
|
9
|
+
config_file_name = config_file.underscore
|
10
|
+
case config_file_name
|
11
|
+
when 'bowerfile' then copy_file 'Bowerfile', 'Bowerfile'
|
12
|
+
when 'json' then copy_file 'bower.json', 'bower.json'
|
13
|
+
else
|
14
|
+
raise ArgumentError, 'You can setup bower-rails only using bower.json or Bowerfile. Please provide `json` or `bowerfile` as an argument instead'
|
15
|
+
end
|
8
16
|
end
|
9
17
|
|
10
|
-
def
|
11
|
-
|
18
|
+
def copy_initializer_file
|
19
|
+
copy_file 'bower_rails.rb', 'config/initializers/bower_rails.rb'
|
12
20
|
end
|
13
21
|
end
|
14
22
|
end
|
@@ -2,11 +2,14 @@
|
|
2
2
|
"lib": {
|
3
3
|
"name": "bower-rails generated lib assets",
|
4
4
|
"dependencies": {
|
5
|
+
// "threex" : "git@github.com:rharriso/threex.git",
|
6
|
+
// "gsvpano.js" : "https://github.com/rharriso/GSVPano.js/blob/master/src/GSVPano.js"
|
5
7
|
}
|
6
8
|
},
|
7
9
|
"vendor": {
|
8
10
|
"name": "bower-rails generated vendor assets",
|
9
11
|
"dependencies": {
|
12
|
+
// "three.js" : "https://raw.github.com/mrdoob/three.js/master/build/three.js"
|
10
13
|
}
|
11
14
|
}
|
12
|
-
}
|
15
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bower-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ross Harrison
|
@@ -14,42 +14,42 @@ dependencies:
|
|
14
14
|
name: rspec
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: coveralls
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
description: Rails integration for bower.
|
@@ -58,14 +58,16 @@ executables: []
|
|
58
58
|
extensions: []
|
59
59
|
extra_rdoc_files: []
|
60
60
|
files:
|
61
|
-
- lib/tasks/bower.rake
|
62
|
-
- lib/bower-rails/railtie.rb
|
63
|
-
- lib/bower-rails/dsl.rb
|
64
|
-
- lib/bower-rails.rb
|
65
|
-
- lib/generators/bower_rails/initialize/templates/bower.json
|
66
|
-
- lib/generators/bower_rails/initialize/initialize_generator.rb
|
67
61
|
- MIT-LICENSE
|
68
62
|
- README.md
|
63
|
+
- lib/bower-rails.rb
|
64
|
+
- lib/bower-rails/dsl.rb
|
65
|
+
- lib/bower-rails/railtie.rb
|
66
|
+
- lib/generators/bower_rails/initialize/initialize_generator.rb
|
67
|
+
- lib/generators/bower_rails/initialize/templates/Bowerfile
|
68
|
+
- lib/generators/bower_rails/initialize/templates/bower.json
|
69
|
+
- lib/generators/bower_rails/initialize/templates/bower_rails.rb
|
70
|
+
- lib/tasks/bower.rake
|
69
71
|
homepage: https://github.com/rharriso/bower-rails
|
70
72
|
licenses:
|
71
73
|
- MIT
|
@@ -76,19 +78,18 @@ require_paths:
|
|
76
78
|
- lib
|
77
79
|
required_ruby_version: !ruby/object:Gem::Requirement
|
78
80
|
requirements:
|
79
|
-
- -
|
81
|
+
- - ">="
|
80
82
|
- !ruby/object:Gem::Version
|
81
83
|
version: '0'
|
82
84
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
85
|
requirements:
|
84
|
-
- -
|
86
|
+
- - ">="
|
85
87
|
- !ruby/object:Gem::Version
|
86
88
|
version: '0'
|
87
89
|
requirements: []
|
88
90
|
rubyforge_project:
|
89
|
-
rubygems_version: 2.1
|
91
|
+
rubygems_version: 2.2.1
|
90
92
|
signing_key:
|
91
93
|
specification_version: 4
|
92
94
|
summary: Bower for Rails
|
93
95
|
test_files: []
|
94
|
-
has_rdoc:
|