whiny-mass-assignment 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest CHANGED
@@ -14,4 +14,3 @@ spec/config_spec.rb
14
14
  spec/sanitizer_spec.rb
15
15
  spec/spec_helper.rb
16
16
  tasks/spec.rake
17
- whiny-mass-assignment.gemspec
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new( 'whiny-mass-assignment', '0.1.4', ) do |p|
5
+ Echoe.new( 'whiny-mass-assignment', '0.1.5', ) do |p|
6
6
  p.description = "Complain loudly when protected attributes are set through mass assignment."
7
7
  p.url = "https://github.com/appsinyourpants/whiny-mass-assignment"
8
8
  p.author = "Paul Alexander"
@@ -15,11 +15,11 @@ module WhinyMassAssignment
15
15
  }
16
16
 
17
17
 
18
- def c( clr, text = nil )
18
+ def self.c( clr, text = nil )
19
19
  "\x1B[" + ( COLOR_ESCAPES[ clr ] || 0 ).to_s + 'm' + ( text ? text + "\x1B[0m" : "" )
20
20
  end
21
21
 
22
- def bc( clr, text = nil )
22
+ def self.bc( clr, text = nil )
23
23
  "\x1B[" + ( ( COLOR_ESCAPES[ clr ] || 0 ) + 10 ).to_s + 'm' + ( text ? text + "\x1B[0m" : "" )
24
24
  end
25
25
  end
@@ -8,7 +8,7 @@ module WhinyMassAssignment
8
8
  end
9
9
 
10
10
  def warn!(attrs)
11
- self.logger.debug "#{bc :yellow}Can't mass-assign protected attributes: #{attrs.join(', ')}#{bc :default}" if self.logger
11
+ self.logger.debug "#{WhinyMassAssignment::bc :yellow}Can't mass-assign protected attributes: #{attrs.join(', ')}#{WhinyMassAssignment::bc :default}" if self.logger
12
12
  whine!(attrs) if WhinyMassAssignment::Config.mode == :raise
13
13
  end
14
14
 
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{whiny-mass-assignment}
5
- s.version = "0.1.4"
5
+ s.version = "0.1.5"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Paul Alexander"]
9
- s.date = %q{2011-02-28}
9
+ s.date = %q{2011-03-01}
10
10
  s.description = %q{Complain loudly when protected attributes are set through mass assignment.}
11
11
  s.email = %q{paul@appsinyourpants.com}
12
12
  s.extra_rdoc_files = ["LICENSE", "README.md", "lib/whiny-mass-assignment.rb", "lib/whiny-mass-assignment/color_escapes.rb", "lib/whiny-mass-assignment/configuration.rb", "lib/whiny-mass-assignment/sanitizer.rb", "lib/whiny_mass_assignment.rb", "tasks/spec.rake"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whiny-mass-assignment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-02-28 00:00:00.000000000 -08:00
12
+ date: 2011-03-01 00:00:00.000000000 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
  description: Complain loudly when protected attributes are set through mass assignment.