whiny-mass-assignment 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/whiny-mass-assignment/color_escapes.rb +22 -19
- data/whiny-mass-assignment.gemspec +3 -3
- metadata +3 -3
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.
|
5
|
+
Echoe.new( 'whiny-mass-assignment', '0.1.4', ) 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"
|
@@ -1,22 +1,25 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
1
|
+
module WhinyMassAssignment
|
2
|
+
|
3
|
+
COLOR_ESCAPES = {
|
4
|
+
:none => 0,
|
5
|
+
:bright => 1,
|
6
|
+
:black => 30,
|
7
|
+
:red => 31,
|
8
|
+
:green => 32,
|
9
|
+
:yellow => 33,
|
10
|
+
:blue => 34,
|
11
|
+
:magenta => 35,
|
12
|
+
:cyan => 36,
|
13
|
+
:white => 37,
|
14
|
+
:default => 39,
|
15
|
+
}
|
14
16
|
|
15
17
|
|
16
|
-
def c( clr, text = nil )
|
17
|
-
|
18
|
-
end
|
18
|
+
def c( clr, text = nil )
|
19
|
+
"\x1B[" + ( COLOR_ESCAPES[ clr ] || 0 ).to_s + 'm' + ( text ? text + "\x1B[0m" : "" )
|
20
|
+
end
|
19
21
|
|
20
|
-
def bc( clr, text = nil )
|
21
|
-
|
22
|
-
end
|
22
|
+
def bc( clr, text = nil )
|
23
|
+
"\x1B[" + ( ( COLOR_ESCAPES[ clr ] || 0 ) + 10 ).to_s + 'm' + ( text ? text + "\x1B[0m" : "" )
|
24
|
+
end
|
25
|
+
end
|
@@ -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.
|
5
|
+
s.version = "0.1.4"
|
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-
|
9
|
+
s.date = %q{2011-02-28}
|
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"]
|
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Whiny-mass-assignment", "--main", "README.md"]
|
16
16
|
s.require_paths = ["lib"]
|
17
17
|
s.rubyforge_project = %q{whiny-mass-assignment}
|
18
|
-
s.rubygems_version = %q{1.5.
|
18
|
+
s.rubygems_version = %q{1.5.3}
|
19
19
|
s.summary = %q{Complain loudly when protected attributes are set through mass assignment.}
|
20
20
|
|
21
21
|
if s.respond_to? :specification_version then
|
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
|
+
version: 0.1.4
|
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-
|
12
|
+
date: 2011-02-28 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.
|
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
70
|
version: '1.2'
|
71
71
|
requirements: []
|
72
72
|
rubyforge_project: whiny-mass-assignment
|
73
|
-
rubygems_version: 1.5.
|
73
|
+
rubygems_version: 1.5.3
|
74
74
|
signing_key:
|
75
75
|
specification_version: 3
|
76
76
|
summary: Complain loudly when protected attributes are set through mass assignment.
|