adhearsion-i18n 0.0.4 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e08c9f4ccde29b657a1d3623cfb1f3c20a194253
4
- data.tar.gz: c9b7261f8bec33d904e4a9c62560cdc8a2fe2c72
3
+ metadata.gz: 79005968c66bcf1ef587307ebaae06be42972c67
4
+ data.tar.gz: da2fb5366e88060c16d4fbc09afc5df4556d9637
5
5
  SHA512:
6
- metadata.gz: b9f0a1cba2f3edfcdaa09cab5b76e10149cb6983ace1ab0be1f67d3733b5079011dc358badb9e569af71b94fd3fffba458797db903d167ca3a24b597fb629afa
7
- data.tar.gz: ecb8432b4dee33f5a6bb1208d8e0bc50a6f50813622cf23ab47ef38c16870358b930da1f15cb67a156ee2bd7969a959cfd2795bf5caef37f6445846a83a57581
6
+ metadata.gz: e710dc85d9c4ba4ad5acb647143486be7760f3f8740ecafefce9e81eb5de03c1303b91c9a69f62b8e602238f13407b1f8c84f37d9f21d552e49567982488c92b
7
+ data.tar.gz: 6ad98758e99d7c6a11d9281f61721ab1a449ffc4d8da3511dc45bbbb49d972c72db0d06d2ce0751cdc35ed54635fa19bbfa2e7b53264385c168ba28ad1b811d8
@@ -0,0 +1,18 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
5
+ - 2.1.0
6
+ - jruby
7
+ - rbx-2.1.1
8
+ - ruby-head
9
+ jdk:
10
+ - openjdk7 # for jruby
11
+ before_script: export JRUBY_OPTS="--server -J-Xss1024k -J-Xmx652m -J-XX:+UseConcMarkSweepGC"
12
+ matrix:
13
+ allow_failures:
14
+ - rvm: rbx-2.1.1
15
+ - rvm: ruby-head
16
+ env: RAILS_ENV=development AHN_ENV=development
17
+ notifications:
18
+ irc: "irc.freenode.org#adhearsion"
@@ -1,3 +1,8 @@
1
+ # develop
2
+
3
+ # v1.0.0
4
+ * [BUGFIX] More widely acceptable default base path (full file:// URL)
5
+
1
6
  # v0.0.4
2
7
  * [FEATURE] More appropriate log level output and check for empty/broken i18n locales
3
8
 
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
 
24
24
  s.add_runtime_dependency 'activesupport', [">= 3.0.0", "< 5.0.0"]
25
25
  s.add_runtime_dependency 'adhearsion', ["~> 2.5"]
26
- s.add_runtime_dependency 'i18n', ["~> 0.6"]
26
+ s.add_runtime_dependency 'i18n', ["~> 0.6.0"]
27
27
 
28
28
  s.add_development_dependency 'rspec', ["~> 2.11"]
29
29
  end
@@ -13,7 +13,7 @@ module AdhearsionI18n::CallControllerMethods
13
13
  end
14
14
 
15
15
  unless prompt.empty?
16
- prompt = "#{config['audio_path']}/#{this_locale}/#{prompt}"
16
+ prompt = "#{Adhearsion.config.i18n.audio_path}/#{this_locale}/#{prompt}"
17
17
  end
18
18
 
19
19
  RubySpeech::SSML.draw language: this_locale do
@@ -32,10 +32,4 @@ module AdhearsionI18n::CallControllerMethods
32
32
  def locale=(l)
33
33
  call[:locale] = l
34
34
  end
35
-
36
- private
37
-
38
- def config
39
- Adhearsion.config.i18n
40
- end
41
35
  end
@@ -17,7 +17,7 @@ class AdhearsionI18n::Plugin < Adhearsion::Plugin
17
17
  locale_path ["#{Adhearsion.root}/config/locales"], transform: Proc.new { |v| v.split ':' }, desc: <<-__
18
18
  List of directories from which to load locale data, colon-delimited
19
19
  __
20
- audio_path "#{Adhearsion.root}/audio", desc: <<-__
20
+ audio_path "file://#{Adhearsion.root}/audio", desc: <<-__
21
21
  Base path from which audio files can be found. May be a filesystem path or some other URL (like HTTP)
22
22
  __
23
23
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  class AdhearsionI18n
4
- VERSION = '0.0.4'
4
+ VERSION = '1.0.0'
5
5
  end
@@ -12,12 +12,12 @@ describe AdhearsionI18n::CallControllerMethods do
12
12
 
13
13
  before :all do
14
14
  Adhearsion.config.i18n['locale_path'] = ["#{File.dirname(__FILE__)}/fixtures/locale"]
15
+ Adhearsion::Plugin.init_plugins
15
16
  end
16
17
 
17
18
  before do
18
19
  I18n.default_locale = :en
19
20
  double call, write_command: true, id: call_id
20
- Adhearsion::Plugin.init_plugins
21
21
  end
22
22
 
23
23
  describe 'getting and setting the locale' do
@@ -50,7 +50,7 @@ describe AdhearsionI18n::CallControllerMethods do
50
50
  it 'should generate proper SSML with both audio and text fallback translations' do
51
51
  ssml = controller.t :have_many_cats
52
52
  ssml.should == RubySpeech::SSML.draw(language: 'en') do
53
- audio src: "/audio/en/have_many_cats.wav" do
53
+ audio src: "file:///audio/en/have_many_cats.wav" do
54
54
  string 'I have quite a few cats'
55
55
  end
56
56
  end
@@ -59,7 +59,7 @@ describe AdhearsionI18n::CallControllerMethods do
59
59
  it 'should generate proper SSML with only audio (no fallback text) translations' do
60
60
  ssml = controller.t :my_shirt_is_white
61
61
  ssml.should == RubySpeech::SSML.draw(language: 'en') do
62
- audio src: "/audio/en/my_shirt_is_white.wav" do
62
+ audio src: "file:///audio/en/my_shirt_is_white.wav" do
63
63
  string ''
64
64
  end
65
65
  end
@@ -75,7 +75,7 @@ describe AdhearsionI18n::CallControllerMethods do
75
75
  it 'should generate a path to the audio prompt based on the requested locale' do
76
76
  ssml = controller.t :my_shirt_is_white, locale: 'it'
77
77
  ssml.should == RubySpeech::SSML.draw(language: 'it') do
78
- audio src: "/audio/it/la_mia_camicia_e_bianca.wav" do
78
+ audio src: "file:///audio/it/la_mia_camicia_e_bianca.wav" do
79
79
  string ''
80
80
  end
81
81
  end
@@ -4,12 +4,12 @@ require 'adhearsion'
4
4
  require 'adhearsion-i18n'
5
5
 
6
6
  RSpec.configure do |config|
7
- config.color_enabled = true
7
+ config.color = true
8
8
  config.tty = true
9
9
 
10
10
  config.mock_with :rspec
11
11
  config.filter_run :focus => true
12
12
  config.run_all_when_everything_filtered = true
13
13
 
14
- config.backtrace_clean_patterns = [/rspec/]
14
+ config.backtrace_exclusion_patterns = [/rspec/]
15
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adhearsion-i18n
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Klang
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-29 00:00:00.000000000 Z
12
+ date: 2015-03-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -51,14 +51,14 @@ dependencies:
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.6'
54
+ version: 0.6.0
55
55
  type: :runtime
56
56
  prerelease: false
57
57
  version_requirements: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.6'
61
+ version: 0.6.0
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: rspec
64
64
  requirement: !ruby/object:Gem::Requirement
@@ -81,6 +81,7 @@ extensions: []
81
81
  extra_rdoc_files: []
82
82
  files:
83
83
  - ".gitignore"
84
+ - ".travis.yml"
84
85
  - CHANGELOG.md
85
86
  - Gemfile
86
87
  - LICENSE
@@ -115,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
116
  version: '0'
116
117
  requirements: []
117
118
  rubyforge_project:
118
- rubygems_version: 2.2.2
119
+ rubygems_version: 2.4.5
119
120
  signing_key:
120
121
  specification_version: 4
121
122
  summary: Internationalization helpers for Adhearsion applications
@@ -124,3 +125,4 @@ test_files:
124
125
  - spec/fixtures/locale/en.yml
125
126
  - spec/fixtures/locale/it.yml
126
127
  - spec/spec_helper.rb
128
+ has_rdoc: