rbitter 0.2.0-java → 0.2.1-java
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/.gitignore +23 -22
- data/.rspec +2 -2
- data/.travis.yml +15 -15
- data/Gemfile +12 -12
- data/LICENSE.txt +22 -22
- data/Rakefile +8 -8
- data/bin/rbitter +20 -20
- data/lib/rbitter/arcserver.rb +169 -165
- data/lib/rbitter/console.rb +93 -93
- data/lib/rbitter/default/config_json.rb +41 -41
- data/lib/rbitter/dlthread.rb +62 -62
- data/lib/rbitter/env.rb +116 -116
- data/lib/rbitter/override/gems/rubysl-socket/socket.rb +8 -8
- data/lib/rbitter/override/gems/twitter/connection.rb +45 -45
- data/lib/rbitter/override.rb +47 -47
- data/lib/rbitter/progress.rb +23 -0
- data/lib/rbitter/records.rb +127 -127
- data/lib/rbitter/records_migrate/20150327_add_index.rb +11 -11
- data/lib/rbitter/records_migrate/20150504_add_replyto_column.rb +11 -11
- data/lib/rbitter/streaming.rb +104 -104
- data/lib/rbitter/version.rb +20 -20
- data/lib/rbitter/xmlrpc.rb +3 -3
- data/lib/rbitter/xmlrpcd/base.rb +24 -24
- data/lib/rbitter/xmlrpcd/rpchandles.rb +11 -11
- data/lib/rbitter/xmlrpcd/xmlrpc_auth_server.rb +82 -82
- data/lib/rbitter/xmlrpcd/xmlrpcd.rb +69 -69
- data/lib/rbitter.rb +62 -62
- data/rbitter.gemspec +46 -46
- data/spec/config/default.json +32 -32
- data/spec/rbitter/arcserver_spec.rb +30 -30
- data/spec/rbitter/console_spec.rb +9 -9
- data/spec/rbitter/default/config_json_spec.rb +3 -3
- data/spec/rbitter/dlthread_spec.rb +8 -8
- data/spec/rbitter/env_spec.rb +76 -76
- data/spec/rbitter/override/gems/twitter/connection_spec.rb +8 -8
- data/spec/rbitter/progress_spec.rb +1 -0
- data/spec/rbitter/records_spec.rb +13 -13
- data/spec/rbitter/streaming_spec.rb +9 -9
- data/spec/rbitter/version_spec.rb +8 -8
- data/spec/rbitter/xmlrpc_spec.rb +8 -8
- data/spec/rbitter/xmlrpcd/base_spec.rb +29 -29
- data/spec/rbitter/xmlrpcd/rpchandles_spec.rb +10 -10
- data/spec/rbitter/xmlrpcd/xmlrpc_auth_server_spec.rb +8 -8
- data/spec/rbitter/xmlrpcd/xmlrpcd_spec.rb +9 -9
- data/spec/rbitter_spec.rb +38 -38
- data/spec/spec_helper.rb +39 -39
- metadata +6 -3
@@ -1,29 +1,29 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require "rbitter/xmlrpcd/base"
|
4
|
-
|
5
|
-
describe RPCHandles do
|
6
|
-
context 'when RH_INFO Struct is served as RPCHandle information,' do
|
7
|
-
it 'structs corrct Struct::RPCHANDLE_INFO' do
|
8
|
-
# String comparison: use eq(==), not be(===)
|
9
|
-
expect(RPCHandles::RH_INFO.to_s).to eq("Struct::RPCHANDLE_INFO")
|
10
|
-
end
|
11
|
-
|
12
|
-
it 'provides correct information when #digest is called' do
|
13
|
-
digest_string = RPCHandles::RH_INFO.new('test', 0.1, 'test', 'test').digest
|
14
|
-
expect(digest_string).to eq("<rpchandle: test-0.1 (written by test, test)>")
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
describe RPCHandles::BaseHandle do
|
20
|
-
context 'when an RPCHandle inherits one of classes Auth and NoAuth' do
|
21
|
-
it 'returns false on #auth? when an RPCHandle class inherits NoAuth' do
|
22
|
-
expect(RPCHandles::BaseHandle::NoAuth.auth?).to be(false)
|
23
|
-
end
|
24
|
-
|
25
|
-
it 'returns true on #auth? when an RPCHandle class inherits Auth' do
|
26
|
-
expect(RPCHandles::BaseHandle::Auth.auth?).to be(true)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require "rbitter/xmlrpcd/base"
|
4
|
+
|
5
|
+
describe RPCHandles do
|
6
|
+
context 'when RH_INFO Struct is served as RPCHandle information,' do
|
7
|
+
it 'structs corrct Struct::RPCHANDLE_INFO' do
|
8
|
+
# String comparison: use eq(==), not be(===)
|
9
|
+
expect(RPCHandles::RH_INFO.to_s).to eq("Struct::RPCHANDLE_INFO")
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'provides correct information when #digest is called' do
|
13
|
+
digest_string = RPCHandles::RH_INFO.new('test', 0.1, 'test', 'test').digest
|
14
|
+
expect(digest_string).to eq("<rpchandle: test-0.1 (written by test, test)>")
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe RPCHandles::BaseHandle do
|
20
|
+
context 'when an RPCHandle inherits one of classes Auth and NoAuth' do
|
21
|
+
it 'returns false on #auth? when an RPCHandle class inherits NoAuth' do
|
22
|
+
expect(RPCHandles::BaseHandle::NoAuth.auth?).to be(false)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'returns true on #auth? when an RPCHandle class inherits Auth' do
|
26
|
+
expect(RPCHandles::BaseHandle::Auth.auth?).to be(true)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -1,10 +1,10 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
require "rbitter/xmlrpcd/rpchandles"
|
3
|
-
|
4
|
-
describe RPCHandles do
|
5
|
-
context 'When features related to authentication needs ::auth method,'
|
6
|
-
it 'responds to ::auth' do
|
7
|
-
expect(RPCHandles.respond_to?(:auth)).to be(true)
|
8
|
-
expect(RPCHandles.auth).to be_a(NilClass)
|
9
|
-
end
|
10
|
-
end
|
1
|
+
# encoding: utf-8
|
2
|
+
require "rbitter/xmlrpcd/rpchandles"
|
3
|
+
|
4
|
+
describe RPCHandles do
|
5
|
+
context 'When features related to authentication needs ::auth method,'
|
6
|
+
it 'responds to ::auth' do
|
7
|
+
expect(RPCHandles.respond_to?(:auth)).to be(true)
|
8
|
+
expect(RPCHandles.auth).to be_a(NilClass)
|
9
|
+
end
|
10
|
+
end
|
@@ -1,8 +1,8 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
require "rbitter/xmlrpcd/xmlrpc_auth_server"
|
3
|
-
|
4
|
-
describe Rbitter do
|
5
|
-
it 'Rbitter is a module' do
|
6
|
-
expect(Rbitter.class === Module).to be(true)
|
7
|
-
end
|
8
|
-
end
|
1
|
+
# encoding: utf-8
|
2
|
+
require "rbitter/xmlrpcd/xmlrpc_auth_server"
|
3
|
+
|
4
|
+
describe Rbitter do
|
5
|
+
it 'Rbitter is a module' do
|
6
|
+
expect(Rbitter.class === Module).to be(true)
|
7
|
+
end
|
8
|
+
end
|
@@ -1,9 +1,9 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require "rbitter/xmlrpcd/xmlrpcd"
|
4
|
-
|
5
|
-
describe Rbitter do
|
6
|
-
it 'Rbitter is a module' do
|
7
|
-
expect(Rbitter.class === Module).to be(true)
|
8
|
-
end
|
9
|
-
end
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require "rbitter/xmlrpcd/xmlrpcd"
|
4
|
+
|
5
|
+
describe Rbitter do
|
6
|
+
it 'Rbitter is a module' do
|
7
|
+
expect(Rbitter.class === Module).to be(true)
|
8
|
+
end
|
9
|
+
end
|
data/spec/rbitter_spec.rb
CHANGED
@@ -1,38 +1,38 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require "rbitter"
|
4
|
-
|
5
|
-
describe Rbitter do
|
6
|
-
context 'when a user requests help message,' do
|
7
|
-
it 'shows help message' do
|
8
|
-
Rbitter.bootstrap(['help'])
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
context 'when \'configure\' option is given,' do
|
13
|
-
it 'installs default config.json' do
|
14
|
-
Rbitter.bootstrap(["configure"])
|
15
|
-
expect(File.file?('config.json')).to be(true)
|
16
|
-
expect(File.delete('config.json')).to be(1)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
context 'when config.json is installed,' do
|
21
|
-
before(:all) do
|
22
|
-
Rbitter.bootstrap(['configure'])
|
23
|
-
end
|
24
|
-
|
25
|
-
it 'bootstraps nothing when empty ARGV is given' do
|
26
|
-
Rbitter.bootstrap([])
|
27
|
-
end
|
28
|
-
|
29
|
-
it 'displays buffered logs with \'logs\' argument' do
|
30
|
-
Rbitter.bootstrap(["logs"])
|
31
|
-
end
|
32
|
-
|
33
|
-
after(:all) do
|
34
|
-
expect(File.file?('config.json')).to be(true)
|
35
|
-
expect(File.delete('config.json')).to be(1)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require "rbitter"
|
4
|
+
|
5
|
+
describe Rbitter do
|
6
|
+
context 'when a user requests help message,' do
|
7
|
+
it 'shows help message' do
|
8
|
+
Rbitter.bootstrap(['help'])
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
context 'when \'configure\' option is given,' do
|
13
|
+
it 'installs default config.json' do
|
14
|
+
Rbitter.bootstrap(["configure"])
|
15
|
+
expect(File.file?('config.json')).to be(true)
|
16
|
+
expect(File.delete('config.json')).to be(1)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
context 'when config.json is installed,' do
|
21
|
+
before(:all) do
|
22
|
+
Rbitter.bootstrap(['configure'])
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'bootstraps nothing when empty ARGV is given' do
|
26
|
+
Rbitter.bootstrap([])
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'displays buffered logs with \'logs\' argument' do
|
30
|
+
Rbitter.bootstrap(["logs"])
|
31
|
+
end
|
32
|
+
|
33
|
+
after(:all) do
|
34
|
+
expect(File.file?('config.json')).to be(true)
|
35
|
+
expect(File.delete('config.json')).to be(1)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,39 +1,39 @@
|
|
1
|
-
require 'simplecov'
|
2
|
-
require 'coveralls'
|
3
|
-
|
4
|
-
Coveralls.wear!
|
5
|
-
|
6
|
-
SimpleCov.start do
|
7
|
-
add_filter '/spec/'
|
8
|
-
end
|
9
|
-
|
10
|
-
require 'rbitter'
|
11
|
-
require 'rspec'
|
12
|
-
|
13
|
-
RSpec.configure do |config|
|
14
|
-
# rspec-expectations config goes here. You can use an alternate
|
15
|
-
# assertion/expectation library such as wrong or the stdlib/minitest
|
16
|
-
# assertions if you prefer.
|
17
|
-
config.expect_with :rspec do |expectations|
|
18
|
-
# This option will default to `true` in RSpec 4. It makes the `description`
|
19
|
-
# and `failure_message` of custom matchers include text for helper methods
|
20
|
-
# defined using `chain`, e.g.:
|
21
|
-
# be_bigger_than(2).and_smaller_than(4).description
|
22
|
-
# # => "be bigger than 2 and smaller than 4"
|
23
|
-
# ...rather than:
|
24
|
-
# # => "be bigger than 2"
|
25
|
-
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
26
|
-
end
|
27
|
-
|
28
|
-
# rspec-mocks config goes here. You can use an alternate test double
|
29
|
-
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
30
|
-
config.mock_with :rspec do |mocks|
|
31
|
-
# Prevents you from mocking or stubbing a method that does not exist on
|
32
|
-
# a real object. This is generally recommended, and will default to
|
33
|
-
# `true` in RSpec 4.
|
34
|
-
mocks.verify_partial_doubles = true
|
35
|
-
end
|
36
|
-
|
37
|
-
config.warnings = true
|
38
|
-
config.order = :random
|
39
|
-
end
|
1
|
+
require 'simplecov'
|
2
|
+
require 'coveralls'
|
3
|
+
|
4
|
+
Coveralls.wear!
|
5
|
+
|
6
|
+
SimpleCov.start do
|
7
|
+
add_filter '/spec/'
|
8
|
+
end
|
9
|
+
|
10
|
+
require 'rbitter'
|
11
|
+
require 'rspec'
|
12
|
+
|
13
|
+
RSpec.configure do |config|
|
14
|
+
# rspec-expectations config goes here. You can use an alternate
|
15
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
16
|
+
# assertions if you prefer.
|
17
|
+
config.expect_with :rspec do |expectations|
|
18
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
19
|
+
# and `failure_message` of custom matchers include text for helper methods
|
20
|
+
# defined using `chain`, e.g.:
|
21
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
22
|
+
# # => "be bigger than 2 and smaller than 4"
|
23
|
+
# ...rather than:
|
24
|
+
# # => "be bigger than 2"
|
25
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
26
|
+
end
|
27
|
+
|
28
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
29
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
30
|
+
config.mock_with :rspec do |mocks|
|
31
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
32
|
+
# a real object. This is generally recommended, and will default to
|
33
|
+
# `true` in RSpec 4.
|
34
|
+
mocks.verify_partial_doubles = true
|
35
|
+
end
|
36
|
+
|
37
|
+
config.warnings = true
|
38
|
+
config.order = :random
|
39
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbitter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Nidev Plontra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -189,6 +189,7 @@ files:
|
|
189
189
|
- lib/rbitter/override.rb
|
190
190
|
- lib/rbitter/override/gems/rubysl-socket/socket.rb
|
191
191
|
- lib/rbitter/override/gems/twitter/connection.rb
|
192
|
+
- lib/rbitter/progress.rb
|
192
193
|
- lib/rbitter/records.rb
|
193
194
|
- lib/rbitter/records_migrate/.keep
|
194
195
|
- lib/rbitter/records_migrate/20150327_add_index.rb
|
@@ -210,6 +211,7 @@ files:
|
|
210
211
|
- spec/rbitter/env_spec.rb
|
211
212
|
- spec/rbitter/override/gems/rubysl-socket/socket_spec.rb
|
212
213
|
- spec/rbitter/override/gems/twitter/connection_spec.rb
|
214
|
+
- spec/rbitter/progress_spec.rb
|
213
215
|
- spec/rbitter/records_spec.rb
|
214
216
|
- spec/rbitter/streaming_spec.rb
|
215
217
|
- spec/rbitter/version_spec.rb
|
@@ -241,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
241
243
|
version: '0'
|
242
244
|
requirements: []
|
243
245
|
rubyforge_project:
|
244
|
-
rubygems_version: 2.4.
|
246
|
+
rubygems_version: 2.4.5
|
245
247
|
signing_key:
|
246
248
|
specification_version: 4
|
247
249
|
summary: Rbitter is a Twitter client specialized in archiving
|
@@ -255,6 +257,7 @@ test_files:
|
|
255
257
|
- spec/rbitter/env_spec.rb
|
256
258
|
- spec/rbitter/override/gems/rubysl-socket/socket_spec.rb
|
257
259
|
- spec/rbitter/override/gems/twitter/connection_spec.rb
|
260
|
+
- spec/rbitter/progress_spec.rb
|
258
261
|
- spec/rbitter/records_spec.rb
|
259
262
|
- spec/rbitter/streaming_spec.rb
|
260
263
|
- spec/rbitter/version_spec.rb
|