filtri 0.1.1 → 0.1.2

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.
data/README.md CHANGED
@@ -96,6 +96,7 @@ Definitions for syntax highlighting of `.rule` files in Sublime Text 2 and TextM
96
96
 
97
97
  ## Version information
98
98
 
99
+ * 0.1.2 - Bugfixes
99
100
  * 0.1.0 - Added filtri tool and syntax highlighting
100
101
  * 0.0.1 - Initial version
101
102
 
data/bin/filtri CHANGED
@@ -17,7 +17,7 @@ rescue SystemExit => sys_exit
17
17
  exit sys_exit.status
18
18
  rescue Exception => ex
19
19
 
20
- puts "[Error] #{ex.message}"
21
- puts " -----> #{ex.backtrace.join("\n ")}" if debug
20
+ $stderr.puts "[Error] #{ex.message}"
21
+ $stderr.puts " -----> #{ex.backtrace.join("\n ")}" if debug
22
22
 
23
23
  end
@@ -134,7 +134,7 @@ class Filtri
134
134
  # add rule
135
135
  self.send(op.to_sym,arg_hash)
136
136
  else
137
- raise FiltriInitError, "Unknown rule: #{op}" unless op == "#"
137
+ raise FiltriInitError, "Unknown rule: #{op}" unless ( op == "#" || l[0] == "#" )
138
138
  end
139
139
 
140
140
  end
@@ -50,7 +50,7 @@ class FiltriCmd
50
50
 
51
51
 
52
52
  unless opts.include?(:rules) || opts.include?(:rule_files)
53
- puts "Error: provide a rule or a rule file."
53
+ $stderr.puts "Error: provide a rule or a rule file."
54
54
  return false
55
55
  end
56
56
 
@@ -58,7 +58,7 @@ class FiltriCmd
58
58
  if opts.include?(f)
59
59
  opts[f].each do |i|
60
60
  unless File.exist?(i)
61
- puts "Error: file #{i} does not exist."
61
+ $stderr.puts "Error: file #{i} does not exist."
62
62
  return false
63
63
  end
64
64
  end
@@ -1,6 +1,7 @@
1
1
  class Filtri
2
2
 
3
3
  # Filtri version (semantic versioning)
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
+
6
+ end
5
7
 
6
- end
@@ -47,7 +47,7 @@ describe FiltriCmd do
47
47
 
48
48
  stub_const("ARGV",["input1", "input2"])
49
49
  out_opts = FiltriCmd.parse_opts
50
- $stdout.should_receive(:puts).with(/Error/i)
50
+ $stderr.should_receive(:puts).with(/Error/i)
51
51
  FiltriCmd.validate_opts(out_opts).should be_false
52
52
 
53
53
  end
@@ -66,7 +66,7 @@ describe FiltriCmd do
66
66
  File.stub!(:exist?).with("existing_file").and_return true
67
67
  File.stub!(:exist?).with("input_file1").and_return true
68
68
  File.stub!(:exist?).with("bad_input_file2").and_return false
69
- $stdout.should_receive(:puts).with(/Error/i)
69
+ $stderr.should_receive(:puts).with(/Error/i)
70
70
  FiltriCmd.validate_opts(out_opts).should be_false
71
71
 
72
72
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filtri
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  version: '0'
151
151
  segments:
152
152
  - 0
153
- hash: -2517431771693229622
153
+ hash: 4377020395678951398
154
154
  requirements: []
155
155
  rubyforge_project:
156
156
  rubygems_version: 1.8.24