clipboard_manager 1.0.5 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a0ce35b12b0971886c32e991585028b0fd434d0a
4
- data.tar.gz: 85942ed874235d0541094c682a30a20c4eed208f
3
+ metadata.gz: 89604845d3cd62950a1d472cd56d92567c7e6204
4
+ data.tar.gz: c356ec8f38ab35d00eb476392d3ee8fc270098ae
5
5
  SHA512:
6
- metadata.gz: 74f2cf9b7be33d847ffed2a43c88aa783b60266d7ae950e0633f21212d898083364aa3d2e0bdaa9e90e8518473fda6e96121624edca2019b19ea1500eea37f45
7
- data.tar.gz: 55ecbce17723a6d09d6a3c7f5d2222f2f8af22fc42a69b9388987ac7b9ce0860eeca89aa5d0d667fbb1013de339f1a0df320918f183ba11094df5fcc1befd5d3
6
+ metadata.gz: b05626e3889af33830921e33988d209fff5184643c51ecff5938497bab1764abc2a79358b74f1d530b4083d77b7e8781b121ccf191b4d34d4dc8840cc9a3851d
7
+ data.tar.gz: 3705e8887d7f1830c84cb403f81d11962f6220e90d82cf14493c36f31f3666ef5638ddbd9db955beeb5c0acdb256d56315b3a96e0903ceea82a639eac87d235e
data/data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.5
1
+ 1.1.1
@@ -53,15 +53,14 @@ class ClipboardManager
53
53
  mm.append_menu_item(:do_qrcode!){do_qrcode!}
54
54
 
55
55
  @history, @previous = [], nil
56
- request_text do |text|
57
- if text
58
- add_history text
59
- @previous = text
60
- end
61
- GLib::Timeout.add(CONFIG[:Sleep]) do
62
- step if @running.active?
63
- true # repeat
64
- end
56
+ text = request_text
57
+ if text
58
+ add_history text
59
+ @previous = text
60
+ end
61
+ GLib::Timeout.add(CONFIG[:Sleep]) do
62
+ step if @running.active?
63
+ true # repeat
65
64
  end
66
65
 
67
66
  status(@ready)
@@ -110,17 +109,15 @@ class ClipboardManager
110
109
  end
111
110
 
112
111
  def do_toggle!
113
- request_text do |text|
114
- @previous = text
115
- @running.active = !@running.active?
116
- end
112
+ text = request_text
113
+ @previous = text
114
+ @running.active = !@running.active?
117
115
  end
118
116
 
119
117
  def request_text
120
- CLIPBOARD.request_text do |_, text|
121
- # nil anything that looks like a pwd.
122
- (@is_pwd=~text)? yield(nil) : yield(text)
123
- end
118
+ text = CLIPBOARD.wait_for_text
119
+ text = nil if @is_pwd=~text
120
+ return text
124
121
  end
125
122
 
126
123
  def status(type)
@@ -133,14 +130,13 @@ class ClipboardManager
133
130
  @timer = nil
134
131
  status @ready
135
132
  end
136
- request_text do |text|
137
- unless text.nil? or @previous == text
138
- @previous = text
139
- status @working
140
- GLib::Timeout.add(0) do
141
- manage(text)
142
- false # don't repeat
143
- end
133
+ text = request_text
134
+ unless text.nil? or @previous == text
135
+ @previous = text
136
+ status @working
137
+ GLib::Timeout.add(0) do
138
+ manage(text)
139
+ false # don't repeat
144
140
  end
145
141
  end
146
142
  end
@@ -156,7 +152,7 @@ class ClipboardManager
156
152
  CONFIG[:tasks].each do |name, _|
157
153
  next unless @checks[name].active?
158
154
  rgx, mth, str = _
159
- rgx = Regexp.new(rgx, Regexp::EXTENDED)
155
+ rgx = Regexp.new(rgx, Regexp::EXTENDED | Regexp::MULTILINE)
160
156
  if md=rgx.match(text) and question?(name)
161
157
  CLIPBOARD.text=Rafini::Empty::STRING
162
158
  begin
@@ -1,4 +1,5 @@
1
1
  module ClipboardManager
2
+ using Rafini::String
2
3
 
3
4
  help = <<-HELP
4
5
  Usage: gtk3app clipboardmanager [options]
@@ -16,16 +17,16 @@ use no-ask and no-running for false.
16
17
  (?!\w+:\/\/) # not like url
17
18
  (?!\/[a-z]+\/[a-z]) # not like linux path
18
19
  (?![a-z]+\/[a-z]+\/) # not like relative path
19
- (?=.*\d) # at least on diget
20
+ (?=.*\d) # at least one diget
20
21
  (?=.*[a-z]) # at least one lower case letter
21
22
  (?=.*[A-Z]) # at least one upper case letter
22
23
  (?=.*[^\w\s]) # at least one special character
23
- .{4,43}$ # 4 to 43 in length
24
+ \S*$ # no spaces
24
25
  \Z'
25
26
 
26
27
  a0 = Rafini::Empty::ARRAY
27
28
  h0 = Rafini::Empty::HASH
28
- s0 = Rafini::Empty::STRING
29
+ #s0 = Rafini::Empty::STRING
29
30
 
30
31
  CONFIG = {
31
32
  Help: help,
@@ -55,8 +56,8 @@ use no-ask and no-running for false.
55
56
 
56
57
  about_dialog: {
57
58
  set_program_name: 'Clipboard Manager',
58
- set_version: VERSION,
59
- set_copyright: '(c) 2014 CarlosJHR64',
59
+ set_version: VERSION.semantic(0..1),
60
+ set_copyright: '(c) 2015 CarlosJHR64',
60
61
  set_comments: 'A Ruby Gtk3App Clipboard Manager ',
61
62
  set_website: 'https://github.com/carlosjhr64/clipboard_manager',
62
63
  set_website_label: 'See it at GitHub!',
@@ -1,3 +1,3 @@
1
1
  module ClipboardManager
2
- VERSION = '1.0.5'
2
+ VERSION = '1.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clipboard_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - carlosjhr64
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-30 00:00:00.000000000 Z
11
+ date: 2015-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: helpema
@@ -71,18 +71,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
71
  - !ruby/object:Gem::Version
72
72
  version: '0'
73
73
  requirements:
74
- - 'ruby: ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-linux]'
75
- - 'gtk3app: 1.4.0'
74
+ - 'ruby: ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]'
75
+ - 'gtk3app: 1.5.1'
76
76
  - 'zbarcam: 0.10'
77
- - 'firefox: Mozilla Firefox 34.0'
77
+ - 'firefox: Mozilla Firefox 38.0.5'
78
78
  - 'espeak: eSpeak text-to-speech: 1.47.11 03.May.13 Data at: /usr/share/espeak-data'
79
79
  - 'wget: GNU Wget 1.16.1 built on linux-gnu.'
80
- - 'youtube-dl: 2014.12.17.2'
80
+ - 'youtube-dl: 2015.12.18'
81
81
  - 'system: linux/bash'
82
82
  rubyforge_project:
83
- rubygems_version: 2.4.1
83
+ rubygems_version: 2.4.5.1
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: Ruby Gtk3App Clipboard Manager.
87
87
  test_files: []
88
- has_rdoc: