vlad-assets 0.0.1
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/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +50 -0
- data/Rakefile +1 -0
- data/lib/vlad/assets.rb +16 -0
- data/lib/vlad/assets/version.rb +5 -0
- data/vlad-assets.gemspec +20 -0
- metadata +55 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 J. Andrew Marshall <http://johnandrewmarshall.com>
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# Vlad Assets
|
2
|
+
|
3
|
+
Vlad tasks for the Rails asset pipeline. They are very simple, but I found
|
4
|
+
myself duplicating them across all my projects, so this gem was born.
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
gem 'vlad-assets', :require => false
|
11
|
+
|
12
|
+
And then execute:
|
13
|
+
|
14
|
+
$ bundle
|
15
|
+
|
16
|
+
Or install it yourself as:
|
17
|
+
|
18
|
+
$ gem install vlad-assets
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
Then add to your `config/deploy.rb`:
|
23
|
+
|
24
|
+
require 'vlad/assets'
|
25
|
+
|
26
|
+
Two tasks are provided that you can add into your existing deploy task(s):
|
27
|
+
`vlad:assets:clean` & `vlad:assets:precompile`, which are anagolous to
|
28
|
+
the `assets:clean` & `assets:precompile` tasks provided to Rails.
|
29
|
+
|
30
|
+
If you are setting `shared_paths` in your deploy configuration, you should add
|
31
|
+
`{'assets' => 'public/assets'}` if you do zero-downtime deploys. This solves
|
32
|
+
the problem of assets disappearing when the release directory change but the
|
33
|
+
app has not yet restarted. If you do not set `shared_paths` manually, Vlad
|
34
|
+
Assets will do so for you—though you may prefer to add it to be explicit.
|
35
|
+
|
36
|
+
## Contributing
|
37
|
+
|
38
|
+
Contributions are welcome. Please be sure that your pull requests are atomic
|
39
|
+
so they can be considered and accepted separately.
|
40
|
+
|
41
|
+
1. Fork it
|
42
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
43
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
44
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
45
|
+
5. Create new Pull Request
|
46
|
+
|
47
|
+
## Credits & License
|
48
|
+
|
49
|
+
Copyright © 2012 J. Andrew Marshall. All rights reserved.
|
50
|
+
License is available in the LICENSE file.
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
data/lib/vlad/assets.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
set :shared_paths, {'assets' => 'public/assets'}.merge(shared_paths)
|
2
|
+
|
3
|
+
namespace :vlad do
|
4
|
+
namespace :assets do
|
5
|
+
desc 'Remove compiled assets'
|
6
|
+
remote_task :clean do
|
7
|
+
run "cd #{current_path} && RAILS_ENV=#{rails_env} #{rake_cmd} assets:clean"
|
8
|
+
end
|
9
|
+
|
10
|
+
desc 'Compile all the configured assets'
|
11
|
+
remote_task :precompile do
|
12
|
+
run "mkdir -p #{shared_path}/assets"
|
13
|
+
run "cd #{current_path} && RAILS_ENV=#{rails_env} #{rake_cmd} assets:precompile"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/vlad-assets.gemspec
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'vlad/assets/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = 'vlad-assets'
|
8
|
+
gem.version = Vlad::Assets::VERSION
|
9
|
+
gem.authors = ['Andrew Marshall']
|
10
|
+
gem.email = ['andrew@johnandrewmarshall.com']
|
11
|
+
gem.description = %q{Vlad tasks for the Rails asset pipline}
|
12
|
+
gem.summary = %q{Vlad tasks for the Rails asset pipline}
|
13
|
+
gem.homepage = 'http://johnandrewmarshall.com/vlad-assets'
|
14
|
+
gem.license = 'MIT'
|
15
|
+
|
16
|
+
gem.files = `git ls-files`.split($/)
|
17
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
18
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
19
|
+
gem.require_paths = ['lib']
|
20
|
+
end
|
metadata
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vlad-assets
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Andrew Marshall
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-11-24 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: Vlad tasks for the Rails asset pipline
|
15
|
+
email:
|
16
|
+
- andrew@johnandrewmarshall.com
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- .gitignore
|
22
|
+
- Gemfile
|
23
|
+
- LICENSE.txt
|
24
|
+
- README.md
|
25
|
+
- Rakefile
|
26
|
+
- lib/vlad/assets.rb
|
27
|
+
- lib/vlad/assets/version.rb
|
28
|
+
- vlad-assets.gemspec
|
29
|
+
homepage: http://johnandrewmarshall.com/vlad-assets
|
30
|
+
licenses:
|
31
|
+
- MIT
|
32
|
+
post_install_message:
|
33
|
+
rdoc_options: []
|
34
|
+
require_paths:
|
35
|
+
- lib
|
36
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
37
|
+
none: false
|
38
|
+
requirements:
|
39
|
+
- - ! '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
requirements: []
|
49
|
+
rubyforge_project:
|
50
|
+
rubygems_version: 1.8.24
|
51
|
+
signing_key:
|
52
|
+
specification_version: 3
|
53
|
+
summary: Vlad tasks for the Rails asset pipline
|
54
|
+
test_files: []
|
55
|
+
has_rdoc:
|