bitly_exporter 0.0.1.pre2 → 0.0.1
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.
- checksums.yaml +4 -4
- data/bitly_exporter.gemspec +1 -0
- data/lib/bitly_exporter/exporter.rb +2 -2
- data/lib/bitly_exporter/version.rb +1 -1
- data/spec/integration/exporter_spec.rb +12 -0
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9294407a862de5c1a942d3dbeb8c10a88cbc2228
|
4
|
+
data.tar.gz: cc7dc53e3559897b1561c77d3c0492fe69469f8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 769a4b91eb5e49388dba00b149603e6f6e2997dd7314d68914832f0bbe1165dc62b5964699153756a82aed9be3d87cfe13ea1a29cb7bd92595e6f25e2b134f96
|
7
|
+
data.tar.gz: 49ca31c40ad1111f69fa10c9ec3b5a0c17cd06c778303ab06b6cb6fe74c81a1094df55db02bcc3c2ac0e2e67b62c96f5754c663d446fb3bf8aa580b8d4b612ec
|
data/bitly_exporter.gemspec
CHANGED
@@ -11,6 +11,7 @@ Gem::Specification.new do |gem|
|
|
11
11
|
gem.description = %q{Export a user's links from Bitly.}
|
12
12
|
gem.summary = %q{Supports Bitly API V3}
|
13
13
|
gem.homepage = "https://github.com/aortbals/bitly_exporter"
|
14
|
+
gem.license = 'MIT'
|
14
15
|
|
15
16
|
gem.files = `git ls-files`.split($/)
|
16
17
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
@@ -19,9 +19,9 @@ module BitlyExporter
|
|
19
19
|
end
|
20
20
|
offset = offset + LIMIT
|
21
21
|
sleep(0.5) # Let's not bull rush the API
|
22
|
-
print "#{offset} links retrieved
|
22
|
+
print "\r#{offset} links retrieved..." if progress
|
23
23
|
end while links.count > 0 && offset < max
|
24
|
-
|
24
|
+
puts "\nFinished. #{results.count} links retrieved." if progress
|
25
25
|
results
|
26
26
|
end
|
27
27
|
end
|
@@ -17,6 +17,18 @@ describe BitlyExporter::Exporter do
|
|
17
17
|
it "should retrieve the maximum" do
|
18
18
|
expect(subject).to have(200).items
|
19
19
|
end
|
20
|
+
|
21
|
+
context "and a block" do
|
22
|
+
subject do
|
23
|
+
BitlyExporter::Exporter.new(user)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "should yield 200 times" do
|
27
|
+
VCR.use_cassette "with maximum" do
|
28
|
+
expect { |link| subject.export(false, 200, &link) }.to yield_control.exactly(200).times
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
20
32
|
end
|
21
33
|
|
22
34
|
context "no maximum" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bitly_exporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Ortbals
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -126,7 +126,8 @@ files:
|
|
126
126
|
- spec/support/contexts/oauth_context.rb
|
127
127
|
- spec/support/matchers/a_link_with_matcher.rb
|
128
128
|
homepage: https://github.com/aortbals/bitly_exporter
|
129
|
-
licenses:
|
129
|
+
licenses:
|
130
|
+
- MIT
|
130
131
|
metadata: {}
|
131
132
|
post_install_message:
|
132
133
|
rdoc_options: []
|
@@ -139,9 +140,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
139
140
|
version: '0'
|
140
141
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
142
|
requirements:
|
142
|
-
- - '
|
143
|
+
- - '>='
|
143
144
|
- !ruby/object:Gem::Version
|
144
|
-
version:
|
145
|
+
version: '0'
|
145
146
|
requirements: []
|
146
147
|
rubyforge_project:
|
147
148
|
rubygems_version: 2.0.3
|