smilodon 0.0.2 → 0.2.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/Gemfile +7 -2
- data/Gemfile.lock +26 -12
- data/README.rdoc +1 -1
- data/Rakefile +38 -4
- data/VERSION +1 -1
- data/lib/smilodon/fakes.rb +0 -20
- data/lib/smilodon/logger.rb +47 -0
- data/lib/smilodon.rb +27 -44
- data/populator.gemspec +70 -0
- data/smilodon.gemspec +11 -11
- data/spec/lib/smilodon_spec.rb +1 -65
- metadata +32 -64
- data/spec/test_files/bar.csv +0 -0
- data/spec/test_files/foo.csv +0 -0
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,20 +1,34 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
diff-lcs (1.1.
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
4
|
+
diff-lcs (1.1.2)
|
5
|
+
git (1.2.5)
|
6
|
+
jeweler (1.6.0)
|
7
|
+
bundler (~> 1.0.0)
|
8
|
+
git (>= 1.2.5)
|
9
|
+
rake
|
10
|
+
little-plugger (1.1.2)
|
11
|
+
logging (1.5.0)
|
12
|
+
little-plugger (>= 1.1.2)
|
13
|
+
rake (0.8.7)
|
14
|
+
rcov (0.9.9)
|
15
|
+
rspec (2.3.0)
|
16
|
+
rspec-core (~> 2.3.0)
|
17
|
+
rspec-expectations (~> 2.3.0)
|
18
|
+
rspec-mocks (~> 2.3.0)
|
19
|
+
rspec-core (2.3.1)
|
20
|
+
rspec-expectations (2.3.0)
|
21
|
+
diff-lcs (~> 1.1.2)
|
22
|
+
rspec-mocks (2.3.0)
|
23
|
+
yard (0.6.8)
|
14
24
|
|
15
25
|
PLATFORMS
|
16
26
|
ruby
|
17
27
|
|
18
28
|
DEPENDENCIES
|
19
|
-
|
20
|
-
|
29
|
+
bundler (~> 1.0.0)
|
30
|
+
jeweler (~> 1.6.0)
|
31
|
+
logging
|
32
|
+
rcov
|
33
|
+
rspec (~> 2.3.0)
|
34
|
+
yard (~> 0.6.0)
|
data/README.rdoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
== Populator http://travis-ci.org/optimis/populator.png
|
2
2
|
|
3
|
-
http://
|
3
|
+
http://dinofelis-cristata.artspots.com/image_sizes/0012/1985/smilodon_populator.jpg
|
4
4
|
|
5
5
|
Populator includes helper methods to ease parsing data files. Assigning a header and iterating over rows is handled by the module via a simple configuration.
|
6
6
|
|
data/Rakefile
CHANGED
@@ -1,10 +1,44 @@
|
|
1
|
-
|
1
|
+
# encoding: utf-8
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
+
gem.name = "smilodon"
|
18
|
+
gem.homepage = "http://github.com/optimis/smilodon"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{Smilodon is a utility to parse data files.}
|
21
|
+
gem.description = %Q{Smilodon is a utility to parse data files.}
|
22
|
+
gem.email = "uchouhan@optimiscorp.com"
|
23
|
+
gem.authors = ["Umang Chouhan"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rspec/core'
|
4
29
|
require 'rspec/core/rake_task'
|
30
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
31
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
32
|
+
end
|
5
33
|
|
6
|
-
|
7
|
-
|
34
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
35
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
36
|
+
spec.rcov = true
|
8
37
|
end
|
9
38
|
|
10
39
|
task :default => :spec
|
40
|
+
|
41
|
+
require 'yard'
|
42
|
+
YARD::Rake::YardocTask.new
|
43
|
+
|
44
|
+
require 'smilodon/tasks'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
data/lib/smilodon/fakes.rb
CHANGED
@@ -27,23 +27,3 @@ module FakePopulatorWithOverriddenDirectory
|
|
27
27
|
# Populate the test file.
|
28
28
|
populates 'TestFile', :directory => 'db/populate/files'
|
29
29
|
end
|
30
|
-
|
31
|
-
# A fake populator module with overridden directory for testing.
|
32
|
-
module FakePopulatorWithMultipleFiles
|
33
|
-
|
34
|
-
# Extend it with the Populator module.
|
35
|
-
extend Smilodon::Populator
|
36
|
-
|
37
|
-
# Populate the test file.
|
38
|
-
populates 'TestFile1', 'TestFile2', 'TestFile3', :directory => 'db/populate/files'
|
39
|
-
end
|
40
|
-
|
41
|
-
# A fake populator module with overridden directory for testing.
|
42
|
-
module FakePopulatorWithOnlyDirectory
|
43
|
-
|
44
|
-
# Extend it with the Populator module.
|
45
|
-
extend Smilodon::Populator
|
46
|
-
|
47
|
-
# Populate the test file.
|
48
|
-
populates :directory => 'spec/test_files'
|
49
|
-
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# Require the logging gem.
|
2
|
+
require 'logging'
|
3
|
+
|
4
|
+
# The populate logger class.
|
5
|
+
class PopulateLogger
|
6
|
+
|
7
|
+
# Configures the logger.
|
8
|
+
#
|
9
|
+
# @return [Logger] The logger instance after configuration.
|
10
|
+
def self.setup
|
11
|
+
configure
|
12
|
+
logger
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
# Configures the level.
|
18
|
+
#
|
19
|
+
# @param [Symbol] The log level. (defaults to :info)
|
20
|
+
def self.level=(level)
|
21
|
+
@level = level
|
22
|
+
end
|
23
|
+
|
24
|
+
# Returns the level.
|
25
|
+
#
|
26
|
+
# @param [String] The configured level. (defaults to :info)
|
27
|
+
def self.level
|
28
|
+
@level or :info
|
29
|
+
end
|
30
|
+
|
31
|
+
# Returns the configured logger.
|
32
|
+
#
|
33
|
+
# @return [Logger, #info, #debug, #warn] The logger instance.
|
34
|
+
def self.logger
|
35
|
+
logger = Logging.logger['example_logger']
|
36
|
+
logger.add_appenders Logging.appenders.stdout, Logging.appenders.file(@path)
|
37
|
+
logger.level = level
|
38
|
+
logger
|
39
|
+
end
|
40
|
+
|
41
|
+
# Configures the path of the log file.
|
42
|
+
#
|
43
|
+
# @return [String] The path of the log file.
|
44
|
+
def self.configure
|
45
|
+
@path = defined?(Rails) ? "#{Rails.root}/log/populator.log" : 'populator.log'
|
46
|
+
end
|
47
|
+
end
|
data/lib/smilodon.rb
CHANGED
@@ -1,7 +1,5 @@
|
|
1
|
-
require 'bundler/setup'
|
2
|
-
|
3
1
|
require 'smilodon/errors'
|
4
|
-
require 'smilodon/
|
2
|
+
require 'smilodon/logger'
|
5
3
|
|
6
4
|
# Smilodon includes helper methods to ease parsing data files.
|
7
5
|
# Assigning a header and iterating over rows is handled by the
|
@@ -32,53 +30,45 @@ module Smilodon
|
|
32
30
|
# Default data file type is CSV.
|
33
31
|
TYPE = 'csv'
|
34
32
|
|
35
|
-
# Attribute accessors for the directory, file name, header, rows and before hook.
|
36
|
-
attr_accessor :logger, :directory, :
|
33
|
+
# Attribute accessors for the directory, file name, header, count, rows and before hook.
|
34
|
+
attr_accessor :logger, :directory, :file, :type, :header, :count, :rows, :before
|
37
35
|
|
38
36
|
# Configuration helper.
|
39
37
|
#
|
40
|
-
# @param [
|
38
|
+
# @param [String] file The data file name.
|
41
39
|
# @option options [String] :directory ('db/populate/data_files') The location of the data file.
|
42
40
|
# @option options [String] :type ('csv') The data file type.
|
43
41
|
# @option options [Boolean] :header Set true if the file has a header.
|
44
42
|
# @option options [String] :before The method to call before the run.
|
45
|
-
def populates(
|
46
|
-
|
47
|
-
|
48
|
-
self.directory = if defined?(Rails)
|
49
|
-
"#{Rails.root}/#{options[:directory] || DIRECTORY}"
|
50
|
-
else
|
51
|
-
options[:directory] || DIRECTORY
|
52
|
-
end
|
43
|
+
def populates(file, options = {})
|
44
|
+
# Setup the logger to log populator warnings and messages.
|
45
|
+
self.logger = PopulateLogger.setup
|
53
46
|
|
47
|
+
self.directory = options[:directory] || DIRECTORY
|
48
|
+
self.file = file
|
54
49
|
self.type = options[:type] || TYPE
|
55
50
|
self.header = options[:header]
|
56
51
|
self.before = options[:before]
|
57
|
-
self.files = args.empty? ? grab_files : args
|
58
52
|
end
|
59
53
|
|
60
54
|
# Parses the data file content and processes each row.
|
61
55
|
#
|
62
56
|
# @return [Boolean] Returns true if all rows are processed successfully.
|
63
57
|
def run
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
process(row)
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
58
|
+
|
59
|
+
# Call the before hook if defined.
|
60
|
+
#
|
61
|
+
# @usage
|
62
|
+
# populates 'TestFile', :before => :inactivate
|
63
|
+
send(before) if before
|
64
|
+
|
65
|
+
rows = parser.parse(read)
|
66
|
+
self.count = header ? rows.count - 1 : rows.count
|
67
|
+
self.header = rows.shift if header
|
68
|
+
count.times { process(rows.shift) }
|
79
69
|
|
80
70
|
# Return true when all rows are processed.
|
81
|
-
true
|
71
|
+
return true
|
82
72
|
end
|
83
73
|
|
84
74
|
# Stub method to be defined in the extended module.
|
@@ -89,15 +79,9 @@ module Smilodon
|
|
89
79
|
end
|
90
80
|
|
91
81
|
private
|
92
|
-
|
93
|
-
Dir.glob("#{directory}/*").map do |file|
|
94
|
-
File.basename(file, File.extname(file))
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
82
|
+
|
98
83
|
# The parser to use based on the type of data file.
|
99
84
|
#
|
100
|
-
# @param [String] Name of file to be read
|
101
85
|
# @return [Parser, #parse] Returns the parser class to use.
|
102
86
|
def parser
|
103
87
|
if type == 'csv'
|
@@ -109,20 +93,19 @@ module Smilodon
|
|
109
93
|
# Absolute path for the data file.
|
110
94
|
#
|
111
95
|
# @return [String] The absolute path.
|
112
|
-
def path
|
113
|
-
"#{directory}/#{file}.#{type}"
|
96
|
+
def path
|
97
|
+
"#{Rails.root}/#{directory}/#{file}.#{type}"
|
114
98
|
end
|
115
99
|
|
116
100
|
# Reads the data file.
|
117
101
|
#
|
118
|
-
# @param [String] Name of file to be read
|
119
102
|
# @return [File] The data file contents.
|
120
103
|
# @raise [DataFileNotConfigured] Raises an exception when the file is not configured.
|
121
104
|
# @raise [MissingDataFile] Raises an exception when the configured file is missing.
|
122
|
-
def read
|
105
|
+
def read
|
123
106
|
raise DataFileNotConfigured unless file
|
124
|
-
raise MissingDataFile unless File.exist?(path
|
125
|
-
File.read path
|
107
|
+
raise MissingDataFile unless File.exist?(path)
|
108
|
+
File.read path
|
126
109
|
end
|
127
110
|
end
|
128
111
|
end
|
data/populator.gemspec
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{populator}
|
8
|
+
s.version = "0.1.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Umang Chouhan"]
|
12
|
+
s.date = %q{2011-05-12}
|
13
|
+
s.description = %q{Populator is a utility to parse data files.}
|
14
|
+
s.email = %q{uchouhan@optimiscorp.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".rspec",
|
22
|
+
"Gemfile",
|
23
|
+
"Gemfile.lock",
|
24
|
+
"LICENSE.txt",
|
25
|
+
"README.rdoc",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"lib/populator.rb",
|
29
|
+
"lib/populator/errors.rb",
|
30
|
+
"lib/populator/fakes.rb",
|
31
|
+
"lib/populator/logger.rb",
|
32
|
+
"populator.gemspec",
|
33
|
+
"spec/populator_spec.rb",
|
34
|
+
"spec/spec_helper.rb"
|
35
|
+
]
|
36
|
+
s.homepage = %q{http://github.com/optimis/populator}
|
37
|
+
s.licenses = ["MIT"]
|
38
|
+
s.require_paths = ["lib"]
|
39
|
+
s.rubygems_version = %q{1.3.7}
|
40
|
+
s.summary = %q{Populator is a utility to parse data files.}
|
41
|
+
|
42
|
+
if s.respond_to? :specification_version then
|
43
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
44
|
+
s.specification_version = 3
|
45
|
+
|
46
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
47
|
+
s.add_runtime_dependency(%q<logging>, [">= 0"])
|
48
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.6.0"])
|
49
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
50
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
|
51
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
52
|
+
s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
|
53
|
+
else
|
54
|
+
s.add_dependency(%q<logging>, [">= 0"])
|
55
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
|
56
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
57
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
58
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
59
|
+
s.add_dependency(%q<yard>, ["~> 0.6.0"])
|
60
|
+
end
|
61
|
+
else
|
62
|
+
s.add_dependency(%q<logging>, [">= 0"])
|
63
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
|
64
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
65
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
66
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
67
|
+
s.add_dependency(%q<yard>, ["~> 0.6.0"])
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
data/smilodon.gemspec
CHANGED
@@ -4,14 +4,14 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.
|
7
|
+
s.name = %q{smilodon}
|
8
|
+
s.version = "0.2.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Umang Chouhan"]
|
12
|
-
s.date =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
12
|
+
s.date = %q{2011-07-11}
|
13
|
+
s.description = %q{Smilodon is a utility to parse data files.}
|
14
|
+
s.email = %q{uchouhan@optimiscorp.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE.txt",
|
17
17
|
"README.rdoc"
|
@@ -28,21 +28,21 @@ Gem::Specification.new do |s|
|
|
28
28
|
"lib/smilodon.rb",
|
29
29
|
"lib/smilodon/errors.rb",
|
30
30
|
"lib/smilodon/fakes.rb",
|
31
|
+
"lib/smilodon/logger.rb",
|
31
32
|
"lib/smilodon/tasks.rb",
|
32
33
|
"lib/tasks/populate.rake",
|
33
34
|
"lib/tasks/populate.yml",
|
35
|
+
"populator.gemspec",
|
34
36
|
"smilodon.gemspec",
|
35
37
|
"spec/lib/smilodon_spec.rb",
|
36
38
|
"spec/lib/tasks/populate_spec.rb",
|
37
|
-
"spec/spec_helper.rb"
|
38
|
-
"spec/test_files/bar.csv",
|
39
|
-
"spec/test_files/foo.csv"
|
39
|
+
"spec/spec_helper.rb"
|
40
40
|
]
|
41
|
-
s.homepage =
|
41
|
+
s.homepage = %q{http://github.com/optimis/smilodon}
|
42
42
|
s.licenses = ["MIT"]
|
43
43
|
s.require_paths = ["lib"]
|
44
|
-
s.rubygems_version =
|
45
|
-
s.summary =
|
44
|
+
s.rubygems_version = %q{1.5.3}
|
45
|
+
s.summary = %q{Smilodon is a utility to parse data files.}
|
46
46
|
|
47
47
|
if s.respond_to? :specification_version then
|
48
48
|
s.specification_version = 3
|
data/spec/lib/smilodon_spec.rb
CHANGED
@@ -23,7 +23,7 @@ end
|
|
23
23
|
|
24
24
|
describe FakePopulator, '.file' do
|
25
25
|
it 'should return the configured file name' do
|
26
|
-
FakePopulator.
|
26
|
+
FakePopulator.file.should == 'TestFile'
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -48,67 +48,3 @@ describe FakePopulator, '.process(row)' do
|
|
48
48
|
}.should raise_exception(MethodNotOverridden)
|
49
49
|
end
|
50
50
|
end
|
51
|
-
|
52
|
-
describe FakePopulator, '.files' do
|
53
|
-
it 'should return the configured file names' do
|
54
|
-
FakePopulatorWithMultipleFiles.files.should == ['TestFile1', 'TestFile2', 'TestFile3']
|
55
|
-
end
|
56
|
-
|
57
|
-
it 'should handle an options hash' do
|
58
|
-
FakePopulatorWithMultipleFiles.directory.should == 'db/populate/files'
|
59
|
-
end
|
60
|
-
|
61
|
-
it 'calls read for each file passed to populate' do
|
62
|
-
FakePopulatorWithMultipleFiles.files.each { |f| FakePopulatorWithMultipleFiles.should_receive(:read).with(f).and_return('') }
|
63
|
-
FakePopulatorWithMultipleFiles.run
|
64
|
-
end
|
65
|
-
|
66
|
-
context 'given a directory and no files' do
|
67
|
-
it 'sets files to all the files in directory' do
|
68
|
-
FakePopulatorWithOnlyDirectory.files.sort.should == ['bar', 'foo'].sort
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
describe FakePopulator, '.run' do
|
74
|
-
module TestPopulator
|
75
|
-
extend Smilodon::Populator
|
76
|
-
populates 'abc'
|
77
|
-
end
|
78
|
-
|
79
|
-
context 'header is true' do
|
80
|
-
let!(:csv) { ["id,name", "1,atsuya"].join("\n") }
|
81
|
-
|
82
|
-
before do
|
83
|
-
TestPopulator.header = true
|
84
|
-
TestPopulator.stub(:read).and_return(csv)
|
85
|
-
TestPopulator.should_receive(:process).once
|
86
|
-
TestPopulator.run
|
87
|
-
end
|
88
|
-
|
89
|
-
it 'should process csv file' do
|
90
|
-
TestPopulator.header.should == ["id", "name"]
|
91
|
-
end
|
92
|
-
|
93
|
-
it 'calls process for each non-header row' do
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
context 'header is false' do
|
98
|
-
let!(:csv) { ["id,name", "1,atsuya"].join("\n") }
|
99
|
-
|
100
|
-
before do
|
101
|
-
TestPopulator.header = false
|
102
|
-
TestPopulator.stub(:read).and_return(csv)
|
103
|
-
TestPopulator.should_receive(:process).twice
|
104
|
-
TestPopulator.run
|
105
|
-
end
|
106
|
-
|
107
|
-
it 'should process csv file' do
|
108
|
-
TestPopulator.header.should == false
|
109
|
-
end
|
110
|
-
|
111
|
-
it 'calls process for each row' do
|
112
|
-
end
|
113
|
-
end
|
114
|
-
end
|
metadata
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smilodon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 27
|
5
4
|
prerelease:
|
6
|
-
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 2
|
10
|
-
version: 0.0.2
|
5
|
+
version: 0.2.2
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
8
|
- Umang Chouhan
|
@@ -15,100 +10,75 @@ autorequire:
|
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
12
|
|
18
|
-
date:
|
13
|
+
date: 2011-07-11 00:00:00 -07:00
|
14
|
+
default_executable:
|
19
15
|
dependencies:
|
20
16
|
- !ruby/object:Gem::Dependency
|
21
|
-
|
22
|
-
|
17
|
+
name: logging
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
23
19
|
none: false
|
24
20
|
requirements:
|
25
21
|
- - ">="
|
26
22
|
- !ruby/object:Gem::Version
|
27
|
-
hash: 3
|
28
|
-
segments:
|
29
|
-
- 0
|
30
23
|
version: "0"
|
31
|
-
requirement: *id001
|
32
|
-
name: logging
|
33
24
|
type: :runtime
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
25
|
prerelease: false
|
36
|
-
version_requirements:
|
26
|
+
version_requirements: *id001
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: jeweler
|
29
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
37
30
|
none: false
|
38
31
|
requirements:
|
39
32
|
- - ~>
|
40
33
|
- !ruby/object:Gem::Version
|
41
|
-
hash: 15
|
42
|
-
segments:
|
43
|
-
- 1
|
44
|
-
- 6
|
45
|
-
- 0
|
46
34
|
version: 1.6.0
|
47
|
-
requirement: *id002
|
48
|
-
name: jeweler
|
49
35
|
type: :development
|
50
|
-
- !ruby/object:Gem::Dependency
|
51
36
|
prerelease: false
|
52
|
-
version_requirements:
|
37
|
+
version_requirements: *id002
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: bundler
|
40
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
53
41
|
none: false
|
54
42
|
requirements:
|
55
43
|
- - ~>
|
56
44
|
- !ruby/object:Gem::Version
|
57
|
-
hash: 23
|
58
|
-
segments:
|
59
|
-
- 1
|
60
|
-
- 0
|
61
|
-
- 0
|
62
45
|
version: 1.0.0
|
63
|
-
requirement: *id003
|
64
|
-
name: bundler
|
65
46
|
type: :development
|
66
|
-
- !ruby/object:Gem::Dependency
|
67
47
|
prerelease: false
|
68
|
-
version_requirements:
|
48
|
+
version_requirements: *id003
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: rspec
|
51
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
69
52
|
none: false
|
70
53
|
requirements:
|
71
54
|
- - ~>
|
72
55
|
- !ruby/object:Gem::Version
|
73
|
-
hash: 3
|
74
|
-
segments:
|
75
|
-
- 2
|
76
|
-
- 3
|
77
|
-
- 0
|
78
56
|
version: 2.3.0
|
79
|
-
requirement: *id004
|
80
|
-
name: rspec
|
81
57
|
type: :development
|
82
|
-
- !ruby/object:Gem::Dependency
|
83
58
|
prerelease: false
|
84
|
-
version_requirements:
|
59
|
+
version_requirements: *id004
|
60
|
+
- !ruby/object:Gem::Dependency
|
61
|
+
name: rcov
|
62
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
85
63
|
none: false
|
86
64
|
requirements:
|
87
65
|
- - ">="
|
88
66
|
- !ruby/object:Gem::Version
|
89
|
-
hash: 3
|
90
|
-
segments:
|
91
|
-
- 0
|
92
67
|
version: "0"
|
93
|
-
requirement: *id005
|
94
|
-
name: rcov
|
95
68
|
type: :development
|
96
|
-
- !ruby/object:Gem::Dependency
|
97
69
|
prerelease: false
|
98
|
-
version_requirements:
|
70
|
+
version_requirements: *id005
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: yard
|
73
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
99
74
|
none: false
|
100
75
|
requirements:
|
101
76
|
- - ~>
|
102
77
|
- !ruby/object:Gem::Version
|
103
|
-
hash: 7
|
104
|
-
segments:
|
105
|
-
- 0
|
106
|
-
- 6
|
107
|
-
- 0
|
108
78
|
version: 0.6.0
|
109
|
-
requirement: *id006
|
110
|
-
name: yard
|
111
79
|
type: :development
|
80
|
+
prerelease: false
|
81
|
+
version_requirements: *id006
|
112
82
|
description: Smilodon is a utility to parse data files.
|
113
83
|
email: uchouhan@optimiscorp.com
|
114
84
|
executables: []
|
@@ -130,15 +100,16 @@ files:
|
|
130
100
|
- lib/smilodon.rb
|
131
101
|
- lib/smilodon/errors.rb
|
132
102
|
- lib/smilodon/fakes.rb
|
103
|
+
- lib/smilodon/logger.rb
|
133
104
|
- lib/smilodon/tasks.rb
|
134
105
|
- lib/tasks/populate.rake
|
135
106
|
- lib/tasks/populate.yml
|
107
|
+
- populator.gemspec
|
136
108
|
- smilodon.gemspec
|
137
109
|
- spec/lib/smilodon_spec.rb
|
138
110
|
- spec/lib/tasks/populate_spec.rb
|
139
111
|
- spec/spec_helper.rb
|
140
|
-
|
141
|
-
- spec/test_files/foo.csv
|
112
|
+
has_rdoc: true
|
142
113
|
homepage: http://github.com/optimis/smilodon
|
143
114
|
licenses:
|
144
115
|
- MIT
|
@@ -152,7 +123,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
152
123
|
requirements:
|
153
124
|
- - ">="
|
154
125
|
- !ruby/object:Gem::Version
|
155
|
-
hash:
|
126
|
+
hash: 571169230994044764
|
156
127
|
segments:
|
157
128
|
- 0
|
158
129
|
version: "0"
|
@@ -161,14 +132,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
132
|
requirements:
|
162
133
|
- - ">="
|
163
134
|
- !ruby/object:Gem::Version
|
164
|
-
hash: 3
|
165
|
-
segments:
|
166
|
-
- 0
|
167
135
|
version: "0"
|
168
136
|
requirements: []
|
169
137
|
|
170
138
|
rubyforge_project:
|
171
|
-
rubygems_version: 1.
|
139
|
+
rubygems_version: 1.5.3
|
172
140
|
signing_key:
|
173
141
|
specification_version: 3
|
174
142
|
summary: Smilodon is a utility to parse data files.
|
data/spec/test_files/bar.csv
DELETED
File without changes
|
data/spec/test_files/foo.csv
DELETED
File without changes
|