Skip to content

Commit

Permalink
Update #{self.prefix} to match yamllint rules (#248)
Browse files Browse the repository at this point in the history
* Update #{self.prefix} to match yamllint rules

yamllint defaults to require-starting-space, this change will fix the
preamble to match the yamllint rules so that inline linting doesn't
throw errors while eyaml editing files.

Signed-off-by: Jordan Conway <[email protected]>

* Update bundler before travis builds

Hopefully this will fix the issue with ruby 1.9.3 and travis tests
thoughtbot/factory_bot#846

Signed-off-by: Jordan Conway <[email protected]>
  • Loading branch information
jordanconway authored and rnelson0 committed Nov 8, 2017
1 parent 68dfa05 commit 9aa3fdc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ branches:
only:
- master
- /^v\d/
before_install:
- gem install bundler
6 changes: 3 additions & 3 deletions lib/hiera/backend/eyaml/subcommands/edit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def self.helptext
end

def self.prefix
'#|'
'# |'
end

def self.preamble
Expand All @@ -35,8 +35,8 @@ def self.preamble
}).collect{|name| Encryptor.find(name).tag}

preamble = <<-eos
This is eyaml edit mode. This text (lines starting with #{self.prefix} at the top of the
file) will be removed when you save and exit.
This is eyaml edit mode. This text (lines starting with #{self.prefix} at the top of
the file) will be removed when you save and exit.
- To edit encrypted values, change the content of the DEC(<num>)::PKCS7[]!
block#{(tags.size>1) ? " (or #{tags.drop(1).collect {|tag| "DEC(<num>)::#{tag}[]!" }.join(' or ')})." : '.' }
WARNING: DO NOT change the number in the parentheses.
Expand Down

0 comments on commit 9aa3fdc

Please sign in to comment.