Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with version and rubygems #22

Closed
ciaoben opened this issue May 9, 2016 · 2 comments
Closed

Problem with version and rubygems #22

ciaoben opened this issue May 9, 2016 · 2 comments

Comments

@ciaoben
Copy link

ciaoben commented May 9, 2016

I have installed the gem in my Rails object, and trying to customize the response to make it return a application/json I have found out that even if bundle install has installed me the last version 0.4.0, the code is not the same of the repo.

here is the code on my pc:

    ##
    # Outputs an HTTP `4xx` or `5xx` response.
    #
    # @param  [Integer]                code
    # @param  [String, #to_s]          message
    # @param  [Hash{String => String}] headers
    # @return [Array(Integer, Hash, #each)]
    def http_error(code, message = nil, headers = {})
      [code, {'Content-Type' => 'text/plain; charset=utf-8'}.merge(headers),
        [http_status(code), (message.nil? ? "\n" : " (#{message})\n")]]
    end

but the code of this repo is:

    ##
    # Outputs an HTTP `4xx` or `5xx` response.
    #
    # @param  [Integer]                code
    # @param  [String, #to_s]          message
    # @param  [Hash{String => String}] headers
    # @return [Array(Integer, Hash, #each)]
    def http_error(code, message = nil, headers = {})
       contentType = 'text/plain; charset=utf-8'
      if options[:type]
        contentType = options[:type]
      end
      [code, {'Content-Type' => 'text/plain; charset=utf-8'}.merge(headers),
        [http_status(code), (message.nil? ? "\n" : " (#{message})\n")]]
    end

How is this possible?

Is there maybe an error with the versioning?

@FreekingDean
Copy link
Collaborator

There is an error with the versioning. The repo is 0.4.1 and rubygems has 0.4.0 which has 1 major bug in not auto loading the second module.

@FreekingDean
Copy link
Collaborator

We are working on getting a new release out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants