view_server 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,8 +24,7 @@ module ViewServer
24
24
  ViewServer::Client.new(opts[:port])
25
25
  end
26
26
  content = $stdin.read
27
- clipboard = client.clipboard
28
- clipboard.copy(content)
27
+ client.copy(content)
29
28
  end
30
29
  end
31
30
  end
@@ -23,8 +23,7 @@ module ViewServer
23
23
  else
24
24
  ViewServer::Client.new(opts[:port])
25
25
  end
26
- clipboard = client.clipboard
27
- $stdout << clipboard.paste
26
+ $stdout << client.paste
28
27
  end
29
28
  end
30
29
  end
@@ -1,5 +1,6 @@
1
1
  require 'drb'
2
2
  require 'delegate'
3
+ require 'view_server/my_clipboard'
3
4
 
4
5
  module ViewServer
5
6
  class Client < Delegator
@@ -0,0 +1,13 @@
1
+ require 'clipboard'
2
+
3
+ module ViewServer
4
+ class MyClipboard
5
+ def self.copy(data)
6
+ Clipboard.copy(data)
7
+ end
8
+
9
+ def self.paste
10
+ Clipboard.paste
11
+ end
12
+ end
13
+ end
@@ -1,13 +1,14 @@
1
1
  require 'drb'
2
2
  require 'clipboard'
3
+ require 'view_server/my_clipboard'
3
4
 
4
5
  module ViewServer
5
6
  class Server
6
- attr_reader :launcher, :clipboard
7
+ attr_reader :launcher
7
8
 
8
9
  def initialize(launcher = Launcher.new)
9
10
  @launcher = launcher
10
- @clipboard = Clipboard
11
+ @clipboard = MyClipboard
11
12
  end
12
13
 
13
14
  # I wanted to use the display method but it conflicts
@@ -16,6 +17,14 @@ module ViewServer
16
17
  launcher.launch(data, file_ext)
17
18
  end
18
19
 
20
+ def copy(str)
21
+ @clipboard.copy(str)
22
+ end
23
+
24
+ def paste
25
+ @clipboard.paste
26
+ end
27
+
19
28
  def self.serve(launcher = Launcher.new, port)
20
29
  DRb.start_service "druby://localhost:#{port}", Server.new
21
30
  puts DRb.uri
@@ -1,3 +1,3 @@
1
1
  module ViewServer
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,60 +1,68 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: view_server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Martin Chabot
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-12-02 00:00:00.000000000 Z
12
+ date: 2014-02-22 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: main
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - '>='
19
+ - - ! '>='
18
20
  - !ruby/object:Gem::Version
19
21
  version: '0'
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - '>='
27
+ - - ! '>='
25
28
  - !ruby/object:Gem::Version
26
29
  version: '0'
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: clipboard
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
- - - '>='
35
+ - - ! '>='
32
36
  - !ruby/object:Gem::Version
33
37
  version: '0'
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
- - - '>='
43
+ - - ! '>='
39
44
  - !ruby/object:Gem::Version
40
45
  version: '0'
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: rake
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
- - - '>='
51
+ - - ! '>='
46
52
  - !ruby/object:Gem::Version
47
53
  version: '0'
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
- - - '>='
59
+ - - ! '>='
53
60
  - !ruby/object:Gem::Version
54
61
  version: '0'
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: bundler
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ~>
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :development
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ~>
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: minitest
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - ~>
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :development
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - ~>
81
92
  - !ruby/object:Gem::Version
@@ -83,57 +94,65 @@ dependencies:
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: pry
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
- - - '>='
99
+ - - ! '>='
88
100
  - !ruby/object:Gem::Version
89
101
  version: '0'
90
102
  type: :development
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
- - - '>='
107
+ - - ! '>='
95
108
  - !ruby/object:Gem::Version
96
109
  version: '0'
97
110
  - !ruby/object:Gem::Dependency
98
111
  name: pry-nav
99
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
100
114
  requirements:
101
- - - '>='
115
+ - - ! '>='
102
116
  - !ruby/object:Gem::Version
103
117
  version: '0'
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
107
122
  requirements:
108
- - - '>='
123
+ - - ! '>='
109
124
  - !ruby/object:Gem::Version
110
125
  version: '0'
111
126
  - !ruby/object:Gem::Dependency
112
127
  name: colored
113
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
114
130
  requirements:
115
- - - '>='
131
+ - - ! '>='
116
132
  - !ruby/object:Gem::Version
117
133
  version: '0'
118
134
  type: :development
119
135
  prerelease: false
120
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
121
138
  requirements:
122
- - - '>='
139
+ - - ! '>='
123
140
  - !ruby/object:Gem::Version
124
141
  version: '0'
125
142
  - !ruby/object:Gem::Dependency
126
143
  name: mocha
127
144
  requirement: !ruby/object:Gem::Requirement
145
+ none: false
128
146
  requirements:
129
- - - '>='
147
+ - - ! '>='
130
148
  - !ruby/object:Gem::Version
131
149
  version: '0'
132
150
  type: :development
133
151
  prerelease: false
134
152
  version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
135
154
  requirements:
136
- - - '>='
155
+ - - ! '>='
137
156
  - !ruby/object:Gem::Version
138
157
  version: '0'
139
158
  description: Allow local viewing of remote files
@@ -162,6 +181,7 @@ files:
162
181
  - lib/view_server/cbpaste_runner.rb
163
182
  - lib/view_server/client.rb
164
183
  - lib/view_server/launcher.rb
184
+ - lib/view_server/my_clipboard.rb
165
185
  - lib/view_server/runner.rb
166
186
  - lib/view_server/server.rb
167
187
  - lib/view_server/show_runner.rb
@@ -174,26 +194,33 @@ files:
174
194
  - view_server.gemspec
175
195
  homepage: ''
176
196
  licenses: []
177
- metadata: {}
178
197
  post_install_message:
179
198
  rdoc_options: []
180
199
  require_paths:
181
200
  - lib
182
201
  required_ruby_version: !ruby/object:Gem::Requirement
202
+ none: false
183
203
  requirements:
184
- - - '>='
204
+ - - ! '>='
185
205
  - !ruby/object:Gem::Version
186
206
  version: '0'
207
+ segments:
208
+ - 0
209
+ hash: 438683516371640244
187
210
  required_rubygems_version: !ruby/object:Gem::Requirement
211
+ none: false
188
212
  requirements:
189
- - - '>='
213
+ - - ! '>='
190
214
  - !ruby/object:Gem::Version
191
215
  version: '0'
216
+ segments:
217
+ - 0
218
+ hash: 438683516371640244
192
219
  requirements: []
193
220
  rubyforge_project:
194
- rubygems_version: 2.1.3
221
+ rubygems_version: 1.8.23
195
222
  signing_key:
196
- specification_version: 4
223
+ specification_version: 3
197
224
  summary: Allow local viewing of remote files
198
225
  test_files:
199
226
  - spec/cb_paste_runner_spec.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 1e8982ac0a8c992ab65d6099b16e93d3959952ad
4
- data.tar.gz: 93a5f44b4ad9508d001e1e100a6ec9c4c8860c52
5
- SHA512:
6
- metadata.gz: 3ff9fefe9880c24db74982811cc95cecf46a649d71ff03c887a6eed1b429620e1e779d569f6c1067c16ad1eb7757d191e15ab4e43026d028eedf1461217a4f72
7
- data.tar.gz: e916e487b33fa260a5190088a13b430c7177b31f7acdf6f906a0204cb139735f8de72d9bcbd2f39664d042db8f228cc32290ca8147e9ecbc7d577fb88b061421