murlsh 1.3.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.htaccess +1 -0
- data/README.textile +6 -12
- data/Rakefile +19 -17
- data/VERSION +1 -1
- data/bin/murlsh +2 -35
- data/config.ru +1 -1
- data/config.yaml +9 -9
- data/lib/murlsh/ask.rb +15 -0
- data/lib/murlsh/cp_r_safe.rb +33 -0
- data/lib/murlsh/doc.rb +1 -16
- data/lib/murlsh/install.rb +28 -0
- data/lib/murlsh/plugin.rb +0 -2
- data/lib/murlsh/search_conditions.rb +12 -2
- data/lib/murlsh/search_grammar.rb +225 -0
- data/lib/murlsh/search_grammar.treetop +34 -0
- data/lib/murlsh/uri_ask.rb +10 -14
- data/lib/murlsh/url_body.rb +33 -19
- data/lib/murlsh/url_result_set.rb +12 -2
- data/lib/murlsh.rb +4 -1
- data/murlsh.gemspec +26 -21
- data/plugins/add_post_50_update_m3u.rb +35 -0
- data/plugins/{add_pre_41_unajax_twitter.rb → add_pre_30_unajax_twitter.rb} +1 -1
- data/plugins/add_pre_35_url_clean.rb +21 -0
- data/plugins/add_pre_50_media_thumbnail.rb +6 -3
- data/plugins/add_pre_65_html_thumb.rb +1 -3
- data/plugins/url_display_add_60_via.rb +4 -1
- data/public/css/jquery.jgrowl.css +11 -7
- data/public/css/screen.css +3 -2
- data/public/js/jquery-1.5.min.js +16 -0
- data/public/js/jquery.jgrowl_compressed.js +40 -32
- data/public/js/js.js +3 -43
- data/public/js/{twitter-text-1.0.4.js → twitter-text-1.3.1.js} +25 -22
- data/spec/doc_spec.rb +10 -4
- metadata +75 -61
- data/lib/murlsh/sqlite3_adapter.rb +0 -13
- data/plugins/add_pre_60_flickr.rb +0 -27
- data/plugins/add_pre_60_vimeo.rb +0 -38
- data/plugins/html_parse_50_nokogiri.rb +0 -16
- data/public/js/comments.json +0 -1
- data/public/js/jquery-1.4.4.min.js +0 -167
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: murlsh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 1.
|
8
|
+
- 4
|
9
|
+
- 0
|
10
|
+
version: 1.4.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Matthew M. Boedicker
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-01-
|
18
|
+
date: 2011-01-31 00:00:00 -05:00
|
19
19
|
default_executable: murlsh
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -66,26 +66,10 @@ dependencies:
|
|
66
66
|
version: 2.1.2
|
67
67
|
type: :runtime
|
68
68
|
version_requirements: *id003
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: flickraw
|
71
|
-
prerelease: false
|
72
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
|
-
requirements:
|
75
|
-
- - ">="
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
hash: 57
|
78
|
-
segments:
|
79
|
-
- 0
|
80
|
-
- 8
|
81
|
-
- 3
|
82
|
-
version: 0.8.3
|
83
|
-
type: :runtime
|
84
|
-
version_requirements: *id004
|
85
69
|
- !ruby/object:Gem::Dependency
|
86
70
|
name: htmlentities
|
87
71
|
prerelease: false
|
88
|
-
requirement: &
|
72
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
89
73
|
none: false
|
90
74
|
requirements:
|
91
75
|
- - ">="
|
@@ -97,11 +81,11 @@ dependencies:
|
|
97
81
|
- 0
|
98
82
|
version: 4.2.0
|
99
83
|
type: :runtime
|
100
|
-
version_requirements: *
|
84
|
+
version_requirements: *id004
|
101
85
|
- !ruby/object:Gem::Dependency
|
102
86
|
name: json
|
103
87
|
prerelease: false
|
104
|
-
requirement: &
|
88
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
105
89
|
none: false
|
106
90
|
requirements:
|
107
91
|
- - ">="
|
@@ -113,11 +97,11 @@ dependencies:
|
|
113
97
|
- 3
|
114
98
|
version: 1.2.3
|
115
99
|
type: :runtime
|
116
|
-
version_requirements: *
|
100
|
+
version_requirements: *id005
|
117
101
|
- !ruby/object:Gem::Dependency
|
118
102
|
name: nokogiri
|
119
103
|
prerelease: false
|
120
|
-
requirement: &
|
104
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
121
105
|
none: false
|
122
106
|
requirements:
|
123
107
|
- - ~>
|
@@ -128,11 +112,11 @@ dependencies:
|
|
128
112
|
- 0
|
129
113
|
version: "1.0"
|
130
114
|
type: :runtime
|
131
|
-
version_requirements: *
|
115
|
+
version_requirements: *id006
|
132
116
|
- !ruby/object:Gem::Dependency
|
133
117
|
name: plumnailer
|
134
118
|
prerelease: false
|
135
|
-
requirement: &
|
119
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
136
120
|
none: false
|
137
121
|
requirements:
|
138
122
|
- - ">="
|
@@ -144,6 +128,21 @@ dependencies:
|
|
144
128
|
- 0
|
145
129
|
version: 0.1.0
|
146
130
|
type: :runtime
|
131
|
+
version_requirements: *id007
|
132
|
+
- !ruby/object:Gem::Dependency
|
133
|
+
name: postrank-uri
|
134
|
+
prerelease: false
|
135
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
136
|
+
none: false
|
137
|
+
requirements:
|
138
|
+
- - ~>
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
hash: 15
|
141
|
+
segments:
|
142
|
+
- 1
|
143
|
+
- 0
|
144
|
+
version: "1.0"
|
145
|
+
type: :runtime
|
147
146
|
version_requirements: *id008
|
148
147
|
- !ruby/object:Gem::Dependency
|
149
148
|
name: public_suffix_service
|
@@ -257,19 +256,18 @@ dependencies:
|
|
257
256
|
type: :runtime
|
258
257
|
version_requirements: *id015
|
259
258
|
- !ruby/object:Gem::Dependency
|
260
|
-
name: sqlite3
|
259
|
+
name: sqlite3
|
261
260
|
prerelease: false
|
262
261
|
requirement: &id016 !ruby/object:Gem::Requirement
|
263
262
|
none: false
|
264
263
|
requirements:
|
265
|
-
- -
|
264
|
+
- - ~>
|
266
265
|
- !ruby/object:Gem::Version
|
267
|
-
hash:
|
266
|
+
hash: 9
|
268
267
|
segments:
|
269
268
|
- 1
|
270
|
-
-
|
271
|
-
|
272
|
-
version: 1.2.1
|
269
|
+
- 3
|
270
|
+
version: "1.3"
|
273
271
|
type: :runtime
|
274
272
|
version_requirements: *id016
|
275
273
|
- !ruby/object:Gem::Dependency
|
@@ -289,9 +287,24 @@ dependencies:
|
|
289
287
|
type: :runtime
|
290
288
|
version_requirements: *id017
|
291
289
|
- !ruby/object:Gem::Dependency
|
292
|
-
name:
|
290
|
+
name: treetop
|
293
291
|
prerelease: false
|
294
292
|
requirement: &id018 !ruby/object:Gem::Requirement
|
293
|
+
none: false
|
294
|
+
requirements:
|
295
|
+
- - ~>
|
296
|
+
- !ruby/object:Gem::Version
|
297
|
+
hash: 7
|
298
|
+
segments:
|
299
|
+
- 1
|
300
|
+
- 4
|
301
|
+
version: "1.4"
|
302
|
+
type: :runtime
|
303
|
+
version_requirements: *id018
|
304
|
+
- !ruby/object:Gem::Dependency
|
305
|
+
name: twitter
|
306
|
+
prerelease: false
|
307
|
+
requirement: &id019 !ruby/object:Gem::Requirement
|
295
308
|
none: false
|
296
309
|
requirements:
|
297
310
|
- - ">="
|
@@ -303,27 +316,26 @@ dependencies:
|
|
303
316
|
- 12
|
304
317
|
version: 0.9.12
|
305
318
|
type: :runtime
|
306
|
-
version_requirements: *
|
319
|
+
version_requirements: *id019
|
307
320
|
- !ruby/object:Gem::Dependency
|
308
|
-
name:
|
321
|
+
name: fakeweb
|
309
322
|
prerelease: false
|
310
|
-
requirement: &
|
323
|
+
requirement: &id020 !ruby/object:Gem::Requirement
|
311
324
|
none: false
|
312
325
|
requirements:
|
313
|
-
- -
|
326
|
+
- - ~>
|
314
327
|
- !ruby/object:Gem::Version
|
315
|
-
hash:
|
328
|
+
hash: 9
|
316
329
|
segments:
|
317
330
|
- 1
|
318
|
-
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
version_requirements: *id019
|
331
|
+
- 3
|
332
|
+
version: "1.3"
|
333
|
+
type: :development
|
334
|
+
version_requirements: *id020
|
323
335
|
- !ruby/object:Gem::Dependency
|
324
336
|
name: flog
|
325
337
|
prerelease: false
|
326
|
-
requirement: &
|
338
|
+
requirement: &id021 !ruby/object:Gem::Requirement
|
327
339
|
none: false
|
328
340
|
requirements:
|
329
341
|
- - ">="
|
@@ -335,11 +347,11 @@ dependencies:
|
|
335
347
|
- 0
|
336
348
|
version: 2.5.0
|
337
349
|
type: :development
|
338
|
-
version_requirements: *
|
350
|
+
version_requirements: *id021
|
339
351
|
- !ruby/object:Gem::Dependency
|
340
352
|
name: rack-test
|
341
353
|
prerelease: false
|
342
|
-
requirement: &
|
354
|
+
requirement: &id022 !ruby/object:Gem::Requirement
|
343
355
|
none: false
|
344
356
|
requirements:
|
345
357
|
- - ~>
|
@@ -350,11 +362,11 @@ dependencies:
|
|
350
362
|
- 5
|
351
363
|
version: "0.5"
|
352
364
|
type: :development
|
353
|
-
version_requirements: *
|
365
|
+
version_requirements: *id022
|
354
366
|
- !ruby/object:Gem::Dependency
|
355
367
|
name: rspec
|
356
368
|
prerelease: false
|
357
|
-
requirement: &
|
369
|
+
requirement: &id023 !ruby/object:Gem::Requirement
|
358
370
|
none: false
|
359
371
|
requirements:
|
360
372
|
- - ~>
|
@@ -365,8 +377,8 @@ dependencies:
|
|
365
377
|
- 0
|
366
378
|
version: "2.0"
|
367
379
|
type: :development
|
368
|
-
version_requirements: *
|
369
|
-
description:
|
380
|
+
version_requirements: *id023
|
381
|
+
description: Host your bookmarks or maintain a link blog
|
370
382
|
email: matthewm@boedicker.org
|
371
383
|
executables:
|
372
384
|
- murlsh
|
@@ -384,9 +396,11 @@ files:
|
|
384
396
|
- config.ru
|
385
397
|
- config.yaml
|
386
398
|
- lib/murlsh.rb
|
399
|
+
- lib/murlsh/ask.rb
|
387
400
|
- lib/murlsh/auth.rb
|
388
401
|
- lib/murlsh/build_md5.rb
|
389
402
|
- lib/murlsh/build_query.rb
|
403
|
+
- lib/murlsh/cp_r_safe.rb
|
390
404
|
- lib/murlsh/delicious_parse.rb
|
391
405
|
- lib/murlsh/dispatch.rb
|
392
406
|
- lib/murlsh/doc.rb
|
@@ -396,6 +410,7 @@ files:
|
|
396
410
|
- lib/murlsh/head_from_get.rb
|
397
411
|
- lib/murlsh/image_list.rb
|
398
412
|
- lib/murlsh/img_store.rb
|
413
|
+
- lib/murlsh/install.rb
|
399
414
|
- lib/murlsh/json_body.rb
|
400
415
|
- lib/murlsh/json_server.rb
|
401
416
|
- lib/murlsh/jsonp_body.rb
|
@@ -404,7 +419,8 @@ files:
|
|
404
419
|
- lib/murlsh/openlock.rb
|
405
420
|
- lib/murlsh/plugin.rb
|
406
421
|
- lib/murlsh/search_conditions.rb
|
407
|
-
- lib/murlsh/
|
422
|
+
- lib/murlsh/search_grammar.rb
|
423
|
+
- lib/murlsh/search_grammar.treetop
|
408
424
|
- lib/murlsh/time_ago.rb
|
409
425
|
- lib/murlsh/uri_ask.rb
|
410
426
|
- lib/murlsh/uri_domain.rb
|
@@ -416,26 +432,25 @@ files:
|
|
416
432
|
- lib/murlsh/yaml_ordered_hash.rb
|
417
433
|
- murlsh.gemspec
|
418
434
|
- plugins/add_post_50_update_feed.rb
|
435
|
+
- plugins/add_post_50_update_m3u.rb
|
419
436
|
- plugins/add_post_50_update_podcast.rb
|
420
437
|
- plugins/add_post_50_update_rss.rb
|
421
438
|
- plugins/add_post_60_notify_hubs.rb
|
439
|
+
- plugins/add_pre_30_unajax_twitter.rb
|
440
|
+
- plugins/add_pre_35_url_clean.rb
|
422
441
|
- plugins/add_pre_40_convert_mobile.rb
|
423
|
-
- plugins/add_pre_41_unajax_twitter.rb
|
424
442
|
- plugins/add_pre_45_supplied_thumbnail.rb
|
425
443
|
- plugins/add_pre_50_lookup_content_type_title.rb
|
426
444
|
- plugins/add_pre_50_media_thumbnail.rb
|
427
445
|
- plugins/add_pre_50_open_graph_image.rb
|
428
|
-
- plugins/add_pre_60_flickr.rb
|
429
446
|
- plugins/add_pre_60_github_title.rb
|
430
447
|
- plugins/add_pre_60_google_code_title.rb
|
431
448
|
- plugins/add_pre_60_imgur.rb
|
432
449
|
- plugins/add_pre_60_s3_image.rb
|
433
450
|
- plugins/add_pre_60_twitter.rb
|
434
|
-
- plugins/add_pre_60_vimeo.rb
|
435
451
|
- plugins/add_pre_65_html_thumb.rb
|
436
452
|
- plugins/add_pre_65_img_thumb.rb
|
437
453
|
- plugins/avatar_50_gravatar.rb
|
438
|
-
- plugins/html_parse_50_nokogiri.rb
|
439
454
|
- plugins/url_display_add_45_audio.rb
|
440
455
|
- plugins/url_display_add_50_hostrec.rb
|
441
456
|
- plugins/url_display_add_55_content_type.rb
|
@@ -444,11 +459,10 @@ files:
|
|
444
459
|
- public/css/jquery.jgrowl.css
|
445
460
|
- public/css/screen.css
|
446
461
|
- public/img/thumb/.gitignore
|
447
|
-
- public/js/
|
448
|
-
- public/js/jquery-1.4.4.min.js
|
462
|
+
- public/js/jquery-1.5.min.js
|
449
463
|
- public/js/jquery.jgrowl_compressed.js
|
450
464
|
- public/js/js.js
|
451
|
-
- public/js/twitter-text-1.
|
465
|
+
- public/js/twitter-text-1.3.1.js
|
452
466
|
- spec/auth_spec.rb
|
453
467
|
- spec/dispatch_spec.rb
|
454
468
|
- spec/doc_spec.rb
|
@@ -491,7 +505,7 @@ rubyforge_project:
|
|
491
505
|
rubygems_version: 1.4.2
|
492
506
|
signing_key:
|
493
507
|
specification_version: 3
|
494
|
-
summary:
|
508
|
+
summary: Host your bookmarks or maintain a link blog
|
495
509
|
test_files:
|
496
510
|
- spec/auth_spec.rb
|
497
511
|
- spec/dispatch_spec.rb
|
@@ -1,13 +0,0 @@
|
|
1
|
-
require 'active_record/connection_adapters/sqlite3_adapter'
|
2
|
-
|
3
|
-
class ActiveRecord::ConnectionAdapters::SQLite3Adapter
|
4
|
-
|
5
|
-
# Add MURLSHMATCH function for regex matching.
|
6
|
-
def initialize(connection, logger, config)
|
7
|
-
super
|
8
|
-
@connection.create_function('MURLSHMATCH', 2) do |func,search_in,search_for|
|
9
|
-
func.result = search_in.to_s.match(/#{search_for}/i) ? 1 : nil
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
require 'flickraw'
|
2
|
-
|
3
|
-
require 'murlsh'
|
4
|
-
|
5
|
-
module Murlsh
|
6
|
-
|
7
|
-
# Set the title of Flickr photos.
|
8
|
-
class AddPre60Flickr < Plugin
|
9
|
-
|
10
|
-
@hook = 'add_pre'
|
11
|
-
|
12
|
-
FlickrRe = %r{^http://(?:www\.)?flickr\.com/photos/[@\w\-]+?/([\d]+)}i
|
13
|
-
|
14
|
-
def self.run(url, config)
|
15
|
-
unless url.user_supplied_title? or config['flickr_api_key'].to_s.empty?
|
16
|
-
if photo_id = url.url[FlickrRe, 1]
|
17
|
-
FlickRaw.api_key = config['flickr_api_key']
|
18
|
-
info = flickr.photos.getInfo(:photo_id => photo_id)
|
19
|
-
|
20
|
-
url.title = "#{info.title} by #{info.owner.username}"
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
26
|
-
|
27
|
-
end
|
data/plugins/add_pre_60_vimeo.rb
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
require 'cgi'
|
2
|
-
|
3
|
-
require 'vimeo'
|
4
|
-
|
5
|
-
require 'murlsh'
|
6
|
-
|
7
|
-
module Murlsh
|
8
|
-
|
9
|
-
# Set title and thumbnail url for Vimeo urls.
|
10
|
-
class AddPre60Vimeo < Plugin
|
11
|
-
|
12
|
-
@hook = 'add_pre'
|
13
|
-
|
14
|
-
VimeoRe = %r{^http://(?:www\.)?vimeo\.com/(\d+)$}i
|
15
|
-
StorageDir = File.join(File.dirname(__FILE__), '..', 'public', 'img',
|
16
|
-
'thumb')
|
17
|
-
|
18
|
-
def self.run(url, config)
|
19
|
-
if id = url.url[VimeoRe, 1]
|
20
|
-
info = Vimeo::Simple::Video.info(id)[0]
|
21
|
-
|
22
|
-
unless url.user_supplied_title?
|
23
|
-
url.title = "#{info['title']} by #{info['user_name']}"
|
24
|
-
end
|
25
|
-
|
26
|
-
thumb_storage = Murlsh::ImgStore.new(StorageDir,
|
27
|
-
:user_agent => config['user_agent'])
|
28
|
-
stored_filename = thumb_storage.store_url(info['thumbnail_small']) do |i|
|
29
|
-
max_side = config.fetch('thumbnail_max_side', 90)
|
30
|
-
i.extend(Murlsh::ImageList).resize_down!(max_side)
|
31
|
-
end
|
32
|
-
url.thumbnail_url = "img/thumb/#{CGI.escape(stored_filename)}"
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
end
|
37
|
-
|
38
|
-
end
|
data/public/js/comments.json
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"http://www.youtube.com/watch?v=KrfpnbGXL70":[{"createdTime":1277520298,"updatedTime":1277520298,"authorAvatar":"http://www.gravatar.com/avatar/355af1bc931baca530e66571923286b4?s=16","authorName":"mmb","authorUrl":"http://matthewm.boedicker.org/","comment":"Through SOAP!"},{"createdTime":1277520298,"updatedTime":1277520298,"authorAvatar":"http://www.gravatar.com/avatar/355af1bc931baca530e66571923286b4?s=16","authorName":"mmb","authorUrl":"http://matthewm.boedicker.org/","comment":"dead, can be seen at http://jz10.java.no/java-4-ever-trailer.html"}]}
|