BtSync 0.5.3 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +8 -8
  2. data/.rubocop.yml +3 -0
  3. data/.travis.yml +2 -2
  4. data/README.md +1 -0
  5. data/btsync.gemspec +1 -0
  6. data/lib/btsync.rb +90 -50
  7. data/lib/btsync/communicator.rb +36 -15
  8. data/lib/btsync/directory.rb +106 -51
  9. data/lib/btsync/version.rb +2 -1
  10. data/spec/BtSync/bt_sync_spec.rb +85 -59
  11. data/spec/BtSync/directory_spec.rb +77 -30
  12. data/spec/fixtures/cassettes/Remove-Default-Host.yml +3 -3
  13. data/spec/fixtures/cassettes/Setup-BtSync-Directory.yml +48 -46
  14. data/spec/fixtures/cassettes/Setup-BtSync.yml +287 -32
  15. data/spec/fixtures/cassettes/Setup-Directory-Settings.yml +6 -6
  16. data/spec/fixtures/cassettes/add-folder-list.yml +33 -30
  17. data/spec/fixtures/cassettes/add-folder.yml +67 -10
  18. data/spec/fixtures/cassettes/add-known-host.yml +8 -9
  19. data/spec/fixtures/cassettes/change_download_limit.yml +9 -9
  20. data/spec/fixtures/cassettes/change_listening_port.yml +9 -9
  21. data/spec/fixtures/cassettes/change_name.yml +9 -9
  22. data/spec/fixtures/cassettes/change_secret_custom.yml +59 -0
  23. data/spec/fixtures/cassettes/change_secret_empty.yml +59 -0
  24. data/spec/fixtures/cassettes/change_secret_error.yml +30 -0
  25. data/spec/fixtures/cassettes/change_upload_limit.yml +9 -9
  26. data/spec/fixtures/cassettes/check_for_new_version.yml +30 -0
  27. data/spec/fixtures/cassettes/check_is_writable.yml +32 -0
  28. data/spec/fixtures/cassettes/check_speeds.yml +33 -0
  29. data/spec/fixtures/cassettes/delete-directory.yml +379 -0
  30. data/spec/fixtures/cassettes/get-folders.yml +19 -76
  31. data/spec/fixtures/cassettes/get-os-type.yml +3 -3
  32. data/spec/fixtures/cassettes/get-peers.yml +8 -7
  33. data/spec/fixtures/cassettes/get-preferences.yml +24 -24
  34. data/spec/fixtures/cassettes/get-settings.yml +3 -3
  35. data/spec/fixtures/cassettes/get_dir.yml +93 -0
  36. data/spec/fixtures/cassettes/get_read_only_secret.yml +32 -0
  37. data/spec/fixtures/cassettes/{get-version.yml → get_version.yml} +4 -4
  38. data/spec/fixtures/cassettes/remove-folder-list.yml +19 -17
  39. data/spec/fixtures/cassettes/remove-folder.yml +36 -33
  40. data/spec/fixtures/cassettes/remove-known-host.yml +35 -8
  41. data/spec/fixtures/cassettes/reset_device_name.yml +9 -9
  42. data/spec/fixtures/cassettes/reset_download_limit.yml +9 -9
  43. data/spec/fixtures/cassettes/reset_listening_port.yml +9 -9
  44. data/spec/fixtures/cassettes/reset_secret.yml +31 -0
  45. data/spec/fixtures/cassettes/reset_upload_limit.yml +9 -9
  46. data/spec/fixtures/cassettes/set-preferences-delete.yml +11 -11
  47. data/spec/fixtures/cassettes/set-preferences-dht.yml +11 -11
  48. data/spec/fixtures/cassettes/set-preferences-hosts.yml +11 -11
  49. data/spec/fixtures/cassettes/set-preferences-lan.yml +11 -11
  50. data/spec/fixtures/cassettes/set-preferences-relay.yml +11 -11
  51. data/spec/fixtures/cassettes/set-preferences-tracker.yml +11 -11
  52. data/spec/fixtures/cassettes/view-folders.yml +3 -3
  53. data/spec/spec_helper.rb +7 -8
  54. metadata +39 -4
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module BtsyncVersion
2
- VERSION = "0.5.3"
3
+ VERSION = '0.6.1'
3
4
  end
@@ -1,119 +1,145 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
1
+ # encoding: utf-8
2
+ my_testing_path = File.join(File.dirname(__FILE__), '..', 'spec_helper')
3
+ require File.expand_path(my_testing_path)
2
4
  require 'btsync'
3
5
  describe 'BtSync' do
4
6
  before(:each) do
5
- VCR.use_cassette("Setup-BtSync") do
7
+ VCR.use_cassette('Setup-BtSync') do
6
8
  @bt = BtSync.new
9
+ @bt.folders.each { |f| @bt.remove_folder f.name }
7
10
  @bt.add_folder '/home/vagrant'
8
11
  @bt.listening_port = 63754
9
12
  @bt.upload_limit = 0
10
- @bt.device_name = "precise32 - Default Instance"
13
+ @bt.device_name = 'precise32 - Default Instance'
11
14
  end
12
15
  end
13
-
14
- it "can view a folder list" do
15
- VCR.use_cassette("get-folders") do
16
+ it 'can check for errors' do
17
+ @bt.errors.should be == []
18
+ end
19
+ it 'can view folders on a system' do
20
+ VCR.use_cassette('get dir') do
21
+ @bt.get_dir.should include '/bin'
22
+ @bt.get_dir.should include '/etc'
23
+ @bt.get_dir.should include '/home'
24
+ end
25
+ end
26
+ it 'can get the version' do
27
+ VCR.use_cassette('get version') do
28
+ @bt.get_version.should be >= 16_842_767
29
+ end
30
+ end
31
+ it 'can view a folder list' do
32
+ VCR.use_cassette('get-folders') do
16
33
  @folder = @bt.folders.first
17
34
  end
18
- @folder.name.should == "/home/vagrant"
35
+ @folder.name.should be == '/home/vagrant'
19
36
  end
20
- it "can view settings" do
21
- VCR.use_cassette("get-settings") do
37
+ it 'can view settings' do
38
+ VCR.use_cassette('get-settings') do
22
39
  @settings = @bt.get_settings
23
40
  end
24
- @settings["devicename"].should == "precise32 - Default Instance"
25
- @settings["listeningport"].should == 63754
41
+ @settings['devicename'].should be == 'precise32 - Default Instance'
42
+ @settings['listeningport'].should be == 63754
26
43
  end
27
- it "can get listening port" do
28
- VCR.use_cassette("get-settings") do
29
- @bt.listening_port.should == 63754
44
+ it 'can get listening port' do
45
+ VCR.use_cassette('get-settings') do
46
+ @bt.listening_port.should be == 63754
30
47
  end
31
48
  end
32
- it "can get upload limit" do
33
- VCR.use_cassette("get-settings") do
34
- @bt.upload_limit.should == 0
49
+ it 'can get upload limit' do
50
+ VCR.use_cassette('get-settings') do
51
+ @bt.upload_limit.should be == 0
35
52
  end
36
53
  end
37
- it "can get download limit" do
38
- VCR.use_cassette("get-settings") do
39
- @bt.download_limit.should == 0
54
+ it 'can get download limit' do
55
+ VCR.use_cassette('get-settings') do
56
+ @bt.download_limit.should be == 0
40
57
  end
41
58
  end
42
- it "can get device name" do
43
- VCR.use_cassette("get-settings") do
44
- @bt.device_name.should == "precise32 - Default Instance"
59
+ it 'can get device name' do
60
+ VCR.use_cassette('get-settings') do
61
+ @bt.device_name.should be == 'precise32 - Default Instance'
45
62
  end
46
63
  end
47
- it "can change the device_name" do
48
- VCR.use_cassette("change_name") do
49
- @bt.device_name = "IceyEC-Virtual2"
50
- @bt.device_name.should == "IceyEC-Virtual2"
64
+ it 'can change the device_name' do
65
+ VCR.use_cassette('change_name') do
66
+ @bt.device_name = 'IceyEC-Virtual2'
67
+ @bt.device_name.should be == 'IceyEC-Virtual2'
51
68
  end
52
69
  VCR.use_cassette('reset_device_name') do
53
- @bt.device_name = "precise32 - Default Instance"
54
- @bt.device_name.should == "precise32 - Default Instance"
70
+ @bt.device_name = 'precise32 - Default Instance'
71
+ @bt.device_name.should be == 'precise32 - Default Instance'
55
72
  end
56
73
  end
57
- it "can change the upload limit" do
58
- VCR.use_cassette("change_upload_limit") do
74
+ it 'can change the upload limit' do
75
+ VCR.use_cassette('change_upload_limit') do
59
76
  @bt.upload_limit = 1000
60
- @bt.upload_limit.should == 1000
77
+ @bt.upload_limit.should be == 1000
61
78
  end
62
79
  VCR.use_cassette('reset_upload_limit') do
63
80
  @bt.upload_limit = 0
64
- @bt.upload_limit.should == 0
81
+ @bt.upload_limit.should be == 0
65
82
  end
66
83
  end
67
- it "can change the download limit" do
68
- VCR.use_cassette("change_download_limit") do
84
+ it 'can change the download limit' do
85
+ VCR.use_cassette('change_download_limit') do
69
86
  @bt.download_limit = 1000
70
- @bt.download_limit.should == 1000
87
+ @bt.download_limit.should be == 1000
71
88
  end
72
89
  VCR.use_cassette('reset_download_limit') do
73
90
  @bt.download_limit = 0
74
- @bt.download_limit.should == 0
91
+ @bt.download_limit.should be == 0
75
92
  end
76
93
  end
77
- it "can change the listening_port" do
78
- VCR.use_cassette("change_listening_port") do
94
+ it 'can change the listening_port' do
95
+ VCR.use_cassette('change_listening_port') do
79
96
  @bt.listening_port = 12345
80
- @bt.listening_port.should == 12345
97
+ @bt.listening_port.should be == 12345
81
98
  end
82
99
  VCR.use_cassette('reset_listening_port') do
83
100
  @bt.listening_port = 63754
84
- @bt.listening_port.should == 63754
101
+ @bt.listening_port.should be == 63754
85
102
  end
86
103
  end
87
- it "can check the OS" do
88
- VCR.use_cassette("get-os-type") do
104
+ it 'can check the OS' do
105
+ VCR.use_cassette('get-os-type') do
89
106
  @os = @bt.get_os_type
90
107
  end
91
- @os.should == "linux"
92
- end
93
- it "can get the version" do
94
- VCR.use_cassette("get-version") do
95
- @version = @bt.get_version
96
- end
97
- @version.should == 16777350
108
+ @os.should be == 'linux'
98
109
  end
99
- it "can add and delete a folder" do
100
- VCR.use_cassette("add-folder") do
110
+ it 'can add and delete a folder' do
111
+ VCR.use_cassette('add-folder') do
101
112
  @bt.add_folder '/tmp'
102
113
  end
103
- VCR.use_cassette("add-folder-list") do
114
+ VCR.use_cassette('add-folder-list') do
104
115
  folders = @bt.folders
105
- folders.count.should == 2
116
+ folders.count.should be == 2
106
117
  folder = folders.last
107
- folder.name.should == "/tmp"
118
+ folder.name.should be == '/tmp'
108
119
  end
109
- VCR.use_cassette("remove-folder") do
120
+ VCR.use_cassette('remove-folder') do
110
121
  @bt.remove_folder '/tmp'
111
122
  end
112
- VCR.use_cassette("remove-folder-list") do
123
+ VCR.use_cassette('remove-folder-list') do
113
124
  folders = @bt.folders
114
- folders.count.should == 1
125
+ folders.count.should be == 1
115
126
  folder = folders.last
116
- folder.name.should == "/home/vagrant"
127
+ folder.name.should be == '/home/vagrant'
128
+ end
129
+ end
130
+ it 'can check speeds' do
131
+ VCR.use_cassette('check speeds') do
132
+ @bt.up.should be == {speed: 0.0, metric: 'kB/s'}
133
+ end
134
+ VCR.use_cassette('check speeds') do
135
+ @bt.down.should be == {speed: 0.0, metric: 'kB/s'}
136
+ end
137
+ end
138
+ it 'can check for new versions' do
139
+ VCR.use_cassette('check for new version') do
140
+ res = @bt.check_new_version
141
+ res["url"].should be == ""
142
+ res["version"].should be == 0
117
143
  end
118
144
  end
119
145
  end
@@ -1,18 +1,20 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
1
+ # encoding: utf-8
2
+ my_testing_path = File.join(File.dirname(__FILE__), '..', 'spec_helper')
3
+ require File.expand_path(my_testing_path)
2
4
 
3
5
  describe 'BtSync::Directory' do
4
6
  before(:each) do
5
- VCR.use_cassette("Setup-BtSync-Directory") do
7
+ VCR.use_cassette('Setup-BtSync-Directory') do
6
8
  @bt = BtSync.new
7
9
  @bt.add_folder '/home/vagrant'
8
10
  @bt.listening_port = 63754
9
11
  @bt.upload_limit = 0
10
- @bt.device_name = "precise32 - Default Instance"
12
+ @bt.device_name = 'precise32 - Default Instance'
11
13
  @directory = @bt.folders.first
12
14
  end
13
15
  VCR.use_cassette('Setup-Directory-Settings') do
14
16
  @directory.send('default_settings')
15
- @directory.add_host('192.168.1.5','45685')
17
+ @directory.add_host('192.168.1.5', '45685')
16
18
  end
17
19
  end
18
20
  after(:each) do
@@ -23,75 +25,120 @@ describe 'BtSync::Directory' do
23
25
  @directory.remove_host 0
24
26
  end
25
27
  end
26
- it "can view contained folders" do
27
- VCR.use_cassette("view-folders") do
28
+ it 'can destroy itself' do
29
+ VCR.use_cassette('delete-directory') do
30
+ dir = BtSync::Directory.new('/usr/share', @bt.generate_secret, @bt)
31
+ @bt.folders.map(&:name).should include dir.name
32
+ dir.destroy
33
+ @bt.folders.map(&:name).should_not include dir.name
34
+ end
35
+ end
36
+ it 'will have errors if you update with a bad secret' do
37
+ @secret = @directory.secret
38
+ VCR.use_cassette('change secret error') do
39
+ new_secret = '123456'
40
+ @directory.update_secret(new_secret)
41
+ @directory.secret.should be == @secret
42
+ @directory.errors.should include "Invalid Secret"
43
+ end
44
+ end
45
+ it 'can view contained folders' do
46
+ VCR.use_cassette('view-folders') do
28
47
  @folders = @directory.folders
29
48
  end
30
49
  @folders.should == []
31
50
  end
32
- it "can get a list of peers" do
33
- VCR.use_cassette("get-peers") do
51
+ it 'can get a list of peers' do
52
+ VCR.use_cassette('get-peers') do
34
53
  @peers = @directory.peers
35
54
  end
36
55
  @peers.should == []
37
56
  end
38
- it "can add and remove a known host" do
57
+ it 'can add and remove a known host' do
39
58
  VCR.use_cassette('add-known-host') do
40
59
  @directory.add_host('10.0.1.254', '12345')
41
60
  @hosts = @directory.known_hosts
42
61
  end
43
- @hosts[1].should == "10.0.1.254:12345"
62
+ @hosts.values.should include '10.0.1.254:12345'
44
63
 
45
64
  VCR.use_cassette('remove-known-host') do
46
- @directory.remove_host(1)
65
+ @directory.remove_host_by_ip('10.0.1.254')
47
66
  @hosts = @directory.known_hosts
48
67
  end
49
68
  @hosts.values.should_not include '10.0.1.254:12345'
50
69
  end
51
70
  it "can check it's settings" do
52
- VCR.use_cassette("get-preferences") do
53
- @directory.use_tracker?.should == true
54
- @directory.use_hosts?.should == true
55
- @directory.search_lan?.should == true
56
- @directory.search_dht?.should == false
57
- @directory.use_relay?.should == true
58
- @directory.delete_to_trash?.should == true
71
+ VCR.use_cassette('get-preferences') do
72
+ @directory.use_tracker?.should be == true
73
+ @directory.use_hosts?.should be == true
74
+ @directory.search_lan?.should be == true
75
+ @directory.search_dht?.should be == false
76
+ @directory.use_relay?.should be == true
77
+ @directory.delete_to_trash?.should be == true
59
78
  end
60
79
  end
61
80
  it "can change it's tracker settings" do
62
- VCR.use_cassette("set-preferences-tracker") do
81
+ VCR.use_cassette('set-preferences-tracker') do
63
82
  @directory.use_tracker = false
64
- @directory.use_tracker?.should == false
83
+ @directory.use_tracker?.should be == false
65
84
  end
66
85
  end
67
86
  it "can change it's hosts settings" do
68
- VCR.use_cassette("set-preferences-hosts") do
87
+ VCR.use_cassette('set-preferences-hosts') do
69
88
  @directory.use_hosts = false
70
- @directory.use_hosts?.should == false
89
+ @directory.use_hosts?.should be == false
71
90
  end
72
91
  end
73
92
  it "can change it's lan settings" do
74
- VCR.use_cassette("set-preferences-lan") do
93
+ VCR.use_cassette('set-preferences-lan') do
75
94
  @directory.search_lan = false
76
- @directory.search_lan?.should == false
95
+ @directory.search_lan?.should be == false
77
96
  end
78
97
  end
79
98
  it "can change it's dht settings" do
80
- VCR.use_cassette("set-preferences-dht") do
99
+ VCR.use_cassette('set-preferences-dht') do
81
100
  @directory.search_dht = true
82
- @directory.search_dht?.should == true
101
+ @directory.search_dht?.should be == true
83
102
  end
84
103
  end
85
104
  it "can change it's relay settings" do
86
- VCR.use_cassette("set-preferences-relay") do
105
+ VCR.use_cassette('set-preferences-relay') do
87
106
  @directory.use_relay = false
88
- @directory.use_relay?.should == false
107
+ @directory.use_relay?.should be == false
89
108
  end
90
109
  end
91
110
  it "can change it's delete settings" do
92
- VCR.use_cassette("set-preferences-delete") do
111
+ VCR.use_cassette('set-preferences-delete') do
93
112
  @directory.delete_to_trash = false
94
- @directory.delete_to_trash?.should == false
113
+ @directory.delete_to_trash?.should be == false
114
+ end
115
+ end
116
+ it "can change it's secret" do
117
+ @secret = @directory.secret
118
+ VCR.use_cassette('change secret empty') do
119
+ @directory.update_secret
120
+ @directory.secret.should_not be == @secret
121
+ end
122
+
123
+ VCR.use_cassette('change secret custom') do
124
+ new_secret = @directory.generate_secret
125
+ @directory.update_secret(new_secret)
126
+ @directory.secret.should_not be == @secret
127
+ @directory.secret.should be == new_secret
128
+ end
129
+ VCR.use_cassette('reset secret') do
130
+ @directory.update_secret(@secret)
131
+ end
132
+ @directory.secret.should be == @secret
133
+ end
134
+ it 'can get a read only secret' do
135
+ VCR.use_cassette('get read only secret') do
136
+ @directory.read_only_secret.should_not be == nil
137
+ end
138
+ end
139
+ it 'can check writable' do
140
+ VCR.use_cassette('check is writable') do
141
+ @directory.is_writable?.should be == true
95
142
  end
96
143
  end
97
144
  end
@@ -2,13 +2,13 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://admin:AdminPassword@localhost:8888/gui/?action=removeknownhosts&index=0&name=/home/vagrant&output=json&secret=XEQRSGSJGGNKCTV4UZG2ZPOJRINGDE2C&token=RZbVuwWEheFdAfByFpevSH6m3_t2y6Brna0IR68P0vD7nryy2Ktd6gTBuFEAAAAA
5
+ uri: http://admin:AdminPassword@localhost:8888/gui/?action=removeknownhosts&index=0&name=/home/vagrant&output=json&secret=WQUVU4Y24ZUVTJKQ5GUGV4HTTJUE2SG2&token=ejWv64pWCtIPBpqIfktISTdvRTZ3BcZ0enIRIZ_AMOIUf-TCNkPF7iiMxFEAAAAA
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  Cookie:
11
- - GUID=TotE2NElyDGhazP4Fk3b
11
+ - GUID=rjaBHJHENSXofGDyyThi
12
12
  response:
13
13
  status:
14
14
  code: 200
@@ -26,5 +26,5 @@ http_interactions:
26
26
  encoding: US-ASCII
27
27
  string: ! '{ }'
28
28
  http_version:
29
- recorded_at: Wed, 12 Jun 2013 18:42:12 GMT
29
+ recorded_at: Fri, 21 Jun 2013 17:23:53 GMT
30
30
  recorded_with: VCR 2.5.0
@@ -19,23 +19,23 @@ http_interactions:
19
19
  Content-Type:
20
20
  - text/html
21
21
  Set-Cookie:
22
- - GUID=oSOYFPariyKyDcK5cH6T; path=/
22
+ - GUID=vJsxm27ZeCjb15oCKsMQ; path=/
23
23
  Cache-Control:
24
24
  - no-cache
25
25
  body:
26
26
  encoding: US-ASCII
27
- string: <html><div id='token' style='display:none;'>FtMlGFaG-UGhYqewQBmHsklKwM3z3AaVmSQmJ_nced9Ku40971WYlATBuFEAAAAA</div></html>
27
+ string: <html><div id='token' style='display:none;'>hsWIFgjPTuDH4lS61vcgpFzFxMAun23ju9bbaQ8osP3amEPtHuyUViiMxFEAAAAA</div></html>
28
28
  http_version:
29
- recorded_at: Wed, 12 Jun 2013 18:42:12 GMT
29
+ recorded_at: Fri, 21 Jun 2013 17:23:52 GMT
30
30
  - request:
31
31
  method: get
32
- uri: http://admin:AdminPassword@localhost:8888/gui/?action=generatesecret&output=json&token=FtMlGFaG-UGhYqewQBmHsklKwM3z3AaVmSQmJ_nced9Ku40971WYlATBuFEAAAAA
32
+ uri: http://admin:AdminPassword@localhost:8888/gui/?action=generatesecret&output=json&token=hsWIFgjPTuDH4lS61vcgpFzFxMAun23ju9bbaQ8osP3amEPtHuyUViiMxFEAAAAA
33
33
  body:
34
34
  encoding: US-ASCII
35
35
  string: ''
36
36
  headers:
37
37
  Cookie:
38
- - GUID=oSOYFPariyKyDcK5cH6T
38
+ - GUID=vJsxm27ZeCjb15oCKsMQ
39
39
  response:
40
40
  status:
41
41
  code: 200
@@ -51,19 +51,19 @@ http_interactions:
51
51
  - no-cache
52
52
  body:
53
53
  encoding: US-ASCII
54
- string: ! '{ "rosecret": "RMXU6JFFMDZCWJM5U6SH6HN5X4C3BQOLG", "secret": "KSOH3TGB6AUFPDABYZYN3AUI7HBOHOWR"
54
+ string: ! '{ "rosecret": "RSBJE53RI75GYRXHUGXJ2ZVMUWE6MTHS7", "secret": "J7C6FWGZOII324QX4QDM7GEYDDP4BWML"
55
55
  }'
56
56
  http_version:
57
- recorded_at: Wed, 12 Jun 2013 18:42:12 GMT
57
+ recorded_at: Fri, 21 Jun 2013 17:23:52 GMT
58
58
  - request:
59
59
  method: get
60
- uri: http://admin:AdminPassword@localhost:8888/gui/?action=addsyncfolder&name=/home/vagrant&output=json&secret=KSOH3TGB6AUFPDABYZYN3AUI7HBOHOWR&token=FtMlGFaG-UGhYqewQBmHsklKwM3z3AaVmSQmJ_nced9Ku40971WYlATBuFEAAAAA
60
+ uri: http://admin:AdminPassword@localhost:8888/gui/?action=addsyncfolder&name=/home/vagrant&output=json&secret=J7C6FWGZOII324QX4QDM7GEYDDP4BWML&token=hsWIFgjPTuDH4lS61vcgpFzFxMAun23ju9bbaQ8osP3amEPtHuyUViiMxFEAAAAA
61
61
  body:
62
62
  encoding: US-ASCII
63
63
  string: ''
64
64
  headers:
65
65
  Cookie:
66
- - GUID=oSOYFPariyKyDcK5cH6T
66
+ - GUID=vJsxm27ZeCjb15oCKsMQ
67
67
  response:
68
68
  status:
69
69
  code: 200
@@ -80,19 +80,19 @@ http_interactions:
80
80
  body:
81
81
  encoding: US-ASCII
82
82
  string: ! '{ "error": 200, "message": "Selected folder is already added to BitTorrent
83
- Sync.", "n": "\/home\/vagrant", "secret": "KSOH3TGB6AUFPDABYZYN3AUI7HBOHOWR"
83
+ Sync.", "n": "\/home\/vagrant", "secret": "J7C6FWGZOII324QX4QDM7GEYDDP4BWML"
84
84
  }'
85
85
  http_version:
86
- recorded_at: Wed, 12 Jun 2013 18:42:12 GMT
86
+ recorded_at: Fri, 21 Jun 2013 17:23:52 GMT
87
87
  - request:
88
88
  method: get
89
- uri: http://admin:AdminPassword@localhost:8888/gui/?action=getsettings&output=json&token=FtMlGFaG-UGhYqewQBmHsklKwM3z3AaVmSQmJ_nced9Ku40971WYlATBuFEAAAAA
89
+ uri: http://admin:AdminPassword@localhost:8888/gui/?action=getsettings&output=json&token=hsWIFgjPTuDH4lS61vcgpFzFxMAun23ju9bbaQ8osP3amEPtHuyUViiMxFEAAAAA
90
90
  body:
91
91
  encoding: US-ASCII
92
92
  string: ''
93
93
  headers:
94
94
  Cookie:
95
- - GUID=oSOYFPariyKyDcK5cH6T
95
+ - GUID=vJsxm27ZeCjb15oCKsMQ
96
96
  response:
97
97
  status:
98
98
  code: 200
@@ -111,16 +111,16 @@ http_interactions:
111
111
  string: ! '{ "settings": { "devicename": "precise32 - Default Instance", "dlrate":
112
112
  0, "listeningport": 63754, "portmapping": 0, "ulrate": 0 } }'
113
113
  http_version:
114
- recorded_at: Wed, 12 Jun 2013 18:42:12 GMT
114
+ recorded_at: Fri, 21 Jun 2013 17:23:52 GMT
115
115
  - request:
116
116
  method: get
117
- uri: http://admin:AdminPassword@localhost:8888/gui/?action=setsettings&devicename=precise32%20-%20Default%20Instance&dlrate=0&listeningport=63754&output=json&portmapping=0&token=FtMlGFaG-UGhYqewQBmHsklKwM3z3AaVmSQmJ_nced9Ku40971WYlATBuFEAAAAA&ulrate=0
117
+ uri: http://admin:AdminPassword@localhost:8888/gui/?action=setsettings&devicename=precise32%20-%20Default%20Instance&dlrate=0&listeningport=63754&output=json&portmapping=0&token=hsWIFgjPTuDH4lS61vcgpFzFxMAun23ju9bbaQ8osP3amEPtHuyUViiMxFEAAAAA&ulrate=0
118
118
  body:
119
119
  encoding: US-ASCII
120
120
  string: ''
121
121
  headers:
122
122
  Cookie:
123
- - GUID=oSOYFPariyKyDcK5cH6T
123
+ - GUID=vJsxm27ZeCjb15oCKsMQ
124
124
  response:
125
125
  status:
126
126
  code: 200
@@ -138,16 +138,16 @@ http_interactions:
138
138
  encoding: US-ASCII
139
139
  string: ! '{ }'
140
140
  http_version:
141
- recorded_at: Wed, 12 Jun 2013 18:42:12 GMT
141
+ recorded_at: Fri, 21 Jun 2013 17:23:52 GMT
142
142
  - request:
143
143
  method: get
144
- uri: http://admin:AdminPassword@localhost:8888/gui/?action=getsettings&output=json&token=FtMlGFaG-UGhYqewQBmHsklKwM3z3AaVmSQmJ_nced9Ku40971WYlATBuFEAAAAA
144
+ uri: http://admin:AdminPassword@localhost:8888/gui/?action=getsettings&output=json&token=hsWIFgjPTuDH4lS61vcgpFzFxMAun23ju9bbaQ8osP3amEPtHuyUViiMxFEAAAAA
145
145
  body:
146
146
  encoding: US-ASCII
147
147
  string: ''
148
148
  headers:
149
149
  Cookie:
150
- - GUID=oSOYFPariyKyDcK5cH6T
150
+ - GUID=vJsxm27ZeCjb15oCKsMQ
151
151
  response:
152
152
  status:
153
153
  code: 200
@@ -166,16 +166,16 @@ http_interactions:
166
166
  string: ! '{ "settings": { "devicename": "precise32 - Default Instance", "dlrate":
167
167
  0, "listeningport": 63754, "portmapping": 0, "ulrate": 0 } }'
168
168
  http_version:
169
- recorded_at: Wed, 12 Jun 2013 18:42:12 GMT
169
+ recorded_at: Fri, 21 Jun 2013 17:23:52 GMT
170
170
  - request:
171
171
  method: get
172
- uri: http://admin:AdminPassword@localhost:8888/gui/?action=setsettings&devicename=precise32%20-%20Default%20Instance&dlrate=0&listeningport=63754&output=json&portmapping=0&token=FtMlGFaG-UGhYqewQBmHsklKwM3z3AaVmSQmJ_nced9Ku40971WYlATBuFEAAAAA&ulrate=0
172
+ uri: http://admin:AdminPassword@localhost:8888/gui/?action=setsettings&devicename=precise32%20-%20Default%20Instance&dlrate=0&listeningport=63754&output=json&portmapping=0&token=hsWIFgjPTuDH4lS61vcgpFzFxMAun23ju9bbaQ8osP3amEPtHuyUViiMxFEAAAAA&ulrate=0
173
173
  body:
174
174
  encoding: US-ASCII
175
175
  string: ''
176
176
  headers:
177
177
  Cookie:
178
- - GUID=oSOYFPariyKyDcK5cH6T
178
+ - GUID=vJsxm27ZeCjb15oCKsMQ
179
179
  response:
180
180
  status:
181
181
  code: 200
@@ -193,16 +193,16 @@ http_interactions:
193
193
  encoding: US-ASCII
194
194
  string: ! '{ }'
195
195
  http_version:
196
- recorded_at: Wed, 12 Jun 2013 18:42:12 GMT
196
+ recorded_at: Fri, 21 Jun 2013 17:23:52 GMT
197
197
  - request:
198
198
  method: get
199
- uri: http://admin:AdminPassword@localhost:8888/gui/?action=getsettings&output=json&token=FtMlGFaG-UGhYqewQBmHsklKwM3z3AaVmSQmJ_nced9Ku40971WYlATBuFEAAAAA
199
+ uri: http://admin:AdminPassword@localhost:8888/gui/?action=getsettings&output=json&token=hsWIFgjPTuDH4lS61vcgpFzFxMAun23ju9bbaQ8osP3amEPtHuyUViiMxFEAAAAA
200
200
  body:
201
201
  encoding: US-ASCII
202
202
  string: ''
203
203
  headers:
204
204
  Cookie:
205
- - GUID=oSOYFPariyKyDcK5cH6T
205
+ - GUID=vJsxm27ZeCjb15oCKsMQ
206
206
  response:
207
207
  status:
208
208
  code: 200
@@ -221,16 +221,16 @@ http_interactions:
221
221
  string: ! '{ "settings": { "devicename": "precise32 - Default Instance", "dlrate":
222
222
  0, "listeningport": 63754, "portmapping": 0, "ulrate": 0 } }'
223
223
  http_version:
224
- recorded_at: Wed, 12 Jun 2013 18:42:12 GMT
224
+ recorded_at: Fri, 21 Jun 2013 17:23:52 GMT
225
225
  - request:
226
226
  method: get
227
- uri: http://admin:AdminPassword@localhost:8888/gui/?action=setsettings&devicename=precise32%20-%20Default%20Instance&dlrate=0&listeningport=63754&output=json&portmapping=0&token=FtMlGFaG-UGhYqewQBmHsklKwM3z3AaVmSQmJ_nced9Ku40971WYlATBuFEAAAAA&ulrate=0
227
+ uri: http://admin:AdminPassword@localhost:8888/gui/?action=setsettings&devicename=precise32%20-%20Default%20Instance&dlrate=0&listeningport=63754&output=json&portmapping=0&token=hsWIFgjPTuDH4lS61vcgpFzFxMAun23ju9bbaQ8osP3amEPtHuyUViiMxFEAAAAA&ulrate=0
228
228
  body:
229
229
  encoding: US-ASCII
230
230
  string: ''
231
231
  headers:
232
232
  Cookie:
233
- - GUID=oSOYFPariyKyDcK5cH6T
233
+ - GUID=vJsxm27ZeCjb15oCKsMQ
234
234
  response:
235
235
  status:
236
236
  code: 200
@@ -248,16 +248,16 @@ http_interactions:
248
248
  encoding: US-ASCII
249
249
  string: ! '{ }'
250
250
  http_version:
251
- recorded_at: Wed, 12 Jun 2013 18:42:12 GMT
251
+ recorded_at: Fri, 21 Jun 2013 17:23:52 GMT
252
252
  - request:
253
253
  method: get
254
- uri: http://admin:AdminPassword@localhost:8888/gui/?action=getsyncfolders&output=json&token=FtMlGFaG-UGhYqewQBmHsklKwM3z3AaVmSQmJ_nced9Ku40971WYlATBuFEAAAAA
254
+ uri: http://admin:AdminPassword@localhost:8888/gui/?action=getsyncfolders&output=json&token=hsWIFgjPTuDH4lS61vcgpFzFxMAun23ju9bbaQ8osP3amEPtHuyUViiMxFEAAAAA
255
255
  body:
256
256
  encoding: US-ASCII
257
257
  string: ''
258
258
  headers:
259
259
  Cookie:
260
- - GUID=oSOYFPariyKyDcK5cH6T
260
+ - GUID=vJsxm27ZeCjb15oCKsMQ
261
261
  response:
262
262
  status:
263
263
  code: 200
@@ -266,18 +266,19 @@ http_interactions:
266
266
  Connection:
267
267
  - keep-alive
268
268
  Content-Length:
269
- - '180'
269
+ - '252'
270
270
  Content-Type:
271
271
  - application/json; charset=utf-8
272
272
  Cache-Control:
273
273
  - no-cache
274
274
  body:
275
275
  encoding: US-ASCII
276
- string: ! '{ "folders": [ { "name": "\/home\/vagrant", "peers": [ ], "secret":
277
- "XEQRSGSJGGNKCTV4UZG2ZPOJRINGDE2C", "size": "54.7 MB in 8 files" } ], "speed":
278
- "0.0 kB\/s up, 0.0 kB\/s down" }'
276
+ string: ! '{ "folders": [ { "iswritable": 1, "name": "\/home\/vagrant", "peers":
277
+ [ ], "readonlysecret": "RVVZWSMFWNP7EU4E7Q34ZQN46L4E57H3J", "secret": "WQUVU4Y24ZUVTJKQ5GUGV4HTTJUE2SG2",
278
+ "size": "54.7 MB in 8 files" } ], "speed": "0.0 kB\/s up, 0.0 kB\/s down"
279
+ }'
279
280
  http_version:
280
- recorded_at: Wed, 12 Jun 2013 18:42:12 GMT
281
+ recorded_at: Fri, 21 Jun 2013 17:23:52 GMT
281
282
  - request:
282
283
  method: get
283
284
  uri: http://admin:AdminPassword@localhost:8888/gui/token.html?output=json
@@ -297,23 +298,23 @@ http_interactions:
297
298
  Content-Type:
298
299
  - text/html
299
300
  Set-Cookie:
300
- - GUID=TotE2NElyDGhazP4Fk3b; path=/
301
+ - GUID=rjaBHJHENSXofGDyyThi; path=/
301
302
  Cache-Control:
302
303
  - no-cache
303
304
  body:
304
305
  encoding: US-ASCII
305
- string: <html><div id='token' style='display:none;'>RZbVuwWEheFdAfByFpevSH6m3_t2y6Brna0IR68P0vD7nryy2Ktd6gTBuFEAAAAA</div></html>
306
+ string: <html><div id='token' style='display:none;'>ejWv64pWCtIPBpqIfktISTdvRTZ3BcZ0enIRIZ_AMOIUf-TCNkPF7iiMxFEAAAAA</div></html>
306
307
  http_version:
307
- recorded_at: Wed, 12 Jun 2013 18:42:12 GMT
308
+ recorded_at: Fri, 21 Jun 2013 17:23:52 GMT
308
309
  - request:
309
310
  method: get
310
- uri: http://admin:AdminPassword@localhost:8888/gui/?action=getsyncfolders&output=json&token=RZbVuwWEheFdAfByFpevSH6m3_t2y6Brna0IR68P0vD7nryy2Ktd6gTBuFEAAAAA
311
+ uri: http://admin:AdminPassword@localhost:8888/gui/?action=getsyncfolders&output=json&token=ejWv64pWCtIPBpqIfktISTdvRTZ3BcZ0enIRIZ_AMOIUf-TCNkPF7iiMxFEAAAAA
311
312
  body:
312
313
  encoding: US-ASCII
313
314
  string: ''
314
315
  headers:
315
316
  Cookie:
316
- - GUID=TotE2NElyDGhazP4Fk3b
317
+ - GUID=rjaBHJHENSXofGDyyThi
317
318
  response:
318
319
  status:
319
320
  code: 200
@@ -322,16 +323,17 @@ http_interactions:
322
323
  Connection:
323
324
  - keep-alive
324
325
  Content-Length:
325
- - '180'
326
+ - '252'
326
327
  Content-Type:
327
328
  - application/json; charset=utf-8
328
329
  Cache-Control:
329
330
  - no-cache
330
331
  body:
331
332
  encoding: US-ASCII
332
- string: ! '{ "folders": [ { "name": "\/home\/vagrant", "peers": [ ], "secret":
333
- "XEQRSGSJGGNKCTV4UZG2ZPOJRINGDE2C", "size": "54.7 MB in 8 files" } ], "speed":
334
- "0.0 kB\/s up, 0.0 kB\/s down" }'
333
+ string: ! '{ "folders": [ { "iswritable": 1, "name": "\/home\/vagrant", "peers":
334
+ [ ], "readonlysecret": "RVVZWSMFWNP7EU4E7Q34ZQN46L4E57H3J", "secret": "WQUVU4Y24ZUVTJKQ5GUGV4HTTJUE2SG2",
335
+ "size": "54.7 MB in 8 files" } ], "speed": "0.0 kB\/s up, 0.0 kB\/s down"
336
+ }'
335
337
  http_version:
336
- recorded_at: Wed, 12 Jun 2013 18:42:12 GMT
338
+ recorded_at: Fri, 21 Jun 2013 17:23:52 GMT
337
339
  recorded_with: VCR 2.5.0