admincredible 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data/Gemfile +12 -0
  2. data/Gemfile.lock +86 -0
  3. data/Rakefile +24 -0
  4. data/Readme.md +121 -0
  5. data/TODOS +1 -0
  6. data/admincredible.gemspec +35 -0
  7. data/developer_notes/README.md +2 -0
  8. data/developer_notes/TODOS.md +0 -0
  9. data/lib/admincredible.rb +1 -0
  10. data/lib/admincredible/client.rb +60 -0
  11. data/lib/admincredible/configuration.rb +125 -0
  12. data/lib/admincredible/connection.rb +30 -0
  13. data/lib/admincredible/core_ext/string.rb +16 -0
  14. data/lib/admincredible/joomla_request.rb +22 -0
  15. data/lib/admincredible/middleware/logger.rb +51 -0
  16. data/lib/admincredible/middleware/step.rb +44 -0
  17. data/lib/admincredible/request.rb +47 -0
  18. data/lib/admincredible/resource.rb +20 -0
  19. data/lib/admincredible/resources/Backup.rb +34 -0
  20. data/lib/admincredible/resources/Compatibility.rb +13 -0
  21. data/lib/admincredible/resources/Extension.rb +37 -0
  22. data/lib/admincredible/resources/Oauth.rb +53 -0
  23. data/lib/admincredible/resources/Setting.rb +21 -0
  24. data/lib/admincredible/resources/Site.rb +9 -0
  25. data/lib/admincredible/resources/Upgrade.rb +64 -0
  26. data/spec/core/client_spec.rb +24 -0
  27. data/spec/core/resource_spec.rb +13 -0
  28. data/spec/fixtures/cassettes/backups/create.yml +73 -0
  29. data/spec/fixtures/cassettes/backups/start.yml +38 -0
  30. data/spec/fixtures/cassettes/backups/step.yml +38 -0
  31. data/spec/fixtures/cassettes/compatibility/added_exceptions.yml +38 -0
  32. data/spec/fixtures/cassettes/compatibility/status.yml +38 -0
  33. data/spec/fixtures/cassettes/extensions/all.yml +38 -0
  34. data/spec/fixtures/cassettes/extensions/update.yml +38 -0
  35. data/spec/fixtures/cassettes/settings/all.yml +38 -0
  36. data/spec/fixtures/cassettes/settings/created.yml +39 -0
  37. data/spec/fixtures/cassettes/settings/first.yml +38 -0
  38. data/spec/fixtures/cassettes/settings/updated.yml +39 -0
  39. data/spec/fixtures/cassettes/site/configuration.yml +41 -0
  40. data/spec/fixtures/cassettes/upgrade/cleanup.yml +38 -0
  41. data/spec/fixtures/cassettes/upgrade/create.yml +249 -0
  42. data/spec/fixtures/cassettes/upgrade/create_restoration_file.yml +38 -0
  43. data/spec/fixtures/cassettes/upgrade/download.yml +38 -0
  44. data/spec/fixtures/cassettes/upgrade/finalize.yml +38 -0
  45. data/spec/fixtures/cassettes/upgrade/info.yml +38 -0
  46. data/spec/fixtures/cassettes/upgrade/start.yml +39 -0
  47. data/spec/fixtures/cassettes/upgrade/step.yml +38 -0
  48. data/spec/resources/backups_spec.rb +36 -0
  49. data/spec/resources/compatibility_spec.rb +25 -0
  50. data/spec/resources/extensions_spec.rb +25 -0
  51. data/spec/resources/setting_spec.rb +47 -0
  52. data/spec/resources/site_spec.rb +14 -0
  53. data/spec/resources/upgrade_spec.rb +91 -0
  54. data/spec/spec_helper.rb +38 -0
  55. metadata +353 -0
@@ -0,0 +1,24 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper.rb')
2
+
3
+ describe Admincredible::Client do
4
+ it 'should create a client with config' do
5
+ client = Admincredible::Client.new do |config|
6
+ config.url = 'http://example.org'
7
+ end
8
+
9
+ client.should be_an_instance_of(Admincredible::Client)
10
+ client.config.url.should eq('http://example.org/components/com_admincredible/direct.php')
11
+ end
12
+
13
+ it 'should refuse to create a client without config' do
14
+ expect { client = Admincredible::Client.new }.to raise_error(ArgumentError)
15
+ end
16
+
17
+ it 'should handle method_missing on resources' do
18
+ client = Admincredible::Client.new do |config|
19
+ config.url = 'http://example.org'
20
+ end
21
+
22
+ client.fake.faker.should eq('fake resource')
23
+ end
24
+ end
@@ -0,0 +1,13 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper.rb')
2
+
3
+ describe Admincredible::Resource do
4
+ it 'should take client' do
5
+ client = Admincredible::Client.new do |config|
6
+ config.url = 'http://example.org'
7
+ end
8
+
9
+ resource = Admincredible::Resource.new(client)
10
+
11
+ resource.client.should eq(client)
12
+ end
13
+ end
@@ -0,0 +1,73 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost/joomla_old_testsite_257/components/com_admincredible/direct.php?resource=backups&task=start
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ User-Agent:
13
+ - Admincredible Ruby Gem
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Sat, 19 Jan 2013 20:06:01 GMT
23
+ Server:
24
+ - Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.6
25
+ X-Powered-By:
26
+ - PHP/5.3.6
27
+ Set-Cookie:
28
+ - c90b3f6e23ff46392a42cf27fea67ad4=52de04e9b23c656837cfa726372795df; path=/
29
+ Content-Length:
30
+ - '216'
31
+ Content-Type:
32
+ - application/json;
33
+ body:
34
+ encoding: US-ASCII
35
+ string: ! "{\"status\":302,\"data\":{\"url\":\"http://localhost/joomla_old_testsite_257/components/com_admincredible/index.php?option=com_admincredible&resource=backups&task=step&profile=1\",\"profile\":1},\"message\":\"More Work Required\"}"
36
+ http_version:
37
+ recorded_at: Sat, 19 Jan 2013 20:06:02 GMT
38
+ - request:
39
+ method: get
40
+ uri: http://localhost/joomla_old_testsite_257/components/com_admincredible/direct.php?resource=backups&task=step
41
+ body:
42
+ encoding: US-ASCII
43
+ string: ''
44
+ headers:
45
+ Accept:
46
+ - application/json
47
+ User-Agent:
48
+ - Admincredible Ruby Gem
49
+ Accept-Encoding:
50
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
51
+ response:
52
+ status:
53
+ code: 200
54
+ message: OK
55
+ headers:
56
+ Date:
57
+ - Sat, 19 Jan 2013 20:06:01 GMT
58
+ Server:
59
+ - Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.6
60
+ X-Powered-By:
61
+ - PHP/5.3.6
62
+ Set-Cookie:
63
+ - c90b3f6e23ff46392a42cf27fea67ad4=52de04e9b23c656837cfa726372795df; path=/
64
+ Content-Length:
65
+ - '208'
66
+ Content-Type:
67
+ - application/json;
68
+ body:
69
+ encoding: US-ASCII
70
+ string: ! "{\"status\":200,\"data\":{\"HasRun\":1,\"Domain\":\"finale\",\"Step\":\"\",\"Substep\":\"\",\"Error\":\"\",\"Warnings\":[],\"Archive\":\"site-localhost-20130119-205740.zip\",\"tag\":\"frontend\",\"Progress\":100},\"message\":\"Completed Backup\"}"
71
+ http_version:
72
+ recorded_at: Sat, 19 Jan 2013 20:06:02 GMT
73
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost/joomla_old_testsite_257/components/com_admincredible/direct.php?resource=backups&task=start
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ User-Agent:
13
+ - Admincredible Ruby Gem
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Sat, 19 Jan 2013 20:06:01 GMT
23
+ Server:
24
+ - Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.6
25
+ X-Powered-By:
26
+ - PHP/5.3.6
27
+ Set-Cookie:
28
+ - c90b3f6e23ff46392a42cf27fea67ad4=52de04e9b23c656837cfa726372795df; path=/
29
+ Content-Length:
30
+ - '216'
31
+ Content-Type:
32
+ - application/json;
33
+ body:
34
+ encoding: US-ASCII
35
+ string: ! "{\"status\":302,\"data\":{\"url\":\"http://localhost/joomla_old_testsite_257/components/com_admincredible/index.php?option=com_admincredible&resource=backups&task=step&profile=1\",\"profile\":1},\"message\":\"More Work Required\"}"
36
+ http_version:
37
+ recorded_at: Sat, 19 Jan 2013 20:06:02 GMT
38
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost/joomla_old_testsite_257/components/com_admincredible/direct.php?resource=backups&task=step
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ User-Agent:
13
+ - Admincredible Ruby Gem
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Sat, 19 Jan 2013 20:06:01 GMT
23
+ Server:
24
+ - Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.6
25
+ X-Powered-By:
26
+ - PHP/5.3.6
27
+ Set-Cookie:
28
+ - c90b3f6e23ff46392a42cf27fea67ad4=52de04e9b23c656837cfa726372795df; path=/
29
+ Content-Length:
30
+ - '208'
31
+ Content-Type:
32
+ - application/json;
33
+ body:
34
+ encoding: US-ASCII
35
+ string: ! "{\"status\":200,\"data\":{\"HasRun\":1,\"Domain\":\"finale\",\"Step\":\"\",\"Substep\":\"\",\"Error\":\"\",\"Warnings\":[],\"Archive\":\"site-localhost-20130119-205740.zip\",\"tag\":\"frontend\",\"Progress\":100},\"message\":\"Completed Backup\"}"
36
+ http_version:
37
+ recorded_at: Sat, 19 Jan 2013 20:06:02 GMT
38
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost/joomla_old_testsite_257/components/com_admincredible/direct.php?accept_terms=true&resource=compatibility&task=add_exceptions
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ User-Agent:
13
+ - Admincredible Ruby Gem
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Sat, 19 Jan 2013 20:05:59 GMT
23
+ Server:
24
+ - Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.6
25
+ X-Powered-By:
26
+ - PHP/5.3.6
27
+ Set-Cookie:
28
+ - c90b3f6e23ff46392a42cf27fea67ad4=a07584870169bdb54723ab140d0c7322; path=/
29
+ Content-Length:
30
+ - '43'
31
+ Content-Type:
32
+ - application/json;
33
+ body:
34
+ encoding: US-ASCII
35
+ string: ! '{"status":200,"message":"Exceptions Added"}'
36
+ http_version:
37
+ recorded_at: Sat, 19 Jan 2013 20:06:01 GMT
38
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost/joomla_old_testsite_257/components/com_admincredible/direct.php?resource=compatibility&task=status
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ User-Agent:
13
+ - Admincredible Ruby Gem
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Sat, 19 Jan 2013 20:05:57 GMT
23
+ Server:
24
+ - Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.6
25
+ X-Powered-By:
26
+ - PHP/5.3.6
27
+ Set-Cookie:
28
+ - c90b3f6e23ff46392a42cf27fea67ad4=86610c047475d100905ddbb658e1cbf7; path=/
29
+ Content-Length:
30
+ - '64'
31
+ Content-Type:
32
+ - application/json;
33
+ body:
34
+ encoding: US-ASCII
35
+ string: ! '{"status":200,"data":{"compatible":true},"message":"compatible"}'
36
+ http_version:
37
+ recorded_at: Sat, 19 Jan 2013 20:05:59 GMT
38
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost/joomla_old_testsite_257/components/com_admincredible/direct.php?resource=extensions&task=index
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ User-Agent:
13
+ - Admincredible Ruby Gem
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Sat, 19 Jan 2013 20:06:01 GMT
23
+ Server:
24
+ - Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.6
25
+ X-Powered-By:
26
+ - PHP/5.3.6
27
+ Set-Cookie:
28
+ - c90b3f6e23ff46392a42cf27fea67ad4=52de04e9b23c656837cfa726372795df; path=/
29
+ Content-Length:
30
+ - '2844'
31
+ Content-Type:
32
+ - application/json;
33
+ body:
34
+ encoding: US-ASCII
35
+ string: ! "{\"status\":200,\"data\":{\"extensions\":[{\"extension_id\":\"10000\",\"client_id\":\"1\",\"name\":\"Akeeba\",\"type\":\"component\",\"folder\":\"\",\"version\":\"3.6.12\",\"status\":\"1\",\"author\":\"Nicholas K. Dionysopoulos\",\"authorEmail\":\"nicholas@dionysopoulos.me\",\"authorUrl\":\"http://www.akeebabackup.com\",\"updateable\":\"0\",\"current_version\":null},{\"extension_id\":\"10003\",\"client_id\":\"0\",\"name\":\"AkeebaStrapper\",\"type\":\"file\",\"folder\":\"\",\"version\":\"1.0.0\",\"status\":\"1\",\"author\":\"Nicholas K. Dionysopoulos\",\"authorEmail\":\"nicholas@dionysopoulos.me\",\"authorUrl\":\"https://www.akeebabackup.com\",\"updateable\":\"0\",\"current_version\":null},{\"extension_id\":\"10004\",\"client_id\":\"0\",\"name\":\"Editor - JCE\",\"type\":\"plugin\",\"folder\":\"editors\",\"version\":\"2.2.1.2\",\"status\":\"1\",\"author\":\"Ryan Demmer\",\"authorEmail\":\"info@joomlacontenteditor.net\",\"authorUrl\":\"http://www.joomlacontenteditor.net\",\"updateable\":\"0\",\"current_version\":null},{\"extension_id\":\"600\",\"client_id\":\"0\",\"name\":\"English (United Kingdom)\",\"type\":\"language\",\"folder\":\"\",\"version\":\"2.5.5\",\"status\":\"2\",\"author\":\"Joomla! Project\",\"authorEmail\":\"admin@joomla.org\",\"authorUrl\":\"www.joomla.org\",\"updateable\":\"1\",\"current_version\":\"2.5.5\"},{\"extension_id\":\"601\",\"client_id\":\"1\",\"name\":\"English (United Kingdom)\",\"type\":\"language\",\"folder\":\"\",\"version\":\"2.5.5\",\"status\":\"2\",\"author\":\"Joomla! Project\",\"authorEmail\":\"admin@joomla.org\",\"authorUrl\":\"www.joomla.org\",\"updateable\":\"0\",\"current_version\":null},{\"extension_id\":\"10006\",\"client_id\":\"1\",\"name\":\"JCE Editor\",\"type\":\"component\",\"folder\":\"\",\"version\":\"2.2.1.2\",\"status\":\"1\",\"author\":\"Ryan Demmer\",\"authorEmail\":\"info@joomlacontenteditor.net\",\"authorUrl\":\"www.joomlacontenteditor.net\",\"updateable\":\"1\",\"current_version\":\"2.3.1\"},{\"extension_id\":\"10001\",\"client_id\":\"0\",\"name\":\"JMonitoring - Akeeba Backup\",\"type\":\"plugin\",\"folder\":\"jmonitoring\",\"version\":\"1.0\",\"status\":\"1\",\"author\":\"Nicholas K. Dionysopoulos / AkeebaBackup.com\",\"authorEmail\":\"nicholas@dionysopoulos.me\",\"authorUrl\":\"http://www.akeebabackup.com\",\"updateable\":\"0\",\"current_version\":null},{\"extension_id\":\"700\",\"client_id\":\"0\",\"name\":\"Joomla CMS\",\"type\":\"file\",\"folder\":\"\",\"version\":\"2.5.7\",\"status\":\"2\",\"author\":\"Joomla! Project\",\"authorEmail\":\"admin@joomla.org\",\"authorUrl\":\"www.joomla.org\",\"updateable\":\"1\",\"current_version\":\"2.5.8\"},{\"extension_id\":\"10005\",\"client_id\":\"0\",\"name\":\"Quick Icon - JCE File Browser\",\"type\":\"plugin\",\"folder\":\"quickicon\",\"version\":\"2.5.0\",\"status\":\"1\",\"author\":\"Ryan Demmer\",\"authorEmail\":\"admin@joomla.org\",\"authorUrl\":\"www.joomla.org\",\"updateable\":\"0\",\"current_version\":null},{\"extension_id\":\"10002\",\"client_id\":\"0\",\"name\":\"lib_fof\",\"type\":\"library\",\"folder\":\"\",\"version\":\"1.3.1\",\"status\":\"1\",\"author\":\"Nicholas K. Dionysopoulos / AkeebaBackup.com\",\"authorEmail\":\"nicholas@akeebabackup.com\",\"authorUrl\":\"https://www.akeebabackup.com\",\"updateable\":\"0\",\"current_version\":null}]}}"
36
+ http_version:
37
+ recorded_at: Sat, 19 Jan 2013 20:06:02 GMT
38
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost/joomla_old_testsite_257/components/com_admincredible/direct.php?resource=extensions&task=update
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ User-Agent:
13
+ - Admincredible Ruby Gem
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Sat, 19 Jan 2013 20:06:01 GMT
23
+ Server:
24
+ - Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.6
25
+ X-Powered-By:
26
+ - PHP/5.3.6
27
+ Set-Cookie:
28
+ - c90b3f6e23ff46392a42cf27fea67ad4=52de04e9b23c656837cfa726372795df; path=/
29
+ Content-Length:
30
+ - '68'
31
+ Content-Type:
32
+ - application/json;
33
+ body:
34
+ encoding: US-ASCII
35
+ string: ! "{\"status\":200,\"data\":{\"success\":true},\"message\":\"Nothing To Update\"}"
36
+ http_version:
37
+ recorded_at: Sat, 19 Jan 2013 20:06:02 GMT
38
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost/joomla_old_testsite_257/components/com_admincredible/direct.php?resource=settings&task=index
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ User-Agent:
13
+ - Admincredible Ruby Gem
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Sat, 19 Jan 2013 19:31:17 GMT
23
+ Server:
24
+ - Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.6
25
+ X-Powered-By:
26
+ - PHP/5.3.6
27
+ Set-Cookie:
28
+ - c90b3f6e23ff46392a42cf27fea67ad4=1b2018d5acab730effb7becb5fcddae4; path=/
29
+ Content-Length:
30
+ - '115'
31
+ Content-Type:
32
+ - application/json;
33
+ body:
34
+ encoding: US-ASCII
35
+ string: ! '{"status":200,"data":[{"authentication_method":"debug","authentication_method_custom":null,"test_setting":"test"}]}'
36
+ http_version:
37
+ recorded_at: Sat, 19 Jan 2013 19:31:27 GMT
38
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,39 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://localhost/joomla_old_testsite_257/components/com_admincredible/direct.php?resource=settings&task=create
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"test_setting":"cats"}'
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ User-Agent:
13
+ - Admincredible Ruby Gem
14
+ Content-Type:
15
+ - application/json
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Sat, 19 Jan 2013 20:06:02 GMT
23
+ Server:
24
+ - Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.6
25
+ X-Powered-By:
26
+ - PHP/5.3.6
27
+ Set-Cookie:
28
+ - c90b3f6e23ff46392a42cf27fea67ad4=fdebee4b3661693281f49ac0159ae5a3; path=/
29
+ Content-Length:
30
+ - '140'
31
+ Content-Type:
32
+ - application/json;
33
+ body:
34
+ encoding: US-ASCII
35
+ string: ! '{"status":200,"data":{"authentication_method":"debug","authentication_method_custom":null,"test_setting":"cats"},"message":"Saved
36
+ Settings"}'
37
+ http_version:
38
+ recorded_at: Sat, 19 Jan 2013 20:06:04 GMT
39
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost/joomla_old_testsite_257/components/com_admincredible/direct.php?resource=settings&task=read
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ User-Agent:
13
+ - Admincredible Ruby Gem
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Sat, 19 Jan 2013 20:06:01 GMT
23
+ Server:
24
+ - Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.6
25
+ X-Powered-By:
26
+ - PHP/5.3.6
27
+ Set-Cookie:
28
+ - c90b3f6e23ff46392a42cf27fea67ad4=52de04e9b23c656837cfa726372795df; path=/
29
+ Content-Length:
30
+ - '113'
31
+ Content-Type:
32
+ - application/json;
33
+ body:
34
+ encoding: US-ASCII
35
+ string: ! '{"status":200,"data":{"authentication_method":"debug","authentication_method_custom":null,"test_setting":"test"}}'
36
+ http_version:
37
+ recorded_at: Sat, 19 Jan 2013 20:06:02 GMT
38
+ recorded_with: VCR 2.4.0