osxscreenshot 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ === 0.0.2 / 2010-02-16
2
+
3
+ * Added simple usage example.
4
+ * Minor URL changes.
5
+ * Noted ImageMagick/mogrify command-line requirement.
6
+
1
7
  === 0.0.1 / 2010-02-16
2
8
 
3
9
  * First release
data/README.txt CHANGED
@@ -1,11 +1,11 @@
1
1
  = osxscreenshot
2
2
 
3
- * http://gemcutter.org/gems/osxscreenshot
3
+ * http://github.com/topfunky/osxscreenshot
4
4
 
5
5
  == DESCRIPTION:
6
6
 
7
7
  Wrapper around webkit2png.py to easily and programmatically capture
8
- screenshots, crop, and resize them on Mac OS X.
8
+ screenshots of websites, then crop and resize them. Mac OS X only.
9
9
 
10
10
  == FEATURES/PROBLEMS:
11
11
 
@@ -15,6 +15,7 @@ screenshots, crop, and resize them on Mac OS X.
15
15
  == REQUIREMENTS:
16
16
 
17
17
  * Uses Python's Cocoa support (standard in Mac OS X).
18
+ * Uses ImageMagick's command-line tools to resize the image (mogrify). See http://github.com/masterkain/ImageMagick-sl. I hope to replace this with MacRuby or RubyCocoa instead.
18
19
 
19
20
  == INSTALL:
20
21
 
@@ -22,9 +23,14 @@ screenshots, crop, and resize them on Mac OS X.
22
23
 
23
24
  == DEVELOPERS:
24
25
 
25
- Call the +capture+ method with the desired URL and some (optional) options.
26
+ Call the +capture+ method which returns the path to a tempfile containing the image:
26
27
 
27
- output_screenshot_path =
28
+ file_path = OSX::Screenshot.capture("http://peepcode.com")
29
+ # => "/tmp/20293-202020293-2020-full.png" at 320x480
30
+
31
+ Or, pass some (optional) options.
32
+
33
+ file_path =
28
34
  OSX::Screenshot.capture(my_url, {
29
35
  :tmp => "#{Sinatra::Application.root}/tmp",
30
36
  :webkit2png => "#{Sinatra::Application.root}/bin/webkit2png.py",
@@ -32,7 +38,7 @@ Call the +capture+ method with the desired URL and some (optional) options.
32
38
  :width => 220,
33
39
  :height => 270
34
40
  })
35
- system "mv #{output_screenshot_path} #{local_path}"
41
+ system "mv #{file_path} #{permanent_path}"
36
42
 
37
43
  == LICENSE:
38
44
 
data/lib/osxscreenshot.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module OSX
2
2
  module Screenshot
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.2'
4
4
 
5
5
  ##
6
6
  # Takes a screenshot of a website, optionally resizes it, and writes
@@ -18,7 +18,7 @@ class TestOsxscreenshot < Test::Unit::TestCase
18
18
 
19
19
  def test_uses_custom_tmpdir
20
20
  @tmpfile = OSX::Screenshot.capture("http://example.com", :tmpdir => "./tmp")
21
- assert_match /^\.\/tmp/, @tmpfile
21
+ assert_match(/^\.\/tmp/, @tmpfile)
22
22
  assert File.exist?(@tmpfile)
23
23
  end
24
24
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: osxscreenshot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geoffrey Grosenbach
@@ -44,7 +44,7 @@ dependencies:
44
44
  version:
45
45
  description: |-
46
46
  Wrapper around webkit2png.py to easily and programmatically capture
47
- screenshots, crop, and resize them on Mac OS X.
47
+ screenshots of websites, then crop and resize them. Mac OS X only.
48
48
  email:
49
49
  - boss@topfunky.com
50
50
  executables: []
@@ -65,7 +65,7 @@ files:
65
65
  - test/test_osxscreenshot.rb
66
66
  - vendor/webkit2png.py
67
67
  has_rdoc: true
68
- homepage: http://gemcutter.org/gems/osxscreenshot
68
+ homepage: http://github.com/topfunky/osxscreenshot
69
69
  licenses: []
70
70
 
71
71
  post_install_message:
@@ -92,6 +92,6 @@ rubyforge_project: osxscreenshot
92
92
  rubygems_version: 1.3.5
93
93
  signing_key:
94
94
  specification_version: 3
95
- summary: Wrapper around webkit2png.py to easily and programmatically capture screenshots, crop, and resize them on Mac OS X.
95
+ summary: Wrapper around webkit2png.py to easily and programmatically capture screenshots of websites, then crop and resize them
96
96
  test_files:
97
97
  - test/test_osxscreenshot.rb