vector_salad 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 216973fb4df052f0d6dfc3364d476dd152972173
4
- data.tar.gz: f487f8434831e25b350f6b5598bf1c3a3e70255c
3
+ metadata.gz: 7083ae78be257690b2c622f111ef364f95096608
4
+ data.tar.gz: 935c635c99950f0082ebe29321ee72b346adc658
5
5
  SHA512:
6
- metadata.gz: 027efabf9e99231c12b27de22911e2b6960d569aa0a629f3cdcf6aee293285dc251367b1d755712c3cd5ed08deae5ca4979a92e73b571ffcfafc1ad468963fcc
7
- data.tar.gz: 4117dcb33a38f58a65e761351be35cf5a61c82e90c25daea9c68a6e9515ef285d55d55e19b251c105c3625aa13b24e59cfbcf70e5c2095d178ca2899a722b9ef
6
+ metadata.gz: f388ec008c53ca10f4b2dd9c2df1d65f784b743d63bfffe4a561f94f207d20e918fefe2a69f967562827e6766d4a00321afa9afe47cca186617da28aab1c33d5
7
+ data.tar.gz: 8c948e79ebe414f3c20f0d1bdd91bceb9664428fd986136e28d35119158503d1134ece6be711f9d41cfbe1b26a44b29c3bc5e1f2422d326c6572f5c4d60dadee
data/bin/vector_salad CHANGED
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'optparse'
4
- require 'ostruct'
3
+ require "optparse"
4
+ require "ostruct"
5
+ require_relative "../lib/vector_salad/version"
5
6
 
6
7
  class OptparseVectorSalad
7
8
  #
@@ -23,13 +24,8 @@ class OptparseVectorSalad
23
24
  opts.separator ""
24
25
  opts.separator "Specific options:"
25
26
 
26
- opts.on("--magic",
27
- "Automatically include VectorSalad and formatter in your canvas.") do |lib|
28
- options.magic = true
29
- end
30
-
31
27
  opts.on("--crop CROP",
32
- "Set width and height manually, format WIDTHxHEIGHT, e.g: 400x600.") do |crop|
28
+ "Set manual crop, WIDTHxHEIGHT, e.g: 400x600") do |crop|
33
29
  options.width, options.height = crop.split('x').map(&:to_i)
34
30
  end
35
31
 
@@ -39,11 +35,16 @@ class OptparseVectorSalad
39
35
  options.file = file
40
36
  end
41
37
 
42
- # Boolean switch.
43
- opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
44
- options.verbose = v
38
+ opts.on("--[no-]magic",
39
+ "Add some helpful magic to your design") do |m|
40
+ options.magic = m
45
41
  end
46
42
 
43
+ # Boolean switch.
44
+ # opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
45
+ # options.verbose = v
46
+ # end
47
+
47
48
  opts.separator ""
48
49
  opts.separator "Common options:"
49
50
 
@@ -66,7 +67,8 @@ class OptparseVectorSalad
66
67
  end
67
68
  end
68
69
 
70
+ ARGV << "-h" if ARGV.empty?
69
71
  options = OptparseVectorSalad.parse(ARGV)
70
72
 
71
- require 'vector_salad/export_with_magic'
73
+ require_relative "../lib/vector_salad/export_with_magic"
72
74
  puts VectorSalad::ExportWithMagic.new(options).export
@@ -1,3 +1,3 @@
1
1
  module VectorSalad
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vector_salad
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon George
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-19 00:00:00.000000000 Z
11
+ date: 2015-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pretty_backtrace