necktie 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -1
- data/example/tasks/app.rb +6 -3
- data/lib/necktie/application.rb +1 -2
- data/lib/necktie.rb +10 -0
- data/necktie.gemspec +1 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -1,4 +1,9 @@
|
|
1
|
-
1.0.2
|
1
|
+
1.0.3 (2009-11-2)
|
2
|
+
* Added Necktie::Version.
|
3
|
+
* Added gem clean to rubygems task (examples).
|
4
|
+
* Fixed a bug in nginx task (examples).
|
5
|
+
|
6
|
+
1.0.2 (2009-10-20)
|
2
7
|
* Added services.reload and improved read time for services.running?
|
3
8
|
* Example now uses more file tasks for conditional updates.
|
4
9
|
* Command line option --env becomes --environment.
|
data/example/tasks/app.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
desc "Update Ruby gems"
|
1
2
|
task :rubygems do
|
2
3
|
# These gems are needed in the enviroment (i.e not bundled with your Rails app).
|
3
4
|
# For example: unicorn, rake, mysql, starling. To install a new gem or upgrade
|
@@ -9,11 +10,12 @@ task :rubygems do
|
|
9
10
|
Dir["gems/*.gem"].each do |gem|
|
10
11
|
install_gem gem
|
11
12
|
end
|
13
|
+
sh "gem clean"
|
12
14
|
end
|
13
15
|
|
14
16
|
task :memcached do
|
15
|
-
# Out of the box, memcached listens to local requests only.
|
16
|
-
# in the same security group
|
17
|
+
# Out of the box, memcached listens to local requests only.
|
18
|
+
# Allow access from all servers (in the same security group).
|
17
19
|
unless processes.find { |p| p.cmdline[/memcached\s.*-l\s0.0.0.0/] }
|
18
20
|
update "/etc/memcached.conf", /^-l 127.0.0.1/, "-l 0.0.0.0"
|
19
21
|
services.start "memcached"
|
@@ -35,7 +37,7 @@ file "/etc/nginx/sites-available/unicorn.conf"=>"etc/nginx/unicorn.conf" do
|
|
35
37
|
ln_sf "/etc/nginx/sites-available/unicorn.conf", "/etc/nginx/sites-enabled/"
|
36
38
|
sh "service nginx reload"
|
37
39
|
end
|
38
|
-
task :nginx=>[:unicorn, "/etc/nginx/sites-available/unicorn.conf"
|
40
|
+
task :nginx=>[:unicorn, "/etc/nginx/sites-available/unicorn.conf"]
|
39
41
|
|
40
42
|
task :postfix do
|
41
43
|
# Have postfix send emails on behalf of our host, and start it.
|
@@ -46,4 +48,5 @@ task :postfix do
|
|
46
48
|
end
|
47
49
|
end
|
48
50
|
|
51
|
+
desc "Setup: memcached, nginx, unicorn and postfix"
|
49
52
|
task :app=>[:environment, :memcached, :unicorn, :nginx, :postfix]
|
data/lib/necktie/application.rb
CHANGED
@@ -91,8 +91,7 @@ module Necktie
|
|
91
91
|
],
|
92
92
|
['--version', '-V', "Display the program version.",
|
93
93
|
lambda { |value|
|
94
|
-
|
95
|
-
puts "Necktie, version #{spec.version}"
|
94
|
+
puts "Necktie, version #{Necktie::Version::STRING}"
|
96
95
|
exit
|
97
96
|
}
|
98
97
|
],
|
data/lib/necktie.rb
CHANGED
@@ -4,6 +4,7 @@ require "necktie/gems"
|
|
4
4
|
require "necktie/services"
|
5
5
|
require "necktie/rush"
|
6
6
|
|
7
|
+
|
7
8
|
# Includes all methods from Necktie::Files and Necktie::Gems methods.
|
8
9
|
#
|
9
10
|
# Includes Rake DSL, see http://rake.rubyforge.org for more details.
|
@@ -11,3 +12,12 @@ require "necktie/rush"
|
|
11
12
|
# Includes Rush, see http://rush.heroku.com for more details.
|
12
13
|
class Object
|
13
14
|
end
|
15
|
+
|
16
|
+
|
17
|
+
module Necktie
|
18
|
+
# Version number.
|
19
|
+
module Version
|
20
|
+
STRING = Gem::Specification.load(File.expand_path("../necktie.gemspec", File.dirname(__FILE__))).version.to_s.freeze
|
21
|
+
MAJOR, MINOR, PATCH = STRING.split(".").map { |i| i.to_i }
|
22
|
+
end
|
23
|
+
end
|
data/necktie.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: necktie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Assaf Arkin
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-11-02 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|