kang 0.1.0alpha.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MjdhMTUzMzVlOTVkYTdlYTkyOWZmNmNhYzZiYThjOWM0ZGVjZDk0MQ==
5
- data.tar.gz: !binary |-
6
- Y2Y2Y2YyNTc4ODhhZmEwNmQzM2NiOWQzYWFlZDg1NWNiYzVmOWMxNA==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- MzgzYWU3NTBmYTFhMzU3Yjk5ODFjMWViMmU4NDQ5MWNhYTAxMGRiNDBlMDVm
10
- MzVlM2Q5NDE5ZTJiZWNmYzEzNDc2MjRkYTRhNTNiNDkxN2JjYTEzOTVkNjlk
11
- YWI4OGE2NzVkNDQ1OThmOWUwMDQ0OTMxZjAyMDFkOTQ3YmRhYjk=
12
- data.tar.gz: !binary |-
13
- ZjZkZTQ5OTI5Yjk4Njc4NDY1NTIzZTViNTA1MTAxNzZlY2JkMjU3MDY5N2Mw
14
- NmFhNTFmYWViNTBmNWFmZWQyYjE5YWNlMjRkMzliNTNhMzMxZTI5OTg4MTA5
15
- YjQ0ZWRjYmMwNDczMGZiNTQ4MWE5ZTFkNmRiNDEwMjJhODRkMmU=
2
+ SHA1:
3
+ metadata.gz: d1ec5c49ecda3da6aad3c9f014d3525a4f65154f
4
+ data.tar.gz: b3d90f738dac98e8d5aac98290b6515249b406ae
5
+ SHA512:
6
+ metadata.gz: 211bd240ed437fc45597beeb6c0cb8f3107850bfacada2953a2103ccd2eb5cb1aeb026dcdc79ab834f0c6a33d0177ec09fedf8de259f1b87f51d2fba64ee64b8
7
+ data.tar.gz: 4861191fa2cbef17e6a7e34dae3941c881f6aec978cfa878460b6e219a3192dcaf197b1758fc5d7174f7e09eee65b6917d9f597c389d326db0743b9393b8c911
data/COPYING CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012 Tony Doan <tdoan@tdoan.com>
1
+ Copyright (c) 2014 Tony Doan <tdoan@tdoan.com>
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
data/bin/kang CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  #
3
3
  # Created on 2009-1-7.
4
- # Copyright (c) 2013. All rights reserved.
4
+ # Copyright (c) 2014. All rights reserved.
5
5
 
6
6
  require File.expand_path(File.dirname(__FILE__) + "/../lib/kang")
7
7
  require 'kang/cli'
@@ -4,7 +4,7 @@
4
4
  # kang.rb - Main executable for GUI interface
5
5
  #
6
6
  # ====================================================================
7
- # Copyright (c) 2013 Tony Doan <tdoan@tdoan.com>. All rights reserved.
7
+ # Copyright (c) 2014 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
@@ -2,7 +2,7 @@
2
2
  # cli.rb - Main executable for GUI interface
3
3
  #
4
4
  # ====================================================================
5
- # Copyright (c) 2013 Tony Doan <tdoan@tdoan.com>. All rights reserved.
5
+ # Copyright (c) 2014 Tony Doan <tdoan@tdoan.com>. All rights reserved.
6
6
  #
7
7
  # This software is licensed as described in the file COPYING, which
8
8
  # you should have received as part of this distribution. The terms
@@ -1,3 +1,17 @@
1
+ #
2
+ # color.rb - Generate randon color sets that are distinguishable
3
+ #
4
+ # ====================================================================
5
+ # Copyright (c) 2014 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
  class Colors
2
16
  def initialize(initial_size=nil, options={})
3
17
  valid_options = [:saturation,:value,:starting_hue,:range]
@@ -48,9 +62,7 @@ class Colors
48
62
  def [](i)
49
63
  if @colors.size-1 < i
50
64
  diff = i - @colors.size + 1
51
- puts "growing #{diff}"
52
65
  (diff).times do
53
- puts "."
54
66
  self.next
55
67
  end
56
68
  end
@@ -2,7 +2,7 @@
2
2
  # controller.rb - Main executable for GUI interface
3
3
  #
4
4
  # ====================================================================
5
- # Copyright (c) 2013 Tony Doan <tdoan@tdoan.com>. All rights reserved.
5
+ # Copyright (c) 2014 Tony Doan <tdoan@tdoan.com>. All rights reserved.
6
6
  #
7
7
  # This software is licensed as described in the file COPYING, which
8
8
  # you should have received as part of this distribution. The terms
@@ -47,26 +47,5 @@ module Kang
47
47
  #@view.update_tag
48
48
  @view.repaint
49
49
  end
50
-
51
- private
52
- def key_up
53
- unless @data.regex_valid?
54
- @view.remove_tag
55
- @view.update_status("Invalid Regex")
56
- else
57
- count = @data.match_group_count ? @data.match_group_count : "no"
58
- message = "Matched with #{@data.match_group_count} grouping"
59
- message += "s" if @data.match_group_count and @data.match_group_count > 1
60
- @view.update_status(message)
61
- if @data.match?
62
- @view.update_tag(@data.match_begin,@data.match_end)
63
- else
64
- @view.remove_tag
65
- @view.update_status("no match")
66
- end
67
- end
68
- @view.update_match_groups(@data.matches)
69
- @view.update_spin_count
70
- end
71
50
  end
72
51
  end
@@ -2,7 +2,7 @@
2
2
  # data.rb - Main executable for GUI interface
3
3
  #
4
4
  # ====================================================================
5
- # Copyright (c) 2013 Tony Doan <tdoan@tdoan.com>. All rights reserved.
5
+ # Copyright (c) 2014 Tony Doan <tdoan@tdoan.com>. All rights reserved.
6
6
  #
7
7
  # This software is licensed as described in the file COPYING, which
8
8
  # you should have received as part of this distribution. The terms
@@ -2,7 +2,7 @@
2
2
  # offset_data.rb - Main executable for GUI interface
3
3
  #
4
4
  # ====================================================================
5
- # Copyright (c) 2013 Tony Doan <tdoan@tdoan.com>. All rights reserved.
5
+ # Copyright (c) 2014 Tony Doan <tdoan@tdoan.com>. All rights reserved.
6
6
  #
7
7
  # This software is licensed as described in the file COPYING, which
8
8
  # you should have received as part of this distribution. The terms
@@ -1,3 +1,17 @@
1
+ #
2
+ # tags.rb - GTK tags for colors library
3
+ #
4
+ # ====================================================================
5
+ # Copyright (c) 2014 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 Tags
3
17
  def initialize(view)
@@ -13,16 +27,13 @@ module Kang
13
27
  tag = @tags.fetch(tag_name)
14
28
  rescue KeyError
15
29
  c = @colors[i]
16
- puts c.inspect
17
30
  color = Gdk::Color.new(*c)
18
- puts color.to_s
19
31
  tag = Gtk::TextTag.new(tag_name)
20
32
  tag.foreground='black'
21
33
  tag.background_gdk=color
22
34
  @tags[tag_name] = tag
23
35
  @view.buffer.tag_table.add(tag)
24
36
  end
25
- #@view.buffer.create_tag("colors",{ "foreground" => "green", "background" => "gray" })
26
37
  tag
27
38
  end
28
39
  end
@@ -2,7 +2,7 @@
2
2
  # version.rb - Main executable for GUI interface
3
3
  #
4
4
  # ====================================================================
5
- # Copyright (c) 2013 Tony Doan <tdoan@tdoan.com>. All rights reserved.
5
+ # Copyright (c) 2014 Tony Doan <tdoan@tdoan.com>. All rights reserved.
6
6
  #
7
7
  # This software is licensed as described in the file COPYING, which
8
8
  # you should have received as part of this distribution. The terms
@@ -13,5 +13,5 @@
13
13
  #
14
14
 
15
15
  module Kang
16
- VERSION = "0.1.0alpha.3"
16
+ VERSION = "0.1.0"
17
17
  end
@@ -2,7 +2,7 @@
2
2
  # view.rb - Main executable for GUI interface
3
3
  #
4
4
  # ====================================================================
5
- # Copyright (c) 2013 Tony Doan <tdoan@tdoan.com>. All rights reserved.
5
+ # Copyright (c) 2014 Tony Doan <tdoan@tdoan.com>. All rights reserved.
6
6
  #
7
7
  # This software is licensed as described in the file COPYING, which
8
8
  # you should have received as part of this distribution. The terms
metadata CHANGED
@@ -1,97 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kang
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0alpha.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Doan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-26 00:00:00.000000000 Z
11
+ date: 2014-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: glib2
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.2.5
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.2.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: atk
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.2.5
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 1.2.5
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: gtk2
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: 1.2.5
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 1.2.5
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pango
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.2.5
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.2.5
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: cairo
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: 1.12.4
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.12.4
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: gdk_pixbuf2
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: 1.2.5
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: 1.2.5
97
97
  description: The Ruby Regex Debugger. Put your regex in the top pane, and your match
@@ -103,6 +103,8 @@ executables:
103
103
  extensions: []
104
104
  extra_rdoc_files: []
105
105
  files:
106
+ - COPYING
107
+ - bin/kang
106
108
  - lib/kang.rb
107
109
  - lib/kang/cli.rb
108
110
  - lib/kang/colors.rb
@@ -112,9 +114,6 @@ files:
112
114
  - lib/kang/tags.rb
113
115
  - lib/kang/version.rb
114
116
  - lib/kang/view.rb
115
- - COPYING
116
- - History.txt
117
- - bin/kang
118
117
  homepage: http://github.com/tdoan/kang
119
118
  licenses: []
120
119
  metadata: {}
@@ -124,18 +123,19 @@ require_paths:
124
123
  - lib
125
124
  required_ruby_version: !ruby/object:Gem::Requirement
126
125
  requirements:
127
- - - ! '>='
126
+ - - ">="
128
127
  - !ruby/object:Gem::Version
129
128
  version: '0'
130
129
  required_rubygems_version: !ruby/object:Gem::Requirement
131
130
  requirements:
132
- - - ! '>'
131
+ - - ">="
133
132
  - !ruby/object:Gem::Version
134
- version: 1.3.1
133
+ version: '0'
135
134
  requirements: []
136
135
  rubyforge_project:
137
- rubygems_version: 2.0.3
136
+ rubygems_version: 2.2.1
138
137
  signing_key:
139
138
  specification_version: 4
140
139
  summary: A visual regex debugger
141
140
  test_files: []
141
+ has_rdoc: false
@@ -1,12 +0,0 @@
1
- == 0.0.1 2009-01-07
2
-
3
- * Initial release
4
-
5
- == 0.0.2 2011-06-21
6
-
7
- * Port from wx to gtk2
8
-
9
- == 0.0.3 2011-08-07
10
-
11
- * Fix bug where match highlighting would not start until the match text was edited for the first time.
12
- * Changed background color of highlighted text tog gray to make the cursor more visible.