Method: Template::Spec#klippspec

Defined in:
lib/template/spec.rb

#klippspecObject



208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/template/spec.rb', line 208

def klippspec
  ks = "# encoding=utf-8\n"
  ks += "\n"
  ks += "spec '#{identifier}' do |s|\n"
  ks += "  s.block_actions_under_git = true\n"
  ks += "  # s.pre_actions = ['echo \"Hello klipp!\"']\n"
  ks += "  # s.post_actions = ['pod install']\n"
  ks += "\n"
  ks += "  s.token :REPLACEABLE do |t|\n"
  ks += "    t.comment = \"Replaceable value (to insert in any filename or string containing 'XXREPLACEABLEXX')\"\n"
  ks += "    t.validation = /^[A-Z][A-Za-z0-9 ]{2,}$/\n"
  ks += "    t.validation_hint = 'At least three characters long, start with a capital character, may contain spaces'\n"
  ks += "  end\n"
  ks += "\n"
  ks += "  s.token :TOGGLE do |t|\n"
  ks += "    t.comment = \"Toggle value (to insert in any filename or string containing 'XXTOGGLEXX')\"\n"
  ks += "    t.type = :bool\n"
  ks += "    # t.bool_strings = ['NO','YES']\n"
  ks += "  end\n"
  ks += "\n"
  ks += "  # ...\n"
  ks += "\n"
  ks += "end\n"
end