pleaserun 0.0.6 → 0.0.7

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: 977bbbd93336000ec0eb5e7dae6496e04c9f3635
4
- data.tar.gz: 5bd3e60151503f1925baf4fd33b1591a50e59933
3
+ metadata.gz: 6db755c281a2e5f041c547f22b425ca854f75d8b
4
+ data.tar.gz: 1cdf25e749553dccdc7204c0a68ce167dc56e77e
5
5
  SHA512:
6
- metadata.gz: b4450c74a63f6c7701a7c98118e413a733fe18be3c665d33c38c0f6894293ce75e518fc7f7a3c639523b88eeeafc64bc2a00c019e00f69aced6d4757fa3f958f
7
- data.tar.gz: f6e29a6719e62fca0ccadcfc8219bd73535e5b5a3c857868101b4477a80ce230c157c4222d6e8648c795dd9ad8161d28b889ea1a2cb9648993768bf5407b7669
6
+ metadata.gz: cd618ba975af6c590ce5c934e1480e28f6b11cd86f68d84ebd600b5b483afbd7173780e05de5fa3402ffe95c8edc7414a57e61de973624f5737a96696db49c67
7
+ data.tar.gz: 1652915321ccd1c26b07dade2ffb840da8416ab19cf8e6e7f3fc1ad0b49872372038ee8393734c057dfbb9fc242996d97a81a62dc1422189b15c9404a7569a1c
@@ -7,7 +7,10 @@ class PleaseRun::Platform::Upstart < PleaseRun::Platform::Base
7
7
  def files
8
8
  return Enumerator::Generator.new do |out|
9
9
  out.yield(safe_filename("/etc/init/{{ name }}.conf"), render_template("init.conf"))
10
- out.yield(safe_filename("/etc/init.d/{{ name }}"), render_template("init.d.sh"), 0755)
10
+ # Don't bother putting /etc/init.d/ shims anymore.
11
+ # The best way to interact with upstart is through initctl, start, stop,
12
+ # and restart commands
13
+ #out.yield(safe_filename("/etc/init.d/{{ name }}"), render_template("init.d.sh"), 0755)
11
14
  end
12
15
  end
13
16
  end
data/pleaserun.gemspec CHANGED
@@ -2,7 +2,7 @@ Gem::Specification.new do |spec|
2
2
  files = %x{git ls-files}.split("\n")
3
3
 
4
4
  spec.name = "pleaserun"
5
- spec.version = "0.0.6"
5
+ spec.version = "0.0.7"
6
6
  spec.summary = "pleaserun"
7
7
  spec.description = "pleaserun"
8
8
  spec.license = "Apache 2.0"
@@ -115,7 +115,16 @@ prestart() {
115
115
  {{/prestart}}
116
116
 
117
117
  case "$1" in
118
- start) status || start ;;
118
+ start)
119
+ status
120
+ code=$?
121
+ if [ $code -eq 0 ]; then
122
+ echo "$name is already running"
123
+ else
124
+ start
125
+ fi
126
+ exit $code
127
+ ;;
119
128
  stop) stop ;;
120
129
  force-stop) force_stop ;;
121
130
  status)
data/test/helpers.rb CHANGED
@@ -5,7 +5,16 @@ end
5
5
 
6
6
  def test_in_container(tag, commands, outfile, errfile)
7
7
  chdir = File.join(File.dirname(__FILE__), "vagrant")
8
- system("cd #{chdir}; vagrant up #{tag} > #{outfile} 2> #{errfile}")
8
+
9
+ # hacks for now because I don't know how to make vagrant smartly
10
+ # choose the right provider.
11
+ provider = case tag
12
+ when /^fedora-/, /^centos-/
13
+ "virtualbox"
14
+ else
15
+ "docker"
16
+ end
17
+ system("cd #{chdir}; vagrant up --provider=#{provider} #{tag} > #{outfile} 2> #{errfile}")
9
18
  insist { $? }.success?
10
19
 
11
20
  commands.each do |command|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pleaserun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordan Sissel