semi 0.7.1 → 0.8.0

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
2
  SHA1:
3
- metadata.gz: a69c6ca96229d497f50fdfffedddb0ea107dbfda
4
- data.tar.gz: fa8a1514d2a356ba8f0b35bdb085c6d71b474ac8
3
+ metadata.gz: 234571144df7015d1316c2768af35f29bfda6d42
4
+ data.tar.gz: be0999f35f5277879e443179b4af928dc642bba7
5
5
  SHA512:
6
- metadata.gz: 3fbe7df13c3e47c0cf363365df037c1f18268bf4c6e54b69a2c233aa30d477f93c28976b6e1b7365d8e81363ac1bfa124a5f42515e5e4fe401064676062102c9
7
- data.tar.gz: 423b498213021d8393d28d70478d78c07eddfc028111467e20ff2b1ff51da477e0b7a12e7ebcee9311ddc84541ca32edf4d94660e05e872360e896bc9b910003
6
+ metadata.gz: 2c8edcfeb6f4589deab333265d2ef590853ca0ebcd6d170d21526895578ed1b1f8b1892bc99765ca8b5a615c1d1a446d465cd6aa1ad48faa172429cbc455287c
7
+ data.tar.gz: fec7429ea34a30c9590d23e1abd441aca230707964744772d54fed36b9fbd8b24bfef719b49b4715a4c7ccd2659dc9924b72b68a434828a8dad86973273c73e7
data/lib/semi/driver.rb CHANGED
@@ -55,6 +55,9 @@ module Semi
55
55
  exit (6)
56
56
  end
57
57
 
58
+ # Replace ENV with @dictionary
59
+ @dictionary.each_pair {|k,v| ENV[k] = v}
60
+
58
61
  # Check for pre-defined commands
59
62
  args = ARGV
60
63
  if args.count == 0 and @config.commands.include? 'default'
data/lib/semi/validate.rb CHANGED
@@ -7,6 +7,7 @@ module Semi
7
7
  if rules.class == String
8
8
  rules = rules.split(/,\s?/)
9
9
  end
10
+ # build a checklist for rules that match
10
11
  tests = Hash[ rules.collect { |r| [r, false] } ]
11
12
 
12
13
  tests.keys.each do |rule|
data/lib/semi/variable.rb CHANGED
@@ -38,7 +38,7 @@ module Semi
38
38
  return Semi::Variables::Boolean.new(val)
39
39
  when Semi::Variables::Integer.validate(val)
40
40
  return Semi::Variables::Integer.new(val)
41
- when val.class == Fixnum
41
+ when val.class == 1.class # Fixnum vs Integer
42
42
  return Semi::Variables::Integer.new(val)
43
43
  when val.class == TrueClass
44
44
  return Semi::Variables::Boolean.new(val)
@@ -19,7 +19,7 @@ module Semi::Variables
19
19
  end
20
20
 
21
21
  def self.validate(value)
22
- if value.class == Fixnum
22
+ if value.class == 1.class
23
23
  return true
24
24
  elsif value.class == Semi::Variables::Integer and value.to_s =~ /^\d+$/
25
25
  return true
data/lib/semi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Semi
2
- version = '0.7.1'
2
+ version = '0.8.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerard Hickey