kang 0.1.0alpha → 0.1.0alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +1 -1
- data/bin/kang +1 -1
- data/lib/kang/cli.rb +15 -1
- data/lib/kang/controller.rb +14 -0
- data/lib/kang/data.rb +14 -0
- data/lib/kang/offset_data.rb +14 -0
- data/lib/kang/version.rb +15 -1
- data/lib/kang/view.rb +26 -6
- data/lib/kang.rb +1 -1
- metadata +3 -4
data/COPYING
CHANGED
data/bin/kang
CHANGED
data/lib/kang/cli.rb
CHANGED
@@ -1,7 +1,21 @@
|
|
1
|
+
#
|
2
|
+
# cli.rb - Main executable for GUI interface
|
3
|
+
#
|
4
|
+
# ====================================================================
|
5
|
+
# Copyright (c) 2012 Tony Doan <tdoan@tdoan.com>. All rights reserved.
|
6
|
+
#
|
7
|
+
# This software is licensed as described in the file COPYING, which
|
8
|
+
# you should have received as part of this distribution. The terms
|
9
|
+
# are also available at http://github.com/tdoan/kang/tree/master/COPYING.
|
10
|
+
# If newer versions of this license are posted there, you may use a
|
11
|
+
# newer version instead, at your option.
|
12
|
+
# ====================================================================
|
13
|
+
#
|
14
|
+
|
1
15
|
module Kang
|
2
16
|
class CLI
|
3
17
|
def self.execute(stdout, arguments=[])
|
4
18
|
Kang::Controller.new
|
5
19
|
end
|
6
20
|
end
|
7
|
-
end
|
21
|
+
end
|
data/lib/kang/controller.rb
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
#
|
2
|
+
# controller.rb - Main executable for GUI interface
|
3
|
+
#
|
4
|
+
# ====================================================================
|
5
|
+
# Copyright (c) 2012 Tony Doan <tdoan@tdoan.com>. All rights reserved.
|
6
|
+
#
|
7
|
+
# This software is licensed as described in the file COPYING, which
|
8
|
+
# you should have received as part of this distribution. The terms
|
9
|
+
# are also available at http://github.com/tdoan/kang/tree/master/COPYING.
|
10
|
+
# If newer versions of this license are posted there, you may use a
|
11
|
+
# newer version instead, at your option.
|
12
|
+
# ====================================================================
|
13
|
+
#
|
14
|
+
|
1
15
|
module Kang
|
2
16
|
class Controller
|
3
17
|
def initialize
|
data/lib/kang/data.rb
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
#
|
2
|
+
# data.rb - Main executable for GUI interface
|
3
|
+
#
|
4
|
+
# ====================================================================
|
5
|
+
# Copyright (c) 2012 Tony Doan <tdoan@tdoan.com>. All rights reserved.
|
6
|
+
#
|
7
|
+
# This software is licensed as described in the file COPYING, which
|
8
|
+
# you should have received as part of this distribution. The terms
|
9
|
+
# are also available at http://github.com/tdoan/kang/tree/master/COPYING.
|
10
|
+
# If newer versions of this license are posted there, you may use a
|
11
|
+
# newer version instead, at your option.
|
12
|
+
# ====================================================================
|
13
|
+
#
|
14
|
+
|
1
15
|
require 'kang/offset_data'
|
2
16
|
|
3
17
|
module Kang
|
data/lib/kang/offset_data.rb
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
#
|
2
|
+
# offset_data.rb - Main executable for GUI interface
|
3
|
+
#
|
4
|
+
# ====================================================================
|
5
|
+
# Copyright (c) 2012 Tony Doan <tdoan@tdoan.com>. All rights reserved.
|
6
|
+
#
|
7
|
+
# This software is licensed as described in the file COPYING, which
|
8
|
+
# you should have received as part of this distribution. The terms
|
9
|
+
# are also available at http://github.com/tdoan/kang/tree/master/COPYING.
|
10
|
+
# If newer versions of this license are posted there, you may use a
|
11
|
+
# newer version instead, at your option.
|
12
|
+
# ====================================================================
|
13
|
+
#
|
14
|
+
|
1
15
|
module Kang
|
2
16
|
class OffSetMatchData
|
3
17
|
def initialize(offset,match_data)
|
data/lib/kang/version.rb
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
#
|
2
|
+
# version.rb - Main executable for GUI interface
|
3
|
+
#
|
4
|
+
# ====================================================================
|
5
|
+
# Copyright (c) 2012 Tony Doan <tdoan@tdoan.com>. All rights reserved.
|
6
|
+
#
|
7
|
+
# This software is licensed as described in the file COPYING, which
|
8
|
+
# you should have received as part of this distribution. The terms
|
9
|
+
# are also available at http://github.com/tdoan/kang/tree/master/COPYING.
|
10
|
+
# If newer versions of this license are posted there, you may use a
|
11
|
+
# newer version instead, at your option.
|
12
|
+
# ====================================================================
|
13
|
+
#
|
14
|
+
|
1
15
|
module Kang
|
2
|
-
VERSION = "0.1.0alpha"
|
16
|
+
VERSION = "0.1.0alpha.2"
|
3
17
|
end
|
data/lib/kang/view.rb
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
#
|
2
|
+
# view.rb - Main executable for GUI interface
|
3
|
+
#
|
4
|
+
# ====================================================================
|
5
|
+
# Copyright (c) 2012 Tony Doan <tdoan@tdoan.com>. All rights reserved.
|
6
|
+
#
|
7
|
+
# This software is licensed as described in the file COPYING, which
|
8
|
+
# you should have received as part of this distribution. The terms
|
9
|
+
# are also available at http://github.com/tdoan/kang/tree/master/COPYING.
|
10
|
+
# If newer versions of this license are posted there, you may use a
|
11
|
+
# newer version instead, at your option.
|
12
|
+
# ====================================================================
|
13
|
+
#
|
14
|
+
|
1
15
|
module Kang
|
2
16
|
class View
|
3
17
|
def initialize(controller,data)
|
@@ -32,7 +46,9 @@ module Kang
|
|
32
46
|
@matchview.buffer.create_tag("colors",{ "foreground" => "green", "background" => "gray" })
|
33
47
|
|
34
48
|
wintop.add(@regview)
|
49
|
+
wintop.set_size_request(400,100)
|
35
50
|
winbottom.add(@matchview)
|
51
|
+
winbottom.set_size_request(400,200)
|
36
52
|
|
37
53
|
@list_store = Gtk::ListStore.new(String, String)
|
38
54
|
treeview = Gtk::TreeView.new(@list_store)
|
@@ -88,11 +104,13 @@ module Kang
|
|
88
104
|
private
|
89
105
|
def update_tag
|
90
106
|
remove_tag
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
107
|
+
if @data.regex_valid?
|
108
|
+
tag_begin = @data.match_begin
|
109
|
+
tag_end = @data.match_end
|
110
|
+
b = @matchview.buffer.get_iter_at_offset(tag_begin)
|
111
|
+
e = @matchview.buffer.get_iter_at_offset(tag_end)
|
112
|
+
@matchview.buffer.apply_tag("colors",b,e)
|
113
|
+
end
|
96
114
|
end
|
97
115
|
|
98
116
|
def update_status
|
@@ -116,7 +134,9 @@ module Kang
|
|
116
134
|
|
117
135
|
def update_match_groups
|
118
136
|
@list_store.clear
|
119
|
-
@data.
|
137
|
+
if @data.regex_valid?
|
138
|
+
@data.matches.each{|m| iter = @list_store.append; iter[0]=m[0];iter[1]=m[1]}
|
139
|
+
end
|
120
140
|
end
|
121
141
|
|
122
142
|
def remove_tag
|
data/lib/kang.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
# kang.rb - Main executable for GUI interface
|
5
5
|
#
|
6
6
|
# ====================================================================
|
7
|
-
# Copyright (c)
|
7
|
+
# Copyright (c) 2012 Tony Doan <tdoan@tdoan.com>. All rights reserved.
|
8
8
|
#
|
9
9
|
# This software is licensed as described in the file COPYING, which
|
10
10
|
# you should have received as part of this distribution. The terms
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kang
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0alpha
|
4
|
+
version: 0.1.0alpha.2
|
5
5
|
prerelease: 5
|
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:
|
12
|
+
date: 2013-03-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gtk2
|
@@ -66,9 +66,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
66
|
version: 1.3.1
|
67
67
|
requirements: []
|
68
68
|
rubyforge_project:
|
69
|
-
rubygems_version: 1.8.
|
69
|
+
rubygems_version: 1.8.25
|
70
70
|
signing_key:
|
71
71
|
specification_version: 3
|
72
72
|
summary: A visual regex debugger
|
73
73
|
test_files: []
|
74
|
-
has_rdoc: false
|