pleaserun 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -4,6 +4,7 @@ gem "cabin"
4
4
  gem "stud"
5
5
  gem "mustache"
6
6
  gem "insist"
7
+ gem "ohai"
7
8
 
8
9
  # For testing
9
10
  gem "rspec"
data/Gemfile.lock CHANGED
@@ -22,6 +22,7 @@ GEM
22
22
  rspec (~> 2.14)
23
23
  hitimes (1.2.1)
24
24
  insist (1.0.0)
25
+ ipaddress (0.8.0)
25
26
  listen (2.4.0)
26
27
  celluloid (>= 0.15.2)
27
28
  rb-fsevent (>= 0.9.3)
@@ -32,8 +33,20 @@ GEM
32
33
  atomic (~> 1.0)
33
34
  avl_tree (~> 1.1.2)
34
35
  hitimes (~> 1.1)
36
+ mixlib-cli (1.4.0)
37
+ mixlib-config (2.1.0)
38
+ mixlib-log (1.6.0)
39
+ mixlib-shellout (1.3.0)
35
40
  mustache (0.99.5)
36
41
  net-ssh (2.8.0)
42
+ ohai (6.20.0)
43
+ ipaddress
44
+ mixlib-cli
45
+ mixlib-config
46
+ mixlib-log
47
+ mixlib-shellout
48
+ systemu (~> 2.5.2)
49
+ yajl-ruby
37
50
  peach (0.5.1)
38
51
  pry (0.9.12.4)
39
52
  coderay (~> 1.0)
@@ -54,8 +67,10 @@ GEM
54
67
  stud (0.0.17)
55
68
  ffi
56
69
  metriks
70
+ systemu (2.5.2)
57
71
  thor (0.18.1)
58
72
  timers (1.1.0)
73
+ yajl-ruby (1.2.0)
59
74
 
60
75
  PLATFORMS
61
76
  ruby
@@ -68,6 +83,7 @@ DEPENDENCIES
68
83
  insist
69
84
  mustache
70
85
  net-ssh
86
+ ohai
71
87
  peach
72
88
  rspec
73
89
  stud
data/README.md CHANGED
@@ -7,6 +7,18 @@ Ideally, you should be able to specify a configuration of how to run a given
7
7
  service command (like apache, syslog-ng, whatever), and this tool should
8
8
  be able to spit out a script or config file for your target platform.
9
9
 
10
+ ## What's going on here?
11
+
12
+ With pleaserun, you can generate the following launchers/scripts/whatever:
13
+
14
+ * launchd
15
+ * upstart
16
+ * systemd
17
+ * runit
18
+ * sysv init
19
+
20
+ Want more? It's easy to add things. [File an issue](issues/) and ask away!
21
+
10
22
  ## Installation
11
23
 
12
24
  ```
data/lib/pleaserun/cli.rb CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  require "pleaserun/namespace"
3
2
  require "clamp"
4
3
  require "cabin"
@@ -67,7 +66,7 @@ and try to use the most sensible init system. For Ubuntu, this means
67
66
  Upstart. For Debian, this means sysv init scripts. For Fedora, this
68
67
  means systemd.
69
68
 
70
- You can the running environment and settings for your runner with various
69
+ You can tune the running environment and settings for your runner with various
71
70
  flags. By way of example, let's make our elasticsearch service run as the
72
71
  'elasticsearch' user!
73
72
 
@@ -82,7 +81,7 @@ exact process launcher to target:
82
81
  Let's do another example. How about running nagios in systemd, but we
83
82
  want to abort if the nagios config is invalid?
84
83
 
85
- % pleaserun -t systemd \
84
+ % pleaserun -p systemd \
86
85
  --prestart "/usr/sbin/nagios -v /etc/nagios/nagios.cfg" \
87
86
  /usr/sbin/nagios /etc/nagios/nagios.cfg
88
87
 
@@ -101,7 +101,7 @@ class PleaseRun::Platform::Base
101
101
 
102
102
  # Get the template path for this platform.
103
103
  def template_path
104
- return File.join("templates", platform)
104
+ return File.join(File.dirname(__FILE__), "../../../templates", platform)
105
105
  end # def template_path
106
106
 
107
107
  def render_template(name)
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.1"
5
+ spec.version = "0.0.3"
6
6
  spec.summary = "pleaserun"
7
7
  spec.description = "pleaserun"
8
8
  spec.license = "Apache 2.0"
@@ -14,6 +14,7 @@ Gem::Specification.new do |spec|
14
14
  spec.add_dependency "stud"
15
15
  spec.add_dependency "mustache"
16
16
  spec.add_dependency "insist"
17
+ spec.add_dependency "ohai", "~> 6.20" # used for host detection
17
18
 
18
19
  spec.files = files
19
20
  spec.require_paths << "lib"
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.1
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -107,6 +107,22 @@ dependencies:
107
107
  - - ! '>='
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: ohai
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: '6.20'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: '6.20'
110
126
  description: pleaserun
111
127
  email:
112
128
  - jls@semicomplete.com