boston-stitch 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/bin/boston-stitch +3 -1
  2. metadata +5 -5
@@ -1,14 +1,16 @@
1
1
  #!/usr/bin/env ruby
2
+ # encoding: utf-8
2
3
  require 'nokogiri'
3
4
  require 'yaml'
4
5
  require 'sinatra'
5
6
  require 'timeout'
7
+ require 'open-uri'
6
8
 
7
9
  $title = nil
8
10
 
9
11
  def process(url)
10
12
  url = url
11
- html = `curl -s '#{url}'`
13
+ html = open(url).read
12
14
  doc = Nokogiri::HTML(html)
13
15
  unless $title
14
16
  $title = doc.at('head title').inner_text
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boston-stitch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-02-28 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
16
- requirement: &22915200 !ruby/object:Gem::Requirement
16
+ requirement: &11702160 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *22915200
24
+ version_requirements: *11702160
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sinatra
27
- requirement: &22914060 !ruby/object:Gem::Requirement
27
+ requirement: &12461300 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *22914060
35
+ version_requirements: *12461300
36
36
  description: Stitch together all the pages of a Boston.com gallery
37
37
  email:
38
38
  - dhchoi@gmail.com