tiller 0.0.7 → 0.0.8

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: feab9651c304713e5ef78bcf87626fd25edec4eb
4
- data.tar.gz: bd30b7743b743d495492e44686b6d196991ae664
3
+ metadata.gz: 0a1ee91c5860d98da73e05ec9e78430309dc9062
4
+ data.tar.gz: 15300fffec069df95fab3cbd081ce471ee6c40d1
5
5
  SHA512:
6
- metadata.gz: aaed3118718d80998ced1e0836ae851c9e5611cbf8aa8a63b14888e53e425643f89c225bcf5b73d97187d8cf029b7b338d61e01fc275ad7fdb5e9277db628a56
7
- data.tar.gz: 0d6763b148968f0093aa75df0207efcc2557214909a94fdb1573be50e8c5c7f01271edc6e4ab392ad8dbbf0c46ae97ee299a1fe749fae158fd2fe71084b86772
6
+ metadata.gz: 6ce64fe320bff5680c8b8ed103656c267b145ea0d66b80b338e5110a2ac3eee1f938afd42fdf931c897720da7c30eca758bd292897999a67b3487fc884964564
7
+ data.tar.gz: e3a55abb0cf59af863abc9752e966ea315a9c46bc4ec14e51239e0eea6a60fbd048669d69e136891c1bc44a2b56cea69f383dd9ef2288aa185c49ffc048fce0a
data/bin/tiller CHANGED
@@ -3,7 +3,7 @@
3
3
  # Named from the first ship-building (Docker) related term I could find that didn't have an existing gem named after it!
4
4
  # Mark Round <github@markround.com>
5
5
 
6
- VERSION='0.0.6'
6
+ VERSION='0.0.8'
7
7
 
8
8
  require 'erb'
9
9
  require 'ostruct'
@@ -18,16 +18,16 @@
18
18
  # so you can inspect your templates.
19
19
  exec: date
20
20
 
21
- # data_sources: Sources of data. Here, we're pulling in the provided FileDataSource (ships with this gem), and also the
22
- # NetworkDataSource under examples/lib/tiller. This is found because we set tiller_lib when we called the tiller
23
- # executable. We're not pulling in the example DummyDataSource, because it also provides target_values, so would
24
- # overwrite the target_values from FileDataSource - you should only have one DataSource providing this information,
21
+ # data_sources: Sources of data. Here, we're pulling in the provided FileDataSource and EnvironmentDataSource (ships with
22
+ # this gem), and also the NetworkDataSource under examples/lib/tiller. This is found because we set tiller_lib when we
23
+ # called the tiller executable. We're not pulling in the example DummyDataSource, because it also provides target_values,
24
+ # so would overwrite the target_values from FileDataSource - you should only have one DataSource providing this information,
25
25
  # otherwise your templates may end up in strange places you didn't expect!
26
26
  data_sources:
27
27
  - file
28
+ - environment
28
29
  - network
29
30
 
30
-
31
31
  # template_sources: Sources of templates, in priority order (first takes precendence). Again using the provided
32
32
  # FileTemplateSource (uses templates under <tiller_base>/templates), and also because we set tiller_lib, we can use
33
33
  # DummyTemplateSource which creates a single "dummy.erb" template.
@@ -3,6 +3,6 @@
3
3
  "name": "<%= fqdn %>",
4
4
  "address": "<%= ipv4_addresses[0][3] %>",
5
5
  "subscriptions": <%= sensu_subscriptions %>,
6
- "safe_mode": false
6
+ "safe_mode": "false"
7
7
  }
8
- }
8
+ }
@@ -0,0 +1,20 @@
1
+ # Random datasource for Tiller. Provides Base64, UUID and other useful random strings
2
+
3
+ require 'securerandom'
4
+
5
+ class RandomDataSource < Tiller::DataSource
6
+
7
+ def global_values
8
+ {
9
+ 'random_base64' => SecureRandom.base64,
10
+ 'random_hex' => SecureRandom.hex,
11
+ 'random_bytes' => SecureRandom.random_bytes,
12
+ 'random_number_10' => SecureRandom.random_number(10),
13
+ 'random_number_100' => SecureRandom.random_number(100),
14
+ 'random_number_1000' => SecureRandom.random_number(1000),
15
+ 'random_urlsafe_base64' => SecureRandom.urlsafe_base64,
16
+ 'random_uuid' => SecureRandom.uuid
17
+ }
18
+ end
19
+
20
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Round
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-04 00:00:00.000000000 Z
11
+ date: 2014-08-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A tool to create configuration files in Docker containers from a variety
14
14
  of sources. See https://github.com/markround/tiller for examples and documentation.
@@ -28,6 +28,7 @@ files:
28
28
  - examples/lib/tiller/template/dummy.rb
29
29
  - lib/tiller/data/environment.rb
30
30
  - lib/tiller/data/file.rb
31
+ - lib/tiller/data/random.rb
31
32
  - lib/tiller/datasource.rb
32
33
  - lib/tiller/template/file.rb
33
34
  - lib/tiller/templatesource.rb