teamcity-ruby-client 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +3 -0
- data/CHANGELOG.md +13 -0
- data/README.md +3 -2
- data/lib/faraday/null_response_body.rb +1 -1
- data/lib/teamcity/client/build_types.rb +11 -0
- data/lib/teamcity/client/builds.rb +1 -0
- data/lib/teamcity/client/projects.rb +1 -0
- data/lib/teamcity/version.rb +1 -1
- data/spec/cassettes/BuildTypes/GET/_buildtype_branches/should_fetch_vcs_branches_the_vcs_root_is_configured_to_use.yml +46 -0
- data/spec/teamcity/client/buildtypes_spec.rb +7 -0
- data/teamcity-ruby-client.gemspec +2 -2
- metadata +38 -10
- checksums.yaml +0 -15
- data/.rvmrc +0 -48
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
teamcity-ruby-client
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.9.3-p362
|
data/.travis.yml
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
## 1.3.0 (Jun 4, 2014)
|
2
|
+
|
3
|
+
* BuildType: Added ```.buildtype_branches```, provides the ability to
|
4
|
+
get a listing of branches the build is configured to build.
|
5
|
+
|
6
|
+
* Dependencies
|
7
|
+
* faraday 0.8.5 -> 0.9.0 (fixed some methods to keep consistent return values)
|
8
|
+
* hashie 2.0.0 -> 3.0.0
|
9
|
+
|
10
|
+
* Development
|
11
|
+
* Changed .rvmrc file to universal .ruby-version and .ruby-gemset files
|
12
|
+
|
1
13
|
## 1.2.0 (Dec 7, 2013)
|
2
14
|
|
3
15
|
* BuildType: Added ```.set_buildtype_setting```, provides the ability to set build configuration settings [@jeffersongirao]
|
@@ -7,6 +19,7 @@
|
|
7
19
|
* BuildType: Added ```.create_build_step```, provides the ability to create a build step in a build configuration [@jeffersongirao]
|
8
20
|
* Project: Added ```.set_parent_project``` and ```.parent_project``` for setting and getting parent project. (TeamCity8 only) [@jeffersongirao]
|
9
21
|
* Bug: Fix ```.create_vcs_root``` to work for svn [@jeffersongirao]
|
22
|
+
* Bug: Fix incompatibility with ruby 1.9.2 [@jeffersongirao]
|
10
23
|
* Cleanup: Remove dependency on xmlbuilder and linguistics [@jeffersongirao]
|
11
24
|
* Testing: Upgrade to rspec 2.14.1 and added guard-rspec gem
|
12
25
|
* Documentation: Added *rest_api_version* tag for specify teamcity api compatibility
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# The TeamCity Ruby Gem [![Gem Version](https://badge.fury.io/rb/teamcity-ruby-client.png)](http://badge.fury.io/rb/teamcity-ruby-client)
|
2
|
-
[![Build Status](https://
|
2
|
+
[![Build Status](https://travis-ci.org/jperry/teamcity-ruby-client.png?branch=master)](https://travis-ci.org/jperry/teamcity-ruby-client.png?branch=master) [![Code Climate](https://codeclimate.com/github/jperry/teamcity-ruby-client.png)](https://codeclimate.com/github/jperry/teamcity-ruby-client) [![Dependency Status](https://gemnasium.com/jperry/teamcity-ruby-client.png)](https://gemnasium.com/jperry/teamcity-ruby-client)
|
3
3
|
|
4
4
|
Ruby wrapper for the TeamCity Rest API
|
5
5
|
|
@@ -19,7 +19,7 @@ Or install it yourself as:
|
|
19
19
|
|
20
20
|
## API Usage Examples
|
21
21
|
|
22
|
-
* Tested on TeamCity 7.X and 8.X
|
22
|
+
* Tested on TeamCity 7.X and 8.0.X
|
23
23
|
* Most of the api calls return either an array of Hashie::Mash objects or a single Hashie::Mash object which allows you to send messages to retreive an attribute easily.
|
24
24
|
* See [api docs](http://rubydoc.info/gems/teamcity-ruby-client/TeamCity/Client) or [specs](spec/teamcity/client) for additional examples and usage
|
25
25
|
|
@@ -177,6 +177,7 @@ the client against as well as the gem and ruby versions.
|
|
177
177
|
2. Create a topic branch.
|
178
178
|
3. Implement your feature or bug fix.
|
179
179
|
4. Add documentation for your feature or bug fix.
|
180
|
+
* Please use the *@rest_api_version* tag to specify if a method is only compatible with a specific version of the rest api
|
180
181
|
5. Run ```rake doc:yard```. If your changes are not 100% documented, go back to step 4.
|
181
182
|
6. Add specs for your feature or bug fix.
|
182
183
|
7. If the rspec test is making a request use VCR to record the response, see the other examples.
|
@@ -32,6 +32,16 @@ module TeamCity
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
+
# Get a listing of vcs branches
|
36
|
+
#
|
37
|
+
# @param buildtype_id [String]
|
38
|
+
# @return [Array<Hashie::Mash>]
|
39
|
+
def buildtype_branches(buildtype_id)
|
40
|
+
path = "buildTypes/#{buildtype_id}/branches"
|
41
|
+
response = get(path, :accept => :json, :content_type => :json)
|
42
|
+
response.branch
|
43
|
+
end
|
44
|
+
|
35
45
|
# Get whether the build is paused or not
|
36
46
|
#
|
37
47
|
# @param options [Hash] option keys, :id => buildtype_id
|
@@ -144,6 +154,7 @@ module TeamCity
|
|
144
154
|
def delete_buildtype_parameter(buildtype_id, parameter_name)
|
145
155
|
path = "buildTypes/#{buildtype_id}/parameters/#{parameter_name}"
|
146
156
|
delete(path, :accept => :text, :content_type => :text)
|
157
|
+
return nil
|
147
158
|
end
|
148
159
|
|
149
160
|
# Create a buildtype agent requirement (Create)
|
data/lib/teamcity/version.rb
CHANGED
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://localhost:8111/guestAuth/app/rest/buildTypes/BuildTypeTests_GetBuildTypeConfigTests/branches
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- TeamCity Ruby Client 1.2.0
|
12
|
+
Accept:
|
13
|
+
- application/json; charset=utf-8
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- Apache-Coyote/1.1
|
25
|
+
Set-Cookie:
|
26
|
+
- RememberMe=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
|
27
|
+
- TCSESSIONID=F3F286B29E25E387B4F1448AB8462DF7; Path=/; HttpOnly
|
28
|
+
Pragma:
|
29
|
+
- no-cache
|
30
|
+
Expires:
|
31
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
32
|
+
Cache-Control:
|
33
|
+
- no-cache
|
34
|
+
- no-store
|
35
|
+
Content-Type:
|
36
|
+
- application/json
|
37
|
+
Transfer-Encoding:
|
38
|
+
- chunked
|
39
|
+
Date:
|
40
|
+
- Fri, 27 Dec 2013 20:36:36 GMT
|
41
|
+
body:
|
42
|
+
encoding: US-ASCII
|
43
|
+
string: ! '{"branch":[{"name":"refs/heads/master","default":true}]}'
|
44
|
+
http_version:
|
45
|
+
recorded_at: Fri, 27 Dec 2013 20:36:36 GMT
|
46
|
+
recorded_with: VCR 2.4.0
|
@@ -43,6 +43,13 @@ describe 'BuildTypes' do
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
+
describe '.buildtype_branches' do
|
47
|
+
it 'should fetch vcs branches the vcs root is configured to use' do
|
48
|
+
buildtype_id = 'BuildTypeTests_GetBuildTypeConfigTests'
|
49
|
+
@tc.buildtype_branches(buildtype_id).first.name.should eq('refs/heads/master')
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
46
53
|
describe '.buildtype_state' do
|
47
54
|
it 'should fetch the state of the buildtype' do
|
48
55
|
build_type = @tc.buildtypes[0]
|
@@ -27,7 +27,7 @@ Gem::Specification.new do |gem|
|
|
27
27
|
gem.add_development_dependency('yard', '~> 0.8.5.2')
|
28
28
|
gem.add_development_dependency('redcarpet', '~> 2.2.2')
|
29
29
|
gem.add_development_dependency('guard-rspec', '~> 4.0.2')
|
30
|
-
gem.add_runtime_dependency('faraday', '~> 0.
|
30
|
+
gem.add_runtime_dependency('faraday', '~> 0.9.0')
|
31
31
|
gem.add_runtime_dependency('faraday_middleware', '~> 0.9.0')
|
32
|
-
gem.add_runtime_dependency('hashie', '~>
|
32
|
+
gem.add_runtime_dependency('hashie', '~> 3.0')
|
33
33
|
end
|
metadata
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teamcity-ruby-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Jason Perry
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2014-06-04 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: rspec
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
@@ -20,6 +22,7 @@ dependencies:
|
|
20
22
|
type: :development
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
27
|
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
@@ -27,6 +30,7 @@ dependencies:
|
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: webmock
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
35
|
- - ~>
|
32
36
|
- !ruby/object:Gem::Version
|
@@ -34,6 +38,7 @@ dependencies:
|
|
34
38
|
type: :development
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
43
|
- - ~>
|
39
44
|
- !ruby/object:Gem::Version
|
@@ -41,6 +46,7 @@ dependencies:
|
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: rake
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
51
|
- - ~>
|
46
52
|
- !ruby/object:Gem::Version
|
@@ -48,6 +54,7 @@ dependencies:
|
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
59
|
- - ~>
|
53
60
|
- !ruby/object:Gem::Version
|
@@ -55,6 +62,7 @@ dependencies:
|
|
55
62
|
- !ruby/object:Gem::Dependency
|
56
63
|
name: pry
|
57
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
67
|
- - ~>
|
60
68
|
- !ruby/object:Gem::Version
|
@@ -62,6 +70,7 @@ dependencies:
|
|
62
70
|
type: :development
|
63
71
|
prerelease: false
|
64
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
65
74
|
requirements:
|
66
75
|
- - ~>
|
67
76
|
- !ruby/object:Gem::Version
|
@@ -69,6 +78,7 @@ dependencies:
|
|
69
78
|
- !ruby/object:Gem::Dependency
|
70
79
|
name: vcr
|
71
80
|
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
72
82
|
requirements:
|
73
83
|
- - ~>
|
74
84
|
- !ruby/object:Gem::Version
|
@@ -76,6 +86,7 @@ dependencies:
|
|
76
86
|
type: :development
|
77
87
|
prerelease: false
|
78
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
79
90
|
requirements:
|
80
91
|
- - ~>
|
81
92
|
- !ruby/object:Gem::Version
|
@@ -83,6 +94,7 @@ dependencies:
|
|
83
94
|
- !ruby/object:Gem::Dependency
|
84
95
|
name: yard
|
85
96
|
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
86
98
|
requirements:
|
87
99
|
- - ~>
|
88
100
|
- !ruby/object:Gem::Version
|
@@ -90,6 +102,7 @@ dependencies:
|
|
90
102
|
type: :development
|
91
103
|
prerelease: false
|
92
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
93
106
|
requirements:
|
94
107
|
- - ~>
|
95
108
|
- !ruby/object:Gem::Version
|
@@ -97,6 +110,7 @@ dependencies:
|
|
97
110
|
- !ruby/object:Gem::Dependency
|
98
111
|
name: redcarpet
|
99
112
|
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
100
114
|
requirements:
|
101
115
|
- - ~>
|
102
116
|
- !ruby/object:Gem::Version
|
@@ -104,6 +118,7 @@ dependencies:
|
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
107
122
|
requirements:
|
108
123
|
- - ~>
|
109
124
|
- !ruby/object:Gem::Version
|
@@ -111,6 +126,7 @@ dependencies:
|
|
111
126
|
- !ruby/object:Gem::Dependency
|
112
127
|
name: guard-rspec
|
113
128
|
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
114
130
|
requirements:
|
115
131
|
- - ~>
|
116
132
|
- !ruby/object:Gem::Version
|
@@ -118,6 +134,7 @@ dependencies:
|
|
118
134
|
type: :development
|
119
135
|
prerelease: false
|
120
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
121
138
|
requirements:
|
122
139
|
- - ~>
|
123
140
|
- !ruby/object:Gem::Version
|
@@ -125,20 +142,23 @@ dependencies:
|
|
125
142
|
- !ruby/object:Gem::Dependency
|
126
143
|
name: faraday
|
127
144
|
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
128
146
|
requirements:
|
129
147
|
- - ~>
|
130
148
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.
|
149
|
+
version: 0.9.0
|
132
150
|
type: :runtime
|
133
151
|
prerelease: false
|
134
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
135
154
|
requirements:
|
136
155
|
- - ~>
|
137
156
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.
|
157
|
+
version: 0.9.0
|
139
158
|
- !ruby/object:Gem::Dependency
|
140
159
|
name: faraday_middleware
|
141
160
|
requirement: !ruby/object:Gem::Requirement
|
161
|
+
none: false
|
142
162
|
requirements:
|
143
163
|
- - ~>
|
144
164
|
- !ruby/object:Gem::Version
|
@@ -146,6 +166,7 @@ dependencies:
|
|
146
166
|
type: :runtime
|
147
167
|
prerelease: false
|
148
168
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
149
170
|
requirements:
|
150
171
|
- - ~>
|
151
172
|
- !ruby/object:Gem::Version
|
@@ -153,17 +174,19 @@ dependencies:
|
|
153
174
|
- !ruby/object:Gem::Dependency
|
154
175
|
name: hashie
|
155
176
|
requirement: !ruby/object:Gem::Requirement
|
177
|
+
none: false
|
156
178
|
requirements:
|
157
179
|
- - ~>
|
158
180
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
181
|
+
version: '3.0'
|
160
182
|
type: :runtime
|
161
183
|
prerelease: false
|
162
184
|
version_requirements: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
163
186
|
requirements:
|
164
187
|
- - ~>
|
165
188
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
189
|
+
version: '3.0'
|
167
190
|
description: A Ruby wrapper for the TeamCity Rest API
|
168
191
|
email:
|
169
192
|
- bosoxjay@gmail.com
|
@@ -172,7 +195,9 @@ extensions: []
|
|
172
195
|
extra_rdoc_files: []
|
173
196
|
files:
|
174
197
|
- .gitignore
|
175
|
-
- .
|
198
|
+
- .ruby-gemset
|
199
|
+
- .ruby-version
|
200
|
+
- .travis.yml
|
176
201
|
- .yardopts
|
177
202
|
- CHANGELOG.md
|
178
203
|
- Gemfile
|
@@ -206,6 +231,7 @@ files:
|
|
206
231
|
- spec/cassettes/BuildTypes/GET/_buildtype_artifact_dependencies/should_fetch_the_build_configuration_artifact_dependencies_for_a_buildtype.yml
|
207
232
|
- spec/cassettes/BuildTypes/GET/_buildtype_artifact_dependencies/should_return_an_array.yml
|
208
233
|
- spec/cassettes/BuildTypes/GET/_buildtype_artifact_dependencies/should_return_nil_if_there_are_no_artifact_dependencies_defined.yml
|
234
|
+
- spec/cassettes/BuildTypes/GET/_buildtype_branches/should_fetch_vcs_branches_the_vcs_root_is_configured_to_use.yml
|
209
235
|
- spec/cassettes/BuildTypes/GET/_buildtype_features/should_fetch_the_build_configuration_features_for_a_buildtype.yml
|
210
236
|
- spec/cassettes/BuildTypes/GET/_buildtype_features/should_return_an_array.yml
|
211
237
|
- spec/cassettes/BuildTypes/GET/_buildtype_features/should_return_nil_if_there_are_no_features_defined.yml
|
@@ -299,26 +325,27 @@ files:
|
|
299
325
|
homepage: https://github.com/jperry/teamcity-ruby-client
|
300
326
|
licenses:
|
301
327
|
- MIT
|
302
|
-
metadata: {}
|
303
328
|
post_install_message:
|
304
329
|
rdoc_options: []
|
305
330
|
require_paths:
|
306
331
|
- lib
|
307
332
|
required_ruby_version: !ruby/object:Gem::Requirement
|
333
|
+
none: false
|
308
334
|
requirements:
|
309
335
|
- - ! '>='
|
310
336
|
- !ruby/object:Gem::Version
|
311
337
|
version: '0'
|
312
338
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
339
|
+
none: false
|
313
340
|
requirements:
|
314
341
|
- - ! '>='
|
315
342
|
- !ruby/object:Gem::Version
|
316
343
|
version: '0'
|
317
344
|
requirements: []
|
318
345
|
rubyforge_project:
|
319
|
-
rubygems_version:
|
346
|
+
rubygems_version: 1.8.23
|
320
347
|
signing_key:
|
321
|
-
specification_version:
|
348
|
+
specification_version: 3
|
322
349
|
summary: Ruby wrapper for the TeamCity API
|
323
350
|
test_files:
|
324
351
|
- spec/cassettes/BuildTypes/DELETE/_delete_agent_requirement/should_delete_the_agent_requirement.yml
|
@@ -332,6 +359,7 @@ test_files:
|
|
332
359
|
- spec/cassettes/BuildTypes/GET/_buildtype_artifact_dependencies/should_fetch_the_build_configuration_artifact_dependencies_for_a_buildtype.yml
|
333
360
|
- spec/cassettes/BuildTypes/GET/_buildtype_artifact_dependencies/should_return_an_array.yml
|
334
361
|
- spec/cassettes/BuildTypes/GET/_buildtype_artifact_dependencies/should_return_nil_if_there_are_no_artifact_dependencies_defined.yml
|
362
|
+
- spec/cassettes/BuildTypes/GET/_buildtype_branches/should_fetch_vcs_branches_the_vcs_root_is_configured_to_use.yml
|
335
363
|
- spec/cassettes/BuildTypes/GET/_buildtype_features/should_fetch_the_build_configuration_features_for_a_buildtype.yml
|
336
364
|
- spec/cassettes/BuildTypes/GET/_buildtype_features/should_return_an_array.yml
|
337
365
|
- spec/cassettes/BuildTypes/GET/_buildtype_features/should_return_nil_if_there_are_no_features_defined.yml
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
NTkyNmMwZWJmYjU4MWRhNzkwNjQwOWMzYjZlNmIxZmVhZWE0NTIyMw==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
NTkzYzA4NTNlZWQ5MjliYzU5ODkxYTMwOThmMmE5YTdhNzFjYjI0Yg==
|
7
|
-
SHA512:
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
YWM1NWY4NDA2YzU3Y2U5NTNhNTA3ZGI0ZDNkYTkyOWQ5ZjdmMDQ3MTc4Njgx
|
10
|
-
NDMzODRhYzJiNWZjZWNlYjc3Njc4ZDQ1ZDQzZDRiYjViOGQxNDM5OGI5OGNh
|
11
|
-
YTJhOTZjMTk0NGQ5MGJlNmNjZTNiYzNlYzQwNjIzMWU4MGUxYzE=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
YjJiNmE0YzU4NTllYzdlOTIxOWI3NDc2ZjMyOTM0NWM3NjkyZTBmNGJmMTkz
|
14
|
-
MjM5NDljMGI3ODVmMjNhY2YxNzhmNmM5ZDU1MWUzZTFiMjc5ZWM2OTE0YWRl
|
15
|
-
NjYxNTBiNmUwMDJlMWQzNmE3MTFiNDIzNzgwN2FhMDg4YmE3OTk=
|
data/.rvmrc
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
|
3
|
-
# This is an RVM Project .rvmrc file, used to automatically load the ruby
|
4
|
-
# development environment upon cd'ing into the directory
|
5
|
-
|
6
|
-
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
|
7
|
-
# Only full ruby name is supported here, for short names use:
|
8
|
-
# echo "rvm use 1.9.3" > .rvmrc
|
9
|
-
environment_id="ruby-1.9.3-p362@teamcity-ruby-client"
|
10
|
-
|
11
|
-
# Uncomment the following lines if you want to verify rvm version per project
|
12
|
-
# rvmrc_rvm_version="1.14.2 (latest)" # 1.10.1 seams as a safe start
|
13
|
-
# eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
|
14
|
-
# echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
|
15
|
-
# return 1
|
16
|
-
# }
|
17
|
-
|
18
|
-
# First we attempt to load the desired environment directly from the environment
|
19
|
-
# file. This is very fast and efficient compared to running through the entire
|
20
|
-
# CLI and selector. If you want feedback on which environment was used then
|
21
|
-
# insert the word 'use' after --create as this triggers verbose mode.
|
22
|
-
if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
|
23
|
-
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
|
24
|
-
then
|
25
|
-
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
|
26
|
-
[[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] &&
|
27
|
-
\. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true
|
28
|
-
else
|
29
|
-
# If the environment file has not yet been created, use the RVM CLI to select.
|
30
|
-
rvm --create "$environment_id" || {
|
31
|
-
echo "Failed to create RVM environment '${environment_id}'."
|
32
|
-
return 1
|
33
|
-
}
|
34
|
-
fi
|
35
|
-
|
36
|
-
# If you use bundler, this might be useful to you:
|
37
|
-
# if [[ -s Gemfile ]] && {
|
38
|
-
# ! builtin command -v bundle >/dev/null ||
|
39
|
-
# builtin command -v bundle | GREP_OPTIONS= \grep $rvm_path/bin/bundle >/dev/null
|
40
|
-
# }
|
41
|
-
# then
|
42
|
-
# printf "%b" "The rubygem 'bundler' is not installed. Installing it now.\n"
|
43
|
-
# gem install bundler
|
44
|
-
# fi
|
45
|
-
# if [[ -s Gemfile ]] && builtin command -v bundle >/dev/null
|
46
|
-
# then
|
47
|
-
# bundle install | GREP_OPTIONS= \grep -vE '^Using|Your bundle is complete'
|
48
|
-
# fi
|