webtail 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/bin/webtail CHANGED
@@ -5,6 +5,7 @@ argv = ARGV.dup
5
5
  slop = Slop.new(:strict => true, :help => true)
6
6
  slop.banner "$ tail -f ... | webtail [options]"
7
7
  slop.on :p, :port=, "port number for http server (default is 9999)"
8
+ slop.on :r, :rc=, 'callback file location (default is ~/.webtailrc)'
8
9
  begin
9
10
  slop.parse!(argv)
10
11
  rescue => e
@@ -15,6 +16,8 @@ options = slop.to_hash
15
16
  options.delete(:help)
16
17
  options[:port] ||= 9999
17
18
 
19
+ options[:rc] ||= "~/.webtailrc"
20
+
18
21
  $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
19
22
  require "webtail"
20
23
  Webtail.run(options)
data/lib/webtail/app.rb CHANGED
@@ -17,8 +17,8 @@ module Webtail
17
17
  end
18
18
 
19
19
  class Server < ::Sinatra::Base
20
- path = File.expand_path("~/.webtailrc")
21
20
  set :webtailrc do
21
+ path = File.expand_path(Webtail.config[:rc])
22
22
  File.exist?(path) && File.read(path)
23
23
  end
24
24
  set :root, File.expand_path("../../../", __FILE__)
@@ -1,3 +1,3 @@
1
1
  module Webtail
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,79 +1,104 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: webtail
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.3
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 4
10
+ version: 0.0.4
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Ryo NAKAMURA
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-09-29 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2012-10-19 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: eventmachine
16
- requirement: &70318316704200 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
17
24
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
22
32
  type: :runtime
23
- prerelease: false
24
- version_requirements: *70318316704200
25
- - !ruby/object:Gem::Dependency
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
26
35
  name: em-websocket
27
- requirement: &70318316701640 !ruby/object:Gem::Requirement
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
28
38
  none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: '0'
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
33
46
  type: :runtime
34
- prerelease: false
35
- version_requirements: *70318316701640
36
- - !ruby/object:Gem::Dependency
47
+ version_requirements: *id002
48
+ - !ruby/object:Gem::Dependency
37
49
  name: sinatra
38
- requirement: &70318316700780 !ruby/object:Gem::Requirement
50
+ prerelease: false
51
+ requirement: &id003 !ruby/object:Gem::Requirement
39
52
  none: false
40
- requirements:
41
- - - ! '>='
42
- - !ruby/object:Gem::Version
43
- version: '0'
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ hash: 3
57
+ segments:
58
+ - 0
59
+ version: "0"
44
60
  type: :runtime
45
- prerelease: false
46
- version_requirements: *70318316700780
47
- - !ruby/object:Gem::Dependency
61
+ version_requirements: *id003
62
+ - !ruby/object:Gem::Dependency
48
63
  name: slop
49
- requirement: &70318316700060 !ruby/object:Gem::Requirement
64
+ prerelease: false
65
+ requirement: &id004 !ruby/object:Gem::Requirement
50
66
  none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ hash: 3
71
+ segments:
72
+ - 0
73
+ version: "0"
55
74
  type: :runtime
56
- prerelease: false
57
- version_requirements: *70318316700060
58
- - !ruby/object:Gem::Dependency
75
+ version_requirements: *id004
76
+ - !ruby/object:Gem::Dependency
59
77
  name: launchy
60
- requirement: &70318316698040 !ruby/object:Gem::Requirement
78
+ prerelease: false
79
+ requirement: &id005 !ruby/object:Gem::Requirement
61
80
  none: false
62
- requirements:
63
- - - ! '>='
64
- - !ruby/object:Gem::Version
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ hash: 3
85
+ segments:
86
+ - 2
87
+ - 0
88
+ - 6
65
89
  version: 2.0.6
66
90
  type: :runtime
67
- prerelease: false
68
- version_requirements: *70318316698040
91
+ version_requirements: *id005
69
92
  description: Stdin to your browser by WebSocket
70
- email:
93
+ email:
71
94
  - r7kamura@gmail.com
72
- executables:
95
+ executables:
73
96
  - webtail
74
97
  extensions: []
98
+
75
99
  extra_rdoc_files: []
76
- files:
100
+
101
+ files:
77
102
  - .gitignore
78
103
  - Gemfile
79
104
  - LICENSE
@@ -94,27 +119,36 @@ files:
94
119
  - webtail.gemspec
95
120
  homepage: https://github.com/r7kamura/webtail
96
121
  licenses: []
122
+
97
123
  post_install_message:
98
124
  rdoc_options: []
99
- require_paths:
125
+
126
+ require_paths:
100
127
  - lib
101
- required_ruby_version: !ruby/object:Gem::Requirement
128
+ required_ruby_version: !ruby/object:Gem::Requirement
102
129
  none: false
103
- requirements:
104
- - - ! '>='
105
- - !ruby/object:Gem::Version
106
- version: '0'
107
- required_rubygems_version: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ hash: 3
134
+ segments:
135
+ - 0
136
+ version: "0"
137
+ required_rubygems_version: !ruby/object:Gem::Requirement
108
138
  none: false
109
- requirements:
110
- - - ! '>='
111
- - !ruby/object:Gem::Version
112
- version: '0'
139
+ requirements:
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ hash: 3
143
+ segments:
144
+ - 0
145
+ version: "0"
113
146
  requirements: []
147
+
114
148
  rubyforge_project:
115
- rubygems_version: 1.8.15
149
+ rubygems_version: 1.8.24
116
150
  signing_key:
117
151
  specification_version: 3
118
152
  summary: tail -f ... | webtail
119
153
  test_files: []
120
- has_rdoc:
154
+