gisty 0.0.21 → 0.0.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +2 -2
  2. data/lib/commands/gyast.rb +1 -0
  3. data/lib/gisty.rb +3 -3
  4. metadata +4 -4
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ require 'rake/rdoctask'
8
8
  require 'rake/contrib/rubyforgepublisher'
9
9
  require 'rake/contrib/sshpublisher'
10
10
  require 'fileutils'
11
- require 'lib/gisty'
11
+ require './lib/gisty'
12
12
  include FileUtils
13
13
 
14
14
  NAME = "gisty"
@@ -43,7 +43,7 @@ spec = Gem::Specification.new do |s|
43
43
  s.name = NAME
44
44
  s.version = VERS
45
45
  s.platform = Gem::Platform::RUBY
46
- s.has_rdoc = true
46
+ # s.has_rdoc = true
47
47
  s.extra_rdoc_files = ["README.rdoc"]
48
48
  s.rdoc_options += RDOC_OPTS + ['--exclude', '^(examples|extras)/']
49
49
  s.summary = DESCRIPTION
@@ -3,6 +3,7 @@ if /darwin/ === RUBY_PLATFORM
3
3
  now = Time.now.to_i
4
4
  file_jpg = "/tmp/#{now}.jpg"
5
5
  system "screencapture -i -t jpg \"#{file_jpg}\""
6
+ sleep 2
6
7
  unless File.exist? file_jpg
7
8
  exit
8
9
  end
data/lib/gisty.rb CHANGED
@@ -7,7 +7,7 @@ require 'nokogiri'
7
7
  require 'net/https'
8
8
 
9
9
  class Gisty
10
- VERSION = '0.0.21'
10
+ VERSION = '0.0.22'
11
11
  GIST_URL = 'https://gist.github.com/'
12
12
  GISTY_URL = 'http://github.com/swdyh/gisty/tree/master'
13
13
  COMMAND_PATH = Pathname.new(File.join(File.dirname(__FILE__), 'commands')).realpath.to_s
@@ -53,8 +53,8 @@ class Gisty
53
53
 
54
54
  def next_link str
55
55
  doc = Nokogiri::HTML str
56
- a = doc.at('.pagination a[hotkey="l"]')
57
- a ? a['href'] : nil
56
+ a = doc.xpath('//div[@class="pagination"]/a[last()]')[0]
57
+ (a && a.inner_text.match(/Older/)) ? a['href'] : nil
58
58
  end
59
59
 
60
60
  def map_pages
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gisty
3
3
  version: !ruby/object:Gem::Version
4
- hash: 53
4
+ hash: 51
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 21
10
- version: 0.0.21
9
+ - 22
10
+ version: 0.0.22
11
11
  platform: ruby
12
12
  authors:
13
13
  - swdyh
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-21 00:00:00 +09:00
18
+ date: 2011-08-11 00:00:00 +09:00
19
19
  default_executable: gisty
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency