jetpack 0.0.3
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 +4 -0
- data/.wrong +1 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +23 -0
- data/README.markdown +35 -0
- data/Rakefile +16 -0
- data/bin/preflight +175 -0
- data/bin_files/.rake_runner.erb +36 -0
- data/bin_files/rake.erb +12 -0
- data/bin_files/ruby.erb +4 -0
- data/gems/bundler-1.0.18.gem +0 -0
- data/gems/bundler-1.1.rc.gem +0 -0
- data/gems/jruby-openssl-0.7.4.gem +0 -0
- data/install_gem.sh +5 -0
- data/jetpack.gemspec +19 -0
- data/jetty_files/etc/fake.p12 +0 -0
- data/jetty_files/etc/jetty.xml.erb +113 -0
- data/jetty_files/jetty-init.erb +702 -0
- data/jetty_files/run/.gitkeep +0 -0
- data/jetty_files/start.ini +69 -0
- data/jetty_files/webapps/.gitkeep +0 -0
- data/lib/preflight/settings.rb +48 -0
- data/script/ci +57 -0
- data/spec/basics_spec.rb +84 -0
- data/spec/bundler_spec.rb +120 -0
- data/spec/ruby_19_spec.rb +34 -0
- data/spec/sample_projects/has_gems_via_bundler/Gemfile +4 -0
- data/spec/sample_projects/has_gems_via_bundler/Gemfile.lock +13 -0
- data/spec/sample_projects/has_gems_via_bundler/Rakefile +18 -0
- data/spec/sample_projects/has_gems_via_bundler/config/preflight.yml +1 -0
- data/spec/sample_projects/has_gems_via_bundler/true} +0 -0
- data/spec/sample_projects/has_gems_via_bundler_19/Gemfile +8 -0
- data/spec/sample_projects/has_gems_via_bundler_19/Gemfile.lock +13 -0
- data/spec/sample_projects/has_gems_via_bundler_19/Rakefile +18 -0
- data/spec/sample_projects/has_gems_via_bundler_19/config/preflight.yml +2 -0
- data/spec/sample_projects/has_gems_via_bundler_bad_gemfile_lock/Gemfile +4 -0
- data/spec/sample_projects/has_gems_via_bundler_bad_gemfile_lock/Rakefile +18 -0
- data/spec/sample_projects/has_gems_via_bundler_bad_gemfile_lock/config/preflight.yml +1 -0
- data/spec/sample_projects/no_dependencies/Rakefile +30 -0
- data/spec/sample_projects/no_dependencies/config/preflight.yml +1 -0
- data/spec/sample_projects/webapp/Gemfile +3 -0
- data/spec/sample_projects/webapp/Gemfile.lock +88 -0
- data/spec/sample_projects/webapp/app/controllers/application_controller.rb +5 -0
- data/spec/sample_projects/webapp/config.ru +4 -0
- data/spec/sample_projects/webapp/config/application.rb +46 -0
- data/spec/sample_projects/webapp/config/boot.rb +6 -0
- data/spec/sample_projects/webapp/config/environment.rb +5 -0
- data/spec/sample_projects/webapp/config/environments/development.rb +25 -0
- data/spec/sample_projects/webapp/config/environments/test.rb +35 -0
- data/spec/sample_projects/webapp/config/initializers/secret_token.rb +7 -0
- data/spec/sample_projects/webapp/config/preflight.yml +6 -0
- data/spec/sample_projects/webapp/config/preflight_files/vendor/jetty/etc/custom-project-specific-jetty.xml +5 -0
- data/spec/sample_projects/webapp/config/preflight_files/vendor/jetty/etc/template-from-project-jetty.xml.erb +9 -0
- data/spec/sample_projects/webapp/config/routes.rb +60 -0
- data/spec/sample_projects/webapp/public/index.html +239 -0
- data/spec/sample_projects/webapp/script/rails +6 -0
- data/spec/spec_helper.rb +48 -0
- data/spec/suite.rb +1 -0
- data/spec/web_spec.rb +67 -0
- data/web_inf_files/web.xml.erb +47 -0
- metadata +175 -0
@@ -0,0 +1 @@
|
|
1
|
+
jruby: "file://<%= File.expand_path('spec/local_mirror') %>/jruby-complete-1.6.4.jar"
|
File without changes
|
@@ -0,0 +1,18 @@
|
|
1
|
+
task :load_path do
|
2
|
+
puts $LOAD_PATH.join("\n")
|
3
|
+
end
|
4
|
+
|
5
|
+
task :load_path_with_rubygems do
|
6
|
+
require "rubygems"
|
7
|
+
puts $LOAD_PATH.join("\n")
|
8
|
+
end
|
9
|
+
|
10
|
+
task :load_path_with_bundler do
|
11
|
+
require "rubygems"
|
12
|
+
require "bundler"
|
13
|
+
$LOAD_PATH.each{|path|puts "-- #{path}"}
|
14
|
+
end
|
15
|
+
|
16
|
+
task :rake_version do
|
17
|
+
puts RAKEVERSION
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
task :load_path do
|
2
|
+
puts $LOAD_PATH.join("\n")
|
3
|
+
end
|
4
|
+
|
5
|
+
task :load_path_with_rubygems do
|
6
|
+
require "rubygems"
|
7
|
+
puts $LOAD_PATH.join("\n")
|
8
|
+
end
|
9
|
+
|
10
|
+
task :load_path_with_bundler do
|
11
|
+
require "rubygems"
|
12
|
+
require "bundler"
|
13
|
+
$LOAD_PATH.each{|path|puts "-- #{path}"}
|
14
|
+
end
|
15
|
+
|
16
|
+
task :rake_version do
|
17
|
+
puts RAKEVERSION
|
18
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
jruby: "file://<%= File.expand_path('spec/local_mirror') %>/jruby-complete-1.6.4.jar"
|
@@ -0,0 +1,30 @@
|
|
1
|
+
task :project_info do
|
2
|
+
require "fileutils"
|
3
|
+
|
4
|
+
puts "Hi, I'm the no_dependencies project"
|
5
|
+
puts "RUBY_PLATFORM=#{RUBY_PLATFORM}"
|
6
|
+
puts "LOAD_PATH=#{$LOAD_PATH.join("\n")}"
|
7
|
+
puts "PWD=#{FileUtils.pwd}"
|
8
|
+
puts "DOLLAR_ZERO=#{$0}"
|
9
|
+
end
|
10
|
+
|
11
|
+
task :another_task do
|
12
|
+
puts "You ran another task"
|
13
|
+
end
|
14
|
+
|
15
|
+
def zzz; yyy end
|
16
|
+
def yyy; xxx end
|
17
|
+
def xxx; raise "BOOM" end
|
18
|
+
|
19
|
+
task :boom do
|
20
|
+
zzz
|
21
|
+
end
|
22
|
+
|
23
|
+
task :load_path do
|
24
|
+
$LOAD_PATH.each{|path|puts "LP-- #{path}"}
|
25
|
+
end
|
26
|
+
|
27
|
+
task :gem_path do
|
28
|
+
require "rubygems"
|
29
|
+
Gem.path.each{|path|puts "GP-- #{path}"}
|
30
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
jruby: "file://<%= File.expand_path('spec/local_mirror') %>/jruby-complete-1.6.4.jar"
|
@@ -0,0 +1,88 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
actionmailer (3.1.0)
|
5
|
+
actionpack (= 3.1.0)
|
6
|
+
mail (~> 2.3.0)
|
7
|
+
actionpack (3.1.0)
|
8
|
+
activemodel (= 3.1.0)
|
9
|
+
activesupport (= 3.1.0)
|
10
|
+
builder (~> 3.0.0)
|
11
|
+
erubis (~> 2.7.0)
|
12
|
+
i18n (~> 0.6)
|
13
|
+
rack (~> 1.3.2)
|
14
|
+
rack-cache (~> 1.0.3)
|
15
|
+
rack-mount (~> 0.8.2)
|
16
|
+
rack-test (~> 0.6.1)
|
17
|
+
sprockets (~> 2.0.0)
|
18
|
+
activemodel (3.1.0)
|
19
|
+
activesupport (= 3.1.0)
|
20
|
+
bcrypt-ruby (~> 3.0.0)
|
21
|
+
builder (~> 3.0.0)
|
22
|
+
i18n (~> 0.6)
|
23
|
+
activerecord (3.1.0)
|
24
|
+
activemodel (= 3.1.0)
|
25
|
+
activesupport (= 3.1.0)
|
26
|
+
arel (~> 2.2.1)
|
27
|
+
tzinfo (~> 0.3.29)
|
28
|
+
activeresource (3.1.0)
|
29
|
+
activemodel (= 3.1.0)
|
30
|
+
activesupport (= 3.1.0)
|
31
|
+
activesupport (3.1.0)
|
32
|
+
multi_json (~> 1.0)
|
33
|
+
arel (2.2.1)
|
34
|
+
bcrypt-ruby (3.0.1)
|
35
|
+
builder (3.0.0)
|
36
|
+
erubis (2.7.0)
|
37
|
+
hike (1.2.1)
|
38
|
+
i18n (0.6.0)
|
39
|
+
mail (2.3.0)
|
40
|
+
i18n (>= 0.4.0)
|
41
|
+
mime-types (~> 1.16)
|
42
|
+
treetop (~> 1.4.8)
|
43
|
+
mime-types (1.16)
|
44
|
+
multi_json (1.0.3)
|
45
|
+
polyglot (0.3.2)
|
46
|
+
rack (1.3.4)
|
47
|
+
rack-cache (1.0.3)
|
48
|
+
rack (>= 0.4)
|
49
|
+
rack-mount (0.8.3)
|
50
|
+
rack (>= 1.0.0)
|
51
|
+
rack-ssl (1.3.2)
|
52
|
+
rack
|
53
|
+
rack-test (0.6.1)
|
54
|
+
rack (>= 1.0)
|
55
|
+
rails (3.1.0)
|
56
|
+
actionmailer (= 3.1.0)
|
57
|
+
actionpack (= 3.1.0)
|
58
|
+
activerecord (= 3.1.0)
|
59
|
+
activeresource (= 3.1.0)
|
60
|
+
activesupport (= 3.1.0)
|
61
|
+
bundler (~> 1.0)
|
62
|
+
railties (= 3.1.0)
|
63
|
+
railties (3.1.0)
|
64
|
+
actionpack (= 3.1.0)
|
65
|
+
activesupport (= 3.1.0)
|
66
|
+
rack-ssl (~> 1.3.2)
|
67
|
+
rake (>= 0.8.7)
|
68
|
+
rdoc (~> 3.4)
|
69
|
+
thor (~> 0.14.6)
|
70
|
+
rake (0.9.2)
|
71
|
+
rdoc (3.9.4)
|
72
|
+
sprockets (2.0.1)
|
73
|
+
hike (~> 1.2)
|
74
|
+
rack (~> 1.0)
|
75
|
+
tilt (~> 1.1, != 1.3.0)
|
76
|
+
thor (0.14.6)
|
77
|
+
tilt (1.3.3)
|
78
|
+
treetop (1.4.10)
|
79
|
+
polyglot
|
80
|
+
polyglot (>= 0.3.1)
|
81
|
+
tzinfo (0.3.30)
|
82
|
+
|
83
|
+
PLATFORMS
|
84
|
+
java
|
85
|
+
ruby
|
86
|
+
|
87
|
+
DEPENDENCIES
|
88
|
+
rails
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
# require “active_record/railtie”
|
4
|
+
require "action_controller/railtie"
|
5
|
+
require "action_mailer/railtie"
|
6
|
+
require "active_resource/railtie"
|
7
|
+
require "rails/test_unit/railtie"
|
8
|
+
|
9
|
+
# If you have a Gemfile, require the gems listed there, including any gems
|
10
|
+
# you've limited to :test, :development, or :production.
|
11
|
+
Bundler.require(:default, Rails.env) if defined?(Bundler)
|
12
|
+
|
13
|
+
module Foo
|
14
|
+
class Application < Rails::Application
|
15
|
+
# Settings in config/environments/* take precedence over those specified here.
|
16
|
+
# Application configuration should go into files in config/initializers
|
17
|
+
# -- all .rb files in that directory are automatically loaded.
|
18
|
+
|
19
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
20
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
21
|
+
|
22
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
23
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
24
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
25
|
+
|
26
|
+
# Activate observers that should always be running.
|
27
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
28
|
+
|
29
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
30
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
31
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
32
|
+
|
33
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
34
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
35
|
+
# config.i18n.default_locale = :de
|
36
|
+
|
37
|
+
# JavaScript files you want as :defaults (application.js is always included).
|
38
|
+
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
39
|
+
|
40
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
41
|
+
config.encoding = "utf-8"
|
42
|
+
|
43
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
44
|
+
config.filter_parameters += [:password]
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
Foo::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the webserver when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Don't care if the mailer can't send
|
17
|
+
config.action_mailer.raise_delivery_errors = true
|
18
|
+
|
19
|
+
# Print deprecation notices to the Rails logger
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Only use best-standards-support built into browsers
|
23
|
+
config.action_dispatch.best_standards_support = :builtin
|
24
|
+
end
|
25
|
+
|
@@ -0,0 +1,35 @@
|
|
1
|
+
Foo::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Log error messages when you accidentally call methods on nil.
|
11
|
+
config.whiny_nils = true
|
12
|
+
|
13
|
+
# Show full error reports and disable caching
|
14
|
+
config.consider_all_requests_local = true
|
15
|
+
config.action_controller.perform_caching = false
|
16
|
+
|
17
|
+
# Raise exceptions instead of rendering exception templates
|
18
|
+
config.action_dispatch.show_exceptions = false
|
19
|
+
|
20
|
+
# Disable request forgery protection in test environment
|
21
|
+
config.action_controller.allow_forgery_protection = false
|
22
|
+
|
23
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
24
|
+
# The :test delivery method accumulates sent emails in the
|
25
|
+
# ActionMailer::Base.deliveries array.
|
26
|
+
config.action_mailer.delivery_method = :test
|
27
|
+
|
28
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
29
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
30
|
+
# like if you have constraints or database-specific column types
|
31
|
+
# config.active_record.schema_format = :sql
|
32
|
+
|
33
|
+
# Print deprecation notices to the stderr
|
34
|
+
config.active_support.deprecation = :stderr
|
35
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Foo::Application.config.secret_token = '9197ec11ccabc88f4e58933d89215efb83096cfc750bca8411096d7cbbb4f4049aa691c8887289391b0ad084d91d5507ebeef78f9d205d3c2532ad31d30c2d68'
|
@@ -0,0 +1,6 @@
|
|
1
|
+
jruby: "file://<%= File.expand_path('spec/local_mirror') %>/jruby-complete-1.6.4.jar"
|
2
|
+
jetty: "file://<%= File.expand_path('spec/local_mirror') %>/jetty-hightide-7.4.5.v20110725.zip"
|
3
|
+
jruby-rack: "file://<%= File.expand_path('spec/local_mirror') %>/jruby-rack-1.0.10.jar"
|
4
|
+
http_port: 10080
|
5
|
+
https_port: 10443
|
6
|
+
max_concurrent_connections: 15
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
|
3
|
+
|
4
|
+
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
5
|
+
<Call class="java.lang.System" name="setProperty">
|
6
|
+
<Arg>HTTPS_PORT</Arg>
|
7
|
+
<Arg><%=@settings.https_port%></Arg>
|
8
|
+
</Call>
|
9
|
+
</Configure>
|
@@ -0,0 +1,60 @@
|
|
1
|
+
Foo::Application.routes.draw do
|
2
|
+
match 'hello' => 'application#hello'
|
3
|
+
|
4
|
+
# The priority is based upon order of creation:
|
5
|
+
# first created -> highest priority.
|
6
|
+
|
7
|
+
# Sample of regular route:
|
8
|
+
# match 'products/:id' => 'catalog#view'
|
9
|
+
# Keep in mind you can assign values other than :controller and :action
|
10
|
+
|
11
|
+
# Sample of named route:
|
12
|
+
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
|
13
|
+
# This route can be invoked with purchase_url(:id => product.id)
|
14
|
+
|
15
|
+
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
16
|
+
# resources :products
|
17
|
+
|
18
|
+
# Sample resource route with options:
|
19
|
+
# resources :products do
|
20
|
+
# member do
|
21
|
+
# get 'short'
|
22
|
+
# post 'toggle'
|
23
|
+
# end
|
24
|
+
#
|
25
|
+
# collection do
|
26
|
+
# get 'sold'
|
27
|
+
# end
|
28
|
+
# end
|
29
|
+
|
30
|
+
# Sample resource route with sub-resources:
|
31
|
+
# resources :products do
|
32
|
+
# resources :comments, :sales
|
33
|
+
# resource :seller
|
34
|
+
# end
|
35
|
+
|
36
|
+
# Sample resource route with more complex sub-resources
|
37
|
+
# resources :products do
|
38
|
+
# resources :comments
|
39
|
+
# resources :sales do
|
40
|
+
# get 'recent', :on => :collection
|
41
|
+
# end
|
42
|
+
# end
|
43
|
+
|
44
|
+
# Sample resource route within a namespace:
|
45
|
+
# namespace :admin do
|
46
|
+
# # Directs /admin/products/* to Admin::ProductsController
|
47
|
+
# # (app/controllers/admin/products_controller.rb)
|
48
|
+
# resources :products
|
49
|
+
# end
|
50
|
+
|
51
|
+
# You can have the root of your site routed with "root"
|
52
|
+
# just remember to delete public/index.html.
|
53
|
+
# root :to => "welcome#index"
|
54
|
+
|
55
|
+
# See how all your routes lay out with "rake routes"
|
56
|
+
|
57
|
+
# This is a legacy wild controller route that's not recommended for RESTful applications.
|
58
|
+
# Note: This route will make all actions in every controller accessible via GET requests.
|
59
|
+
# match ':controller(/:action(/:id(.:format)))'
|
60
|
+
end
|