asciiart 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/asciiart.gemspec CHANGED
@@ -6,11 +6,11 @@ require 'asciiart/version'
6
6
  Gem::Specification.new do |gem|
7
7
  gem.name = "asciiart"
8
8
  gem.version = AsciiArt::VERSION
9
- gem.authors = ["nodanaonlyzuul"]
9
+ gem.authors = ["nodanaonlyzuul", "rosscooperman"]
10
10
  gem.email = ["stephen@eastmedia.com"]
11
11
  # gem.description = %q{A command line tool to turn images into ASCII art}
12
12
  gem.summary = %q{A command line tool to turn images into ASCII art}
13
- gem.homepage = ""
13
+ gem.homepage = "https://github.com/eastmedia/asciiart"
14
14
 
15
15
  gem.files = `git ls-files`.split($/)
16
16
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
data/lib/asciiart.rb CHANGED
@@ -3,16 +3,18 @@ require 'RMagick'
3
3
 
4
4
  class AsciiArt
5
5
 
6
- attr_accessor :file
6
+ attr_reader :file
7
7
  attr_writer :image_chars
8
8
 
9
9
  def initialize(path_to_file)
10
10
  @file = File.new(path_to_file, "r")
11
+ @data = file.read
12
+
13
+ self
11
14
  end
12
15
 
13
16
  def to_ascii_art
14
-
15
- img = Magick::Image.read(file).first
17
+ img = Magick::Image.from_blob(@data).first
16
18
 
17
19
  new_width = 100
18
20
  scale = (new_width.to_f / img.columns)
@@ -1,3 +1,3 @@
1
1
  class AsciiArt
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,11 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciiart
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - nodanaonlyzuul
9
+ - rosscooperman
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
@@ -60,7 +61,7 @@ files:
60
61
  - bin/asciiart
61
62
  - lib/asciiart.rb
62
63
  - lib/asciiart/version.rb
63
- homepage: ''
64
+ homepage: https://github.com/eastmedia/asciiart
64
65
  licenses: []
65
66
  post_install_message:
66
67
  rdoc_options: []