mina-nginx 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f1524f73b74a9fcd393dde060743a323b917754f
4
- data.tar.gz: 3063f7a458deb75d6bab43a07699592fdba635c3
3
+ metadata.gz: 7fc9f55e13f8c93e65915450dba5af5b713a835f
4
+ data.tar.gz: 3ceb413fd582ed68e31e3d50854f2a14f3ae6f5b
5
5
  SHA512:
6
- metadata.gz: 41b1f6e05ab72567afa57a0cc8c9fbf8da51da0e5a54d28601feed109a3e8bf869bb0a1bf6841e9e35d1ae2f57a6ce1bc27cabc46efc5aa98f5b692e496120be
7
- data.tar.gz: 4e03f71ee33dc85da1471ea1f868ccd2ada2a87159f011de3d2c9f918c296548087a32002d06f6004c642ae136aaa739f59dfcb687bd42f7fcd0a046f7e95771
6
+ metadata.gz: 925707213e89e846e632c363ec2572cf53e25f2604019324a7de1a83499275fb1e5a5428edf7d8767bcd8d92c5094b91f2516b05ef87f210b906eb428f76f889
7
+ data.tar.gz: 0405cf368b7f6ade3a12667a6d0655b6d408585c7594dedc1814d93ac6fa9868dd51249a122fb5d6758fae864ecfb944b68672ee7791c301a49c3c5bb60025ba
data/README.md CHANGED
@@ -34,7 +34,7 @@ Add this to your `config/deploy.rb` file:
34
34
 
35
35
  require 'mina/nginx'
36
36
 
37
- Make sure the following settings are setted in your `config/deploy.rb`:
37
+ Make sure the following settings are set in your `config/deploy.rb`:
38
38
 
39
39
  * `application` - application name
40
40
  * `server_name` - your application's server_name in nginx (e.g. example.com)(optional)
@@ -47,10 +47,9 @@ $ mina nginx:setup
47
47
  $ mina nginx:link
48
48
  ```
49
49
 
50
- Be sure to edit `shared/config/nginx.conf` on your server. Or you can parse an sample
51
- configuration file by `mina nginx:parse` on your server.
50
+ You can parse an sample configuration file by `mina nginx:parse` on your server.
52
51
 
53
- Then:
52
+ Be sure to edit `shared/config/nginx.conf`, and then:
54
53
 
55
54
  ```
56
55
  $ mina nginx:reload
@@ -58,7 +57,7 @@ $ mina nginx:reload
58
57
 
59
58
  ## Contributing
60
59
 
61
- 1. Fork it ( http://github.com/<my-github-username>/mina-nginx/fork )
60
+ 1. Fork it ( http://github.com/hbin/mina-nginx/fork )
62
61
  2. Create your feature branch (`git checkout -b my-new-feature`)
63
62
  3. Commit your changes (`git commit -am 'Add some feature'`)
64
63
  4. Push to the branch (`git push origin my-new-feature`)
data/Rakefile CHANGED
@@ -1 +1 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler/gem_tasks'
data/lib/mina/nginx.rb CHANGED
@@ -1,44 +1,44 @@
1
- require "mina/nginx/version"
1
+ require 'mina/nginx/version'
2
2
 
3
3
  namespace :nginx do
4
- set_default :nginx_user, "www-data"
5
- set_default :nginx_group, "www-data"
6
- set_default :nginx_path, "/etc/nginx"
7
- set_default :nginx_config, -> { "#{deploy_to}/#{shared_path}/config/nginx.conf" }
8
- set_default :nginx_config_e, -> { "#{nginx_path}/sites-enabled/#{application}.conf" }
4
+ set :nginx_user, 'www-data'
5
+ set :nginx_group, 'www-data'
6
+ set :nginx_path, '/etc/nginx'
7
+ set :nginx_config, -> { "#{fetch(:shared_path)}/config/nginx.conf" }
8
+ set :nginx_config_e, -> { "#{fetch(:nginx_path)}/sites-enabled/#{application}.conf" }
9
9
 
10
10
  desc 'Setup Nginx'
11
11
  task :setup => :environment do
12
- queue %(echo "-----> Setup the nginx")
13
- queue! %(touch #{nginx_config})
14
- queue %(echo "-----> Be sure to edit 'shared/config/nginx.conf'.")
12
+ command %(Setup the nginx)
13
+ command %(touch #{fetch(:nginx_config)})
14
+ comment %(Be sure to edit 'shared/config/nginx.conf'.)
15
15
  end
16
16
 
17
17
  desc 'Symlinking nginx config file'
18
18
  task :link => :environment do
19
- queue %(echo "-----> Symlinking nginx config file")
20
- queue! %(sudo ln -nfs "#{nginx_config}" "#{nginx_config_e}")
19
+ comment %(Symlinking nginx config file)
20
+ command %(sudo ln -nfs "#{fetch(:nginx_config)}" "#{fetch(:nginx_config_e)}")
21
21
  end
22
22
 
23
23
  desc 'Parse nginx configuration file and upload it to the server.'
24
24
  task :parse => :environment do
25
25
  content = erb(nginx_template)
26
- queue %(echo '#{content}' > #{nginx_config})
27
- queue %(cat #{nginx_config})
28
- queue %(echo "-----> Be sure to edit 'shared/config/nginx.conf'.")
26
+ command %(echo '#{content}' > #{fetch(:nginx_config)})
27
+ command %(cat #{fetch(:nginx_config)})
28
+ comment %(Be sure to edit 'shared/config/nginx.conf'.)
29
29
  end
30
30
 
31
31
  %w(stop start restart reload status).each do |action|
32
32
  desc "#{action.capitalize} Nginx"
33
33
  task action.to_sym => :environment do
34
- queue %(echo "-----> #{action.capitalize} Nginx")
35
- queue! "sudo service nginx #{action}"
34
+ comment %(#{action.capitalize} Nginx)
35
+ command "sudo service nginx #{action}"
36
36
  end
37
37
  end
38
38
 
39
39
  private
40
40
 
41
- def nginx_template
42
- File.expand_path('../templates/nginx.conf.erb', __FILE__)
43
- end
41
+ def nginx_template
42
+ File.expand_path('../templates/nginx.conf.erb', __FILE__)
43
+ end
44
44
  end
@@ -1,5 +1,5 @@
1
1
  module Mina
2
2
  module Nginx
3
- VERSION = "0.0.1"
3
+ VERSION = '0.0.2'.freeze
4
4
  end
5
5
  end
data/mina-nginx.gemspec CHANGED
@@ -4,22 +4,22 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'mina/nginx/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "mina-nginx"
7
+ spec.name = 'mina-nginx'
8
8
  spec.version = Mina::Nginx::VERSION
9
- spec.authors = ["hbin"]
10
- spec.email = ["huangbin88@foxmail.com"]
11
- spec.summary = %q{Mina tasks for handle with Nginx.}
12
- spec.description = %q{Configuration and managements Mina tasks for Nginx.}
13
- spec.homepage = "https://github.com/hbin/mina-nginx.git"
14
- spec.license = "MIT"
9
+ spec.authors = ['hbin']
10
+ spec.email = ['huangbin88@foxmail.com']
11
+ spec.summary = %(Mina tasks for handle with Nginx.)
12
+ spec.description = %(Configuration and managements Mina tasks for Nginx.)
13
+ spec.homepage = 'https://github.com/hbin/mina-nginx.git'
14
+ spec.license = 'MIT'
15
15
 
16
- spec.files = `git ls-files`.split($/)
16
+ spec.files = `git ls-files`.split($RS)
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
19
+ spec.require_paths = ['lib']
20
20
 
21
- spec.add_dependency "mina", "~> 0"
21
+ spec.add_dependency 'mina', '~> 1'
22
22
 
23
- spec.add_development_dependency "bundler", "~> 1.5"
24
- spec.add_development_dependency "rake"
23
+ spec.add_development_dependency 'bundler', '~> 1.5'
24
+ spec.add_development_dependency 'rake', '~> 0'
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mina-nginx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - hbin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-22 00:00:00.000000000 Z
11
+ date: 2016-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mina
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,14 +42,14 @@ dependencies:
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: Configuration and managements Mina tasks for Nginx.
@@ -88,9 +88,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  version: '0'
89
89
  requirements: []
90
90
  rubyforge_project:
91
- rubygems_version: 2.2.0
91
+ rubygems_version: 2.5.1
92
92
  signing_key:
93
93
  specification_version: 4
94
94
  summary: Mina tasks for handle with Nginx.
95
95
  test_files: []
96
- has_rdoc: