nomadsl 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b4e0160e75a331237172b9c60a468f927fcfb073
4
- data.tar.gz: 6bce6e506fbc05491a5dd83549c03da94a2e76ab
2
+ SHA256:
3
+ metadata.gz: f3990adb76a257881c24b28eec9dac07531754a3e36bdd13a3f289f72148a82f
4
+ data.tar.gz: 6dc35a69dd9c1662904aaaa82d51f6da4f4ca6aa1961a5d6d3d962bed2188aea
5
5
  SHA512:
6
- metadata.gz: 5d579b1766677e566abcae0f93210201a980ed7b51c38676435a89d16dbd3ba6b4bd64ca150f4473bdddd84751e40d6f9be735a4a0e1d6691f0a27999c296d97
7
- data.tar.gz: 1fa02bf1905ea5255c0a104226889d4e99464106e84fa9b830d437bdbbf7bf313eeff85485081b8275d6d667966ce68eac97657ba9fad1153191d10e781c82a3
6
+ metadata.gz: fad39c4d9e171c5dae462be23b1c449beef3add6c0b9e6daef8beb1485807560550b91d9d24e6acc49d90f94e830c604c26bb94557bdc575a9bde7f6543cf77d
7
+ data.tar.gz: 768959b69543ed821fefd1c81c79afc17ff390ef304d536ca92e538265fb4652db4c77352f55cde36f352fb5c8a293eb84081742cc0b34925a33e13ef0fdcd77
data/README.md CHANGED
@@ -85,6 +85,21 @@ Will generate this output:
85
85
  }
86
86
  }
87
87
 
88
+ ## Using `nomadsl` as the interpreter
89
+
90
+ As of 0.1.4, you can also set your shbang line to use `nomadsl` as the
91
+ interpreter of the script. This will evaluate everything as Ruby, but with the
92
+ necessary `nomadsl` boilerplate already built in:
93
+
94
+ #!/usr/bin/env nomadsl
95
+
96
+ job "nomadsl-example" do
97
+ # ...
98
+ end
99
+
100
+ If the file is then marked as executable, you can simply run it to generate
101
+ the corresponding Nomad job specification.
102
+
88
103
  ## Other uses
89
104
 
90
105
  By requiring only `nomadsl`, you can inject these methods into another class:
data/bin/nomadsl ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'nomadsl/dsl'
4
+
5
+ eval ARGF.read
@@ -1,3 +1,3 @@
1
1
  module Nomadsl
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
data/nomadsl.gemspec CHANGED
@@ -8,14 +8,17 @@ Gem::Specification.new do |s|
8
8
  s.date = Time.now.strftime('%Y-%m-%d')
9
9
  s.license = 'CC0'
10
10
  s.homepage = 'https://github.com/daveadams/nomadsl'
11
- s.required_ruby_version = '>=2.4.0'
11
+ s.required_ruby_version = '>=2.5.0'
12
12
 
13
13
  s.summary = 'Ruby DSL for generating Nomad job specification files'
14
14
 
15
15
  s.require_paths = ['lib']
16
16
  s.files = Dir["lib/**/*.rb"] + [
17
+ 'bin/nomadsl',
17
18
  'README.md',
18
19
  'LICENSE',
19
20
  'nomadsl.gemspec'
20
21
  ]
22
+ s.bindir = 'bin'
23
+ s.executables = ['nomadsl']
21
24
  end
metadata CHANGED
@@ -1,23 +1,25 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nomadsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Adams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-21 00:00:00.000000000 Z
11
+ date: 2018-12-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: daveadams@gmail.com
15
- executables: []
15
+ executables:
16
+ - nomadsl
16
17
  extensions: []
17
18
  extra_rdoc_files: []
18
19
  files:
19
20
  - LICENSE
20
21
  - README.md
22
+ - bin/nomadsl
21
23
  - lib/nomadsl.rb
22
24
  - lib/nomadsl/dsl.rb
23
25
  - lib/nomadsl/version.rb
@@ -34,7 +36,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
34
36
  requirements:
35
37
  - - ">="
36
38
  - !ruby/object:Gem::Version
37
- version: 2.4.0
39
+ version: 2.5.0
38
40
  required_rubygems_version: !ruby/object:Gem::Requirement
39
41
  requirements:
40
42
  - - ">="
@@ -42,7 +44,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
42
44
  version: '0'
43
45
  requirements: []
44
46
  rubyforge_project:
45
- rubygems_version: 2.6.13
47
+ rubygems_version: 2.7.6
46
48
  signing_key:
47
49
  specification_version: 4
48
50
  summary: Ruby DSL for generating Nomad job specification files