jugynox 0.0.1 → 0.0.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 +1 -1
- data/Gemfile.lock +1 -1
- data/VERSION +1 -0
- data/jugynox.gemspec +70 -0
- data/lib/jugynox.rb +4 -0
- data/spec/jugynox_spec.rb +8 -2
- metadata +5 -3
data/Gemfile
CHANGED
@@ -6,7 +6,7 @@ source "http://rubygems.org"
|
|
6
6
|
# Add dependencies to develop your gem here.
|
7
7
|
# Include everything needed to run rake, tests, features, etc.
|
8
8
|
group :development do
|
9
|
-
gem "rspec", ">= 2.
|
9
|
+
gem "rspec", ">= 2.5.0"
|
10
10
|
gem "bundler", ">= 1.0.0"
|
11
11
|
gem "jeweler", ">= 1.5.2"
|
12
12
|
gem "rcov", ">= 0"
|
data/Gemfile.lock
CHANGED
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.2
|
data/jugynox.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{jugynox}
|
8
|
+
s.version = "0.0.2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Guillermo Iguaran", "Carlos Leon"]
|
12
|
+
s.date = %q{2011-02-07}
|
13
|
+
s.default_executable = %q{jugynox}
|
14
|
+
s.description = %q{jugynox is a tool/library to assist you with large-scale codebase refactors that can be partially automated but still require human oversight and occassional intervention}
|
15
|
+
s.email = %q{guilleiguaran@gmail.com, mail@carlosleon.info}
|
16
|
+
s.executables = ["jugynox"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE",
|
19
|
+
"README.md"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".document",
|
23
|
+
".rspec",
|
24
|
+
"Gemfile",
|
25
|
+
"Gemfile.lock",
|
26
|
+
"LICENSE",
|
27
|
+
"README.md",
|
28
|
+
"Rakefile",
|
29
|
+
"VERSION",
|
30
|
+
"bin/jugynox",
|
31
|
+
"jugynox.gemspec",
|
32
|
+
"lib/jugynox.rb",
|
33
|
+
"spec/jugynox_spec.rb",
|
34
|
+
"spec/spec_helper.rb"
|
35
|
+
]
|
36
|
+
s.homepage = %q{http://github.com/guilleiguaran/jugynox}
|
37
|
+
s.licenses = ["MIT"]
|
38
|
+
s.require_paths = ["lib"]
|
39
|
+
s.rubygems_version = %q{1.5.0}
|
40
|
+
s.summary = %q{jugynox is a tool/library to assist you with large-scale codebase refactors}
|
41
|
+
s.test_files = [
|
42
|
+
"spec/jugynox_spec.rb",
|
43
|
+
"spec/spec_helper.rb"
|
44
|
+
]
|
45
|
+
|
46
|
+
if s.respond_to? :specification_version then
|
47
|
+
s.specification_version = 3
|
48
|
+
|
49
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
50
|
+
s.add_development_dependency(%q<rspec>, [">= 2.5.0"])
|
51
|
+
s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
|
52
|
+
s.add_development_dependency(%q<jeweler>, [">= 1.5.2"])
|
53
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
54
|
+
s.add_development_dependency(%q<rspec>, [">= 2.5.0"])
|
55
|
+
else
|
56
|
+
s.add_dependency(%q<rspec>, [">= 2.5.0"])
|
57
|
+
s.add_dependency(%q<bundler>, [">= 1.0.0"])
|
58
|
+
s.add_dependency(%q<jeweler>, [">= 1.5.2"])
|
59
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
60
|
+
s.add_dependency(%q<rspec>, [">= 2.5.0"])
|
61
|
+
end
|
62
|
+
else
|
63
|
+
s.add_dependency(%q<rspec>, [">= 2.5.0"])
|
64
|
+
s.add_dependency(%q<bundler>, [">= 1.0.0"])
|
65
|
+
s.add_dependency(%q<jeweler>, [">= 1.5.2"])
|
66
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
67
|
+
s.add_dependency(%q<rspec>, [">= 2.5.0"])
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
data/lib/jugynox.rb
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
class Jugynox
|
2
|
+
|
2
3
|
attr_accessor :match, :replacement
|
3
4
|
|
4
5
|
def initialize(match, replacement)
|
5
6
|
raise ArgumentError.new("Match cannot be blank") unless match
|
7
|
+
raise ArgumentError.new("Replacement cannot be blank") unless replacement
|
8
|
+
@match = match
|
9
|
+
@replacement = replacement
|
6
10
|
end
|
7
11
|
end
|
data/spec/jugynox_spec.rb
CHANGED
@@ -5,12 +5,18 @@ describe "Jugynox" do
|
|
5
5
|
lambda { @jugynox = Jugynox.new(nil, '<span style="color: \1;">\2</span>') }.should raise_error
|
6
6
|
end
|
7
7
|
|
8
|
-
it "should raise error if replacement isn't provided"
|
8
|
+
it "should raise error if replacement isn't provided" do
|
9
|
+
lambda{ @jugynox = Jugynox.new( '<font *color="?(.*?)"?>(.*?)</font>', nil ) }.should raise_error
|
10
|
+
end
|
9
11
|
|
10
12
|
it "should have a saved match string" do
|
11
13
|
@jugynox = Jugynox.new('<font *color="?(.*?)"?>(.*?)</font>', '<span style="color: \1;">\2</span>')
|
12
14
|
@jugynox.match.should == '<font *color="?(.*?)"?>(.*?)</font>'
|
13
15
|
end
|
14
16
|
|
15
|
-
it "should have a replacement string"
|
17
|
+
it "should have a replacement string" do
|
18
|
+
@jugynox = Jugynox.new( '<font *color="?(.*?)"?>(.*?)</font>', '<span style="color: \1;">\2</span>' )
|
19
|
+
@jugynox.replacement.should == '<span style="color: \1;">\2</span>'
|
20
|
+
end
|
21
|
+
|
16
22
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: jugynox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Guillermo Iguaran
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
requirements:
|
22
22
|
- - ">="
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version: 2.
|
24
|
+
version: 2.5.0
|
25
25
|
type: :development
|
26
26
|
prerelease: false
|
27
27
|
version_requirements: *id001
|
@@ -86,7 +86,9 @@ files:
|
|
86
86
|
- LICENSE
|
87
87
|
- README.md
|
88
88
|
- Rakefile
|
89
|
+
- VERSION
|
89
90
|
- bin/jugynox
|
91
|
+
- jugynox.gemspec
|
90
92
|
- lib/jugynox.rb
|
91
93
|
- spec/jugynox_spec.rb
|
92
94
|
- spec/spec_helper.rb
|
@@ -104,7 +106,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
104
106
|
requirements:
|
105
107
|
- - ">="
|
106
108
|
- !ruby/object:Gem::Version
|
107
|
-
hash:
|
109
|
+
hash: 2002480283496807367
|
108
110
|
segments:
|
109
111
|
- 0
|
110
112
|
version: "0"
|