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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 84fc241b4ebeecdb5a9c34fcfbd69bbed2d77d10
4
- data.tar.gz: e8e7f5e1c99aebc58a621a909b08e44d83549326
3
+ metadata.gz: d18d9ca48d1438cf86e7d8effff84410300bb0f8
4
+ data.tar.gz: 77bdfb89794820ff714e879006daa84ec7cb8002
5
5
  SHA512:
6
- metadata.gz: 4749301128115d7ef40779640b4b1e7235a97e6bae3627085f3190a0c1f222d9bb002238dd28515d167d620ddb74cf046e963c50e2bcae1ad8f6b3b9e464b3df
7
- data.tar.gz: 42dbd5f4c81d57302031bdb1202473ba83b4118d958b77e8000658c5f4f34b9c3c92cdb945fe28ef13d53147c220321624dc34def3011397d9499d78e8f2ed07
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.0"
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.2"
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.2"
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
@@ -12,6 +12,6 @@ module BowerRails
12
12
  end
13
13
  end
14
14
 
15
- # Set default values for options
15
+ # Set default values for options
16
16
  @resolve_before_precompile = false
17
17
  end
@@ -1,14 +1,22 @@
1
1
  module BowerRails
2
2
  module Generators
3
3
  class InitializeGenerator < Rails::Generators::Base
4
- desc "Adds a boilerplate component.json file to root of rails project"
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 self.source_root
7
- @_bower_rails_source_root ||= File.expand_path("../templates", __FILE__)
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 create_initializer_file
11
- template "bower.json", 'bower.json'
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
@@ -0,0 +1,4 @@
1
+ # A sample Bowerfile
2
+ # Check out https://github.com/42dev/bower-rails#ruby-dsl-configuration for more options
3
+
4
+ # asset 'bootstrap'
@@ -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
+ }
@@ -0,0 +1,6 @@
1
+ BowerRails.configure do |bower_rails|
2
+ # Uncomment this line if you want `rake bower:resolve` task to be run
3
+ # automatically before the `rake assets:precompile` task.
4
+
5
+ # bower_rails.resolve_before_precompile = true
6
+ end
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.0
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.10
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: