hss 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hss +5 -5
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0c815dae40ad8012a473c88b6e3bebf5044b9bb1
4
- data.tar.gz: bd1abd6ca56ce3ce7ff4a0e781763390a4f3150e
3
+ metadata.gz: 2dda825118c5f2c9c9a23084aa370a2c04f50f19
4
+ data.tar.gz: b2ee054b0b03a8d111f1d18796f0a0611ff62f82
5
5
  SHA512:
6
- metadata.gz: c8470acd12fd7a1f66795db92a57e3edf95f15aabfff1316b10e76d435bbf266973b5e72109109dda18dd63fde29d49c7f400ddd58d53fdbbfdc2d806bd94508
7
- data.tar.gz: 63813a91970e935357b70bf102558279a7791bae650def6e247a351691bb6f25b4a08d511b3459e4bedbb8c723af6c38e6b6a9de784847a00297fd9207ab6a4a
6
+ metadata.gz: b35efa6f33d354e3f98655a6b92211a0b261b40b02db9ecfa05d8b456261398d4a019e5f8d7522a0be115f4e92f6b6e24c590729c67762fbad78c5260e4c0232
7
+ data.tar.gz: 1fedf809329f3288ad3d5009ec816d1b925a20193df10be2278f1039e5d0ec8a39050ad0e42b523296c0aced9f918469a6d31308d4d1e0d71b854c8e4a5f25a8
data/lib/hss CHANGED
@@ -5,12 +5,12 @@ require 'pathname'
5
5
  require 'erb'
6
6
 
7
7
  def expand(input)
8
- Config['expansions'].each { |long, shorts| return long if shorts.include? input }
8
+ Conf['expansions'].each { |long, shorts| return long if shorts.include? input }
9
9
  raise NameError, "No expansion found for: #{input}"
10
10
  end
11
11
 
12
12
  def shortcut(input)
13
- return Config['shortcuts'][input]
13
+ return Conf['shortcuts'][input]
14
14
  end
15
15
 
16
16
  def command(input)
@@ -28,16 +28,16 @@ if possible_paths.empty?
28
28
  exit 1
29
29
  end
30
30
 
31
- Config = open(possible_paths[0]) { |file| YAML.load(file.read) }
31
+ Conf = open(possible_paths[0]) { |file| YAML.load(file.read) }
32
32
  Input = ARGV.pop
33
33
  Args = ARGV.join(' ')
34
34
 
35
35
  if Input.nil? or Input == 'help'
36
36
  puts 'How to use:'
37
37
  puts '(what you type) -> (where it takes you)'
38
- Config['patterns'].each { |pattern| puts pattern['example'] }
38
+ Conf['patterns'].each { |pattern| puts pattern['example'] }
39
39
  else
40
- Config['patterns'].each do |pattern|
40
+ Conf['patterns'].each do |pattern|
41
41
  next unless Input.match(pattern['short'])
42
42
  long_form = eval '"' + pattern['long'] + '"'
43
43
  #long_form = ERB.new('<%= "' + pattern['long'] + '" %>').result
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hss
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
  - Les Aker