This repository has been archived by the owner on Dec 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
package gems to vendor/cache for faster install
- Loading branch information
Michal Cichra
committed
Nov 17, 2014
1 parent
9d94ae5
commit 1095c4b
Showing
135 changed files
with
2,785 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,6 @@ node_modules | |
/.vagrant | ||
/.listen_test | ||
/release | ||
/vendor | ||
/app/assets/compiled/* | ||
/app/vendor/jasmine/ | ||
.rspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/*.gem | ||
/.ruby-version | ||
/Gemfile.lock | ||
/.idea/ | ||
/pkg/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source 'https://rubygems.org' | ||
|
||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
You can do wathever you want License and we suggest to open source your code! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require "bundler/gem_tasks" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Guard::Concat | ||
|
||
This little guard allows you to concatenate js/css (or other) files in one. | ||
|
||
|
||
## Install | ||
|
||
Make sure you have [guard](http://github.com/guard/guard) installed. | ||
|
||
Install the gem with: | ||
|
||
gem install guard-concat | ||
|
||
Or add it to your Gemfile: | ||
|
||
gem 'guard-concat' | ||
|
||
And then add a basic setup to your Guardfile: | ||
|
||
guard init concat | ||
|
||
|
||
## Usage | ||
|
||
|
||
``` ruby | ||
# This will concatenate the javascript files a.js and b.js in public/js to all.js | ||
guard :concat, type: "js", files: %w(b a), input_dir: "public/js", output: "public/js/all" | ||
|
||
# analog css example | ||
guard :concat, type: "css", files: %w(c d), input_dir: "public/css", output: "public/css/all" | ||
|
||
# js example with * | ||
|
||
guard :concat, type: "js", files: %w(vendor/* b a), input_dir: "public/js", output: "public/js/all" | ||
# will concatenate all files in the vendor dir, then b then a (watch out of dependencies) | ||
``` | ||
|
||
Advanced usage: | ||
|
||
``` ruby | ||
# this is a recommended file structure when using * | ||
# plugins usually need libraries so put libraries like jquery in the libs directory, then your jquery (or another library) plugin(s) in the plugins dir and at the end your main file(s) | ||
guard :concat, type: "js", files: %w(libs/* plugins/* main), input_dir: "public/js", output: "public/js/all" | ||
``` | ||
|
||
it's not possible to use * or ./* alone, you have to use * after a directory name, like this: `dir/*` | ||
|
||
## Versions changelog | ||
|
||
- 0.0.4 - add star (*) support to load multiple files | ||
- 0.0.3 - basic version |
30 changes: 30 additions & 0 deletions
30
vendor/cache/guard-concat-f19853684e67/guard-concat.gemspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# -*- encoding: utf-8 -*- | ||
# stub: guard-concat 0.0.5 ruby lib | ||
|
||
Gem::Specification.new do |s| | ||
s.name = "guard-concat" | ||
s.version = "0.0.5" | ||
|
||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= | ||
s.require_paths = ["lib"] | ||
s.authors = ["Francesco 'makevoid' Canessa"] | ||
s.date = "2014-11-17" | ||
s.description = " Guard::Concat automatically concatenates files in one when watched files are modified.\n" | ||
s.email = "makevoid@gmail.com" | ||
s.files = ["LICENSE", "Readme.md", "lib/guard", "lib/guard/concat", "lib/guard/concat.rb", "lib/guard/concat/templates", "lib/guard/concat/templates/Guardfile"] | ||
s.homepage = "http://github.com/makevoid/guard-concat" | ||
s.rubygems_version = "2.2.2" | ||
s.summary = "Guard gem for concatenating (js/css) files" | ||
|
||
if s.respond_to? :specification_version then | ||
s.specification_version = 4 | ||
|
||
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then | ||
s.add_runtime_dependency(%q<guard>, [">= 1.1.0"]) | ||
else | ||
s.add_dependency(%q<guard>, [">= 1.1.0"]) | ||
end | ||
else | ||
s.add_dependency(%q<guard>, [">= 1.1.0"]) | ||
end | ||
end |
89 changes: 89 additions & 0 deletions
89
vendor/cache/guard-concat-f19853684e67/lib/guard/concat.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
require 'guard' | ||
require 'guard/guard' | ||
require 'guard/watcher' | ||
|
||
module Guard | ||
class Concat < Guard | ||
def initialize(watchers=[], opts={}) | ||
@opts = opts | ||
watchers << ::Guard::Watcher.new(matcher_regex) | ||
super(watchers, opts) | ||
end | ||
|
||
def start | ||
run_all if all_on_start? | ||
end | ||
|
||
def run_all | ||
concat | ||
end | ||
|
||
def run_on_changes(paths) | ||
concat | ||
end | ||
|
||
# The actual concat method | ||
# | ||
# scans the :files passed as options | ||
# supports * and expands them requiring all files in that path/folder | ||
|
||
def concat | ||
file_names = files.map do |file| | ||
single?(file) ? full_path(file) : expand(file) | ||
end | ||
|
||
content = file_names.flatten.reduce("") do |content, file| | ||
content << File.read(file) | ||
content << "\n" | ||
end | ||
|
||
File.open(output_file, "w"){ |f| f.write content.strip } | ||
|
||
UI.info "Concatenated #{file_names.join(', ')} to #{output_file}" | ||
end | ||
|
||
def full_path(file) | ||
path = "#{input_dir}/#{file}" | ||
path << ".#{type}" unless path =~ /\.#{type}$/ | ||
path | ||
end | ||
|
||
def matcher_regex | ||
all_files = files.map{|f| f.sub(/\*$/, '.+') }.join("|") | ||
%r|^#{input_dir}/(#{all_files})\.#{type}$| | ||
end | ||
|
||
def files | ||
@opts.fetch(:files) | ||
end | ||
|
||
def input_dir | ||
@opts.fetch(:input_dir) | ||
end | ||
|
||
def type | ||
@opts.fetch(:type) | ||
end | ||
|
||
def output_file | ||
@output_file ||= "#{@opts.fetch(:output)}.#{type}" | ||
end | ||
|
||
def all_on_start? | ||
!!@opts[:all_on_start] | ||
end | ||
|
||
private | ||
|
||
# handle the star option (*) | ||
|
||
def single?(file) | ||
file !~ /\*/ | ||
end | ||
|
||
def expand(file) | ||
Dir.glob full_path(file) | ||
end | ||
|
||
end | ||
end |
4 changes: 4 additions & 0 deletions
4
vendor/cache/guard-concat-f19853684e67/lib/guard/concat/templates/Guardfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# This will concatenate the javascript files specified in :files to public/js/all.js | ||
guard :concat, type: "js", files: %w(), input_dir: "public/js", output: "public/js/all" | ||
|
||
guard :concat, type: "css", files: %w(), input_dir: "public/css", output: "public/css/all" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
guard :concat, type: "js", files: %w(vendor/* a1 a2), input_dir: "public/js", output: "public/js/all" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
a1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
a2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
b | ||
c | ||
a1 | ||
a2 |
1 change: 1 addition & 0 deletions
1
vendor/cache/guard-concat-f19853684e67/spec/public/js/vendor/b.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
b |
1 change: 1 addition & 0 deletions
1
vendor/cache/guard-concat-f19853684e67/spec/public/js/vendor/c.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# To launch the spec: | ||
|
||
# ruby run.rb; guard | ||
|
||
# then edit a file :) | ||
|
||
puts `cd ..; gem build guard-concat.gemspec` | ||
puts `cd ..; gem install guard-concat-0.0.4.gem` |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/*.gem | ||
/tmp/* | ||
Gemfile.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
source :rubygems | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
The MIT License | ||
|
||
Copyright (c) 2013 3scale networks S.L. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
|
Oops, something went wrong.