Skip to content

Commit

Permalink
removed Ruby 1.8 related code
Browse files Browse the repository at this point in the history
  • Loading branch information
morgoth committed Aug 6, 2013
1 parent e82fc7f commit ec83d7d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source "https://rubygems.org"

group :extra do
gem "debugger", :platform => [:ruby_19, :ruby_20]
gem "debugger"
end

gem "rake"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ Currently alexa will not work with `ox` gem

* [rmoriz](https://github.com/rmoriz)
* [jasongill](https://github.com/jasongill)
* [sporkmonger](https://github.com/sporkmonger)

## Continuous Integration

Expand Down
4 changes: 2 additions & 2 deletions alexa.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Gem::Specification.new do |gem|
gem.require_paths = ["lib"]
gem.version = Alexa::VERSION

gem.required_ruby_version = ">= 1.9.3"

gem.add_dependency "multi_xml", ">= 0.5.0"
gem.add_dependency "faraday", "~> 0.8"

gem.add_development_dependency "minitest", ">= 5.0.0"
gem.add_development_dependency "mocha"
gem.add_development_dependency "webmock"

gem.post_install_message = "Version 0.6.0 of alexa gem will require Ruby 1.9.3 or greater. If you still need 1.8.7 freeze gem version to ~> 0.5.1"
end
1 change: 0 additions & 1 deletion lib/alexa/api/category_browse.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def fetch(arguments = {})
end

# Response attributes

def categories
@categories ||= safe_retrieve(parsed_body, "CategoryBrowseResponse", "Response", "CategoryBrowseResult", "Alexa", "CategoryBrowse", "Categories", "Category")
end
Expand Down
10 changes: 1 addition & 9 deletions lib/alexa/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def params

def get(params = {})
self.params = params
encode handle_response(request).body
handle_response(request).body.force_encoding(Encoding::UTF_8)
end

def handle_response(response)
Expand Down Expand Up @@ -74,13 +74,5 @@ def sign
def query
default_params.merge(params).map { |key, value| "#{key}=#{CGI::escape(value.to_s)}" }.sort.join("&")
end

def encode(string)
if "muflon".respond_to?(:force_encoding)
string.force_encoding(Encoding::UTF_8)
else
string
end
end
end
end

0 comments on commit ec83d7d

Please sign in to comment.