pastehub 0.5.0 → 0.5.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: a01fa2d11546477436fdcfabfb078611ad6703fc
4
- data.tar.gz: cd4b9982587c99b62620af701df08c58a55675c7
3
+ metadata.gz: 4fcea458e691141f56af84f016b03018319c8621
4
+ data.tar.gz: 2de2af1d9c960064d7b9f702f649d3f814ccca75
5
5
  SHA512:
6
- metadata.gz: a77838b34dd3d3ca9cfdb918ad7d2c2af2255a339464849e27b0890e84fac26d71e5e6cd041c9e7a56cee1a9baf62a090c2bf86830c80b042d1eddeac24a4cce
7
- data.tar.gz: 46195274032f1740d99003045051b8a19d359be9a8d1e46cf2fb9b1f969a11120c94a391ca72ea7413f02948c80afa71c4eae8cc2772b6b20f66e9164848fd68
6
+ metadata.gz: 7935dfc206a25d32863b1e15dada9ce3936e55bc10728c37a938933c7295b39696c97fbe1ab76d3742769dae65d26d13b04c61ffeba5d0af9cf524eefa40e232
7
+ data.tar.gz: 11b7a83e65c568295212ad7c357a2c5fa94831c6c05a909d68d7a7ac014d9fc987f170c4fdf2d7a50767f59dcac14f1a92be6f239683bae8b7591a083aaa3d4c
data/README.md CHANGED
@@ -9,11 +9,11 @@ Cross-platform clipboard (copy and paste) sync tool.
9
9
 
10
10
  ## Support OS
11
11
 
12
- type | OS's clipboard | Emacs kill-ring | vim |
13
- ---------------|----------------|--------------------|-----------|
14
- MacOSX(gem) | OK | OK | OK |
15
- Windows(gem) | OK | not yet | not yet |
16
- Linux(gem) | not yet | OK | OK |
12
+ OS | native clipboard | Emacs kill-ring | vim |
13
+ ----------|------------------|--------------------|-------------|
14
+ MacOSX | OK | OK | OK |
15
+ Windows | OK | not yet | not yet |
16
+ Linux | not yet | OK | OK |
17
17
 
18
18
  ## How to install
19
19
 
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 5
4
- :patch: 0
4
+ :patch: 1
@@ -76,6 +76,7 @@ def main( argv )
76
76
 
77
77
  # create clientSync
78
78
  clientSync = PasteHub::ClientSync.new( hostname, 1.0 )
79
+ clientSync.display_config()
79
80
 
80
81
  while true
81
82
  signals = 0
@@ -116,6 +116,10 @@ module PasteHub
116
116
  @plugin = PasteHub::Plugin
117
117
  @plugin.load_plugins
118
118
  end
119
+
120
+ def display_config
121
+ @plugin.display_config
122
+ end
119
123
 
120
124
  def notifyToReceive(message)
121
125
  @plugin.distribute_newly_arrived(message)
@@ -39,9 +39,17 @@ module PasteHub
39
39
  @plugins = []
40
40
  end
41
41
 
42
+ def display_config
43
+ @plugins.each {|x|
44
+ STDERR.printf( "Info: plugin [%s] loaded.\n", x.class.to_s )
45
+ x.display_config()
46
+ }
47
+ end
48
+
42
49
  def load_plugins
43
50
  dir = File.join(File.dirname(__FILE__), "plugin")
44
51
  load_plugin_dir(dir)
52
+ nil
45
53
  end
46
54
 
47
55
  def load_plugin_dir(dir)
@@ -55,7 +63,6 @@ module PasteHub
55
63
  end
56
64
 
57
65
  def register_plugin(obj)
58
- #STDERR.printf( "Info: plugin [%s] loaded.\n", obj.class.to_s )
59
66
  @plugins << obj
60
67
  end
61
68
 
@@ -43,12 +43,17 @@ module PasteHub
43
43
  # MacOS X
44
44
  @notifier_path = RbConfig::CONFIG['bindir'] + "/" + "terminal-notifier"
45
45
  if File.exist?( @notifier_path )
46
- STDERR.puts( "Info: found terminal-notifier for MacOS X." )
47
46
  @enable = true
48
47
  end
49
48
  end
50
49
  end
51
50
 
51
+ def display_config
52
+ if @enable
53
+ STDERR.puts( "Info: found terminal-notifier for MacOS X." )
54
+ end
55
+ end
56
+
52
57
  def newly_arrived(message)
53
58
  config = PasteHub::Config.instance
54
59
  if @enable
@@ -66,6 +66,9 @@ module PasteHub
66
66
  nil
67
67
  end
68
68
  }.select( ) {|x| x}
69
+ end
70
+
71
+ def display_config
69
72
  # display settings
70
73
  @mail_settings.each { |setting|
71
74
  STDERR.printf( "Info: SendMail-plugin tag:[%s] mail[%s]\n",
@@ -36,6 +36,10 @@ module PasteHub
36
36
  def initialize
37
37
  end
38
38
 
39
+ # display plugin's config info or status
40
+ def display_config
41
+ end
42
+
39
43
  # for customization of newly arraived message.
40
44
  def newly_arrived (message)
41
45
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pastehub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kiyoka Nishiyama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-27 00:00:00.000000000 Z
11
+ date: 2014-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clipboard