chrislo-sourceclassifier 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ require 'find'
6
6
  require 'fileutils'
7
7
  require 'echoe'
8
8
 
9
- Echoe.new('sourceclassifier', '0.2.2') do |p|
9
+ Echoe.new('sourceclassifier', '0.2.3') do |p|
10
10
  p.description = "Determine the programming language used in a code snippet"
11
11
  p.url = "http://github.com/chrislo/sourceclassifier/tree/master"
12
12
  p.author = "Chris Lowis"
data/lib/trainer.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  require 'rubygems'
2
2
  require 'classifier'
3
- require 'ruby-debug'
4
-
3
+ require 'fileutils'
5
4
 
6
5
  class Trainer
7
6
  attr_reader :classifier
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{sourceclassifier}
5
- s.version = "0.2.2"
5
+ s.version = "0.2.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Chris Lowis"]
9
- s.date = %q{2009-01-06}
9
+ s.date = %q{2009-02-19}
10
10
  s.description = %q{Determine the programming language used in a code snippet}
11
11
  s.email = %q{chris.lowis@gmail.com}
12
12
  s.extra_rdoc_files = ["lib/sourceclassifier.rb", "lib/trainer.rb", "README.textile"]
@@ -1,6 +1,7 @@
1
1
  require File.join(File.dirname(__FILE__), '..', 'lib', 'trainer')
2
2
  require File.join(File.dirname(__FILE__), '..', 'lib', 'sourceclassifier')
3
3
 
4
+ require 'fileutils'
4
5
  require 'test/unit'
5
6
 
6
7
  class TestSourceClassifier < Test::Unit::TestCase
@@ -17,11 +18,11 @@ class TestSourceClassifier < Test::Unit::TestCase
17
18
  end
18
19
 
19
20
  def test_default_training_file
20
- require 'ftools'
21
+
21
22
  assert_equal(@c.training_file, @output_dir + "/trainer.bin")
22
23
 
23
24
  d = SourceClassifier.new()
24
- assert(File.compare(d.training_file, File.join(File.dirname(__FILE__), '..', 'trainer.bin')))
25
+ assert(FileUtils.compare_file(d.training_file, File.join(File.dirname(__FILE__), '..', 'trainer.bin')))
25
26
  end
26
27
 
27
28
  def test_languages
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chrislo-sourceclassifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Lowis
@@ -9,11 +9,12 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-06 00:00:00 -08:00
12
+ date: 2009-02-19 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: classifier
17
+ type: :runtime
17
18
  version_requirement:
18
19
  version_requirements: !ruby/object:Gem::Requirement
19
20
  requirements: