dogsay 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 61ad1bbaef3bdabe95c7d6cf946b1b3a9fb57568
4
- data.tar.gz: c8f03c1221a155a8bdf730288cc986101d327723
3
+ metadata.gz: 53b69d03536e181374a1a1ed0db0f7ceddcc907c
4
+ data.tar.gz: 6765a26ed5cd8a994e02a7536b5bf494c8286ef2
5
5
  SHA512:
6
- metadata.gz: f749d9167e7b4c7fb9a19fe08da78bcd67d8f16123c6e8a078bf8a3a0052b9c2dd29192309fc2968e2794408e587fadad2f3ccf2ab3600ed0ac683d32b6b2a08
7
- data.tar.gz: b3860283688e5ff725ebf0b5afacda3a73f7c0d207661392680148d9de18324e95f3ce050e72267ea269bdb3669aad26026ff17f108f88cd7162145ef557b9d1
6
+ metadata.gz: 99e9d4a9246eb5dcdbc1a7b45436d0934f5fdcf9cd09294928fd462b5505b4dac20e6bbbe28af8a538bd7c78bfe8bb90b0634121cf62341c3bf1fd7cc6619ea9
7
+ data.tar.gz: f3479858143be1bd27cf92a6f7d6c44fe1d4ff2e80ebd26c12fbeb1a6afd328c38b02ee30eac5c65364434f4dcaf52a25076a3761456fb86aa03fb34e0b387e7
data/README.md CHANGED
@@ -64,6 +64,30 @@ or
64
64
 
65
65
  If you're feeling saucy, you can try out `dinosay` as well.
66
66
 
67
+ ## Configuration
68
+
69
+ Edit `.dogsay` in your home directory. It is a Yaml file that looks something
70
+ like this:
71
+ ```yaml
72
+ :pose: :small
73
+ :justify: :center
74
+ :strip: :true
75
+ :text_width: 35
76
+ ```
77
+
78
+ The full options (though some, like `:raw`, are incompatible with others, like
79
+ `:justify`) are:
80
+ ```yaml
81
+ :pose: <see dogs directory or use dogsay --list>
82
+ :justify: <:ljust|:center|:rjust>
83
+ :strip: <true|false>
84
+ :raw: <true|false>
85
+ :text_width: <integer>
86
+ ```
87
+
88
+ Note that you can't set `:animal` in your dotfile, as if you want a dog you use
89
+ `dogsay` and if you want a dinosaur you use `dinosay`.
90
+
67
91
  ## Contributing
68
92
 
69
93
  1. Fork it ( https://github.com/ffleming/dogsay/fork )
@@ -72,7 +96,8 @@ If you're feeling saucy, you can try out `dinosay` as well.
72
96
  4. Push to the branch (`git push origin my-new-feature`)
73
97
  5. Create a new Pull Request
74
98
 
75
- ##Acknowledgments
99
+ ## Acknowledgments
100
+
76
101
  * `default.dog` by 'dgs' at [Ascii-art.de](http://www.ascii-art.de/ascii/def/dogs.txt)
77
102
  * `small.dog` from [Ascii-art.de](http://www.ascii-art.de/ascii/def/dogs.txt)
78
103
  * `sit.dog` from [AsciiWorld.com](http://www.asciiworld.com/-Dogs-.html)
@@ -15,7 +15,7 @@ module Dogsay
15
15
  options = config.merge opts
16
16
  dog = Dogsay::Dog.new(options)
17
17
  text = Dogsay::TextBox.new(string, options)
18
- boxed = opts[:raw] ? text.raw : text.ascii
18
+ boxed = options[:raw] ? text.raw : text.ascii
19
19
  dog.add_art(boxed, on_the: dog.text_position)
20
20
  end
21
21
 
@@ -35,7 +35,12 @@ class Dogsay::Dog
35
35
  begin
36
36
  yaml_hash = YAML.load_file filename
37
37
  rescue Errno::ENOENT
38
- raise Dogsay::InvalidDogError.new("Invalid dog file #{filename}")
38
+ begin
39
+ @pose = :default
40
+ yaml_hash = YAML.load_file filename
41
+ rescue Errno::ENOENT
42
+ raise Dogsay::InvalidDogError.new("Invalid dog file #{filename}")
43
+ end
39
44
  end
40
45
  @ascii = ascii_from(yaml_hash)
41
46
  @text_position = yaml_hash[:text_position]
@@ -1,3 +1,3 @@
1
1
  module Dogsay
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dogsay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Forrest Fleming