smilodon 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,7 +1,5 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
- gem 'logging'
4
-
5
3
  group :development do
6
4
  gem 'rake'
7
5
  gem 'rspec'
data/Gemfile.lock CHANGED
@@ -2,9 +2,6 @@ GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
4
  diff-lcs (1.1.3)
5
- little-plugger (1.1.3)
6
- logging (1.7.2)
7
- little-plugger (>= 1.1.3)
8
5
  rake (0.9.2.2)
9
6
  rspec (2.10.0)
10
7
  rspec-core (~> 2.10.0)
@@ -19,6 +16,5 @@ PLATFORMS
19
16
  ruby
20
17
 
21
18
  DEPENDENCIES
22
- logging
23
19
  rake
24
20
  rspec
@@ -1,3 +1,3 @@
1
1
  module Smilodon
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  end
data/lib/smilodon.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  require 'bundler/setup'
2
2
 
3
3
  require 'smilodon/errors'
4
- require 'smilodon/logger'
5
4
  require 'smilodon/railtie' if defined?(Rails)
6
5
 
7
6
  # Smilodon includes helper methods to ease parsing data files.
@@ -44,9 +43,6 @@ module Smilodon
44
43
  # @option options [Boolean] :header Set true if the file has a header.
45
44
  # @option options [String] :before The method to call before the run.
46
45
  def populates(*args)
47
- # Setup the logger to log populator warnings and messages.
48
- self.logger = PopulateLogger.setup
49
-
50
46
  options = args.last.is_a?(Hash) ? args.pop : {}
51
47
 
52
48
  self.directory = if defined?(Rails)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smilodon
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 2
10
- version: 0.3.2
9
+ - 3
10
+ version: 0.3.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Umang Chouhan
@@ -43,7 +43,6 @@ files:
43
43
  - lib/smilodon.rb
44
44
  - lib/smilodon/errors.rb
45
45
  - lib/smilodon/fakes.rb
46
- - lib/smilodon/logger.rb
47
46
  - lib/smilodon/railtie.rb
48
47
  - lib/smilodon/tasks.rb
49
48
  - lib/smilodon/version.rb
@@ -1,44 +0,0 @@
1
- # The populate logger class.
2
- class PopulateLogger
3
-
4
- # Configures the logger.
5
- #
6
- # @return [Logger] The logger instance after configuration.
7
- def self.setup
8
- configure
9
- logger
10
- end
11
-
12
- private
13
-
14
- # Configures the level.
15
- #
16
- # @param [Symbol] The log level. (defaults to :info)
17
- def self.level=(level)
18
- @level = level
19
- end
20
-
21
- # Returns the level.
22
- #
23
- # @param [String] The configured level. (defaults to :info)
24
- def self.level
25
- @level or :info
26
- end
27
-
28
- # Returns the configured logger.
29
- #
30
- # @return [Logger, #info, #debug, #warn] The logger instance.
31
- def self.logger
32
- logger = Logging.logger['example_logger']
33
- logger.add_appenders Logging.appenders.stdout, Logging.appenders.file(@path)
34
- logger.level = level
35
- logger
36
- end
37
-
38
- # Configures the path of the log file.
39
- #
40
- # @return [String] The path of the log file.
41
- def self.configure
42
- @path = defined?(Rails) ? "#{Rails.root}/log/populator.log" : 'populator.log'
43
- end
44
- end