Git Product home page Git Product logo

tinybucket's Introduction

tinybucket gem

A Ruby client library for Bitbucket REST API v2 with OAuth Authentication.

WARNING This gem is under development.

This gem is inspired by vongrippen/bitbucket. Thanks.

Gem Version Build Status Code Climate Test Coverage Inline docs

yard doc (master branch)

Installation

Add this line to your application's Gemfile:

gem 'tinybucket'

And then execute:

$ bundle

Or install it yourself as:

$ gem install tinybucket

Usage

WARNING These specs will be changed at any time.

NOTE: x mark means Already implemented..

Configure

logger = Logger.new($stdout)
logger.level = Logger::WARN

Tinybucket.configure do |config|
  # Configure logger if you want.
  #
  # optional, default: nil (no logging)
  config.logger = logger

  # Configure cache_store options if you need.
  #
  # see https://github.com/plataformatec/faraday-http-cache
  #
  # optional, default: nil (disable request cache)
  config.cache_store_options = { store: Rails.cache, logger: logger }

  # Configure access_token if you can prepare OAuth2 access_token.
  config.access_token = 'your_access_token'

  # Configure oauth_token/oauth_secret if you want to use OAuth1.0 authentication.
  # (This config will be ignored if you configure OAuth2 access_token.)
  config.oauth_token = 'key'
  config.oauth_secret = 'secret'
end

Pagination

After v1.0.0, tinybucket gem support lazy enumerator !

This feature make your code more rubyish, like this.

# get enumerator to enumerate repositories.
repos = bucket.repos('myname')

# Select repositories which has 2 pull requests to be reviewed.
repos = repos('my_name').select do |repo|
  repo.pull_requests.size > 2
end.map(&:full_name)

This enumerable feature depends on Paging through object collections at Bitbucket Cloud REST API.

NOTE: About size attribute

object collections wrapper has size attribute at Bitbucket Cloud REST API.

The size attribute describe as optional attribute.

In tinybucket gem, collection size depend on side attribute of object collections wrapper in Bitbucket Cloud REST API.

So enumerator's size attribute may return nil.

init

bucket = Tinybucket.new

Endpoints

teams Endpoint

# [x] GET the team profile
team = bucket.team('team name')

# [x] GET the team members
members = team.members

# [x] GET the team followers
followers = team.followers

# [x] GET a list of accounts the team is following
following = team.following

# [x] GET the team's repositories
repos = team.repos

users Endpoint

# [x] GET the user profile
user = bucket.user('user name')

# [x] GET the list of followers
followers = user.followers

# [x] GET a list of accounts the user is following
followings = user.followings

# [x] GET the user's repositories
repos = user.repos

repositories Endpoint

# [x] GET a list of all public repositories
repos = bucket.repos

# [x] GET a list of repositories owned by the account 'someone'
repos  = bucket.repos('someone')
repository Resource
Collection Methods
repos = bucket.repos('myname')

# [ ] POST a new repository
repos.create(params)
Object Methods
# [x] GET a repository
repo = bucket.repo('someone', 'great_repo')

# [x] Load a repository
# (Load the repository attributes from Bitbucket WebAPI)
repo.load

# [ ] DELETE a repository
repo.destroy

# [x] GET a list of watchers
watchers = repo.watchers

# [x] GET a list of forks
repos = repo.forks
pullrequests Resource
Collection Methods
repo = bucket.repo('someone', 'great_repo')

# [x ] GET a list of pull requests
pull_requests = repo.pull_requests(options)

# [ ] POST (create) a new pull request
pull_requests.create(params)

# [ ] GET the log of all of a repository's pull request activity
activities = pull_requests.activities(options)
Object Methods
repo = bucket.repo('someone', 'great_repo')

# [x] GET a specific pull request
pull_request = repo.pull_request(pr_id)

# [ ] PUT a pull request update
pull_request.update(params)

# [x] GET the commits for a pull request
commits = pull_request.commits

# [x] POST a pull request approval
pull_request.approve

# [x] DELETE a pull request approval
pull_request.unapprove

# [x] GET the diff for a pull request
diff = pull_request.diff

# [ ] GET the activity for a pull request
activities = pull_request.activities(options)

# [x] Accept and merge a pull request
pull_request.merge(options)

# [x] Decline or reject a pull request
pull_request.decline(options)

# [x] GET a list of pull request comments
comments = pull_request.comments

# [x] GET an individual pull request comment
comment = pull_request.comment(comment_id)
commits or commit Resource
Collection Methods
repo = bucket.repo('someone', 'great_repo')

# [x] GET a commits list for a repository or compare commits across branches
# branchortag, include, exclude options
commits = repo.commits(options)
Object Methods
repo = bucket.repo('someone', 'great_repo')

# [x] GET an individual commit
commit = repo.commit('revision')

# [x] GET a list of commit comments
comments = commit.comments

# [x] GET an individual commit comment
comment = commit.comment(comment_id)

# [x] POST a commit approval
commit.approve

# [x] DELETE a commit approval
commit.unapprove
branches Resource
Collection Methods
repo = bucket.repo('someone', 'great_repo')

# [x ] GET a list of branches
branches = repo.branches(options)
Object Methods
repo = bucket.repo('someone', 'great_repo')

# [x] GET a specific branch
branch = repo.branch(branch_name)
branch-restrictions Resource
Collection Methods
repo = bucket.repo('someone', 'great_repo')

# [x] GET the branch-restrictions
restrictions = repo.branch_restrictions

# [ ] POST the branch-restrictions
new_restriction = restrictions.create(params)
Object Methods
repo = bucket.repo('someone', 'great_repo').find

# [x] GET a specific restriction
restriction = repo.branch_restriction(restriction_id)

# [ ] PUT a branch restriction update
restriction.update(params)

# [ ] DELETE the branch restriction
restriction.destroy
diff Resource
repo = bucket.repo('someone', 'great_repo')
COMMIT_ID = '7e968c5'

# [x] GET a diff
diff = repo.diff(COMMIT_ID)

# [x] GET a patch
patch = repo.patch(COMMIT_ID)
statuses/build Resource
Collection Methods
repo = bucket.repo('someone', 'great_repo')

COMMIT_ID = '7e968c5'
commit = repo.commit(COMMIT_ID)

BUILD_STATUS_KEY = 'tinybucket'

# [x] POST a build status for a commit
commit.build_statuses.create(
  key: BUILD_STATUS_KEY,
  state: 'INPROGRESS',
  name: 'Name of build',
  url: 'link to the build result',
  description: 'about build'
)
Object Methods
repo = bucket.repo('someone', 'great_repo')

COMMIT_ID = '7e968c5'
commit = repo.commit(COMMIT_ID)

BUILD_STATUS_KEY = 'tinybucket'

# [x] GET the build status for a commit
status = commit.build_status(BUILD_STATUS_KEY)

# [x] PUT a build status for a commit
status.update(
  state: 'SUCCESSFUL',
  name: 'Name of build',
  url: 'link to the build result',
  description: 'about build'
)

Contribution

  1. Fork it ( https://github.com/[my-github-username]/bitbucket/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

License

See LICENSE file.

Author

hirakiuc

tinybucket's People

Contributors

hirakiuc avatar ondrejbartas avatar falexandrou avatar mvlbarcelos avatar plukevdh avatar vitorhp avatar dvbeato avatar dshmelev avatar justincampbell avatar

Stargazers

ะ”ะผะธั‚ั€ะธะน ะงะตั€ะฝัั‚ัŒะตะฒ avatar  avatar Vladimir Polukhin avatar Roman avatar  avatar Yves Vogl avatar Dmitrii Suchkov avatar Tim Ray avatar Santiago Franco Garcia avatar Tim Ray avatar Grey Baker avatar Alec Pervushin avatar JinHua Huang avatar Wilmar van Heerden avatar Marc Steven avatar Christian Noon avatar Luan Ribeiro avatar Mike F avatar Alessandro Descovi avatar RichKe avatar Vladislav Tkatchev avatar Daragh Martin avatar Yasha avatar Chris Ross avatar  avatar Atchyut Nagabhairava avatar MOZGIII avatar  avatar Angus H. avatar Joel Van Horn avatar Jayshree Anandakumar avatar Kiran Salke avatar Matt avatar

Watchers

 avatar James Cloos avatar Atchyut Nagabhairava avatar Kostas Georgiou avatar  avatar  avatar

tinybucket's Issues

can't get this to work with oauth

I have successfully authenticated to BB with oauth. I have 4 hashes:

  • consumer secret
  • consumer key
  • oauth token
  • oauth token secret

You use the vocabulary:

config.oauth_key = 'key'
config.oauth_secret = 'secret'

are these the consumer key and consumer secret? If so, how do you use the access token? I've tried every combo, I get a 401 every time.

Thanks for any help,
kevin

undefined method `uuid=` for #<Tinybucket::Model::Repository:... (NoMethodError)

NoMethodError raised when call load method to repository.

E, [2014-09-17T10:29:13.274348 #95690] ERROR -- : undefined method `uuid=' for #<Tinybucket::Model::Repository:0x007fe52141e9a8> (NoMethodError)
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.1/lib/tinybucket/model/base.rb:19:in `block in attributes='
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.1/lib/tinybucket/model/base.rb:19:in `each'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.1/lib/tinybucket/model/base.rb:19:in `attributes='
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.1/lib/tinybucket/model/base.rb:13:in `initialize'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.1/lib/tinybucket/parser/repo_parser.rb:6:in `new'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.1/lib/tinybucket/parser/repo_parser.rb:6:in `convert'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.1/lib/tinybucket/parser/base_parser.rb:5:in `process_response'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:32:in `block in call'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/faraday-0.9.0/lib/faraday/response.rb:57:in `on_complete'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:30:in `call'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/faraday-0.9.0/lib/faraday/rack_builder.rb:139:in `build_response'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/faraday-0.9.0/lib/faraday/connection.rb:377:in `run_request'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/faraday-0.9.0/lib/faraday/connection.rb:140:in `get'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.1/lib/tinybucket/request.rb:31:in `request'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.1/lib/tinybucket/request.rb:4:in `get_path'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.1/lib/tinybucket/api/repo_api.rb:9:in `find'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.1/lib/tinybucket/model/repository.rb:92:in `load_model'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.1/lib/tinybucket/model/concerns/reloadable.rb:13:in `load'
app.rb:18:in `block in <main>'

Trying to print repos from a user

Hi ,

I'm trying to print the repos from a specific user by using

@bucket = Tinybucket.new
puts @bucket.user('user').repos.to_json

but im not getting any information in the json

any ideas on what im doing worng? thanks

Retrieving list of branches from a repository.

Hello @hirakiuc ,

I got requirement in my project to list out all branches from a repository and compare code among them.
I had went through our gem documentation and bitbucket api 2.0 documentation. What I found was they are listing all branches from this type of url:
https://api.bitbucket.org/2.0/repositories/#{@repository.owner_name}/#{@repository.name}/refs/branches

But I had noticed in our gem you are using ``https://api.bitbucket.org/2.0/repositories/#{@repository.owner_name}/#{@repository.name}/branches_restrictions`

and there is no functionality for listing out branches. Well I tried to access my bitbucket api by following the way you had used in connection.rb file.

But the result was a forbidden error.
Can you please help me to access the api for get the url specified above for getting the branches list and compare files among them. (I had implemented this with github) or please help me how to use TinyBucket to get list of branches.

Code I had written:

attrs = {
          headers: {
            USER_AGENT: 'test client' # TODO: fix this !
          },
          ssl: { verify: false },
          url: 'https://api.bitbucket.org'
        }

oauth_secrets = {
          consumer_key:    Repository.last.key,
          consumer_secret: Repository.last.secret
        }
        conn = Faraday.new(attrs)
        conn.request :oauth, oauth_secrets
        conn.get("/2.0/repositories/#{Repository.last.owner_name}/#{Repository.last.name}/refs/branches")

Thanks in advance. :)

fix bucket.repo method argument

Now, bucket.repo method need 'owner' key as hash, but this is not convenient.

Fix this method to receive variable argument. owner only or owner and slug .

403 error which getting commits from a private repo

I was trying to get the commit messages data from bitbucket of a private repository. For this I wrote a loop

commits.each do |commit|
    puts commit.message
end

In the rails console, after running that loop I stuck with an error:
ERROR -- : Invalid response code:403 Tinybucket::Error::ServiceError:

Well, then I tried to open the api url in the browser manually which gave me popup asking for user id, password. I further explored on this 403 FORBIDDEN error and found some answers saying

Returned if the caller attempts to make a call or modify a resource for which the caller is not authorized. The request was a valid request, the caller's authentication credentials succeeded but those credentials do not grant the caller permission to access the resource.

Can someone please explain to me why I could be getting a 403 error when an API request originates from rails console, and also how to get my code authenticated before getting the data from bitbucket.

Fail to GET diff in a pull reuest

Bitbucket REST API return 401 error with this code.

repo = bucket.repo('altabjpworks', 'sandbox')
pr = repo.pull_request(2)
p pr.diff
D, [2016-07-16T11:27:45.604744 #5398] DEBUG -- : [api.bitbucket.org] GET /2.0/repositories/altabjpworks/sandbox/pullrequests/2 (0.828 s)
D, [2016-07-16T11:27:45.605367 #5398] DEBUG -- : HTTP Cache: [GET /2.0/repositories/altabjpworks/sandbox/pullrequests/2] miss, store
D, [2016-07-16T11:27:46.604268 #5398] DEBUG -- : [api.bitbucket.org] GET /2.0/repositories/altabjpworks/sandbox/pullrequests/2/diff (0.996 s)
D, [2016-07-16T11:27:47.388054 #5398] DEBUG -- : [api.bitbucket.org] GET /2.0/repositories/altabjpworks/sandbox/diff/altabjpworks/sandbox:533c11ea4161%0D2133dc9b0838 (0.783 s)
E, [2016-07-16T11:27:47.388112 #5398] ERROR -- : Invalid response code:401
/Users/hirakiuc/Desktop/github_repos/tinybucket/lib/tinybucket/response/handler.rb:16:in `on_complete': GET https://api.bitbucket.org/2.0/repositories/altabjpworks/sandbox/diff/altabjpworks/sandbox:533c11ea4161%0D2133dc9b0838 401  (Tinybucket::Error::ServiceError)

Loosen dependencies

Hi,

The dependencies on activerecord and activemodel are hard set at 4.1.6, can this be loosened at all?

Create wiki pages for each models.

Create wiki pages for each models to describe the attributes and methods.

  • BranchRestriction
  • Commit
  • CommitComment
  • Profile
  • PullRequest
  • Repository
  • Team

Failed enumerate with method chain.

Enumerate with method chain failed.

repos = bucket.repos('hirakiuc').select do |repo|
  repo.pull_requests.size > 1
end.map(&:full_name)
D, [2016-03-21T17:46:20.294568 #33311] DEBUG -- : [bitbucket.org] GET /api/2.0/repositories/hirakiuc (1.367 s)
/Users/hirakiuc/Desktop/github_repos/tinybucket/lib/tinybucket/api/helper/api_helper.rb:32:in `rescue in build_path': Failed to build request URL: Invalid repo_owner parameter. () (ArgumentError)
        from /Users/hirakiuc/Desktop/github_repos/tinybucket/lib/tinybucket/api/helper/api_helper.rb:23:in `build_path'
        from /Users/hirakiuc/Desktop/github_repos/tinybucket/lib/tinybucket/api/helper/pull_requests_helper.rb:48:in `base_path'
        from /Users/hirakiuc/Desktop/github_repos/tinybucket/lib/tinybucket/api/helper/pull_requests_helper.rb:10:in `path_to_list'
        from /Users/hirakiuc/Desktop/github_repos/tinybucket/lib/tinybucket/api/pull_requests_api.rb:24:in `list'
        from /Users/hirakiuc/Desktop/github_repos/tinybucket/lib/tinybucket/iterator.rb:39:in `load_next'
        from /Users/hirakiuc/Desktop/github_repos/tinybucket/lib/tinybucket/iterator.rb:18:in `size'
        from /Users/hirakiuc/Desktop/github_repos/tinybucket/lib/tinybucket/enumerator.rb:18:in `size'
        from app.rb:21:in `block in <main>'
        from /Users/hirakiuc/Desktop/github_repos/tinybucket/lib/tinybucket/enumerator.rb:8:in `yield'
        from /Users/hirakiuc/Desktop/github_repos/tinybucket/lib/tinybucket/enumerator.rb:8:in `block (2 levels) in initialize'
        from /Users/hirakiuc/Desktop/github_repos/tinybucket/lib/tinybucket/enumerator.rb:7:in `loop'
        from /Users/hirakiuc/Desktop/github_repos/tinybucket/lib/tinybucket/enumerator.rb:7:in `block in initialize'
        from app.rb:20:in `each'
        from app.rb:20:in `each'
        from app.rb:20:in `select'
        from app.rb:20:in `<main>'

Gem dependency conflict with Digital Ocean gem

    ...
      droplet_kit (= 1.4.1) was resolved to 1.4.1, which depends on
        faraday (~> 0.9.1)

    ...
      tinybucket (~> 1.0) was resolved to 1.0.0, which depends on
        faraday (= 0.9.0)

I'm unable to use gem on my project because of the strict dependency tinybucket places the Faraday middlware. Is there a reason to have it to tightly limited?

Cache Connection

This gem create new faraday connection on each request.
So, fix to cache the faraday connection for each (thread, options, parser).

Fail to get team's repositories

Bitbucket REST API return 401 error with this code.

bucket = Tinybucket.new
team = bucket.team('altabjpworks') 
team.repos.each { |repo| p repo }
#<Tinybucket::Resource::Team::Repos:0x007ffa9a546248 @team_name="altabjpworks", @args=[{}]>
D, [2016-07-16T10:51:05.150601 #2923] DEBUG -- : [api.bitbucket.org] GET /2.0/teams/altabjpworks/repositories (1.256 s)
D, [2016-07-16T10:51:05.931659 #2923] DEBUG -- : [api.bitbucket.org] GET /2.0/repositories/altabjpworks (0.780 s)
E, [2016-07-16T10:51:05.931717 #2923] ERROR -- : Invalid response code:401
/Users/hirakiuc/Desktop/github_repos/tinybucket/lib/tinybucket/response/handler.rb:16:in `on_complete': GET https://api.bitbucket.org/2.0/repositories/altabjpworks 401  (Tinybucket::Error::ServiceError)

OAuth2 support?

Hello,

Is OAuth2 supported by this gem? If so, how are we assigning client id, client secret and access_token ?

Thanks

Fail to update a build status on commit.

Ref: pull request #82


PUT a build status for a commit API return 500 error response.

Ref: https://bitbucket.org/site/master/issues/12576/codedeploy-status-not-updating-after

D, [2016-04-16T15:55:40.345810 #22101] DEBUG -- : [api.bitbucket.org] PUT /2.0/repositories/altabjpworks/sandbox/commit/f0222b6326750da995d1abb0637194b15579a1eb/statuses/build/tinybucket (0.908 s)
E, [2016-04-16T15:55:40.345888 #22101] ERROR -- : Invalid response code:500
/Users/hirakiuc/Desktop/github_repos/tinybucket/lib/tinybucket/response/handler.rb:16:in `on_complete': PUT https://api.bitbucket.org/2.0/repositories/altabjpworks/sandbox/commit/f0222b6326750da995d1abb0637194b15579a1eb/statuses/build/tinybucket 500 {"error": {"message": "unhashable type: 'list'", "id": "1cd96f69baed4023ae43411cd7173245"}} (Tinybucket::Error::ServiceError)

NoMethodError: undefined method `merge!' for "branch_name":String

When I was trying to retrieve commit messages from a particular branch by looping all the commits of the branch as mentioned in the documentation.

Documentation:

repo = bucket.repo('someone', 'great_repo')

# [x] GET a commits list for a repository or compare commits across branches
# branchortag, include, exclude options
commits = repo.commits(options)

My code:

commits = repo.commits('branch_name')
 #<Tinybucket::Resource::Commits:0x00000005faca30 @repo=#<Tinybucket::Model::Repository:0x00000007afef68 @_loaded=false, @repo_owner="owner_name", @repo_slug="sample_app">, @args=["static-pages-exercises"]> 

commits.each do |commit|
    puts commit.message
end

Error message after that loop:

NoMethodError: undefined method `merge!' for "branch_name":String
    from /home/atchyut/.rvm/gems/ruby-2.3.0/gems/tinybucket-1.2.0/lib/tinybucket/iterator.rb:73:in `next_params'
    from /home/atchyut/.rvm/gems/ruby-2.3.0/gems/tinybucket-1.2.0/lib/tinybucket/iterator.rb:58:in `load_next'
    from /home/atchyut/.rvm/gems/ruby-2.3.0/gems/tinybucket-1.2.0/lib/tinybucket/iterator.rb:44:in `next_value'
    from /home/atchyut/.rvm/gems/ruby-2.3.0/gems/tinybucket-1.2.0/lib/tinybucket/iterator.rb:23:in `next'
    from /home/atchyut/.rvm/gems/ruby-2.3.0/gems/tinybucket-1.2.0/lib/tinybucket/enumerator.rb:17:in `block (2 levels) in initialize'
    from /home/atchyut/.rvm/gems/ruby-2.3.0/gems/tinybucket-1.2.0/lib/tinybucket/enumerator.rb:16:in `loop'
    from /home/atchyut/.rvm/gems/ruby-2.3.0/gems/tinybucket-1.2.0/lib/tinybucket/enumerator.rb:16:in `block in initialize'
    from /home/atchyut/.rvm/gems/ruby-2.3.0/gems/tinybucket-1.2.0/lib/tinybucket/resource/base.rb:12:in `each'
    from /home/atchyut/.rvm/gems/ruby-2.3.0/gems/tinybucket-1.2.0/lib/tinybucket/resource/base.rb:12:in `each'
    from /home/atchyut/.rvm/gems/ruby-2.3.0/gems/tinybucket-1.2.0/lib/tinybucket/resource/base.rb:12:in `method_missing'
    from (irb):357
    from /home/atchyut/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/console.rb:65:in `start'
    from /home/atchyut/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/console_helper.rb:9:in `start'
    from /home/atchyut/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:78:in `console'
    from /home/atchyut/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
    from /home/atchyut/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'2.3.0 :360 > 

Can someone please explain how should I have to send branch name for the options argument to retrieve individual commit messages?

Support username and password

In v2, it's possible to use your team name as a username and the API key as a password, and pass it along as a Basic-Auth header. It'd be great if that could be integrated here.

Ignored attributes

  • Tinybucket::Model::Repository
    • website attribute
    • type attribute
  • Tinybucket::Model::PullRequest
    • type attribute
    • task_count attribute
    • comment_count attribute
  • Tinybucket::Model::Comment
    • pullrequest attribute
    • commit attribute
  • Tinybucket::Model::Commit
    • type attribute

NoMethodError on parsing repository.

E, [2015-06-03T11:33:20.089064 #65520] ERROR -- : undefined method `_type=' for #<Tinybucket::Model::Repository:0x007fd7b1830460 @scm="git"> (NoMethodError)
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.3/lib/tinybucket/model/base.rb:19:in `block in attributes='
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.3/lib/tinybucket/model/base.rb:19:in `each'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.3/lib/tinybucket/model/base.rb:19:in `attributes='
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.3/lib/tinybucket/model/base.rb:13:in `initialize'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.3/lib/tinybucket/parser/repo_parser.rb:5:in `new'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.3/lib/tinybucket/parser/repo_parser.rb:5:in `convert'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.3/lib/tinybucket/parser/base_parser.rb:5:in `process_response'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:32:in `block in call'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/faraday-0.9.0/lib/faraday/response.rb:57:in `on_complete'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:30:in `call'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/faraday-0.9.0/lib/faraday/rack_builder.rb:139:in `build_response'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/faraday-0.9.0/lib/faraday/connection.rb:377:in `run_request'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/faraday-0.9.0/lib/faraday/connection.rb:140:in `get'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.3/lib/tinybucket/request.rb:31:in `request'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.3/lib/tinybucket/request.rb:4:in `get_path'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.3/lib/tinybucket/api/repo_api.rb:9:in `find'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.3/lib/tinybucket/model/repository.rb:92:in `load_model'
/Users/hirakiuc/Desktop/tool/bitbucket/.bundle/ruby/2.1.0/gems/tinybucket-0.1.3/lib/tinybucket/model/concerns/reloadable.rb:13:in `load'
app.rb:21:in `block in <main>'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.