rasem 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +1 -0
  2. data/VERSION +1 -1
  3. data/bin/rasem +28 -0
  4. metadata +7 -6
data/Rakefile CHANGED
@@ -22,6 +22,7 @@ Jeweler::Tasks.new do |gem|
22
22
  DESCRIPTION
23
23
  gem.email = "eldawy@cs.umn.edu"
24
24
  gem.authors = ["Ahmed Eldawy"]
25
+ gem.executables = ["rasem"]
25
26
  # Include your dependencies below. Runtime dependencies are required when using your gem,
26
27
  # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
27
28
  # gem.add_runtime_dependency 'jabber4r', '> 0.1'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.5.0
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env ruby
2
+ rasem_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+ $LOAD_PATH.unshift(rasem_dir) unless $LOAD_PATH.include?(rasem_dir)
4
+ require 'rasem'
5
+
6
+ if ARGV.empty?
7
+ source_files = Dir.glob(File.expand_path("*.rasem"))
8
+ else
9
+ source_files = ARGV
10
+ end
11
+
12
+ if source_files.empty?
13
+ puts "No input files"
14
+ end
15
+
16
+ for source_file in source_files
17
+ puts "Source file #{source_file}"
18
+ if source_file =~ /\.rasem$/
19
+ svg_file = source_file.sub(/\.rasem$/, '.svg')
20
+ else
21
+ svg_file = source_file + ".svg"
22
+ end
23
+ File.open(svg_file, "w") do |f|
24
+ Rasem::SVGImage.new(f, 100, 100) do
25
+ eval(File.read(source_file), binding)
26
+ end
27
+ end
28
+ end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 4
7
+ - 5
8
8
  - 0
9
- version: 0.4.0
9
+ version: 0.5.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ahmed Eldawy
@@ -15,7 +15,7 @@ bindir: bin
15
15
  cert_chain: []
16
16
 
17
17
  date: 2011-04-10 00:00:00 -05:00
18
- default_executable:
18
+ default_executable: rasem
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rspec
@@ -77,8 +77,8 @@ dependencies:
77
77
  version_requirements: *id004
78
78
  description: " This gem allows you to describe your images using ruby code.\n You can use rasem to draw complex images using small portions of ruby code\n"
79
79
  email: eldawy@cs.umn.edu
80
- executables: []
81
-
80
+ executables:
81
+ - rasem
82
82
  extensions: []
83
83
 
84
84
  extra_rdoc_files:
@@ -92,6 +92,7 @@ files:
92
92
  - README.rdoc
93
93
  - Rakefile
94
94
  - VERSION
95
+ - bin/rasem
95
96
  - lib/rasem.rb
96
97
  - lib/rasem/svg_image.rb
97
98
  - spec/rasem_spec.rb
@@ -110,7 +111,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
111
  requirements:
111
112
  - - ">="
112
113
  - !ruby/object:Gem::Version
113
- hash: -948951515577583612
114
+ hash: -1313597127925925902
114
115
  segments:
115
116
  - 0
116
117
  version: "0"