Class: Tinybucket::Model::Repository
- Includes:
- Concerns::RepositoryKeys
- Defined in:
- lib/tinybucket/model/repository.rb
Overview
Repository
Instance Attribute Summary collapse
- #created_on ⇒ String
- #description ⇒ String
- #fork_policy ⇒ String
- #full_name ⇒ String
- #has_issues ⇒ true, false
- #has_wiki ⇒ true, false
- #is_private ⇒ true, false
- #language ⇒ String
- #links ⇒ Hash
- #name ⇒ String
- #owner ⇒ Hash
- #parent ⇒ Hash, NillClass
- #scm ⇒ String
- #size ⇒ Fixnum
- #type ⇒ String
- #updated_on ⇒ String
- #uuid ⇒ String
- #website ⇒ String
Instance Method Summary collapse
-
#branch(branch, options = {}) ⇒ Tinybucket::Model::Branches
Get the specific branch on this repository.
-
#branch_restriction(restriction_id, options = {}) ⇒ Tinybucket::Model::BranchRestriction
Get the specific branch restriction information on this repository.
-
#branch_restrictions(options = {}) ⇒ Tinybucket::Resource::BranchRestrictions
Get the branch restriction information associated with this repository.
-
#branches(options = {}) ⇒ Tinybucket::Resource::Branches
Get branches on this repository.
-
#commit(revision, options = {}) ⇒ Tinybucket::Model::Commit
Get the specific commit on this repository.
-
#commits(options = {}) ⇒ Tinybucket::Resource::Commits
Get commits on this repository.
-
#destroy ⇒ Object
Remove this repository.
-
#diff(spec, options = {}) ⇒ String
Get the diff for this repository.
-
#forks(options = {}) ⇒ Tinybucket::Resource::Forks
Get repository forks.
-
#initialize(json) ⇒ Repository
constructor
A new instance of Repository.
-
#patch(spec, options = {}) ⇒ String
Get the patch for the specification.
-
#pull_request(pullrequest_id, options = {}) ⇒ Tinybucket::Model::PullRequest
Get the specific pull request on this repository.
-
#pull_requests(options = {}) ⇒ Tinybucket::Enumerator
Get pull requests on thie repository.
-
#watchers(options = {}) ⇒ Tinybucket::Resource::Watchers
Get watchers on this repository.
Methods inherited from Base
#attributes, #attributes=, concern_included?
Constructor Details
#initialize(json) ⇒ Repository
Returns a new instance of Repository.
55 56 57 58 59 60 |
# File 'lib/tinybucket/model/repository.rb', line 55 def initialize(json) super(json) return unless full_name && full_name.split('/').size == 2 @repo_owner, @repo_slug = full_name.split('/') end |
Instance Attribute Details
#created_on ⇒ String
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/tinybucket/model/repository.rb', line 46 class Repository < Base include Tinybucket::Model::Concerns::RepositoryKeys acceptable_attributes \ :scm, :has_wiki, :description, :links, :updated_on, :fork_policy, :created_on, :owner, :size, :parent, :uuid, :has_issues, :is_private, :full_name, :name, :language, :website, :type def initialize(json) super(json) return unless full_name && full_name.split('/').size == 2 @repo_owner, @repo_slug = full_name.split('/') end # Remove this repository # # @todo to be implemented. # @raise [NotImplementedError] to be implemented. def destroy raise NotImplementedError end # Get pull requests on thie repository. # # @param options [Hash] # @return [Tinybucket::Enumerator] an enumerator to enumerate # pull requests as {Tinybucket::Model::PullRequest} instance. def pull_requests( = {}) pull_requests_resource() end # Get the specific pull request on this repository. # # @param pullrequest_id [String] # @param options [Hash] # @return [Tinybucket::Model::PullRequest] def pull_request(pullrequest_id, = {}) pull_requests_resource.find(pullrequest_id, ) end # Get watchers on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Watchers] def watchers( = {}) watchers_resource() end # Get repository forks. # # @param options [Hash] # @return [Tinybucket::Resource::Forks] def forks( = {}) forks_resource() end # Get commits on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Commits] def commits( = {}) commits_resource() end # Get the specific commit on this repository. # # @param revision [String] # @param options [Hash] # @return [Tinybucket::Model::Commit] def commit(revision, = {}) commits_resource.find(revision, ) end # Get branches on this repository # # @param options [Hash] # @return [Tinybucket::Resource::Branches] def branches( = {}) branches_resource() end # Get the specific branch on this repository. # # @param branch [String] # @param options [Hash] # @return [Tinybucket::Model::Branches] def branch(branch, = {}) branches_resource.find(branch, ) end # Get the branch restriction information associated with this repository. # # @param options [Hash] # @return [Tinybucket::Resource::BranchRestrictions] def branch_restrictions( = {}) branch_restrictions_resource() end # Get the specific branch restriction information on this repository. # # @param restriction_id [String] # @param options [Hash] # @return [Tinybucket::Model::BranchRestriction] def branch_restriction(restriction_id, = {}) branch_restrictions_resource.find(restriction_id, ) end # Get the diff for this repository. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] diff as raw text. def diff(spec, = {}) diff_api.find(spec, ) end # Get the patch for the specification. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @return [String] patch as raw text. def patch(spec, = {}) diff_api.find_patch(spec, ) end private def branch_restrictions_resource( = {}) Tinybucket::Resource::BranchRestrictions.new(self, ) end def branches_resource( = {}) Tinybucket::Resource::Branches.new(self, ) end def commits_resource( = {}) Tinybucket::Resource::Commits.new(self, ) end def hooks_resource( = {}) Tinybucket::Resource::Hooks.new(self, ) end def pull_requests_resource( = {}) Tinybucket::Resource::PullRequests.new(self, ) end def watchers_resource( = {}) Tinybucket::Resource::Watchers.new(self, ) end def forks_resource( = {}) Tinybucket::Resource::Forks.new(self, ) end def repo_api create_api('Repo', repo_keys) end def diff_api create_api('Diff', repo_keys) end def load_model repo_api.find() end end |
#description ⇒ String
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/tinybucket/model/repository.rb', line 46 class Repository < Base include Tinybucket::Model::Concerns::RepositoryKeys acceptable_attributes \ :scm, :has_wiki, :description, :links, :updated_on, :fork_policy, :created_on, :owner, :size, :parent, :uuid, :has_issues, :is_private, :full_name, :name, :language, :website, :type def initialize(json) super(json) return unless full_name && full_name.split('/').size == 2 @repo_owner, @repo_slug = full_name.split('/') end # Remove this repository # # @todo to be implemented. # @raise [NotImplementedError] to be implemented. def destroy raise NotImplementedError end # Get pull requests on thie repository. # # @param options [Hash] # @return [Tinybucket::Enumerator] an enumerator to enumerate # pull requests as {Tinybucket::Model::PullRequest} instance. def pull_requests( = {}) pull_requests_resource() end # Get the specific pull request on this repository. # # @param pullrequest_id [String] # @param options [Hash] # @return [Tinybucket::Model::PullRequest] def pull_request(pullrequest_id, = {}) pull_requests_resource.find(pullrequest_id, ) end # Get watchers on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Watchers] def watchers( = {}) watchers_resource() end # Get repository forks. # # @param options [Hash] # @return [Tinybucket::Resource::Forks] def forks( = {}) forks_resource() end # Get commits on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Commits] def commits( = {}) commits_resource() end # Get the specific commit on this repository. # # @param revision [String] # @param options [Hash] # @return [Tinybucket::Model::Commit] def commit(revision, = {}) commits_resource.find(revision, ) end # Get branches on this repository # # @param options [Hash] # @return [Tinybucket::Resource::Branches] def branches( = {}) branches_resource() end # Get the specific branch on this repository. # # @param branch [String] # @param options [Hash] # @return [Tinybucket::Model::Branches] def branch(branch, = {}) branches_resource.find(branch, ) end # Get the branch restriction information associated with this repository. # # @param options [Hash] # @return [Tinybucket::Resource::BranchRestrictions] def branch_restrictions( = {}) branch_restrictions_resource() end # Get the specific branch restriction information on this repository. # # @param restriction_id [String] # @param options [Hash] # @return [Tinybucket::Model::BranchRestriction] def branch_restriction(restriction_id, = {}) branch_restrictions_resource.find(restriction_id, ) end # Get the diff for this repository. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] diff as raw text. def diff(spec, = {}) diff_api.find(spec, ) end # Get the patch for the specification. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @return [String] patch as raw text. def patch(spec, = {}) diff_api.find_patch(spec, ) end private def branch_restrictions_resource( = {}) Tinybucket::Resource::BranchRestrictions.new(self, ) end def branches_resource( = {}) Tinybucket::Resource::Branches.new(self, ) end def commits_resource( = {}) Tinybucket::Resource::Commits.new(self, ) end def hooks_resource( = {}) Tinybucket::Resource::Hooks.new(self, ) end def pull_requests_resource( = {}) Tinybucket::Resource::PullRequests.new(self, ) end def watchers_resource( = {}) Tinybucket::Resource::Watchers.new(self, ) end def forks_resource( = {}) Tinybucket::Resource::Forks.new(self, ) end def repo_api create_api('Repo', repo_keys) end def diff_api create_api('Diff', repo_keys) end def load_model repo_api.find() end end |
#fork_policy ⇒ String
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/tinybucket/model/repository.rb', line 46 class Repository < Base include Tinybucket::Model::Concerns::RepositoryKeys acceptable_attributes \ :scm, :has_wiki, :description, :links, :updated_on, :fork_policy, :created_on, :owner, :size, :parent, :uuid, :has_issues, :is_private, :full_name, :name, :language, :website, :type def initialize(json) super(json) return unless full_name && full_name.split('/').size == 2 @repo_owner, @repo_slug = full_name.split('/') end # Remove this repository # # @todo to be implemented. # @raise [NotImplementedError] to be implemented. def destroy raise NotImplementedError end # Get pull requests on thie repository. # # @param options [Hash] # @return [Tinybucket::Enumerator] an enumerator to enumerate # pull requests as {Tinybucket::Model::PullRequest} instance. def pull_requests( = {}) pull_requests_resource() end # Get the specific pull request on this repository. # # @param pullrequest_id [String] # @param options [Hash] # @return [Tinybucket::Model::PullRequest] def pull_request(pullrequest_id, = {}) pull_requests_resource.find(pullrequest_id, ) end # Get watchers on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Watchers] def watchers( = {}) watchers_resource() end # Get repository forks. # # @param options [Hash] # @return [Tinybucket::Resource::Forks] def forks( = {}) forks_resource() end # Get commits on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Commits] def commits( = {}) commits_resource() end # Get the specific commit on this repository. # # @param revision [String] # @param options [Hash] # @return [Tinybucket::Model::Commit] def commit(revision, = {}) commits_resource.find(revision, ) end # Get branches on this repository # # @param options [Hash] # @return [Tinybucket::Resource::Branches] def branches( = {}) branches_resource() end # Get the specific branch on this repository. # # @param branch [String] # @param options [Hash] # @return [Tinybucket::Model::Branches] def branch(branch, = {}) branches_resource.find(branch, ) end # Get the branch restriction information associated with this repository. # # @param options [Hash] # @return [Tinybucket::Resource::BranchRestrictions] def branch_restrictions( = {}) branch_restrictions_resource() end # Get the specific branch restriction information on this repository. # # @param restriction_id [String] # @param options [Hash] # @return [Tinybucket::Model::BranchRestriction] def branch_restriction(restriction_id, = {}) branch_restrictions_resource.find(restriction_id, ) end # Get the diff for this repository. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] diff as raw text. def diff(spec, = {}) diff_api.find(spec, ) end # Get the patch for the specification. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @return [String] patch as raw text. def patch(spec, = {}) diff_api.find_patch(spec, ) end private def branch_restrictions_resource( = {}) Tinybucket::Resource::BranchRestrictions.new(self, ) end def branches_resource( = {}) Tinybucket::Resource::Branches.new(self, ) end def commits_resource( = {}) Tinybucket::Resource::Commits.new(self, ) end def hooks_resource( = {}) Tinybucket::Resource::Hooks.new(self, ) end def pull_requests_resource( = {}) Tinybucket::Resource::PullRequests.new(self, ) end def watchers_resource( = {}) Tinybucket::Resource::Watchers.new(self, ) end def forks_resource( = {}) Tinybucket::Resource::Forks.new(self, ) end def repo_api create_api('Repo', repo_keys) end def diff_api create_api('Diff', repo_keys) end def load_model repo_api.find() end end |
#full_name ⇒ String
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/tinybucket/model/repository.rb', line 46 class Repository < Base include Tinybucket::Model::Concerns::RepositoryKeys acceptable_attributes \ :scm, :has_wiki, :description, :links, :updated_on, :fork_policy, :created_on, :owner, :size, :parent, :uuid, :has_issues, :is_private, :full_name, :name, :language, :website, :type def initialize(json) super(json) return unless full_name && full_name.split('/').size == 2 @repo_owner, @repo_slug = full_name.split('/') end # Remove this repository # # @todo to be implemented. # @raise [NotImplementedError] to be implemented. def destroy raise NotImplementedError end # Get pull requests on thie repository. # # @param options [Hash] # @return [Tinybucket::Enumerator] an enumerator to enumerate # pull requests as {Tinybucket::Model::PullRequest} instance. def pull_requests( = {}) pull_requests_resource() end # Get the specific pull request on this repository. # # @param pullrequest_id [String] # @param options [Hash] # @return [Tinybucket::Model::PullRequest] def pull_request(pullrequest_id, = {}) pull_requests_resource.find(pullrequest_id, ) end # Get watchers on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Watchers] def watchers( = {}) watchers_resource() end # Get repository forks. # # @param options [Hash] # @return [Tinybucket::Resource::Forks] def forks( = {}) forks_resource() end # Get commits on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Commits] def commits( = {}) commits_resource() end # Get the specific commit on this repository. # # @param revision [String] # @param options [Hash] # @return [Tinybucket::Model::Commit] def commit(revision, = {}) commits_resource.find(revision, ) end # Get branches on this repository # # @param options [Hash] # @return [Tinybucket::Resource::Branches] def branches( = {}) branches_resource() end # Get the specific branch on this repository. # # @param branch [String] # @param options [Hash] # @return [Tinybucket::Model::Branches] def branch(branch, = {}) branches_resource.find(branch, ) end # Get the branch restriction information associated with this repository. # # @param options [Hash] # @return [Tinybucket::Resource::BranchRestrictions] def branch_restrictions( = {}) branch_restrictions_resource() end # Get the specific branch restriction information on this repository. # # @param restriction_id [String] # @param options [Hash] # @return [Tinybucket::Model::BranchRestriction] def branch_restriction(restriction_id, = {}) branch_restrictions_resource.find(restriction_id, ) end # Get the diff for this repository. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] diff as raw text. def diff(spec, = {}) diff_api.find(spec, ) end # Get the patch for the specification. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @return [String] patch as raw text. def patch(spec, = {}) diff_api.find_patch(spec, ) end private def branch_restrictions_resource( = {}) Tinybucket::Resource::BranchRestrictions.new(self, ) end def branches_resource( = {}) Tinybucket::Resource::Branches.new(self, ) end def commits_resource( = {}) Tinybucket::Resource::Commits.new(self, ) end def hooks_resource( = {}) Tinybucket::Resource::Hooks.new(self, ) end def pull_requests_resource( = {}) Tinybucket::Resource::PullRequests.new(self, ) end def watchers_resource( = {}) Tinybucket::Resource::Watchers.new(self, ) end def forks_resource( = {}) Tinybucket::Resource::Forks.new(self, ) end def repo_api create_api('Repo', repo_keys) end def diff_api create_api('Diff', repo_keys) end def load_model repo_api.find() end end |
#has_issues ⇒ true, false
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/tinybucket/model/repository.rb', line 46 class Repository < Base include Tinybucket::Model::Concerns::RepositoryKeys acceptable_attributes \ :scm, :has_wiki, :description, :links, :updated_on, :fork_policy, :created_on, :owner, :size, :parent, :uuid, :has_issues, :is_private, :full_name, :name, :language, :website, :type def initialize(json) super(json) return unless full_name && full_name.split('/').size == 2 @repo_owner, @repo_slug = full_name.split('/') end # Remove this repository # # @todo to be implemented. # @raise [NotImplementedError] to be implemented. def destroy raise NotImplementedError end # Get pull requests on thie repository. # # @param options [Hash] # @return [Tinybucket::Enumerator] an enumerator to enumerate # pull requests as {Tinybucket::Model::PullRequest} instance. def pull_requests( = {}) pull_requests_resource() end # Get the specific pull request on this repository. # # @param pullrequest_id [String] # @param options [Hash] # @return [Tinybucket::Model::PullRequest] def pull_request(pullrequest_id, = {}) pull_requests_resource.find(pullrequest_id, ) end # Get watchers on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Watchers] def watchers( = {}) watchers_resource() end # Get repository forks. # # @param options [Hash] # @return [Tinybucket::Resource::Forks] def forks( = {}) forks_resource() end # Get commits on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Commits] def commits( = {}) commits_resource() end # Get the specific commit on this repository. # # @param revision [String] # @param options [Hash] # @return [Tinybucket::Model::Commit] def commit(revision, = {}) commits_resource.find(revision, ) end # Get branches on this repository # # @param options [Hash] # @return [Tinybucket::Resource::Branches] def branches( = {}) branches_resource() end # Get the specific branch on this repository. # # @param branch [String] # @param options [Hash] # @return [Tinybucket::Model::Branches] def branch(branch, = {}) branches_resource.find(branch, ) end # Get the branch restriction information associated with this repository. # # @param options [Hash] # @return [Tinybucket::Resource::BranchRestrictions] def branch_restrictions( = {}) branch_restrictions_resource() end # Get the specific branch restriction information on this repository. # # @param restriction_id [String] # @param options [Hash] # @return [Tinybucket::Model::BranchRestriction] def branch_restriction(restriction_id, = {}) branch_restrictions_resource.find(restriction_id, ) end # Get the diff for this repository. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] diff as raw text. def diff(spec, = {}) diff_api.find(spec, ) end # Get the patch for the specification. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @return [String] patch as raw text. def patch(spec, = {}) diff_api.find_patch(spec, ) end private def branch_restrictions_resource( = {}) Tinybucket::Resource::BranchRestrictions.new(self, ) end def branches_resource( = {}) Tinybucket::Resource::Branches.new(self, ) end def commits_resource( = {}) Tinybucket::Resource::Commits.new(self, ) end def hooks_resource( = {}) Tinybucket::Resource::Hooks.new(self, ) end def pull_requests_resource( = {}) Tinybucket::Resource::PullRequests.new(self, ) end def watchers_resource( = {}) Tinybucket::Resource::Watchers.new(self, ) end def forks_resource( = {}) Tinybucket::Resource::Forks.new(self, ) end def repo_api create_api('Repo', repo_keys) end def diff_api create_api('Diff', repo_keys) end def load_model repo_api.find() end end |
#has_wiki ⇒ true, false
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/tinybucket/model/repository.rb', line 46 class Repository < Base include Tinybucket::Model::Concerns::RepositoryKeys acceptable_attributes \ :scm, :has_wiki, :description, :links, :updated_on, :fork_policy, :created_on, :owner, :size, :parent, :uuid, :has_issues, :is_private, :full_name, :name, :language, :website, :type def initialize(json) super(json) return unless full_name && full_name.split('/').size == 2 @repo_owner, @repo_slug = full_name.split('/') end # Remove this repository # # @todo to be implemented. # @raise [NotImplementedError] to be implemented. def destroy raise NotImplementedError end # Get pull requests on thie repository. # # @param options [Hash] # @return [Tinybucket::Enumerator] an enumerator to enumerate # pull requests as {Tinybucket::Model::PullRequest} instance. def pull_requests( = {}) pull_requests_resource() end # Get the specific pull request on this repository. # # @param pullrequest_id [String] # @param options [Hash] # @return [Tinybucket::Model::PullRequest] def pull_request(pullrequest_id, = {}) pull_requests_resource.find(pullrequest_id, ) end # Get watchers on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Watchers] def watchers( = {}) watchers_resource() end # Get repository forks. # # @param options [Hash] # @return [Tinybucket::Resource::Forks] def forks( = {}) forks_resource() end # Get commits on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Commits] def commits( = {}) commits_resource() end # Get the specific commit on this repository. # # @param revision [String] # @param options [Hash] # @return [Tinybucket::Model::Commit] def commit(revision, = {}) commits_resource.find(revision, ) end # Get branches on this repository # # @param options [Hash] # @return [Tinybucket::Resource::Branches] def branches( = {}) branches_resource() end # Get the specific branch on this repository. # # @param branch [String] # @param options [Hash] # @return [Tinybucket::Model::Branches] def branch(branch, = {}) branches_resource.find(branch, ) end # Get the branch restriction information associated with this repository. # # @param options [Hash] # @return [Tinybucket::Resource::BranchRestrictions] def branch_restrictions( = {}) branch_restrictions_resource() end # Get the specific branch restriction information on this repository. # # @param restriction_id [String] # @param options [Hash] # @return [Tinybucket::Model::BranchRestriction] def branch_restriction(restriction_id, = {}) branch_restrictions_resource.find(restriction_id, ) end # Get the diff for this repository. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] diff as raw text. def diff(spec, = {}) diff_api.find(spec, ) end # Get the patch for the specification. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @return [String] patch as raw text. def patch(spec, = {}) diff_api.find_patch(spec, ) end private def branch_restrictions_resource( = {}) Tinybucket::Resource::BranchRestrictions.new(self, ) end def branches_resource( = {}) Tinybucket::Resource::Branches.new(self, ) end def commits_resource( = {}) Tinybucket::Resource::Commits.new(self, ) end def hooks_resource( = {}) Tinybucket::Resource::Hooks.new(self, ) end def pull_requests_resource( = {}) Tinybucket::Resource::PullRequests.new(self, ) end def watchers_resource( = {}) Tinybucket::Resource::Watchers.new(self, ) end def forks_resource( = {}) Tinybucket::Resource::Forks.new(self, ) end def repo_api create_api('Repo', repo_keys) end def diff_api create_api('Diff', repo_keys) end def load_model repo_api.find() end end |
#is_private ⇒ true, false
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/tinybucket/model/repository.rb', line 46 class Repository < Base include Tinybucket::Model::Concerns::RepositoryKeys acceptable_attributes \ :scm, :has_wiki, :description, :links, :updated_on, :fork_policy, :created_on, :owner, :size, :parent, :uuid, :has_issues, :is_private, :full_name, :name, :language, :website, :type def initialize(json) super(json) return unless full_name && full_name.split('/').size == 2 @repo_owner, @repo_slug = full_name.split('/') end # Remove this repository # # @todo to be implemented. # @raise [NotImplementedError] to be implemented. def destroy raise NotImplementedError end # Get pull requests on thie repository. # # @param options [Hash] # @return [Tinybucket::Enumerator] an enumerator to enumerate # pull requests as {Tinybucket::Model::PullRequest} instance. def pull_requests( = {}) pull_requests_resource() end # Get the specific pull request on this repository. # # @param pullrequest_id [String] # @param options [Hash] # @return [Tinybucket::Model::PullRequest] def pull_request(pullrequest_id, = {}) pull_requests_resource.find(pullrequest_id, ) end # Get watchers on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Watchers] def watchers( = {}) watchers_resource() end # Get repository forks. # # @param options [Hash] # @return [Tinybucket::Resource::Forks] def forks( = {}) forks_resource() end # Get commits on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Commits] def commits( = {}) commits_resource() end # Get the specific commit on this repository. # # @param revision [String] # @param options [Hash] # @return [Tinybucket::Model::Commit] def commit(revision, = {}) commits_resource.find(revision, ) end # Get branches on this repository # # @param options [Hash] # @return [Tinybucket::Resource::Branches] def branches( = {}) branches_resource() end # Get the specific branch on this repository. # # @param branch [String] # @param options [Hash] # @return [Tinybucket::Model::Branches] def branch(branch, = {}) branches_resource.find(branch, ) end # Get the branch restriction information associated with this repository. # # @param options [Hash] # @return [Tinybucket::Resource::BranchRestrictions] def branch_restrictions( = {}) branch_restrictions_resource() end # Get the specific branch restriction information on this repository. # # @param restriction_id [String] # @param options [Hash] # @return [Tinybucket::Model::BranchRestriction] def branch_restriction(restriction_id, = {}) branch_restrictions_resource.find(restriction_id, ) end # Get the diff for this repository. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] diff as raw text. def diff(spec, = {}) diff_api.find(spec, ) end # Get the patch for the specification. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @return [String] patch as raw text. def patch(spec, = {}) diff_api.find_patch(spec, ) end private def branch_restrictions_resource( = {}) Tinybucket::Resource::BranchRestrictions.new(self, ) end def branches_resource( = {}) Tinybucket::Resource::Branches.new(self, ) end def commits_resource( = {}) Tinybucket::Resource::Commits.new(self, ) end def hooks_resource( = {}) Tinybucket::Resource::Hooks.new(self, ) end def pull_requests_resource( = {}) Tinybucket::Resource::PullRequests.new(self, ) end def watchers_resource( = {}) Tinybucket::Resource::Watchers.new(self, ) end def forks_resource( = {}) Tinybucket::Resource::Forks.new(self, ) end def repo_api create_api('Repo', repo_keys) end def diff_api create_api('Diff', repo_keys) end def load_model repo_api.find() end end |
#language ⇒ String
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/tinybucket/model/repository.rb', line 46 class Repository < Base include Tinybucket::Model::Concerns::RepositoryKeys acceptable_attributes \ :scm, :has_wiki, :description, :links, :updated_on, :fork_policy, :created_on, :owner, :size, :parent, :uuid, :has_issues, :is_private, :full_name, :name, :language, :website, :type def initialize(json) super(json) return unless full_name && full_name.split('/').size == 2 @repo_owner, @repo_slug = full_name.split('/') end # Remove this repository # # @todo to be implemented. # @raise [NotImplementedError] to be implemented. def destroy raise NotImplementedError end # Get pull requests on thie repository. # # @param options [Hash] # @return [Tinybucket::Enumerator] an enumerator to enumerate # pull requests as {Tinybucket::Model::PullRequest} instance. def pull_requests( = {}) pull_requests_resource() end # Get the specific pull request on this repository. # # @param pullrequest_id [String] # @param options [Hash] # @return [Tinybucket::Model::PullRequest] def pull_request(pullrequest_id, = {}) pull_requests_resource.find(pullrequest_id, ) end # Get watchers on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Watchers] def watchers( = {}) watchers_resource() end # Get repository forks. # # @param options [Hash] # @return [Tinybucket::Resource::Forks] def forks( = {}) forks_resource() end # Get commits on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Commits] def commits( = {}) commits_resource() end # Get the specific commit on this repository. # # @param revision [String] # @param options [Hash] # @return [Tinybucket::Model::Commit] def commit(revision, = {}) commits_resource.find(revision, ) end # Get branches on this repository # # @param options [Hash] # @return [Tinybucket::Resource::Branches] def branches( = {}) branches_resource() end # Get the specific branch on this repository. # # @param branch [String] # @param options [Hash] # @return [Tinybucket::Model::Branches] def branch(branch, = {}) branches_resource.find(branch, ) end # Get the branch restriction information associated with this repository. # # @param options [Hash] # @return [Tinybucket::Resource::BranchRestrictions] def branch_restrictions( = {}) branch_restrictions_resource() end # Get the specific branch restriction information on this repository. # # @param restriction_id [String] # @param options [Hash] # @return [Tinybucket::Model::BranchRestriction] def branch_restriction(restriction_id, = {}) branch_restrictions_resource.find(restriction_id, ) end # Get the diff for this repository. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] diff as raw text. def diff(spec, = {}) diff_api.find(spec, ) end # Get the patch for the specification. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @return [String] patch as raw text. def patch(spec, = {}) diff_api.find_patch(spec, ) end private def branch_restrictions_resource( = {}) Tinybucket::Resource::BranchRestrictions.new(self, ) end def branches_resource( = {}) Tinybucket::Resource::Branches.new(self, ) end def commits_resource( = {}) Tinybucket::Resource::Commits.new(self, ) end def hooks_resource( = {}) Tinybucket::Resource::Hooks.new(self, ) end def pull_requests_resource( = {}) Tinybucket::Resource::PullRequests.new(self, ) end def watchers_resource( = {}) Tinybucket::Resource::Watchers.new(self, ) end def forks_resource( = {}) Tinybucket::Resource::Forks.new(self, ) end def repo_api create_api('Repo', repo_keys) end def diff_api create_api('Diff', repo_keys) end def load_model repo_api.find() end end |
#links ⇒ Hash
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/tinybucket/model/repository.rb', line 46 class Repository < Base include Tinybucket::Model::Concerns::RepositoryKeys acceptable_attributes \ :scm, :has_wiki, :description, :links, :updated_on, :fork_policy, :created_on, :owner, :size, :parent, :uuid, :has_issues, :is_private, :full_name, :name, :language, :website, :type def initialize(json) super(json) return unless full_name && full_name.split('/').size == 2 @repo_owner, @repo_slug = full_name.split('/') end # Remove this repository # # @todo to be implemented. # @raise [NotImplementedError] to be implemented. def destroy raise NotImplementedError end # Get pull requests on thie repository. # # @param options [Hash] # @return [Tinybucket::Enumerator] an enumerator to enumerate # pull requests as {Tinybucket::Model::PullRequest} instance. def pull_requests( = {}) pull_requests_resource() end # Get the specific pull request on this repository. # # @param pullrequest_id [String] # @param options [Hash] # @return [Tinybucket::Model::PullRequest] def pull_request(pullrequest_id, = {}) pull_requests_resource.find(pullrequest_id, ) end # Get watchers on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Watchers] def watchers( = {}) watchers_resource() end # Get repository forks. # # @param options [Hash] # @return [Tinybucket::Resource::Forks] def forks( = {}) forks_resource() end # Get commits on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Commits] def commits( = {}) commits_resource() end # Get the specific commit on this repository. # # @param revision [String] # @param options [Hash] # @return [Tinybucket::Model::Commit] def commit(revision, = {}) commits_resource.find(revision, ) end # Get branches on this repository # # @param options [Hash] # @return [Tinybucket::Resource::Branches] def branches( = {}) branches_resource() end # Get the specific branch on this repository. # # @param branch [String] # @param options [Hash] # @return [Tinybucket::Model::Branches] def branch(branch, = {}) branches_resource.find(branch, ) end # Get the branch restriction information associated with this repository. # # @param options [Hash] # @return [Tinybucket::Resource::BranchRestrictions] def branch_restrictions( = {}) branch_restrictions_resource() end # Get the specific branch restriction information on this repository. # # @param restriction_id [String] # @param options [Hash] # @return [Tinybucket::Model::BranchRestriction] def branch_restriction(restriction_id, = {}) branch_restrictions_resource.find(restriction_id, ) end # Get the diff for this repository. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] diff as raw text. def diff(spec, = {}) diff_api.find(spec, ) end # Get the patch for the specification. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @return [String] patch as raw text. def patch(spec, = {}) diff_api.find_patch(spec, ) end private def branch_restrictions_resource( = {}) Tinybucket::Resource::BranchRestrictions.new(self, ) end def branches_resource( = {}) Tinybucket::Resource::Branches.new(self, ) end def commits_resource( = {}) Tinybucket::Resource::Commits.new(self, ) end def hooks_resource( = {}) Tinybucket::Resource::Hooks.new(self, ) end def pull_requests_resource( = {}) Tinybucket::Resource::PullRequests.new(self, ) end def watchers_resource( = {}) Tinybucket::Resource::Watchers.new(self, ) end def forks_resource( = {}) Tinybucket::Resource::Forks.new(self, ) end def repo_api create_api('Repo', repo_keys) end def diff_api create_api('Diff', repo_keys) end def load_model repo_api.find() end end |
#name ⇒ String
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/tinybucket/model/repository.rb', line 46 class Repository < Base include Tinybucket::Model::Concerns::RepositoryKeys acceptable_attributes \ :scm, :has_wiki, :description, :links, :updated_on, :fork_policy, :created_on, :owner, :size, :parent, :uuid, :has_issues, :is_private, :full_name, :name, :language, :website, :type def initialize(json) super(json) return unless full_name && full_name.split('/').size == 2 @repo_owner, @repo_slug = full_name.split('/') end # Remove this repository # # @todo to be implemented. # @raise [NotImplementedError] to be implemented. def destroy raise NotImplementedError end # Get pull requests on thie repository. # # @param options [Hash] # @return [Tinybucket::Enumerator] an enumerator to enumerate # pull requests as {Tinybucket::Model::PullRequest} instance. def pull_requests( = {}) pull_requests_resource() end # Get the specific pull request on this repository. # # @param pullrequest_id [String] # @param options [Hash] # @return [Tinybucket::Model::PullRequest] def pull_request(pullrequest_id, = {}) pull_requests_resource.find(pullrequest_id, ) end # Get watchers on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Watchers] def watchers( = {}) watchers_resource() end # Get repository forks. # # @param options [Hash] # @return [Tinybucket::Resource::Forks] def forks( = {}) forks_resource() end # Get commits on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Commits] def commits( = {}) commits_resource() end # Get the specific commit on this repository. # # @param revision [String] # @param options [Hash] # @return [Tinybucket::Model::Commit] def commit(revision, = {}) commits_resource.find(revision, ) end # Get branches on this repository # # @param options [Hash] # @return [Tinybucket::Resource::Branches] def branches( = {}) branches_resource() end # Get the specific branch on this repository. # # @param branch [String] # @param options [Hash] # @return [Tinybucket::Model::Branches] def branch(branch, = {}) branches_resource.find(branch, ) end # Get the branch restriction information associated with this repository. # # @param options [Hash] # @return [Tinybucket::Resource::BranchRestrictions] def branch_restrictions( = {}) branch_restrictions_resource() end # Get the specific branch restriction information on this repository. # # @param restriction_id [String] # @param options [Hash] # @return [Tinybucket::Model::BranchRestriction] def branch_restriction(restriction_id, = {}) branch_restrictions_resource.find(restriction_id, ) end # Get the diff for this repository. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] diff as raw text. def diff(spec, = {}) diff_api.find(spec, ) end # Get the patch for the specification. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @return [String] patch as raw text. def patch(spec, = {}) diff_api.find_patch(spec, ) end private def branch_restrictions_resource( = {}) Tinybucket::Resource::BranchRestrictions.new(self, ) end def branches_resource( = {}) Tinybucket::Resource::Branches.new(self, ) end def commits_resource( = {}) Tinybucket::Resource::Commits.new(self, ) end def hooks_resource( = {}) Tinybucket::Resource::Hooks.new(self, ) end def pull_requests_resource( = {}) Tinybucket::Resource::PullRequests.new(self, ) end def watchers_resource( = {}) Tinybucket::Resource::Watchers.new(self, ) end def forks_resource( = {}) Tinybucket::Resource::Forks.new(self, ) end def repo_api create_api('Repo', repo_keys) end def diff_api create_api('Diff', repo_keys) end def load_model repo_api.find() end end |
#owner ⇒ Hash
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/tinybucket/model/repository.rb', line 46 class Repository < Base include Tinybucket::Model::Concerns::RepositoryKeys acceptable_attributes \ :scm, :has_wiki, :description, :links, :updated_on, :fork_policy, :created_on, :owner, :size, :parent, :uuid, :has_issues, :is_private, :full_name, :name, :language, :website, :type def initialize(json) super(json) return unless full_name && full_name.split('/').size == 2 @repo_owner, @repo_slug = full_name.split('/') end # Remove this repository # # @todo to be implemented. # @raise [NotImplementedError] to be implemented. def destroy raise NotImplementedError end # Get pull requests on thie repository. # # @param options [Hash] # @return [Tinybucket::Enumerator] an enumerator to enumerate # pull requests as {Tinybucket::Model::PullRequest} instance. def pull_requests( = {}) pull_requests_resource() end # Get the specific pull request on this repository. # # @param pullrequest_id [String] # @param options [Hash] # @return [Tinybucket::Model::PullRequest] def pull_request(pullrequest_id, = {}) pull_requests_resource.find(pullrequest_id, ) end # Get watchers on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Watchers] def watchers( = {}) watchers_resource() end # Get repository forks. # # @param options [Hash] # @return [Tinybucket::Resource::Forks] def forks( = {}) forks_resource() end # Get commits on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Commits] def commits( = {}) commits_resource() end # Get the specific commit on this repository. # # @param revision [String] # @param options [Hash] # @return [Tinybucket::Model::Commit] def commit(revision, = {}) commits_resource.find(revision, ) end # Get branches on this repository # # @param options [Hash] # @return [Tinybucket::Resource::Branches] def branches( = {}) branches_resource() end # Get the specific branch on this repository. # # @param branch [String] # @param options [Hash] # @return [Tinybucket::Model::Branches] def branch(branch, = {}) branches_resource.find(branch, ) end # Get the branch restriction information associated with this repository. # # @param options [Hash] # @return [Tinybucket::Resource::BranchRestrictions] def branch_restrictions( = {}) branch_restrictions_resource() end # Get the specific branch restriction information on this repository. # # @param restriction_id [String] # @param options [Hash] # @return [Tinybucket::Model::BranchRestriction] def branch_restriction(restriction_id, = {}) branch_restrictions_resource.find(restriction_id, ) end # Get the diff for this repository. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] diff as raw text. def diff(spec, = {}) diff_api.find(spec, ) end # Get the patch for the specification. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @return [String] patch as raw text. def patch(spec, = {}) diff_api.find_patch(spec, ) end private def branch_restrictions_resource( = {}) Tinybucket::Resource::BranchRestrictions.new(self, ) end def branches_resource( = {}) Tinybucket::Resource::Branches.new(self, ) end def commits_resource( = {}) Tinybucket::Resource::Commits.new(self, ) end def hooks_resource( = {}) Tinybucket::Resource::Hooks.new(self, ) end def pull_requests_resource( = {}) Tinybucket::Resource::PullRequests.new(self, ) end def watchers_resource( = {}) Tinybucket::Resource::Watchers.new(self, ) end def forks_resource( = {}) Tinybucket::Resource::Forks.new(self, ) end def repo_api create_api('Repo', repo_keys) end def diff_api create_api('Diff', repo_keys) end def load_model repo_api.find() end end |
#parent ⇒ Hash, NillClass
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/tinybucket/model/repository.rb', line 46 class Repository < Base include Tinybucket::Model::Concerns::RepositoryKeys acceptable_attributes \ :scm, :has_wiki, :description, :links, :updated_on, :fork_policy, :created_on, :owner, :size, :parent, :uuid, :has_issues, :is_private, :full_name, :name, :language, :website, :type def initialize(json) super(json) return unless full_name && full_name.split('/').size == 2 @repo_owner, @repo_slug = full_name.split('/') end # Remove this repository # # @todo to be implemented. # @raise [NotImplementedError] to be implemented. def destroy raise NotImplementedError end # Get pull requests on thie repository. # # @param options [Hash] # @return [Tinybucket::Enumerator] an enumerator to enumerate # pull requests as {Tinybucket::Model::PullRequest} instance. def pull_requests( = {}) pull_requests_resource() end # Get the specific pull request on this repository. # # @param pullrequest_id [String] # @param options [Hash] # @return [Tinybucket::Model::PullRequest] def pull_request(pullrequest_id, = {}) pull_requests_resource.find(pullrequest_id, ) end # Get watchers on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Watchers] def watchers( = {}) watchers_resource() end # Get repository forks. # # @param options [Hash] # @return [Tinybucket::Resource::Forks] def forks( = {}) forks_resource() end # Get commits on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Commits] def commits( = {}) commits_resource() end # Get the specific commit on this repository. # # @param revision [String] # @param options [Hash] # @return [Tinybucket::Model::Commit] def commit(revision, = {}) commits_resource.find(revision, ) end # Get branches on this repository # # @param options [Hash] # @return [Tinybucket::Resource::Branches] def branches( = {}) branches_resource() end # Get the specific branch on this repository. # # @param branch [String] # @param options [Hash] # @return [Tinybucket::Model::Branches] def branch(branch, = {}) branches_resource.find(branch, ) end # Get the branch restriction information associated with this repository. # # @param options [Hash] # @return [Tinybucket::Resource::BranchRestrictions] def branch_restrictions( = {}) branch_restrictions_resource() end # Get the specific branch restriction information on this repository. # # @param restriction_id [String] # @param options [Hash] # @return [Tinybucket::Model::BranchRestriction] def branch_restriction(restriction_id, = {}) branch_restrictions_resource.find(restriction_id, ) end # Get the diff for this repository. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] diff as raw text. def diff(spec, = {}) diff_api.find(spec, ) end # Get the patch for the specification. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @return [String] patch as raw text. def patch(spec, = {}) diff_api.find_patch(spec, ) end private def branch_restrictions_resource( = {}) Tinybucket::Resource::BranchRestrictions.new(self, ) end def branches_resource( = {}) Tinybucket::Resource::Branches.new(self, ) end def commits_resource( = {}) Tinybucket::Resource::Commits.new(self, ) end def hooks_resource( = {}) Tinybucket::Resource::Hooks.new(self, ) end def pull_requests_resource( = {}) Tinybucket::Resource::PullRequests.new(self, ) end def watchers_resource( = {}) Tinybucket::Resource::Watchers.new(self, ) end def forks_resource( = {}) Tinybucket::Resource::Forks.new(self, ) end def repo_api create_api('Repo', repo_keys) end def diff_api create_api('Diff', repo_keys) end def load_model repo_api.find() end end |
#scm ⇒ String
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/tinybucket/model/repository.rb', line 46 class Repository < Base include Tinybucket::Model::Concerns::RepositoryKeys acceptable_attributes \ :scm, :has_wiki, :description, :links, :updated_on, :fork_policy, :created_on, :owner, :size, :parent, :uuid, :has_issues, :is_private, :full_name, :name, :language, :website, :type def initialize(json) super(json) return unless full_name && full_name.split('/').size == 2 @repo_owner, @repo_slug = full_name.split('/') end # Remove this repository # # @todo to be implemented. # @raise [NotImplementedError] to be implemented. def destroy raise NotImplementedError end # Get pull requests on thie repository. # # @param options [Hash] # @return [Tinybucket::Enumerator] an enumerator to enumerate # pull requests as {Tinybucket::Model::PullRequest} instance. def pull_requests( = {}) pull_requests_resource() end # Get the specific pull request on this repository. # # @param pullrequest_id [String] # @param options [Hash] # @return [Tinybucket::Model::PullRequest] def pull_request(pullrequest_id, = {}) pull_requests_resource.find(pullrequest_id, ) end # Get watchers on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Watchers] def watchers( = {}) watchers_resource() end # Get repository forks. # # @param options [Hash] # @return [Tinybucket::Resource::Forks] def forks( = {}) forks_resource() end # Get commits on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Commits] def commits( = {}) commits_resource() end # Get the specific commit on this repository. # # @param revision [String] # @param options [Hash] # @return [Tinybucket::Model::Commit] def commit(revision, = {}) commits_resource.find(revision, ) end # Get branches on this repository # # @param options [Hash] # @return [Tinybucket::Resource::Branches] def branches( = {}) branches_resource() end # Get the specific branch on this repository. # # @param branch [String] # @param options [Hash] # @return [Tinybucket::Model::Branches] def branch(branch, = {}) branches_resource.find(branch, ) end # Get the branch restriction information associated with this repository. # # @param options [Hash] # @return [Tinybucket::Resource::BranchRestrictions] def branch_restrictions( = {}) branch_restrictions_resource() end # Get the specific branch restriction information on this repository. # # @param restriction_id [String] # @param options [Hash] # @return [Tinybucket::Model::BranchRestriction] def branch_restriction(restriction_id, = {}) branch_restrictions_resource.find(restriction_id, ) end # Get the diff for this repository. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] diff as raw text. def diff(spec, = {}) diff_api.find(spec, ) end # Get the patch for the specification. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @return [String] patch as raw text. def patch(spec, = {}) diff_api.find_patch(spec, ) end private def branch_restrictions_resource( = {}) Tinybucket::Resource::BranchRestrictions.new(self, ) end def branches_resource( = {}) Tinybucket::Resource::Branches.new(self, ) end def commits_resource( = {}) Tinybucket::Resource::Commits.new(self, ) end def hooks_resource( = {}) Tinybucket::Resource::Hooks.new(self, ) end def pull_requests_resource( = {}) Tinybucket::Resource::PullRequests.new(self, ) end def watchers_resource( = {}) Tinybucket::Resource::Watchers.new(self, ) end def forks_resource( = {}) Tinybucket::Resource::Forks.new(self, ) end def repo_api create_api('Repo', repo_keys) end def diff_api create_api('Diff', repo_keys) end def load_model repo_api.find() end end |
#size ⇒ Fixnum
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/tinybucket/model/repository.rb', line 46 class Repository < Base include Tinybucket::Model::Concerns::RepositoryKeys acceptable_attributes \ :scm, :has_wiki, :description, :links, :updated_on, :fork_policy, :created_on, :owner, :size, :parent, :uuid, :has_issues, :is_private, :full_name, :name, :language, :website, :type def initialize(json) super(json) return unless full_name && full_name.split('/').size == 2 @repo_owner, @repo_slug = full_name.split('/') end # Remove this repository # # @todo to be implemented. # @raise [NotImplementedError] to be implemented. def destroy raise NotImplementedError end # Get pull requests on thie repository. # # @param options [Hash] # @return [Tinybucket::Enumerator] an enumerator to enumerate # pull requests as {Tinybucket::Model::PullRequest} instance. def pull_requests( = {}) pull_requests_resource() end # Get the specific pull request on this repository. # # @param pullrequest_id [String] # @param options [Hash] # @return [Tinybucket::Model::PullRequest] def pull_request(pullrequest_id, = {}) pull_requests_resource.find(pullrequest_id, ) end # Get watchers on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Watchers] def watchers( = {}) watchers_resource() end # Get repository forks. # # @param options [Hash] # @return [Tinybucket::Resource::Forks] def forks( = {}) forks_resource() end # Get commits on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Commits] def commits( = {}) commits_resource() end # Get the specific commit on this repository. # # @param revision [String] # @param options [Hash] # @return [Tinybucket::Model::Commit] def commit(revision, = {}) commits_resource.find(revision, ) end # Get branches on this repository # # @param options [Hash] # @return [Tinybucket::Resource::Branches] def branches( = {}) branches_resource() end # Get the specific branch on this repository. # # @param branch [String] # @param options [Hash] # @return [Tinybucket::Model::Branches] def branch(branch, = {}) branches_resource.find(branch, ) end # Get the branch restriction information associated with this repository. # # @param options [Hash] # @return [Tinybucket::Resource::BranchRestrictions] def branch_restrictions( = {}) branch_restrictions_resource() end # Get the specific branch restriction information on this repository. # # @param restriction_id [String] # @param options [Hash] # @return [Tinybucket::Model::BranchRestriction] def branch_restriction(restriction_id, = {}) branch_restrictions_resource.find(restriction_id, ) end # Get the diff for this repository. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] diff as raw text. def diff(spec, = {}) diff_api.find(spec, ) end # Get the patch for the specification. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @return [String] patch as raw text. def patch(spec, = {}) diff_api.find_patch(spec, ) end private def branch_restrictions_resource( = {}) Tinybucket::Resource::BranchRestrictions.new(self, ) end def branches_resource( = {}) Tinybucket::Resource::Branches.new(self, ) end def commits_resource( = {}) Tinybucket::Resource::Commits.new(self, ) end def hooks_resource( = {}) Tinybucket::Resource::Hooks.new(self, ) end def pull_requests_resource( = {}) Tinybucket::Resource::PullRequests.new(self, ) end def watchers_resource( = {}) Tinybucket::Resource::Watchers.new(self, ) end def forks_resource( = {}) Tinybucket::Resource::Forks.new(self, ) end def repo_api create_api('Repo', repo_keys) end def diff_api create_api('Diff', repo_keys) end def load_model repo_api.find() end end |
#type ⇒ String
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/tinybucket/model/repository.rb', line 46 class Repository < Base include Tinybucket::Model::Concerns::RepositoryKeys acceptable_attributes \ :scm, :has_wiki, :description, :links, :updated_on, :fork_policy, :created_on, :owner, :size, :parent, :uuid, :has_issues, :is_private, :full_name, :name, :language, :website, :type def initialize(json) super(json) return unless full_name && full_name.split('/').size == 2 @repo_owner, @repo_slug = full_name.split('/') end # Remove this repository # # @todo to be implemented. # @raise [NotImplementedError] to be implemented. def destroy raise NotImplementedError end # Get pull requests on thie repository. # # @param options [Hash] # @return [Tinybucket::Enumerator] an enumerator to enumerate # pull requests as {Tinybucket::Model::PullRequest} instance. def pull_requests( = {}) pull_requests_resource() end # Get the specific pull request on this repository. # # @param pullrequest_id [String] # @param options [Hash] # @return [Tinybucket::Model::PullRequest] def pull_request(pullrequest_id, = {}) pull_requests_resource.find(pullrequest_id, ) end # Get watchers on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Watchers] def watchers( = {}) watchers_resource() end # Get repository forks. # # @param options [Hash] # @return [Tinybucket::Resource::Forks] def forks( = {}) forks_resource() end # Get commits on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Commits] def commits( = {}) commits_resource() end # Get the specific commit on this repository. # # @param revision [String] # @param options [Hash] # @return [Tinybucket::Model::Commit] def commit(revision, = {}) commits_resource.find(revision, ) end # Get branches on this repository # # @param options [Hash] # @return [Tinybucket::Resource::Branches] def branches( = {}) branches_resource() end # Get the specific branch on this repository. # # @param branch [String] # @param options [Hash] # @return [Tinybucket::Model::Branches] def branch(branch, = {}) branches_resource.find(branch, ) end # Get the branch restriction information associated with this repository. # # @param options [Hash] # @return [Tinybucket::Resource::BranchRestrictions] def branch_restrictions( = {}) branch_restrictions_resource() end # Get the specific branch restriction information on this repository. # # @param restriction_id [String] # @param options [Hash] # @return [Tinybucket::Model::BranchRestriction] def branch_restriction(restriction_id, = {}) branch_restrictions_resource.find(restriction_id, ) end # Get the diff for this repository. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] diff as raw text. def diff(spec, = {}) diff_api.find(spec, ) end # Get the patch for the specification. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @return [String] patch as raw text. def patch(spec, = {}) diff_api.find_patch(spec, ) end private def branch_restrictions_resource( = {}) Tinybucket::Resource::BranchRestrictions.new(self, ) end def branches_resource( = {}) Tinybucket::Resource::Branches.new(self, ) end def commits_resource( = {}) Tinybucket::Resource::Commits.new(self, ) end def hooks_resource( = {}) Tinybucket::Resource::Hooks.new(self, ) end def pull_requests_resource( = {}) Tinybucket::Resource::PullRequests.new(self, ) end def watchers_resource( = {}) Tinybucket::Resource::Watchers.new(self, ) end def forks_resource( = {}) Tinybucket::Resource::Forks.new(self, ) end def repo_api create_api('Repo', repo_keys) end def diff_api create_api('Diff', repo_keys) end def load_model repo_api.find() end end |
#updated_on ⇒ String
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/tinybucket/model/repository.rb', line 46 class Repository < Base include Tinybucket::Model::Concerns::RepositoryKeys acceptable_attributes \ :scm, :has_wiki, :description, :links, :updated_on, :fork_policy, :created_on, :owner, :size, :parent, :uuid, :has_issues, :is_private, :full_name, :name, :language, :website, :type def initialize(json) super(json) return unless full_name && full_name.split('/').size == 2 @repo_owner, @repo_slug = full_name.split('/') end # Remove this repository # # @todo to be implemented. # @raise [NotImplementedError] to be implemented. def destroy raise NotImplementedError end # Get pull requests on thie repository. # # @param options [Hash] # @return [Tinybucket::Enumerator] an enumerator to enumerate # pull requests as {Tinybucket::Model::PullRequest} instance. def pull_requests( = {}) pull_requests_resource() end # Get the specific pull request on this repository. # # @param pullrequest_id [String] # @param options [Hash] # @return [Tinybucket::Model::PullRequest] def pull_request(pullrequest_id, = {}) pull_requests_resource.find(pullrequest_id, ) end # Get watchers on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Watchers] def watchers( = {}) watchers_resource() end # Get repository forks. # # @param options [Hash] # @return [Tinybucket::Resource::Forks] def forks( = {}) forks_resource() end # Get commits on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Commits] def commits( = {}) commits_resource() end # Get the specific commit on this repository. # # @param revision [String] # @param options [Hash] # @return [Tinybucket::Model::Commit] def commit(revision, = {}) commits_resource.find(revision, ) end # Get branches on this repository # # @param options [Hash] # @return [Tinybucket::Resource::Branches] def branches( = {}) branches_resource() end # Get the specific branch on this repository. # # @param branch [String] # @param options [Hash] # @return [Tinybucket::Model::Branches] def branch(branch, = {}) branches_resource.find(branch, ) end # Get the branch restriction information associated with this repository. # # @param options [Hash] # @return [Tinybucket::Resource::BranchRestrictions] def branch_restrictions( = {}) branch_restrictions_resource() end # Get the specific branch restriction information on this repository. # # @param restriction_id [String] # @param options [Hash] # @return [Tinybucket::Model::BranchRestriction] def branch_restriction(restriction_id, = {}) branch_restrictions_resource.find(restriction_id, ) end # Get the diff for this repository. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] diff as raw text. def diff(spec, = {}) diff_api.find(spec, ) end # Get the patch for the specification. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @return [String] patch as raw text. def patch(spec, = {}) diff_api.find_patch(spec, ) end private def branch_restrictions_resource( = {}) Tinybucket::Resource::BranchRestrictions.new(self, ) end def branches_resource( = {}) Tinybucket::Resource::Branches.new(self, ) end def commits_resource( = {}) Tinybucket::Resource::Commits.new(self, ) end def hooks_resource( = {}) Tinybucket::Resource::Hooks.new(self, ) end def pull_requests_resource( = {}) Tinybucket::Resource::PullRequests.new(self, ) end def watchers_resource( = {}) Tinybucket::Resource::Watchers.new(self, ) end def forks_resource( = {}) Tinybucket::Resource::Forks.new(self, ) end def repo_api create_api('Repo', repo_keys) end def diff_api create_api('Diff', repo_keys) end def load_model repo_api.find() end end |
#uuid ⇒ String
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/tinybucket/model/repository.rb', line 46 class Repository < Base include Tinybucket::Model::Concerns::RepositoryKeys acceptable_attributes \ :scm, :has_wiki, :description, :links, :updated_on, :fork_policy, :created_on, :owner, :size, :parent, :uuid, :has_issues, :is_private, :full_name, :name, :language, :website, :type def initialize(json) super(json) return unless full_name && full_name.split('/').size == 2 @repo_owner, @repo_slug = full_name.split('/') end # Remove this repository # # @todo to be implemented. # @raise [NotImplementedError] to be implemented. def destroy raise NotImplementedError end # Get pull requests on thie repository. # # @param options [Hash] # @return [Tinybucket::Enumerator] an enumerator to enumerate # pull requests as {Tinybucket::Model::PullRequest} instance. def pull_requests( = {}) pull_requests_resource() end # Get the specific pull request on this repository. # # @param pullrequest_id [String] # @param options [Hash] # @return [Tinybucket::Model::PullRequest] def pull_request(pullrequest_id, = {}) pull_requests_resource.find(pullrequest_id, ) end # Get watchers on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Watchers] def watchers( = {}) watchers_resource() end # Get repository forks. # # @param options [Hash] # @return [Tinybucket::Resource::Forks] def forks( = {}) forks_resource() end # Get commits on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Commits] def commits( = {}) commits_resource() end # Get the specific commit on this repository. # # @param revision [String] # @param options [Hash] # @return [Tinybucket::Model::Commit] def commit(revision, = {}) commits_resource.find(revision, ) end # Get branches on this repository # # @param options [Hash] # @return [Tinybucket::Resource::Branches] def branches( = {}) branches_resource() end # Get the specific branch on this repository. # # @param branch [String] # @param options [Hash] # @return [Tinybucket::Model::Branches] def branch(branch, = {}) branches_resource.find(branch, ) end # Get the branch restriction information associated with this repository. # # @param options [Hash] # @return [Tinybucket::Resource::BranchRestrictions] def branch_restrictions( = {}) branch_restrictions_resource() end # Get the specific branch restriction information on this repository. # # @param restriction_id [String] # @param options [Hash] # @return [Tinybucket::Model::BranchRestriction] def branch_restriction(restriction_id, = {}) branch_restrictions_resource.find(restriction_id, ) end # Get the diff for this repository. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] diff as raw text. def diff(spec, = {}) diff_api.find(spec, ) end # Get the patch for the specification. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @return [String] patch as raw text. def patch(spec, = {}) diff_api.find_patch(spec, ) end private def branch_restrictions_resource( = {}) Tinybucket::Resource::BranchRestrictions.new(self, ) end def branches_resource( = {}) Tinybucket::Resource::Branches.new(self, ) end def commits_resource( = {}) Tinybucket::Resource::Commits.new(self, ) end def hooks_resource( = {}) Tinybucket::Resource::Hooks.new(self, ) end def pull_requests_resource( = {}) Tinybucket::Resource::PullRequests.new(self, ) end def watchers_resource( = {}) Tinybucket::Resource::Watchers.new(self, ) end def forks_resource( = {}) Tinybucket::Resource::Forks.new(self, ) end def repo_api create_api('Repo', repo_keys) end def diff_api create_api('Diff', repo_keys) end def load_model repo_api.find() end end |
#website ⇒ String
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/tinybucket/model/repository.rb', line 46 class Repository < Base include Tinybucket::Model::Concerns::RepositoryKeys acceptable_attributes \ :scm, :has_wiki, :description, :links, :updated_on, :fork_policy, :created_on, :owner, :size, :parent, :uuid, :has_issues, :is_private, :full_name, :name, :language, :website, :type def initialize(json) super(json) return unless full_name && full_name.split('/').size == 2 @repo_owner, @repo_slug = full_name.split('/') end # Remove this repository # # @todo to be implemented. # @raise [NotImplementedError] to be implemented. def destroy raise NotImplementedError end # Get pull requests on thie repository. # # @param options [Hash] # @return [Tinybucket::Enumerator] an enumerator to enumerate # pull requests as {Tinybucket::Model::PullRequest} instance. def pull_requests( = {}) pull_requests_resource() end # Get the specific pull request on this repository. # # @param pullrequest_id [String] # @param options [Hash] # @return [Tinybucket::Model::PullRequest] def pull_request(pullrequest_id, = {}) pull_requests_resource.find(pullrequest_id, ) end # Get watchers on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Watchers] def watchers( = {}) watchers_resource() end # Get repository forks. # # @param options [Hash] # @return [Tinybucket::Resource::Forks] def forks( = {}) forks_resource() end # Get commits on this repository. # # @param options [Hash] # @return [Tinybucket::Resource::Commits] def commits( = {}) commits_resource() end # Get the specific commit on this repository. # # @param revision [String] # @param options [Hash] # @return [Tinybucket::Model::Commit] def commit(revision, = {}) commits_resource.find(revision, ) end # Get branches on this repository # # @param options [Hash] # @return [Tinybucket::Resource::Branches] def branches( = {}) branches_resource() end # Get the specific branch on this repository. # # @param branch [String] # @param options [Hash] # @return [Tinybucket::Model::Branches] def branch(branch, = {}) branches_resource.find(branch, ) end # Get the branch restriction information associated with this repository. # # @param options [Hash] # @return [Tinybucket::Resource::BranchRestrictions] def branch_restrictions( = {}) branch_restrictions_resource() end # Get the specific branch restriction information on this repository. # # @param restriction_id [String] # @param options [Hash] # @return [Tinybucket::Model::BranchRestriction] def branch_restriction(restriction_id, = {}) branch_restrictions_resource.find(restriction_id, ) end # Get the diff for this repository. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] diff as raw text. def diff(spec, = {}) diff_api.find(spec, ) end # Get the patch for the specification. # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @return [String] patch as raw text. def patch(spec, = {}) diff_api.find_patch(spec, ) end private def branch_restrictions_resource( = {}) Tinybucket::Resource::BranchRestrictions.new(self, ) end def branches_resource( = {}) Tinybucket::Resource::Branches.new(self, ) end def commits_resource( = {}) Tinybucket::Resource::Commits.new(self, ) end def hooks_resource( = {}) Tinybucket::Resource::Hooks.new(self, ) end def pull_requests_resource( = {}) Tinybucket::Resource::PullRequests.new(self, ) end def watchers_resource( = {}) Tinybucket::Resource::Watchers.new(self, ) end def forks_resource( = {}) Tinybucket::Resource::Forks.new(self, ) end def repo_api create_api('Repo', repo_keys) end def diff_api create_api('Diff', repo_keys) end def load_model repo_api.find() end end |
Instance Method Details
#branch(branch, options = {}) ⇒ Tinybucket::Model::Branches
Get the specific branch on this repository.
134 135 136 |
# File 'lib/tinybucket/model/repository.rb', line 134 def branch(branch, = {}) branches_resource.find(branch, ) end |
#branch_restriction(restriction_id, options = {}) ⇒ Tinybucket::Model::BranchRestriction
Get the specific branch restriction information on this repository.
151 152 153 |
# File 'lib/tinybucket/model/repository.rb', line 151 def branch_restriction(restriction_id, = {}) branch_restrictions_resource.find(restriction_id, ) end |
#branch_restrictions(options = {}) ⇒ Tinybucket::Resource::BranchRestrictions
Get the branch restriction information associated with this repository.
142 143 144 |
# File 'lib/tinybucket/model/repository.rb', line 142 def branch_restrictions( = {}) branch_restrictions_resource() end |
#branches(options = {}) ⇒ Tinybucket::Resource::Branches
Get branches on this repository
125 126 127 |
# File 'lib/tinybucket/model/repository.rb', line 125 def branches( = {}) branches_resource() end |
#commit(revision, options = {}) ⇒ Tinybucket::Model::Commit
Get the specific commit on this repository.
117 118 119 |
# File 'lib/tinybucket/model/repository.rb', line 117 def commit(revision, = {}) commits_resource.find(revision, ) end |
#commits(options = {}) ⇒ Tinybucket::Resource::Commits
Get commits on this repository.
108 109 110 |
# File 'lib/tinybucket/model/repository.rb', line 108 def commits( = {}) commits_resource() end |
#destroy ⇒ Object
to be implemented.
Remove this repository
66 67 68 |
# File 'lib/tinybucket/model/repository.rb', line 66 def destroy raise NotImplementedError end |
#diff(spec, options = {}) ⇒ String
Get the diff for this repository.
161 162 163 |
# File 'lib/tinybucket/model/repository.rb', line 161 def diff(spec, = {}) diff_api.find(spec, ) end |
#forks(options = {}) ⇒ Tinybucket::Resource::Forks
Get repository forks.
100 101 102 |
# File 'lib/tinybucket/model/repository.rb', line 100 def forks( = {}) forks_resource() end |
#patch(spec, options = {}) ⇒ String
Get the patch for the specification.
170 171 172 |
# File 'lib/tinybucket/model/repository.rb', line 170 def patch(spec, = {}) diff_api.find_patch(spec, ) end |
#pull_request(pullrequest_id, options = {}) ⇒ Tinybucket::Model::PullRequest
Get the specific pull request on this repository.
84 85 86 |
# File 'lib/tinybucket/model/repository.rb', line 84 def pull_request(pullrequest_id, = {}) pull_requests_resource.find(pullrequest_id, ) end |
#pull_requests(options = {}) ⇒ Tinybucket::Enumerator
Get pull requests on thie repository.
75 76 77 |
# File 'lib/tinybucket/model/repository.rb', line 75 def pull_requests( = {}) pull_requests_resource() end |
#watchers(options = {}) ⇒ Tinybucket::Resource::Watchers
Get watchers on this repository.
92 93 94 |
# File 'lib/tinybucket/model/repository.rb', line 92 def watchers( = {}) watchers_resource() end |