beanstalkappjeroenb 1.7
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/CHANGES.rdoc +52 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +36 -0
- data/Rakefile +38 -0
- data/VERSION +1 -0
- data/beanstalkappjeroenb.gemspec +160 -0
- data/doc/account.html +192 -0
- data/doc/changelog.html +150 -0
- data/doc/changeset.html +256 -0
- data/doc/comment.html +299 -0
- data/doc/files/javascripts/code-highlighter.js +190 -0
- data/doc/files/javascripts/global.js +67 -0
- data/doc/files/javascripts/mootools-1.2.4-core-yc.js +357 -0
- data/doc/files/stylesheets/global.css +2152 -0
- data/doc/files/stylesheets/ie7.css +85 -0
- data/doc/images/apple-touch-icon.png +0 -0
- data/doc/images/b-search.gif +0 -0
- data/doc/images/b-submit.gif +0 -0
- data/doc/images/b-tour.png +0 -0
- data/doc/images/bg-comments-count.png +0 -0
- data/doc/images/bg-corners.png +0 -0
- data/doc/images/bg-header-pattern-alt.png +0 -0
- data/doc/images/bg-header-pattern.png +0 -0
- data/doc/images/bg-header.png +0 -0
- data/doc/images/bg-input.png +0 -0
- data/doc/images/bg-page-pattern-alt.png +0 -0
- data/doc/images/bg-page-pattern.png +0 -0
- data/doc/images/bg-plans.png +0 -0
- data/doc/images/bg-ref-basecamp.gif +0 -0
- data/doc/images/bg-ref-lighthouse.gif +0 -0
- data/doc/images/bg-ref-rackspace.gif +0 -0
- data/doc/images/bg-ref-versions.gif +0 -0
- data/doc/images/bg-referrer.png +0 -0
- data/doc/images/bg-screenshot.png +0 -0
- data/doc/images/bg-tooltip.png +0 -0
- data/doc/images/button.png +0 -0
- data/doc/images/customers/blueflavor.png +0 -0
- data/doc/images/customers/brightcove.png +0 -0
- data/doc/images/customers/flipshake-s.png +0 -0
- data/doc/images/customers/flipshake.png +0 -0
- data/doc/images/customers/helloenjoy-s.png +0 -0
- data/doc/images/customers/helloenjoy.png +0 -0
- data/doc/images/customers/netmagazine.jpg +0 -0
- data/doc/images/customers/newrelic.png +0 -0
- data/doc/images/customers/puma.png +0 -0
- data/doc/images/customers/realmac-s.png +0 -0
- data/doc/images/customers/realmac.png +0 -0
- data/doc/images/customers/scrapblog.png +0 -0
- data/doc/images/customers/store74.gif +0 -0
- data/doc/images/customers/theappleblog.jpg +0 -0
- data/doc/images/customers/tuaw.jpg +0 -0
- data/doc/images/customers/vzaar-s.png +0 -0
- data/doc/images/customers/vzaar.png +0 -0
- data/doc/images/customers/wufoo-s.png +0 -0
- data/doc/images/customers/wufoo.png +0 -0
- data/doc/images/favicon.ico +0 -0
- data/doc/images/i-arrow.png +0 -0
- data/doc/images/i-cc.png +0 -0
- data/doc/images/i-checkmark.png +0 -0
- data/doc/images/i-features.png +0 -0
- data/doc/images/i-help.png +0 -0
- data/doc/images/i-input-email.png +0 -0
- data/doc/images/i-input-password.png +0 -0
- data/doc/images/i-leaf.png +0 -0
- data/doc/images/i-lock-sml.png +0 -0
- data/doc/images/i-rss.png +0 -0
- data/doc/images/i-tour-help.png +0 -0
- data/doc/images/logo-rackspace.gif +0 -0
- data/doc/images/logo-sml.png +0 -0
- data/doc/images/logo-wildbit.png +0 -0
- data/doc/images/logo.png +0 -0
- data/doc/images/logos/basecamp-ref.png +0 -0
- data/doc/images/logos/basecamp.png +0 -0
- data/doc/images/logos/campfire.png +0 -0
- data/doc/images/logos/cloudscaling.png +0 -0
- data/doc/images/logos/collabnet.gif +0 -0
- data/doc/images/logos/dynect.png +0 -0
- data/doc/images/logos/fogbugz.png +0 -0
- data/doc/images/logos/freckle.png +0 -0
- data/doc/images/logos/harvest-ref.gif +0 -0
- data/doc/images/logos/harvest.png +0 -0
- data/doc/images/logos/lighthouse-ref.png +0 -0
- data/doc/images/logos/lighthouse.png +0 -0
- data/doc/images/logos/pixelnovel.png +0 -0
- data/doc/images/logos/rackspace-ref.gif +0 -0
- data/doc/images/logos/rackspace.gif +0 -0
- data/doc/images/logos/rackspace.png +0 -0
- data/doc/images/logos/splunk-s.png +0 -0
- data/doc/images/logos/splunk.png +0 -0
- data/doc/images/logos/teamsupport.png +0 -0
- data/doc/images/logos/twitter.png +0 -0
- data/doc/images/logos/versions-ref.gif +0 -0
- data/doc/images/logos/versions.png +0 -0
- data/doc/images/promo-screenshots.png +0 -0
- data/doc/images/sep-promo.png +0 -0
- data/doc/images/ss-browse.png +0 -0
- data/doc/images/ss-changeset.png +0 -0
- data/doc/images/ss-dashboard.png +0 -0
- data/doc/images/ss-integrations.png +0 -0
- data/doc/images/ss-releases.png +0 -0
- data/doc/images/ss-repositories.png +0 -0
- data/doc/images/ss-signup-motivator.jpg +0 -0
- data/doc/introduction.html +152 -0
- data/doc/rails_plugin.html +141 -0
- data/doc/release.html +282 -0
- data/doc/release_server.html +340 -0
- data/doc/repository.html +326 -0
- data/doc/ruby_gem.html +160 -0
- data/doc/server_environment.html +270 -0
- data/doc/user.html +210 -0
- data/lib/beanstalkapp.rb +23 -0
- data/lib/beanstalkapp/account.rb +12 -0
- data/lib/beanstalkapp/base.rb +21 -0
- data/lib/beanstalkapp/changeset.rb +51 -0
- data/lib/beanstalkapp/comment.rb +5 -0
- data/lib/beanstalkapp/permission.rb +9 -0
- data/lib/beanstalkapp/plan.rb +4 -0
- data/lib/beanstalkapp/public_key.rb +4 -0
- data/lib/beanstalkapp/release.rb +26 -0
- data/lib/beanstalkapp/release_server.rb +22 -0
- data/lib/beanstalkapp/repository.rb +4 -0
- data/lib/beanstalkapp/server_environment.rb +14 -0
- data/lib/beanstalkapp/user.rb +9 -0
- data/test/integration.rb +96 -0
- metadata +187 -0
data/CHANGES.rdoc
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
= Changelog
|
2
|
+
|
3
|
+
== 1.6.0
|
4
|
+
|
5
|
+
* Introducing Permission resource.
|
6
|
+
|
7
|
+
== 1.5.0
|
8
|
+
|
9
|
+
* Introducing PublicKey resource.
|
10
|
+
|
11
|
+
== 1.4.1
|
12
|
+
|
13
|
+
* Added User.find_current for fetching info about currently logged in user.
|
14
|
+
|
15
|
+
== 1.4.0
|
16
|
+
|
17
|
+
* Added Release#retry method for retrying failed deployments.
|
18
|
+
|
19
|
+
== 1.3.0
|
20
|
+
|
21
|
+
* Added Plan model. It will return information about Beanstalk's public plans including storage limits and price.
|
22
|
+
|
23
|
+
== 1.2.1
|
24
|
+
|
25
|
+
* Added pagination support for Releases API. Now you can specify page number as a third argument to Release.find_all_for_environment.
|
26
|
+
|
27
|
+
== 1.2.0
|
28
|
+
|
29
|
+
* Added support for reworked Beanstalk Deployments. New model added: ServerEnvironment.
|
30
|
+
|
31
|
+
== 1.1.3
|
32
|
+
|
33
|
+
* Added ReleaseServer#toggle_state! method for enabling/disabling Releases servers.
|
34
|
+
|
35
|
+
== 1.1.2
|
36
|
+
|
37
|
+
* Fixed find methods in Release class.
|
38
|
+
|
39
|
+
== 1.1.1
|
40
|
+
|
41
|
+
* Bug fixing
|
42
|
+
|
43
|
+
== 1.1
|
44
|
+
|
45
|
+
* Added Comment model;
|
46
|
+
* Added little helper methods to models, such as Release.find_all_for_repository;
|
47
|
+
* Repackaged from Rails plugin to gem (Gemcutter);
|
48
|
+
* Moved repository to Github.
|
49
|
+
|
50
|
+
== 1.0
|
51
|
+
|
52
|
+
* Initial public release
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 [name of plugin creator]
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
= Beanstalk API Wrapper
|
2
|
+
|
3
|
+
Official Ruby gem for accessing Beanstalk RESTful API. Basically a set of pre-written ActiveResource classes with a few adjustments.
|
4
|
+
|
5
|
+
http://api.beanstalkapp.com
|
6
|
+
|
7
|
+
== Installation
|
8
|
+
|
9
|
+
gem install beanstalkapp
|
10
|
+
|
11
|
+
== Requirements
|
12
|
+
|
13
|
+
ActiveResource 2.3.5
|
14
|
+
|
15
|
+
== Usage
|
16
|
+
|
17
|
+
First enable API access in your Beanstalk account by going to Account > Setup. Only the account owner can do that.
|
18
|
+
|
19
|
+
Then in your code setup the API like that:
|
20
|
+
|
21
|
+
Beanstalk::API::Base.setup(
|
22
|
+
:domain => 'your_beanstalk_subdomain',
|
23
|
+
:login => 'login',
|
24
|
+
:password => '12345'
|
25
|
+
)
|
26
|
+
|
27
|
+
Then you can start using the API:
|
28
|
+
|
29
|
+
Beanstalk::API::Account.find
|
30
|
+
|
31
|
+
For information about all API methods please go to the official documentation site:
|
32
|
+
|
33
|
+
http://api.beanstalkapp.com
|
34
|
+
|
35
|
+
Copyright (c) 2011 Ilya Sabanin, Wildbit.
|
36
|
+
Released under the MIT license
|
data/Rakefile
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "beanstalkappjeroenb"
|
8
|
+
gem.summary = "Official wrapper for Beanstalk API."
|
9
|
+
gem.email = "jeroenbourgois@gmail.com"
|
10
|
+
gem.homepage = "http://api.beanstalkapp.com"
|
11
|
+
gem.authors = ["Ilya Sabanin"]
|
12
|
+
gem.add_dependency('activeresource', '= 3.0.7')
|
13
|
+
end
|
14
|
+
Jeweler::GemcutterTasks.new
|
15
|
+
rescue LoadError
|
16
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
17
|
+
end
|
18
|
+
|
19
|
+
require 'rake/testtask'
|
20
|
+
Rake::TestTask.new(:test) do |test|
|
21
|
+
test.libs << 'lib' << 'test'
|
22
|
+
test.pattern = 'test/**/*_test.rb'
|
23
|
+
test.verbose = true
|
24
|
+
end
|
25
|
+
|
26
|
+
task :test => :check_dependencies
|
27
|
+
|
28
|
+
task :default => :test
|
29
|
+
|
30
|
+
require 'rake/rdoctask'
|
31
|
+
Rake::RDocTask.new do |rdoc|
|
32
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
33
|
+
|
34
|
+
rdoc.rdoc_dir = 'rdoc'
|
35
|
+
rdoc.title = "pretty_diff #{version}"
|
36
|
+
rdoc.rdoc_files.include('README*')
|
37
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
38
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.7
|
@@ -0,0 +1,160 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{beanstalkappjeroenb}
|
8
|
+
s.version = "1.7"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Ilya Sabanin"]
|
12
|
+
s.date = %q{2011-08-30}
|
13
|
+
s.email = %q{jeroenbourgois@gmail.com}
|
14
|
+
s.extra_rdoc_files = [
|
15
|
+
"README.rdoc"
|
16
|
+
]
|
17
|
+
s.files = [
|
18
|
+
"CHANGES.rdoc",
|
19
|
+
"MIT-LICENSE",
|
20
|
+
"README.rdoc",
|
21
|
+
"Rakefile",
|
22
|
+
"VERSION",
|
23
|
+
"beanstalkappjeroenb.gemspec",
|
24
|
+
"doc/account.html",
|
25
|
+
"doc/changelog.html",
|
26
|
+
"doc/changeset.html",
|
27
|
+
"doc/comment.html",
|
28
|
+
"doc/files/javascripts/code-highlighter.js",
|
29
|
+
"doc/files/javascripts/global.js",
|
30
|
+
"doc/files/javascripts/mootools-1.2.4-core-yc.js",
|
31
|
+
"doc/files/stylesheets/global.css",
|
32
|
+
"doc/files/stylesheets/ie7.css",
|
33
|
+
"doc/images/apple-touch-icon.png",
|
34
|
+
"doc/images/b-search.gif",
|
35
|
+
"doc/images/b-submit.gif",
|
36
|
+
"doc/images/b-tour.png",
|
37
|
+
"doc/images/bg-comments-count.png",
|
38
|
+
"doc/images/bg-corners.png",
|
39
|
+
"doc/images/bg-header-pattern-alt.png",
|
40
|
+
"doc/images/bg-header-pattern.png",
|
41
|
+
"doc/images/bg-header.png",
|
42
|
+
"doc/images/bg-input.png",
|
43
|
+
"doc/images/bg-page-pattern-alt.png",
|
44
|
+
"doc/images/bg-page-pattern.png",
|
45
|
+
"doc/images/bg-plans.png",
|
46
|
+
"doc/images/bg-ref-basecamp.gif",
|
47
|
+
"doc/images/bg-ref-lighthouse.gif",
|
48
|
+
"doc/images/bg-ref-rackspace.gif",
|
49
|
+
"doc/images/bg-ref-versions.gif",
|
50
|
+
"doc/images/bg-referrer.png",
|
51
|
+
"doc/images/bg-screenshot.png",
|
52
|
+
"doc/images/bg-tooltip.png",
|
53
|
+
"doc/images/button.png",
|
54
|
+
"doc/images/customers/blueflavor.png",
|
55
|
+
"doc/images/customers/brightcove.png",
|
56
|
+
"doc/images/customers/flipshake-s.png",
|
57
|
+
"doc/images/customers/flipshake.png",
|
58
|
+
"doc/images/customers/helloenjoy-s.png",
|
59
|
+
"doc/images/customers/helloenjoy.png",
|
60
|
+
"doc/images/customers/netmagazine.jpg",
|
61
|
+
"doc/images/customers/newrelic.png",
|
62
|
+
"doc/images/customers/puma.png",
|
63
|
+
"doc/images/customers/realmac-s.png",
|
64
|
+
"doc/images/customers/realmac.png",
|
65
|
+
"doc/images/customers/scrapblog.png",
|
66
|
+
"doc/images/customers/store74.gif",
|
67
|
+
"doc/images/customers/theappleblog.jpg",
|
68
|
+
"doc/images/customers/tuaw.jpg",
|
69
|
+
"doc/images/customers/vzaar-s.png",
|
70
|
+
"doc/images/customers/vzaar.png",
|
71
|
+
"doc/images/customers/wufoo-s.png",
|
72
|
+
"doc/images/customers/wufoo.png",
|
73
|
+
"doc/images/favicon.ico",
|
74
|
+
"doc/images/i-arrow.png",
|
75
|
+
"doc/images/i-cc.png",
|
76
|
+
"doc/images/i-checkmark.png",
|
77
|
+
"doc/images/i-features.png",
|
78
|
+
"doc/images/i-help.png",
|
79
|
+
"doc/images/i-input-email.png",
|
80
|
+
"doc/images/i-input-password.png",
|
81
|
+
"doc/images/i-leaf.png",
|
82
|
+
"doc/images/i-lock-sml.png",
|
83
|
+
"doc/images/i-rss.png",
|
84
|
+
"doc/images/i-tour-help.png",
|
85
|
+
"doc/images/logo-rackspace.gif",
|
86
|
+
"doc/images/logo-sml.png",
|
87
|
+
"doc/images/logo-wildbit.png",
|
88
|
+
"doc/images/logo.png",
|
89
|
+
"doc/images/logos/basecamp-ref.png",
|
90
|
+
"doc/images/logos/basecamp.png",
|
91
|
+
"doc/images/logos/campfire.png",
|
92
|
+
"doc/images/logos/cloudscaling.png",
|
93
|
+
"doc/images/logos/collabnet.gif",
|
94
|
+
"doc/images/logos/dynect.png",
|
95
|
+
"doc/images/logos/fogbugz.png",
|
96
|
+
"doc/images/logos/freckle.png",
|
97
|
+
"doc/images/logos/harvest-ref.gif",
|
98
|
+
"doc/images/logos/harvest.png",
|
99
|
+
"doc/images/logos/lighthouse-ref.png",
|
100
|
+
"doc/images/logos/lighthouse.png",
|
101
|
+
"doc/images/logos/pixelnovel.png",
|
102
|
+
"doc/images/logos/rackspace-ref.gif",
|
103
|
+
"doc/images/logos/rackspace.gif",
|
104
|
+
"doc/images/logos/rackspace.png",
|
105
|
+
"doc/images/logos/splunk-s.png",
|
106
|
+
"doc/images/logos/splunk.png",
|
107
|
+
"doc/images/logos/teamsupport.png",
|
108
|
+
"doc/images/logos/twitter.png",
|
109
|
+
"doc/images/logos/versions-ref.gif",
|
110
|
+
"doc/images/logos/versions.png",
|
111
|
+
"doc/images/promo-screenshots.png",
|
112
|
+
"doc/images/sep-promo.png",
|
113
|
+
"doc/images/ss-browse.png",
|
114
|
+
"doc/images/ss-changeset.png",
|
115
|
+
"doc/images/ss-dashboard.png",
|
116
|
+
"doc/images/ss-integrations.png",
|
117
|
+
"doc/images/ss-releases.png",
|
118
|
+
"doc/images/ss-repositories.png",
|
119
|
+
"doc/images/ss-signup-motivator.jpg",
|
120
|
+
"doc/introduction.html",
|
121
|
+
"doc/rails_plugin.html",
|
122
|
+
"doc/release.html",
|
123
|
+
"doc/release_server.html",
|
124
|
+
"doc/repository.html",
|
125
|
+
"doc/ruby_gem.html",
|
126
|
+
"doc/server_environment.html",
|
127
|
+
"doc/user.html",
|
128
|
+
"lib/beanstalkapp.rb",
|
129
|
+
"lib/beanstalkapp/account.rb",
|
130
|
+
"lib/beanstalkapp/base.rb",
|
131
|
+
"lib/beanstalkapp/changeset.rb",
|
132
|
+
"lib/beanstalkapp/comment.rb",
|
133
|
+
"lib/beanstalkapp/permission.rb",
|
134
|
+
"lib/beanstalkapp/plan.rb",
|
135
|
+
"lib/beanstalkapp/public_key.rb",
|
136
|
+
"lib/beanstalkapp/release.rb",
|
137
|
+
"lib/beanstalkapp/release_server.rb",
|
138
|
+
"lib/beanstalkapp/repository.rb",
|
139
|
+
"lib/beanstalkapp/server_environment.rb",
|
140
|
+
"lib/beanstalkapp/user.rb",
|
141
|
+
"test/integration.rb"
|
142
|
+
]
|
143
|
+
s.homepage = %q{http://api.beanstalkapp.com}
|
144
|
+
s.require_paths = ["lib"]
|
145
|
+
s.rubygems_version = %q{1.5.2}
|
146
|
+
s.summary = %q{Official wrapper for Beanstalk API.}
|
147
|
+
|
148
|
+
if s.respond_to? :specification_version then
|
149
|
+
s.specification_version = 3
|
150
|
+
|
151
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
152
|
+
s.add_runtime_dependency(%q<activeresource>, ["= 3.0.7"])
|
153
|
+
else
|
154
|
+
s.add_dependency(%q<activeresource>, ["= 3.0.7"])
|
155
|
+
end
|
156
|
+
else
|
157
|
+
s.add_dependency(%q<activeresource>, ["= 3.0.7"])
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
data/doc/account.html
ADDED
@@ -0,0 +1,192 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html lang="en">
|
4
|
+
<head>
|
5
|
+
<meta charset="utf-8">
|
6
|
+
<title>Beanstalk — Hassle-free Subversion Hosting</title>
|
7
|
+
<meta name="description" content="Beanstalk allows designers and developers to store source code, track changes, and collaborate with their team.">
|
8
|
+
<meta name="author" content="Wildbit, LLC">
|
9
|
+
<meta name="viewport" content="width=980">
|
10
|
+
|
11
|
+
<!--[if IE]>
|
12
|
+
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
13
|
+
<![endif]-->
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="files/stylesheets/global.css" media="all">
|
16
|
+
|
17
|
+
<!--[if IE 7]>
|
18
|
+
<link rel="stylesheet" href="files/stylesheets/ie7.css" media="all">
|
19
|
+
<![endif]-->
|
20
|
+
|
21
|
+
<script type="text/javascript" src="files/javascripts/mootools-1.2.4-core-yc.js"></script>
|
22
|
+
<script type="text/javascript" src="files/javascripts/code-highlighter.js"></script>
|
23
|
+
<script type="text/javascript" src="files/javascripts/global.js"></script>
|
24
|
+
|
25
|
+
<link rel="shortcut icon" href="images/favicon.ico">
|
26
|
+
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
|
27
|
+
</head>
|
28
|
+
|
29
|
+
<body>
|
30
|
+
<header>
|
31
|
+
<div class="container">
|
32
|
+
|
33
|
+
<hgroup>
|
34
|
+
<h1><a href="http://beanstalkapp.com">Beanstalk</a></h1>
|
35
|
+
<h2><a href="http://beanstalkapp.com">Version Control with a Human Face</a></h2>
|
36
|
+
</hgroup>
|
37
|
+
|
38
|
+
<nav>
|
39
|
+
<ul>
|
40
|
+
<li><a href="http://beanstalkapp.com">Home</a></li>
|
41
|
+
<li><a href="http://beanstalkapp.com/features">Feature Tour</a></li>
|
42
|
+
<li><a href="http://beanstalkapp.com/buzz">Buzz</a></li>
|
43
|
+
<li><a href="http://help.beanstalkapp.com/">Support</a></li>
|
44
|
+
<li><a href="http://beanstalkapp.com/partners">Partners</a></li>
|
45
|
+
<li><a href="http://blog.beanstalkapp.com">Blog</a></li>
|
46
|
+
<li><strong>API & Tools</strong></li>
|
47
|
+
<li class="link-signin"><a href="https://login.beanstalkapp.com">Log In</a></li>
|
48
|
+
<li class="link-signup"><a href="http://beanstalkapp.com/pricing">Pricing & Sign Up</a></li>
|
49
|
+
</ul>
|
50
|
+
</nav>
|
51
|
+
|
52
|
+
<b class="cl"></b><b class="cr"></b>
|
53
|
+
</div>
|
54
|
+
</header>
|
55
|
+
|
56
|
+
<div class="page" id="api">
|
57
|
+
<div class="container">
|
58
|
+
<section class="wrap">
|
59
|
+
<h1>Account model</h1>
|
60
|
+
<p class='warning'>Account owner privileges are required.</p>
|
61
|
+
<h3>Writable attributes</h3>
|
62
|
+
<ol>
|
63
|
+
<li>name — required;</li>
|
64
|
+
<li>time_zone — required.</li>
|
65
|
+
</ol>
|
66
|
+
<h3>Get your account details</h3>
|
67
|
+
<div class="code_container http-request"><i>http-request</i><code class="http-request"><pre>GET /api/account.xml</pre></code></div>
|
68
|
+
|
69
|
+
<div class="code_container response">
|
70
|
+
<p>Click to expand…</p>
|
71
|
+
<i>http-response</i>
|
72
|
+
<pre><code><?xml version="1.0" encoding="UTF-8"?>
|
73
|
+
<account>
|
74
|
+
<id type="integer">3875</id>
|
75
|
+
<owner-id type="integer">53533</owner-id>
|
76
|
+
<plan-id type="integer">5</plan-id>
|
77
|
+
<name>Super Account</name>
|
78
|
+
<third-level-domain>super-account</third-level-domain>
|
79
|
+
<time-zone>Krasnoyarsk</time-zone>
|
80
|
+
<suspended type="boolean">false</suspended>
|
81
|
+
<created-at type="datetime">2009-11-15T16:45:56Z</created-at>
|
82
|
+
<updated-at type="datetime">2009-11-15T16:45:56Z</updated-at>
|
83
|
+
</account></code></pre>
|
84
|
+
</div>
|
85
|
+
<div class="code_container ruby"><i>ruby</i><code class="ruby"><pre>Beanstalk::API::Account.find</pre></code></div>
|
86
|
+
<p class='warning'>The code above will work only with ruby library provided by Beanstalk, since it uses a hack to override some ActiveResource behavior. ActiveResource is not working with singular resources by default.</p>
|
87
|
+
<h3>Update your Account details</h3>
|
88
|
+
<p>See the list of writable attributes at the top of the page. You only need to pass attributes that you want to change.</p>
|
89
|
+
<div class="code_container http-request"><i>http-request</i><code class="http-request"><pre>PUT /api/account.xml
|
90
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
91
|
+
<account>
|
92
|
+
<name>New Company Name</name>
|
93
|
+
<time-zone>International Date Line West</time-zone>
|
94
|
+
</account>
|
95
|
+
</pre></code></div>
|
96
|
+
<div class="code_container response">
|
97
|
+
<p>Click to expand…</p>
|
98
|
+
<i>http-response</i>
|
99
|
+
<pre><code>HEAD 200 OK
|
100
|
+
|
101
|
+
--OR IF INVALID--
|
102
|
+
|
103
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
104
|
+
<errors>
|
105
|
+
<error>Name can't be blank</error>
|
106
|
+
</errors></code></pre>
|
107
|
+
</div>
|
108
|
+
<div class="code_container ruby"><i>ruby</i><code class="ruby"><pre>account = Beanstalk::API::Account.find
|
109
|
+
account.name = "New Company Name"
|
110
|
+
account.save
|
111
|
+
</pre></code></div>
|
112
|
+
</section>
|
113
|
+
|
114
|
+
<section id="sidebar">
|
115
|
+
<ul class="tabs">
|
116
|
+
<li>
|
117
|
+
|
118
|
+
<a href="introduction.html">Introduction</a>
|
119
|
+
</li>
|
120
|
+
<li>
|
121
|
+
|
122
|
+
<a href="changelog.html">Changelog</a>
|
123
|
+
</li>
|
124
|
+
<li>
|
125
|
+
|
126
|
+
<a href="ruby_gem.html">Ruby Gem</a>
|
127
|
+
</li>
|
128
|
+
<li>
|
129
|
+
|
130
|
+
<strong>→ Account</strong>
|
131
|
+
</li>
|
132
|
+
<li>
|
133
|
+
|
134
|
+
<a href="user.html">User</a>
|
135
|
+
</li>
|
136
|
+
<li>
|
137
|
+
|
138
|
+
<a href="repository.html">Repository</a>
|
139
|
+
</li>
|
140
|
+
<li>
|
141
|
+
|
142
|
+
<a href="changeset.html">Changeset</a>
|
143
|
+
</li>
|
144
|
+
<li>
|
145
|
+
|
146
|
+
<a href="comment.html">Comment</a>
|
147
|
+
</li>
|
148
|
+
<li>
|
149
|
+
|
150
|
+
<a href="server_environment.html">Server Environment</a>
|
151
|
+
</li>
|
152
|
+
<li>
|
153
|
+
|
154
|
+
<a href="release_server.html">Release Server</a>
|
155
|
+
</li>
|
156
|
+
<li>
|
157
|
+
|
158
|
+
<a href="release.html">Release</a>
|
159
|
+
</li>
|
160
|
+
</ul>
|
161
|
+
</section>
|
162
|
+
</div>
|
163
|
+
</div>
|
164
|
+
|
165
|
+
<footer>
|
166
|
+
|
167
|
+
<div class="container">
|
168
|
+
<ul>
|
169
|
+
<li><a href="http://help.beanstalkapp.com/discussion/new">Contact</a></li>
|
170
|
+
<li><a href="http://blog.beanstalkapp.com">Blog</a></li>
|
171
|
+
<li><a href="http://twitter.com/beanstalkapp">Twitter</a></li>
|
172
|
+
<li><a href="http://beanstalkapp.com/security">Security</a></li>
|
173
|
+
<li><a href="http://beanstalkapp.com/privacy-policy">Privacy Policy</a></li>
|
174
|
+
<li><a href="http://beanstalkapp.com/terms-of-service">Terms of Service</a></li>
|
175
|
+
</ul>
|
176
|
+
<p>© <a href="http://wildbit.com/">Wildbit, <abbr>LLC</abbr></a>, 2010. All rights reserved. The Beanstalk logo and name are trademarks of Wildbit, <abbr>LLC</abbr>.</p>
|
177
|
+
</div>
|
178
|
+
|
179
|
+
</footer>
|
180
|
+
|
181
|
+
<script type="text/javascript">
|
182
|
+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
183
|
+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
184
|
+
</script>
|
185
|
+
<script type="text/javascript">
|
186
|
+
try {
|
187
|
+
var pageTracker = _gat._getTracker("UA-507677-5");
|
188
|
+
pageTracker._setDomainName(".beanstalkapp.com");
|
189
|
+
pageTracker._trackPageview();
|
190
|
+
} catch(err) {}</script>
|
191
|
+
</body>
|
192
|
+
</html>
|