talks 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.0.5
4
+
5
+ * Added customization through your_project_folder/.talksrc file
6
+
7
+ ## 0.0.4
8
+
9
+ * Added customization through ~/.talksrc file
10
+
11
+ ## 0.0.3
12
+
13
+ * Voices can be changed now
14
+ * You can send type to say method
15
+
3
16
  ## 0.0.2
4
17
 
5
18
  Init version
data/README.md CHANGED
@@ -21,7 +21,7 @@ This gem just using native MacOS X `say` command line tool.
21
21
 
22
22
  ### Configuration
23
23
 
24
- You can configure default voices and messages for `talks` with `~/.talksrc` file. It should be written in YAML format:
24
+ You can configure default voices and messages for `talks` with `~/.talksrc` file or with `your_project/.talksrc` file. It should be written in YAML format:
25
25
 
26
26
  `~/.talksrc`
27
27
  ```yml
@@ -34,7 +34,7 @@ messages:
34
34
  ```
35
35
 
36
36
  The same you can do in your code dynamicly through Talks.config instance.
37
- Soon I'll add configuration with dotfile project-wide.
37
+ You can configure now only default voice for `say` method and voices and messages for 4 types of talks: `info, warn, success, error`
38
38
 
39
39
  ### Using talks in your code
40
40
 
data/lib/talks/runner.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  # What file is used for talks startup configuration.
2
- unless defined?(OPTS_INITFILE)
2
+ initfile = if File.exists?('./.talksrc')
3
+ './.talksrc'
4
+ elsif !defined?(OPTS_INITFILE)
3
5
  if RUBY_PLATFORM =~ /mswin/
4
6
  # Of course MS Windows has to be different
5
7
  OPTS_INITFILE = 'talks.ini'
@@ -9,9 +11,9 @@ unless defined?(OPTS_INITFILE)
9
11
  OPTS_INITFILE = '.talksrc'
10
12
  HOME_DIR = ENV['HOME'].to_s
11
13
  end
14
+ File.join(HOME_DIR, OPTS_INITFILE)
12
15
  end
13
16
 
14
- initfile = File.join(HOME_DIR, OPTS_INITFILE)
15
17
 
16
18
  if File.exist?(initfile)
17
19
  Talks.configure(YAML.load_file(initfile))
data/lib/talks/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Talks
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: talks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: