circleci 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/circleci/config.rb +2 -3
- data/lib/circleci/http.rb +1 -1
- data/lib/circleci/project.rb +60 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc2019b8f6353ddcaf0261b8c3daa78f1e53544d
|
4
|
+
data.tar.gz: b83a8a28c1838a0942a639f344b481202cd0800c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f19c2766cad2045ff29bd1d2040a186318a86a3b98e0325ba3bc1302b8cc428c0bdc07dcc7c209bde006ae3499b63ef16a993f05e1bf1c1f127d0947a1210487
|
7
|
+
data.tar.gz: 9852e587d7bf08278ef705722c0cdd7ad9b95172825349e294300073629963f9c0a2de7591c3c95064c87f62ee951a100dd5a8194443d041d2ca76cdaf214caf
|
data/lib/circleci/config.rb
CHANGED
@@ -8,10 +8,9 @@ module CircleCi
|
|
8
8
|
|
9
9
|
VERSION = 'v1'
|
10
10
|
DEFAULT_HOST = "https://circleci.com/api/#{VERSION}"
|
11
|
-
DEFAULT_PORT = 80
|
11
|
+
DEFAULT_PORT = 80
|
12
12
|
|
13
|
-
attr_accessor :token
|
14
|
-
attr_reader :host, :port # @private
|
13
|
+
attr_accessor :token, :host, :port
|
15
14
|
|
16
15
|
##
|
17
16
|
#
|
data/lib/circleci/http.rb
CHANGED
data/lib/circleci/project.rb
CHANGED
@@ -28,6 +28,18 @@ module CircleCi
|
|
28
28
|
CircleCi.http.get "/project/#{username}/#{project}"
|
29
29
|
end
|
30
30
|
|
31
|
+
##
|
32
|
+
#
|
33
|
+
# Build the latest master push for this project
|
34
|
+
#
|
35
|
+
# @param username [String] - User or org name who owns project
|
36
|
+
# @param project [String] - Name of project
|
37
|
+
# @return [CircleCi::Response] - Response object
|
38
|
+
|
39
|
+
def self.build username, project
|
40
|
+
CircleCi.http.post "/project/#{username}/#{project}"
|
41
|
+
end
|
42
|
+
|
31
43
|
##
|
32
44
|
#
|
33
45
|
# Get all recent builds for a specific branch of a project
|
@@ -53,6 +65,54 @@ module CircleCi
|
|
53
65
|
CircleCi.http.delete "/project/#{username}/#{project}/build-cache"
|
54
66
|
end
|
55
67
|
|
68
|
+
##
|
69
|
+
#
|
70
|
+
# Enable a project in CircleCI. Causes a CircleCI SSH key to be added to the GitHub. Requires admin privilege to the repository.
|
71
|
+
#
|
72
|
+
# @param username [String] - User or org name who owns project
|
73
|
+
# @param project [String] - Name of project
|
74
|
+
# @return [CircleCi::Response] - Response object
|
75
|
+
|
76
|
+
def self.enable username, project
|
77
|
+
CircleCi.http.post "/project/#{username}/#{project}/enable"
|
78
|
+
end
|
79
|
+
|
80
|
+
##
|
81
|
+
#
|
82
|
+
# Follow the project
|
83
|
+
#
|
84
|
+
# @param username [String] - User or org name who owns project
|
85
|
+
# @param project [String] - Name of project
|
86
|
+
# @return [CircleCi::Response] - Response object
|
87
|
+
|
88
|
+
def self.follow username, project
|
89
|
+
CircleCi.http.post "/project/#{username}/#{project}/follow"
|
90
|
+
end
|
91
|
+
|
92
|
+
##
|
93
|
+
#
|
94
|
+
# Unfollow the project
|
95
|
+
#
|
96
|
+
# @param username [String] - User or org name who owns project
|
97
|
+
# @param project [String] - Name of project
|
98
|
+
# @return [CircleCi::Response] - Response object
|
99
|
+
|
100
|
+
def self.unfollow username, project
|
101
|
+
CircleCi.http.post "/project/#{username}/#{project}/unfollow"
|
102
|
+
end
|
103
|
+
|
104
|
+
##
|
105
|
+
#
|
106
|
+
# Get the project configuration
|
107
|
+
#
|
108
|
+
# @param username [String] - User or org name who owns project
|
109
|
+
# @param project [String] - Name of project
|
110
|
+
# @return [CircleCi::Response] - Response object
|
111
|
+
|
112
|
+
def self.settings username, project
|
113
|
+
CircleCi.http.get "/project/#{username}/#{project}/settings"
|
114
|
+
end
|
115
|
+
|
56
116
|
end
|
57
117
|
|
58
118
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: circleci
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chavez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|