doge 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.md +3 -1
  2. data/lib/doge.rb +4 -3
  3. data/lib/doge/version.rb +1 -1
  4. metadata +2 -4
  5. data/foo.jpg +0 -0
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Doge
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/doge.png)](http://badge.fury.io/rb/doge)
4
+
3
5
  ```
4
6
  such gem
5
7
 
@@ -45,7 +47,7 @@ Will write the image to disk:
45
47
 
46
48
  `#image` will return an [`Magick::Image`](http://www.simplesystems.org/RMagick/doc/imageattrs.html).
47
49
 
48
- Available methods are `such`, `wow`, `so`, `amaze` and `wuff` which writes a custom string.
50
+ Available methods are `such`, `wow`, `so`, `amaze`, `very` and `wuff` which writes a custom string. You can specify a custom image by handing over a file path `Doge.new(my_image)`.
49
51
 
50
52
  ## Contributing
51
53
 
@@ -5,8 +5,9 @@ require 'RMagick'
5
5
  class Doge
6
6
  attr_reader :image
7
7
 
8
- def initialize(&block)
9
- @image = Magick::ImageList.new(File.expand_path('doge/images/doge.jpg', File.dirname(__FILE__)))
8
+ def initialize(image_path = nil, &block)
9
+ image_path ||= File.expand_path('doge/images/doge.jpg', File.dirname(__FILE__))
10
+ @image = Magick::ImageList.new(image_path)
10
11
  @occupied = []
11
12
  instance_eval &block if block
12
13
  end
@@ -21,7 +22,7 @@ class Doge
21
22
  self
22
23
  end
23
24
 
24
- [:such, :wow, :so, :much, :amaze].each do |word|
25
+ [:such, :wow, :so, :much, :amaze, :very].each do |word|
25
26
  define_method(word) { |text = ''| wuff(word.to_s + " " + text) }
26
27
  end
27
28
 
@@ -1,3 +1,3 @@
1
1
  class Doge
2
- VERSION = "1.0.2"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doge
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-03 00:00:00.000000000 Z
12
+ date: 2014-03-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rmagick
@@ -72,7 +72,6 @@ files:
72
72
  - README.md
73
73
  - Rakefile
74
74
  - doge.gemspec
75
- - foo.jpg
76
75
  - lib/doge.rb
77
76
  - lib/doge/images/doge.jpg
78
77
  - lib/doge/version.rb
@@ -103,4 +102,3 @@ signing_key:
103
102
  specification_version: 3
104
103
  summary: wow
105
104
  test_files: []
106
- has_rdoc:
data/foo.jpg DELETED
Binary file