From 25943c9d5057406998f06ac1fd6546dec1056cb9 Mon Sep 17 00:00:00 2001 From: Ben Langfeld Date: Fri, 8 Jan 2016 16:06:38 -0200 Subject: [PATCH 1/2] Compatibility with Adhearsion 3 --- Gemfile | 2 ++ lib/voicemail.rb | 1 - lib/voicemail/storage_generic.rb | 2 +- spec/voicemail/intro_message_creator_spec.rb | 2 +- voicemail.gemspec | 3 +-- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index c80ee36..ccd0f7e 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ source "http://rubygems.org" gemspec + +gem 'ahnsay', github: 'adhearsion/ahnsay', branch: 'feature/adhearsion-3' diff --git a/lib/voicemail.rb b/lib/voicemail.rb index 73a1957..35b94f8 100644 --- a/lib/voicemail.rb +++ b/lib/voicemail.rb @@ -1,5 +1,4 @@ require 'adhearsion' -require 'adhearsion-i18n' module Voicemail; end require "voicemail/version" diff --git a/lib/voicemail/storage_generic.rb b/lib/voicemail/storage_generic.rb index d39a6c7..6fc249d 100644 --- a/lib/voicemail/storage_generic.rb +++ b/lib/voicemail/storage_generic.rb @@ -86,7 +86,7 @@ def change_pin_for_mailbox(mailbox_id, new_pin) # @param mailbox_id The mailbox's ID # @param type[Symbol] The type of message to be created (e.g. :new or :saved) # @param from[String] The phone number of the message's sender - # @param recording_object[Punchblock::Component::Record] The recording result from Adhearsion + # @param recording_object[Adhearsion::Rayo::Component::Record] The recording result from Adhearsion # def save_recording(mailbox_id, type, from, recording_object) end diff --git a/spec/voicemail/intro_message_creator_spec.rb b/spec/voicemail/intro_message_creator_spec.rb index ddf4434..3a29114 100644 --- a/spec/voicemail/intro_message_creator_spec.rb +++ b/spec/voicemail/intro_message_creator_spec.rb @@ -50,7 +50,7 @@ class MyCallController < Adhearsion::CallController end context 'in :ahn_say mode' do - let!(:ahn_config) { flexmock(Adhearsion.config, punchblock: OpenStruct.new, ahnsay: OpenStruct.new(sounds_dir: '/')) } + let!(:ahn_config) { flexmock(Adhearsion.config, core: OpenStruct.new, ahnsay: OpenStruct.new(sounds_dir: '/')) } before do config.numeric_method = :ahn_say diff --git a/voicemail.gemspec b/voicemail.gemspec index c96e5b6..e1be62f 100644 --- a/voicemail.gemspec +++ b/voicemail.gemspec @@ -18,8 +18,7 @@ Gem::Specification.new do |s| s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.require_paths = ["lib"] - s.add_runtime_dependency %q, ["~> 2.4"] - s.add_runtime_dependency %q, ["~> 0.0"] + s.add_runtime_dependency %q, ["~> 3.0.0.rc1"] s.add_development_dependency %q s.add_development_dependency %q, ["~> 2.14.0"] From 2358326326e66d6f5df85063ad6fb21bc4b81873 Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Sat, 13 Feb 2016 08:56:22 -0500 Subject: [PATCH 2/2] Modernize Ruby suite * Drop support for Ruby < 2.2 * Drop support for Rubinius * Update to JRuby 9000 --- .travis.yml | 15 ++++++++------- CHANGELOG.md | 1 + 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3d5b074..7e62385 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,15 @@ language: ruby rvm: - - 1.9.3 - - 2.0.0 - - 2.1.0 - - jruby - - rbx-2.1.1 + - 2.2.0 + - jruby-9.0.1.0 + - jruby-head - ruby-head matrix: allow_failures: - - rvm: rbx-2.1.1 + - rvm: jruby-head - rvm: ruby-head notifications: - irc: "irc.freenode.org#adhearsion" \ No newline at end of file + irc: "irc.freenode.org#adhearsion" + slack: + secure: Y7EqF/9FY7mca63c1DM7kEr34fNtFclWXJj9vLqVQJwR3rCDZUZSD8DlqHJDwE6KRCCDsSkyV4lihCim+GEM28CRcJir0AEUJhXHvIMckjH7n38W9OGN26RuJGZTapjgCSMOBeq0YpSe6dAnZeRpZRJxsTFtP5ptLD5RRjIMzZM= +sudo: false diff --git a/CHANGELOG.md b/CHANGELOG.md index 59d9d62..ccad155 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ # develop + * CHANGE: Drop support for Ruby < 2.2, which is required by Adhearsion 3 * BUG - Listening to new messages needs to set the `new_or_saved` metadata. Otherwise, after visiting saved messages, the status is always `:saved` * FEATURE - Refactor voicemail storage (backward incompatible change) * Pass storage instance in metadata to all controllers