savage 1.0.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.3
1
+ 1.1.0
@@ -1,18 +1,19 @@
1
1
  module Savage
2
2
  module DirectionProxy
3
- def self.included(klass)
4
- klass.extend ClassMethods
3
+ def self.included(klass)
4
+ klass.extend ClassMethods
5
5
  end
6
-
6
+
7
7
  module ClassMethods
8
8
  def define_proxies(&block)
9
- Directions.constants.each do |constant|
9
+ Directions.constants.each do |constant_sym|
10
+ constant = (constant_sym.is_a?(Symbol)) ? constant_sym.to_s : constant_sym
10
11
  unless %w[PointTarget CoordinateTarget Point MoveTo].include? constant
11
- sym = constant.gsub(/[A-Z]/) { |p| '_' + p.downcase }[1..-1].to_sym
12
+ sym = constant.to_s.gsub(/[A-Z]/) { |p| '_' + p.downcase }[1..-1].to_sym
12
13
  block.call(sym,constant)
13
14
  end
14
15
  end
15
16
  end
16
17
  end
17
18
  end
18
- end
19
+ end
data/lib/savage.rb CHANGED
@@ -1,4 +1,8 @@
1
- require 'activesupport'
1
+ begin
2
+ require 'active_support/core_ext/string/inflections'
3
+ rescue LoadError, NameError
4
+ require 'activesupport'
5
+ end
2
6
  SAVAGE_PATH = File.dirname(__FILE__) + "/savage/"
3
7
  [
4
8
  'utils',
data/savage.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{savage}
8
- s.version = "1.0.3"
8
+ s.version = "1.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jeremy Holland"]
12
- s.date = %q{2010-09-04}
12
+ s.date = %q{2010-10-07}
13
13
  s.description = %q{A little gem for extracting and manipulating SVG vector path data.}
14
14
  s.email = %q{jeremy@jeremypholland.com}
15
15
  s.extra_rdoc_files = [
@@ -67,24 +67,24 @@ Gem::Specification.new do |s|
67
67
  s.rubygems_version = %q{1.3.7}
68
68
  s.summary = %q{A little library to manipulate SVG path data}
69
69
  s.test_files = [
70
- "spec/savage_spec.rb",
71
- "spec/savage/directions/point_spec.rb",
70
+ "spec/savage/directions/arc_to_spec.rb",
71
+ "spec/savage/directions/close_path_spec.rb",
72
+ "spec/savage/directions/cubic_curve_to_spec.rb",
73
+ "spec/savage/directions/horizontal_to_spec.rb",
72
74
  "spec/savage/directions/line_to_spec.rb",
73
75
  "spec/savage/directions/move_to_spec.rb",
76
+ "spec/savage/directions/point_spec.rb",
74
77
  "spec/savage/directions/quadratic_curve_spec.rb",
75
- "spec/savage/directions/cubic_curve_to_spec.rb",
76
- "spec/savage/directions/arc_to_spec.rb",
77
78
  "spec/savage/directions/vertical_to_spec.rb",
78
- "spec/savage/directions/close_path_spec.rb",
79
- "spec/savage/directions/horizontal_to_spec.rb",
80
- "spec/savage/sub_path_spec.rb",
81
79
  "spec/savage/parser_spec.rb",
82
80
  "spec/savage/path_spec.rb",
83
- "spec/spec_helper.rb",
84
- "spec/shared/point_target.rb",
85
- "spec/shared/coordinate_target.rb",
81
+ "spec/savage/sub_path_spec.rb",
82
+ "spec/savage_spec.rb",
86
83
  "spec/shared/command.rb",
87
- "spec/shared/direction.rb"
84
+ "spec/shared/coordinate_target.rb",
85
+ "spec/shared/direction.rb",
86
+ "spec/shared/point_target.rb",
87
+ "spec/spec_helper.rb"
88
88
  ]
89
89
 
90
90
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: savage
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
5
4
  prerelease: false
6
5
  segments:
7
6
  - 1
7
+ - 1
8
8
  - 0
9
- - 3
10
- version: 1.0.3
9
+ version: 1.1.0
11
10
  platform: ruby
12
11
  authors:
13
12
  - Jeremy Holland
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-09-04 00:00:00 -05:00
17
+ date: 2010-10-07 00:00:00 -05:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
@@ -26,7 +25,6 @@ dependencies:
26
25
  requirements:
27
26
  - - ">="
28
27
  - !ruby/object:Gem::Version
29
- hash: 13
30
28
  segments:
31
29
  - 1
32
30
  - 2
@@ -42,7 +40,6 @@ dependencies:
42
40
  requirements:
43
41
  - - ">="
44
42
  - !ruby/object:Gem::Version
45
- hash: 9
46
43
  segments:
47
44
  - 2
48
45
  - 3
@@ -117,7 +114,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
117
114
  requirements:
118
115
  - - ">="
119
116
  - !ruby/object:Gem::Version
120
- hash: 3
121
117
  segments:
122
118
  - 0
123
119
  version: "0"
@@ -126,7 +122,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
122
  requirements:
127
123
  - - ">="
128
124
  - !ruby/object:Gem::Version
129
- hash: 3
130
125
  segments:
131
126
  - 0
132
127
  version: "0"
@@ -138,21 +133,21 @@ signing_key:
138
133
  specification_version: 3
139
134
  summary: A little library to manipulate SVG path data
140
135
  test_files:
141
- - spec/savage_spec.rb
142
- - spec/savage/directions/point_spec.rb
136
+ - spec/savage/directions/arc_to_spec.rb
137
+ - spec/savage/directions/close_path_spec.rb
138
+ - spec/savage/directions/cubic_curve_to_spec.rb
139
+ - spec/savage/directions/horizontal_to_spec.rb
143
140
  - spec/savage/directions/line_to_spec.rb
144
141
  - spec/savage/directions/move_to_spec.rb
142
+ - spec/savage/directions/point_spec.rb
145
143
  - spec/savage/directions/quadratic_curve_spec.rb
146
- - spec/savage/directions/cubic_curve_to_spec.rb
147
- - spec/savage/directions/arc_to_spec.rb
148
144
  - spec/savage/directions/vertical_to_spec.rb
149
- - spec/savage/directions/close_path_spec.rb
150
- - spec/savage/directions/horizontal_to_spec.rb
151
- - spec/savage/sub_path_spec.rb
152
145
  - spec/savage/parser_spec.rb
153
146
  - spec/savage/path_spec.rb
154
- - spec/spec_helper.rb
155
- - spec/shared/point_target.rb
156
- - spec/shared/coordinate_target.rb
147
+ - spec/savage/sub_path_spec.rb
148
+ - spec/savage_spec.rb
157
149
  - spec/shared/command.rb
150
+ - spec/shared/coordinate_target.rb
158
151
  - spec/shared/direction.rb
152
+ - spec/shared/point_target.rb
153
+ - spec/spec_helper.rb