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

Compatibility with Adhearsion 3 #46

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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"
irc: "irc.freenode.org#adhearsion"
slack:
secure: Y7EqF/9FY7mca63c1DM7kEr34fNtFclWXJj9vLqVQJwR3rCDZUZSD8DlqHJDwE6KRCCDsSkyV4lihCim+GEM28CRcJir0AEUJhXHvIMckjH7n38W9OGN26RuJGZTapjgCSMOBeq0YpSe6dAnZeRpZRJxsTFtP5ptLD5RRjIMzZM=
sudo: false
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
source "http://rubygems.org"

gemspec

gem 'ahnsay', github: 'adhearsion/ahnsay', branch: 'feature/adhearsion-3'
1 change: 0 additions & 1 deletion lib/voicemail.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'adhearsion'
require 'adhearsion-i18n'

module Voicemail; end
require "voicemail/version"
Expand Down
2 changes: 1 addition & 1 deletion lib/voicemail/storage_generic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/voicemail/intro_message_creator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions voicemail.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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<adhearsion>, ["~> 2.4"]
s.add_runtime_dependency %q<adhearsion-i18n>, ["~> 0.0"]
s.add_runtime_dependency %q<adhearsion>, ["~> 3.0.0.rc1"]

s.add_development_dependency %q<bundler>
s.add_development_dependency %q<rspec>, ["~> 2.14.0"]
Expand Down