Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Commit

Permalink
package gems to vendor/cache for faster install
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Cichra committed Nov 17, 2014
1 parent 9d94ae5 commit 1095c4b
Show file tree
Hide file tree
Showing 135 changed files with 2,785 additions and 3 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ node_modules
/.vagrant
/.listen_test
/release
/vendor
/app/assets/compiled/*
/app/vendor/jasmine/
.rspec
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ install:
- wget -T 60 -qO- http://luarocks.org/releases/luarocks-${LUAROCKS_VERSION}.tar.gz | tar xvz -C /tmp/
- cd /tmp/ngx_openresty-${OPENRESTY_VERSION}
- curl https://gist.githubusercontent.com/mikz/4dae10a0ef94de7c8139/raw/33d6d5f9baf68fc5a0748b072b4d94951e463eae/system-ssl.patch | patch -p0
- ./configure --prefix=${OPENRESTY} --with-luajit-xcflags=-DLUAJIT_ENABLE_LUA52COMPAT --with-http_gunzip_module && sudo make install
- ./configure --prefix=${OPENRESTY} --with-luajit-xcflags=-DLUAJIT_ENABLE_LUA52COMPAT --with-http_gunzip_module && make -j
- sudo make install
- sudo ln -sf ${OPENRESTY}/luajit/bin/luajit-2.1.0-alpha ${OPENRESTY}/luajit/bin/lua
- sudo ln -sf ${OPENRESTY}/luajit/bin/lua /usr/local/bin/lua
- sudo ln -sf ${OPENRESTY}/nginx/sbin/nginx /usr/local/bin/nginx
Expand All @@ -36,7 +37,7 @@ install:
- sudo luarocks install LuaExpat
- npm install -g karma-cli
- cd ${TRAVIS_BUILD_DIR}
- bundle install --without development
- bundle install --without development --local --jobs=3 --retry=3
- npm install
before_script:
- bundle exec rake release -- -y
Expand Down
Binary file added vendor/cache/activesupport-4.1.5.gem
Binary file not shown.
Binary file added vendor/cache/addressable-2.3.6.gem
Binary file not shown.
Binary file added vendor/cache/binding_of_caller-0.7.2.gem
Binary file not shown.
Binary file added vendor/cache/bootstrap-sass-2.3.2.2.gem
Binary file not shown.
Binary file added vendor/cache/bourbon-4.0.2.gem
Binary file not shown.
Binary file added vendor/cache/builder-3.2.2.gem
Binary file not shown.
Binary file added vendor/cache/byebug-3.4.0.gem
Binary file not shown.
Binary file added vendor/cache/capybara-2.4.4.gem
Binary file not shown.
Binary file added vendor/cache/capybara-angular-0.0.4.gem
Binary file not shown.
Binary file added vendor/cache/capybara-screenshot-0.3.22.gem
Binary file not shown.
Binary file added vendor/cache/capybara-webkit-1.3.1.gem
Binary file not shown.
Binary file added vendor/cache/celluloid-0.16.0.gem
Binary file not shown.
Binary file added vendor/cache/childprocess-0.5.3.gem
Binary file not shown.
Binary file added vendor/cache/chunky_png-1.3.1.gem
Binary file not shown.
Binary file added vendor/cache/coderay-1.1.0.gem
Binary file not shown.
Binary file added vendor/cache/coffee-script-2.3.0.gem
Binary file not shown.
Binary file added vendor/cache/coffee-script-source-1.8.0.gem
Binary file not shown.
Binary file added vendor/cache/colored-1.2.gem
Binary file not shown.
Binary file added vendor/cache/columnize-0.8.9.gem
Binary file not shown.
Binary file added vendor/cache/compass-1.0.1.gem
Binary file not shown.
Binary file added vendor/cache/compass-core-1.0.1.gem
Binary file not shown.
Binary file added vendor/cache/compass-flexbox-1.1.3.gem
Binary file not shown.
Binary file added vendor/cache/compass-import-once-1.0.5.gem
Binary file not shown.
Binary file added vendor/cache/cucumber-1.3.16.gem
Binary file not shown.
Binary file added vendor/cache/daemons-1.1.9.gem
Binary file not shown.
Binary file added vendor/cache/debug_inspector-0.0.2.gem
Binary file not shown.
Binary file added vendor/cache/debugger-linecache-1.2.0.gem
Binary file not shown.
Binary file added vendor/cache/diff-lcs-1.2.5.gem
Binary file not shown.
Binary file added vendor/cache/dotenv-0.11.1.gem
Binary file not shown.
Binary file added vendor/cache/dotenv-deployment-0.0.2.gem
Binary file not shown.
Binary file added vendor/cache/em-websocket-0.5.1.gem
Binary file not shown.
Binary file added vendor/cache/eventmachine-1.0.3.gem
Binary file not shown.
Binary file added vendor/cache/execjs-2.2.1.gem
Binary file not shown.
Binary file added vendor/cache/ffi-1.9.3.gem
Binary file not shown.
Binary file added vendor/cache/foreman-0.75.0.gem
Binary file not shown.
Binary file added vendor/cache/formatador-0.2.5.gem
Binary file not shown.
Binary file added vendor/cache/gherkin-2.12.2.gem
Binary file not shown.
Binary file added vendor/cache/guard-2.6.1.gem
Binary file not shown.
Binary file added vendor/cache/guard-coffeescript-1.4.0.gem
Binary file not shown.
Empty file.
5 changes: 5 additions & 0 deletions vendor/cache/guard-concat-f19853684e67/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/*.gem
/.ruby-version
/Gemfile.lock
/.idea/
/pkg/
3 changes: 3 additions & 0 deletions vendor/cache/guard-concat-f19853684e67/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'

gemspec
1 change: 1 addition & 0 deletions vendor/cache/guard-concat-f19853684e67/LICENSE
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!
1 change: 1 addition & 0 deletions vendor/cache/guard-concat-f19853684e67/Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require "bundler/gem_tasks"
52 changes: 52 additions & 0 deletions vendor/cache/guard-concat-f19853684e67/Readme.md
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 vendor/cache/guard-concat-f19853684e67/guard-concat.gemspec
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 vendor/cache/guard-concat-f19853684e67/lib/guard/concat.rb
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
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"
1 change: 1 addition & 0 deletions vendor/cache/guard-concat-f19853684e67/spec/Guardfile
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"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a2
4 changes: 4 additions & 0 deletions vendor/cache/guard-concat-f19853684e67/spec/public/js/all.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
b
c
a1
a2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c
8 changes: 8 additions & 0 deletions vendor/cache/guard-concat-f19853684e67/spec/run.rb
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 added vendor/cache/guard-livereload-2.3.0.gem
Binary file not shown.
Binary file added vendor/cache/guard-shell-0.6.1.gem
Binary file not shown.
Binary file added vendor/cache/headless-1.0.2.gem
Binary file not shown.
Binary file added vendor/cache/hiredis-0.4.5.gem
Binary file not shown.
Binary file added vendor/cache/hitimes-1.2.2.gem
Binary file not shown.
Binary file added vendor/cache/http_parser.rb-0.6.0.gem
Binary file not shown.
Binary file added vendor/cache/httpclient-2.4.0.gem
Binary file not shown.
Binary file added vendor/cache/i18n-0.6.11.gem
Binary file not shown.
Binary file added vendor/cache/interception-0.5.gem
Binary file not shown.
Empty file.
3 changes: 3 additions & 0 deletions vendor/cache/jor-ac56495e8ea0/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/*.gem
/tmp/*
Gemfile.lock
2 changes: 2 additions & 0 deletions vendor/cache/jor-ac56495e8ea0/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source :rubygems
gemspec
22 changes: 22 additions & 0 deletions vendor/cache/jor-ac56495e8ea0/LICENCE
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.

Loading

0 comments on commit 1095c4b

Please sign in to comment.