scrapey 0.0.11 → 0.0.12
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/lib/scrapey.rb +2 -0
- data/lib/scrapey/cache.rb +20 -0
- data/lib/scrapey/constants.rb +1 -1
- data/template/Rakefile +14 -0
- data/template/template.iss +1 -1
- metadata +2 -2
data/lib/scrapey.rb
CHANGED
data/lib/scrapey/cache.rb
CHANGED
@@ -17,4 +17,24 @@ module Scrapey
|
|
17
17
|
@use_cache = true
|
18
18
|
end
|
19
19
|
|
20
|
+
|
21
|
+
def without_cache
|
22
|
+
yield
|
23
|
+
end
|
24
|
+
|
25
|
+
def with_cache cassette_name = 'my_cassette'
|
26
|
+
require 'vcr'
|
27
|
+
require 'fakeweb'
|
28
|
+
|
29
|
+
VCR.configure do |c|
|
30
|
+
c.cassette_library_dir = "#{BASEDIR}/cache"
|
31
|
+
c.hook_into :fakeweb
|
32
|
+
c.allow_http_connections_when_no_cassette = true
|
33
|
+
end
|
34
|
+
|
35
|
+
VCR.use_cassette(cassette_name, :record => :new_episodes, :match_requests_on => [:method, :uri, :body]) do
|
36
|
+
yield
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
20
40
|
end
|
data/lib/scrapey/constants.rb
CHANGED
data/template/Rakefile
CHANGED
@@ -21,3 +21,17 @@ task 'dropbox' do
|
|
21
21
|
url = [ENV['DROPBOX_public_url'], name, file].join('/').squeeze('/')
|
22
22
|
puts "uploaded to #{url}"
|
23
23
|
end
|
24
|
+
|
25
|
+
task 'git' do
|
26
|
+
server = ARGV[1] || 'foo'
|
27
|
+
puts <<EOF
|
28
|
+
git commands:
|
29
|
+
-------------
|
30
|
+
cd my_repo
|
31
|
+
git init
|
32
|
+
git remote add origin ssh://#{server}/repos/#{name}
|
33
|
+
git add .
|
34
|
+
git commit -m "Initial commit"
|
35
|
+
git push -u origin master
|
36
|
+
EOF
|
37
|
+
end
|
data/template/template.iss
CHANGED
@@ -21,4 +21,4 @@ Name: "{group}\Uninstall Template Scraper"; Filename: "{uninstallexe}"
|
|
21
21
|
// Root: HKCR; Subkey: SystemFileAssociations\.csv\shell\Template Scraper\command; ValueType: string; ValueData: """{app}\template.exe"" ""%1"""; Flags: uninsdeletekey deletekey
|
22
22
|
|
23
23
|
[Run]
|
24
|
-
//Filename: schtasks.exe; Parameters:" /CREATE /TN ""Scheduled Template"" /TR ""{app}\template.exe"" /SC DAILY /ST 02:30"
|
24
|
+
// Filename: schtasks.exe; Parameters:" /CREATE /TN ""Scheduled Template"" /TR ""{app}\template.exe"" /SC DAILY /ST 02:30"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scrapey
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mechanize
|