skip 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in skip.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Guillaume Malette
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.
@@ -0,0 +1,29 @@
1
+ # Skip
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'skip'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install skip
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler'
4
+ require 'readline'
5
+ require 'shellwords'
6
+
7
+ begin
8
+ Bundler.require(:default, (ENV['RAILS_ENV'] || 'development'))
9
+ rescue Bundler::GemfileNotFound => e
10
+ puts "Gemfile Not Found, executing IRB instead"
11
+ exec("irb")
12
+ end
13
+
14
+
15
+ child = nil
16
+
17
+ Signal.trap("INT") do
18
+ unless child
19
+ puts "Skip is terminating..."
20
+ exit(0)
21
+ end
22
+ end
23
+
24
+
25
+ while args = Readline.readline("skip> ", true) do
26
+ ARGV.clear
27
+ ARGV.push(*Shellwords.split(args))
28
+
29
+ exec = ARGV.shift
30
+
31
+ time = Time.now
32
+ child = fork do
33
+ case exec
34
+ when 'rails'
35
+ load './script/rails'
36
+ when 'rake'
37
+ require 'rake'
38
+ Rake.application.run
39
+ when 'ruby'
40
+ Skip.setup_ruby
41
+ file = ARGV.shift
42
+ load file
43
+ end
44
+ end
45
+ puts "Waiting for child #{child}"
46
+ Process.waitpid(child)
47
+ puts "Done in #{(Time.now - time).to_f}"
48
+ child = nil
49
+ end
50
+
51
+ puts "Terminated"
52
+
@@ -0,0 +1,31 @@
1
+ require "skip/version"
2
+
3
+ module Skip
4
+ def self.setup_ruby
5
+ exit_after = false
6
+ while ARGV.first && ARGV.first[0] == "-"
7
+ arg = ARGV.shift
8
+
9
+ case
10
+ when arg == '--version'
11
+ puts RUBY_DESCRIPTION
12
+ exit
13
+ when arg == '--copyright'
14
+ puts RUBY_COPYRIGHT
15
+ exit
16
+ when arg.start_with?("-I")
17
+ path = arg[2..-1]
18
+ $LOAD_PATH.unshift(path) unless $LOAD_PATH.include?(path)
19
+ when arg == '-e'
20
+ cmd = ARGV.shift
21
+ exit_after = true
22
+ eval(cmd)
23
+ else
24
+ puts "Argument not supported #{arg}"
25
+ exit
26
+ end
27
+ end
28
+
29
+ exit if exit_after
30
+ end
31
+ end
@@ -0,0 +1,3 @@
1
+ module Skip
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'skip/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "skip"
8
+ spec.version = Skip::VERSION
9
+ spec.authors = ["Guillaume Malette"]
10
+ spec.email = ["guillaume.malette@jadedpixel.com"]
11
+ spec.description = %q{Skip makes loading the environment faster for Rails or Rake}
12
+ spec.summary = %q{Skip requires all gems and uses forks to speed up the load time of Rails and Rake}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency "bundler"
22
+
23
+ spec.add_development_dependency "bundler", "~> 1.3"
24
+ spec.add_development_dependency "rake"
25
+ end
metadata ADDED
@@ -0,0 +1,105 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: skip
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.0.1
6
+ platform: ruby
7
+ authors:
8
+ - Guillaume Malette
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-05-02 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ version_requirements: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ! '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ none: false
21
+ name: bundler
22
+ type: :runtime
23
+ prerelease: false
24
+ requirement: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ! '>='
27
+ - !ruby/object:Gem::Version
28
+ version: '0'
29
+ none: false
30
+ - !ruby/object:Gem::Dependency
31
+ version_requirements: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ~>
34
+ - !ruby/object:Gem::Version
35
+ version: '1.3'
36
+ none: false
37
+ name: bundler
38
+ type: :development
39
+ prerelease: false
40
+ requirement: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ version: '1.3'
45
+ none: false
46
+ - !ruby/object:Gem::Dependency
47
+ version_requirements: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ! '>='
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ none: false
53
+ name: rake
54
+ type: :development
55
+ prerelease: false
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ! '>='
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ none: false
62
+ description: Skip makes loading the environment faster for Rails or Rake
63
+ email:
64
+ - guillaume.malette@jadedpixel.com
65
+ executables:
66
+ - skip
67
+ extensions: []
68
+ extra_rdoc_files: []
69
+ files:
70
+ - .gitignore
71
+ - Gemfile
72
+ - LICENSE.txt
73
+ - README.md
74
+ - Rakefile
75
+ - bin/skip
76
+ - lib/skip.rb
77
+ - lib/skip/version.rb
78
+ - skip.gemspec
79
+ homepage: ''
80
+ licenses:
81
+ - MIT
82
+ post_install_message:
83
+ rdoc_options: []
84
+ require_paths:
85
+ - lib
86
+ required_ruby_version: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ! '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ none: false
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ! '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ none: false
98
+ requirements: []
99
+ rubyforge_project:
100
+ rubygems_version: 1.8.23
101
+ signing_key:
102
+ specification_version: 3
103
+ summary: Skip requires all gems and uses forks to speed up the load time of Rails
104
+ and Rake
105
+ test_files: []