h2ocube_rails_puma 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8902a5149b57b315d7b22a4eefa6516bf89c82f2
4
+ data.tar.gz: 86cd48fcfa0753fae31e6b89378c139e1744b1c3
5
+ SHA512:
6
+ metadata.gz: 5c289626e43971efdef215aff20ffd09d71b69bbba036805ad07a1fa127757291a62f1dd36f63289ae3647d91e0dac027d8eb0d7877c40a352c611d56c5fbc42
7
+ data.tar.gz: c09977c6166bd30527350e72a787c764283037ab42698362aa465ff67671bb1496b4f0640779cfd4d69d823f1f0dc60f1cc225557b26590a7223699a78de2b0d
@@ -0,0 +1,5 @@
1
+ # Logfile created on 2013-12-30 13:30:09 +0800 by logger.rb/44203
2
+ I, [2013-12-30T13:30:09.769206 #5674] INFO -- : 0: rack (1.5.2) from /Users/ben/.rvm/gems/ruby-2.1.0/specifications/rack-1.5.2.gemspec
3
+ I, [2013-12-30T13:30:09.770101 #5674] INFO -- : 0: puma (2.7.1) from /Users/ben/.rvm/gems/ruby-2.1.0/specifications/puma-2.7.1.gemspec
4
+ I, [2013-12-30T13:30:09.785992 #5674] INFO -- : 0: h2ocube_rails_puma (0.0.1) from /Users/ben/dev/h2ocube_rails_puma/h2ocube_rails_puma.gemspec
5
+ I, [2013-12-30T13:30:09.786398 #5674] INFO -- : 0: bundler (1.5.0) from /Users/ben/.rvm/gems/ruby-2.1.0@global/specifications/bundler-1.5.0.gemspec
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in h2ocube_rails_development.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,18 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ h2ocube_rails_puma (0.0.1)
5
+ puma
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ puma (2.7.1)
11
+ rack (>= 1.1, < 2.0)
12
+ rack (1.5.2)
13
+
14
+ PLATFORMS
15
+ ruby
16
+
17
+ DEPENDENCIES
18
+ h2ocube_rails_puma!
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 H2ocube.com
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,66 @@
1
+ # H2ocubeRailsPuma
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/h2ocube_rails_puma.png)](http://badge.fury.io/rb/h2ocube_rails_puma)
4
+
5
+ Puma helper.
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ gem 'h2ocube_rails_puma', group: [:development, :production]
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install h2ocube_rails_puma
20
+
21
+ ## Usage
22
+
23
+ # Capfile
24
+ require 'capistrano/puma'
25
+
26
+ Puma specific tasks for Capistrano v3:
27
+
28
+ cap puma:start
29
+ cap puma:stop
30
+ cap puma:restart
31
+
32
+ # nginx.conf
33
+ upstream app {
34
+ server unix:/root/app/shared/sockets/puma.sock fail_timeout=0;
35
+ }
36
+ server {
37
+ listen 80;
38
+ server_name app.com;
39
+ root /root/app/current/public;
40
+ location / {
41
+ if ($request_uri ~* "\.(ico|css|js|gif|jpe?g|png)\?[0-9]*$") {
42
+ expires max;
43
+ break;
44
+ }
45
+ try_files $uri @app;
46
+ }
47
+ location @app {
48
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
49
+ proxy_set_header Host $http_host;
50
+ proxy_set_header X-UA-Compatible IE=edge,chrome=1;
51
+ proxy_redirect off;
52
+ proxy_pass http://app;
53
+ }
54
+ }
55
+
56
+ ## Include
57
+
58
+ * puma https://github.com/puma/puma
59
+
60
+ ## Contributing
61
+
62
+ 1. Fork it
63
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
64
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
65
+ 4. Push to the branch (`git push origin my-new-feature`)
66
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,21 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'h2ocube_rails_puma'
7
+ spec.version = '0.0.1'
8
+ spec.authors = ['Ben']
9
+ spec.email = ['ben@zfben.com']
10
+ spec.description = %q{Just a collection for development gems}
11
+ spec.summary = %q{Just a collection for development gems}
12
+ spec.homepage = 'https://github.com/h2ocube/h2ocube_rails_puma'
13
+ spec.license = 'MIT'
14
+
15
+ spec.files = `git ls-files`.split($/)
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ['lib']
19
+
20
+ spec.add_dependency 'puma'
21
+ end
@@ -0,0 +1 @@
1
+ load File.expand_path('../tasks/puma.cap', __FILE__)
@@ -0,0 +1,34 @@
1
+ namespace :puma do
2
+ desc 'Start puma'
3
+ task :start do
4
+ on roles :app do
5
+ within release_path do
6
+ execute :bundle, "exec puma -C config/puma.rb -b 'unix://#{shared_path}/sockets/puma.sock' --pidfile #{shared_path}/pids/puma.pid -S #{state_path} -e #{fetch(:stage)} -d"
7
+ end
8
+ end
9
+ end
10
+
11
+ desc 'Stop puma'
12
+ task :stop do
13
+ on roles :app do
14
+ within release_path do
15
+ execute :bundle, "exec pumactl -S #{state_path} stop;true"
16
+ end
17
+ end
18
+ end
19
+
20
+ desc 'Restart puma'
21
+ task :restart do
22
+ on roles :app do
23
+ within release_path do
24
+ execute :bundle, "exec pumactl -S #{state_path} phased-restart;true"
25
+ end
26
+ end
27
+ end
28
+
29
+ def state_path
30
+ "#{shared_path}/sockets/puma.state"
31
+ end
32
+
33
+ before 'deploy:published', 'puma:restart'
34
+ end
@@ -0,0 +1,10 @@
1
+ require 'puma'
2
+
3
+ module H2ocubeRailsPuma
4
+ module Rails
5
+ class Rails::Engine < ::Rails::Engine
6
+ initializer 'h2ocube_rails_puma.require_dependency' do |app|
7
+ end
8
+ end
9
+ end
10
+ end
metadata ADDED
@@ -0,0 +1,68 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: h2ocube_rails_puma
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Ben
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-12-30 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: puma
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: Just a collection for development gems
28
+ email:
29
+ - ben@zfben.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - ".bundle/install.log"
35
+ - Gemfile
36
+ - Gemfile.lock
37
+ - LICENSE.txt
38
+ - README.md
39
+ - Rakefile
40
+ - h2ocube_rails_puma.gemspec
41
+ - lib/capistrano/puma.rb
42
+ - lib/capistrano/tasks/puma.cap
43
+ - lib/h2ocube_rails_puma.rb
44
+ homepage: https://github.com/h2ocube/h2ocube_rails_puma
45
+ licenses:
46
+ - MIT
47
+ metadata: {}
48
+ post_install_message:
49
+ rdoc_options: []
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ required_rubygems_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ requirements: []
63
+ rubyforge_project:
64
+ rubygems_version: 2.2.0
65
+ signing_key:
66
+ specification_version: 4
67
+ summary: Just a collection for development gems
68
+ test_files: []