boing 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.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/bin/boing +5 -0
- data/boing.gemspec +23 -0
- data/lib/boing/version.rb +3 -0
- data/lib/boing.rb +64 -0
- metadata +82 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 74b7d6f99b91897b5b77241acda31a5dec883bac
|
4
|
+
data.tar.gz: d339a967a03c4b7dbf44f135c9333b3e4ad2909e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2fd6fc2dc7f6d8997e36f03e3e135736a1db9ddca0e86b41746f55687e447ad7e2186e351c3af1c65f9c86f2004fb21cbcc3f9c3ac845e213cafa2e33c3d9c8d
|
7
|
+
data.tar.gz: c8ef4f6f0c0f840c16484611e2b9297daf3e8cba03bf4930900cc91837083117b893ea6c5e0197e3de822fad3e319101ff679ca49cc797c6b1ab0eedae2ae27f
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Charles Oliver Nutter
|
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,29 @@
|
|
1
|
+
# Boing
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'boing'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install boing
|
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
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/boing
ADDED
data/boing.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'boing/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "boing"
|
8
|
+
spec.version = Boing::VERSION
|
9
|
+
spec.authors = ["Charles Oliver Nutter"]
|
10
|
+
spec.email = ["headius@headius.com"]
|
11
|
+
spec.description = "A command running that's aware of the Drip prebooter for JRuby."
|
12
|
+
spec.summary = "A command running that's aware of the Drip prebooter for JRuby."
|
13
|
+
spec.homepage = "https://github.com/headius/boing"
|
14
|
+
spec.license = "Apache-2"
|
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_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
end
|
data/lib/boing.rb
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
require "boing/version"
|
2
|
+
require 'fileutils'
|
3
|
+
|
4
|
+
module Boing
|
5
|
+
class Runner
|
6
|
+
INPROC_RAILS_CMDS = %w[c console r runner g generate d destroy]
|
7
|
+
|
8
|
+
def initialize(args)
|
9
|
+
@args = args.dup
|
10
|
+
end
|
11
|
+
|
12
|
+
def run
|
13
|
+
# warn if we're not in drip; and if not, load dripmain.rb as well
|
14
|
+
if ENV['DRIP_INIT_CLASS'] == nil
|
15
|
+
$stderr.puts "Note: Not running in drip; may be booting or configured wrong"
|
16
|
+
dripmain = File.join(Dir.pwd, 'dripmain.rb')
|
17
|
+
if File.exist?(dripmain)
|
18
|
+
load dripmain
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
# check for known "special" commands
|
23
|
+
if @args[0] == 'rails' && INPROC_RAILS_COMMANDS.include?(@args[1])
|
24
|
+
# running a `rails` command
|
25
|
+
|
26
|
+
# best value comes from prebooting rails, so warn if not prebooted
|
27
|
+
if !defined?(Rails)
|
28
|
+
$stderr.puts "Note: Running Rails commands but Rails is not prebooted."
|
29
|
+
require File.join(Dir.pwd, 'config/application.rb')
|
30
|
+
end
|
31
|
+
|
32
|
+
# commands that just reboot rails can run in-process
|
33
|
+
@args.shift
|
34
|
+
Object.const_set(:APP_PATH, ::Rails.root.join("config/application"))
|
35
|
+
require "rails/commands"
|
36
|
+
exit
|
37
|
+
|
38
|
+
elsif @args[0] == 'killall'
|
39
|
+
# kill all drip instances
|
40
|
+
$stderr.puts "Killing all drip instances"
|
41
|
+
system "drip kill"
|
42
|
+
exit
|
43
|
+
|
44
|
+
elsif @args[0] == 'dripmain'
|
45
|
+
# Install a basic dripmain.rb for Rails use
|
46
|
+
if !File.exist? File.expand_path('./config/application.rb')
|
47
|
+
$stderr.puts "#{Dir.pwd} does not appear to be a rails application."
|
48
|
+
exit
|
49
|
+
end
|
50
|
+
if File.exist? 'dripmain.rb'
|
51
|
+
FileUtils.cp 'dripmain.rb', 'dripmain.rb.bak'
|
52
|
+
end
|
53
|
+
File.open('dripmain.rb', 'w') do |f|
|
54
|
+
f.puts("require File.expand_path('../config/application', __FILE__)")
|
55
|
+
end
|
56
|
+
exit
|
57
|
+
end
|
58
|
+
|
59
|
+
# All other commands run as is
|
60
|
+
cmd = @args.shift
|
61
|
+
load File.join(File.dirname(Gem.ruby), cmd)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
metadata
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: boing
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Charles Oliver Nutter
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-01-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - ~>
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '1.3'
|
19
|
+
name: bundler
|
20
|
+
prerelease: false
|
21
|
+
type: :development
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
name: rake
|
34
|
+
prerelease: false
|
35
|
+
type: :development
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: A command running that's aware of the Drip prebooter for JRuby.
|
42
|
+
email:
|
43
|
+
- headius@headius.com
|
44
|
+
executables:
|
45
|
+
- boing
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- .gitignore
|
50
|
+
- Gemfile
|
51
|
+
- LICENSE.txt
|
52
|
+
- README.md
|
53
|
+
- Rakefile
|
54
|
+
- bin/boing
|
55
|
+
- boing.gemspec
|
56
|
+
- lib/boing.rb
|
57
|
+
- lib/boing/version.rb
|
58
|
+
homepage: https://github.com/headius/boing
|
59
|
+
licenses:
|
60
|
+
- Apache-2
|
61
|
+
metadata: {}
|
62
|
+
post_install_message:
|
63
|
+
rdoc_options: []
|
64
|
+
require_paths:
|
65
|
+
- lib
|
66
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - '>='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
requirements: []
|
77
|
+
rubyforge_project:
|
78
|
+
rubygems_version: 2.1.9
|
79
|
+
signing_key:
|
80
|
+
specification_version: 4
|
81
|
+
summary: A command running that's aware of the Drip prebooter for JRuby.
|
82
|
+
test_files: []
|