rubyapple 0.1.1 → 0.2.3

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
  SHA256:
3
- metadata.gz: 4a60b39aa49ab33bfc0f8d2330652b2573a562b11e3ed6eaa6d5f40af51fc28d
4
- data.tar.gz: 7231674e31730e800cd3c3a05c0bef51f5f7ed11682190da9605c739c73d35dc
3
+ metadata.gz: e6f70803c1104ac8e6f57e2b674efd3b535d45c1c2219be427837680a620554d
4
+ data.tar.gz: 9ef059d2d664babcae42e9527638e2257f191875d28b8e84b7304648185630e5
5
5
  SHA512:
6
- metadata.gz: 5af0c2333d217a94c05f9f4f39418cb6344737fed7a0aacb3c171fb98feb427394fc38c56c71925ca226bd3ac4f472c79d47a7274e698a66ac9e74de203aa296
7
- data.tar.gz: 4414a606c014fb170acb297ede1fb4222a8f261f39259a43926f9d86ab8fa7f9c81e5268e7f6e09210685b9914920f804544990f5c773d3d7f3db4fd1cd74d6f
6
+ metadata.gz: d72d7e0a76ee0e43db9d102da7967c72bdc1117c245cb5b24f981c119cee9879820166853ebe06a0975aa011082f89b74f40647f5e3467094949768f3ea250f1
7
+ data.tar.gz: 9d775b1e940e73c10a2f83445a71e71c95fc3d61baa8695b255a1296c0caa1d6d89f0cc132e9156ddac69f5ec895a27a06ab44b6fd01cc219ce753e2c2866107
data/Gemfile.lock ADDED
@@ -0,0 +1,24 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rubyapple (0.2.2)
5
+ fileutils (~> 1.1, >= 1.1.0)
6
+ rmagick (~> 2.16, >= 2.16.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ fileutils (1.1.0)
12
+ rake (12.3.1)
13
+ rmagick (2.16.0)
14
+
15
+ PLATFORMS
16
+ ruby
17
+
18
+ DEPENDENCIES
19
+ bundler (~> 1.16, >= 1.16.2)
20
+ rake (~> 12.3, >= 12.3.1)
21
+ rubyapple!
22
+
23
+ BUNDLED WITH
24
+ 1.16.3
data/README.md CHANGED
@@ -11,6 +11,18 @@
11
11
  > apple-touch-icon-sizexsize.png
12
12
  >
13
13
  > apple-touch-icon-sizexsize-precompiled.png
14
+ >
15
+ > drawable-hdpi-icon.png
16
+ >
17
+ > drawable-ldpi-icon.png
18
+ >
19
+ > drawable-mdpi-icon.png
20
+ >
21
+ > drawable-xhdpi-icon.png
22
+ >
23
+ > drawable-xxhdpi-icon.png
24
+ >
25
+ > drawable-xxxhdpi-icon.png
14
26
 
15
27
 
16
28
  ## PRE-Installation
@@ -42,6 +54,12 @@ output will be contained in the following folder where you invoked the command
42
54
  type_images/
43
55
  ```
44
56
 
57
+ or if you're looking for all types
58
+
59
+ ```rb
60
+ rubyapple gen-all picture.png
61
+ ```
62
+
45
63
  Example output from `gen-apple-touch` 's `apple_images` folder:
46
64
  ```
47
65
  user@computer:~/apple_images$ ls -l
@@ -95,5 +113,11 @@ user@computer:~/drawable_images$
95
113
 
96
114
  Make a pull request and make this a better one if you feel like it!
97
115
 
116
+ # Issues/Feature requests
117
+
118
+ Create an issue, tag with bug/feature and describe what is wrong or what you need
119
+
120
+ For feature request regarding generate_types please specify format size ranges so it can be applied like the above outputs.
121
+
98
122
  -- Juksefantomet
99
123
 
data/bin/rubyapple CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'rubyapple'
4
+ require 'rubyapple/version'
4
5
 
5
- Rubyapple.new
6
+ Rubyapple::Main.new
@@ -1,4 +1,4 @@
1
1
  module Rubyapple
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.3"
3
3
  end
4
4
 
data/lib/rubyapple.rb CHANGED
@@ -2,17 +2,18 @@ require 'rubygems'
2
2
  require 'rmagick'
3
3
  require 'fileutils'
4
4
 
5
- class Rubyapple
5
+ module Rubyapple
6
+ class Main
6
7
  def initialize
7
- args = ARGV[0..-1]
8
+ args = ARGV[0..-1]
8
9
 
9
- unless !args[1]
10
- image = Magick::Image.read(args[1])[0].strip!
11
- end
10
+ unless !args[1]
11
+ image = Magick::Image.read(args[1])[0].strip!
12
+ end
12
13
 
13
14
  case
14
15
  when args[0] == 'help'
15
- puts "initializing.. help"
16
+ puts "rubyapple version #{Rubyapple::VERSION}"
16
17
  puts ""
17
18
  puts "rubyapple gen-apple-touch imagename.png"
18
19
  puts " -- outputs apple-touch-icon-* files to apple_images/*"
@@ -20,18 +21,32 @@ class Rubyapple
20
21
  puts "rubyapple gen-drawables imagename.png"
21
22
  puts " -- outputs drawable-* files to drawable_images/*"
22
23
  puts ""
24
+ puts "rubyapple gen-all imagename.png"
25
+ puts " -- outputs all types files to *_images/*"
26
+ puts ""
23
27
  when args[0] == 'gen-apple-touch'
24
- puts "initializing.. gen-apple-touch"
28
+ puts "initializing.. gen-apple-touch"
25
29
  generate_apples(image)
26
30
  when args[0] == 'gen-drawables'
27
- puts "initializing.. gen-drawables"
31
+ puts "initializing.. gen-drawables"
32
+ generate_drawables(image)
33
+ when args[0] == 'gen-all'
34
+ puts "initializing.. generation of all types.."
35
+ generate_apples(image)
28
36
  generate_drawables(image)
37
+ when args[0] == 'version' || args[0] == '-v'
38
+ puts "Current rubyapple version: #{Rubyapple::VERSION}"
39
+ else
40
+ puts "-"
41
+ puts "did you forget something?"
42
+ puts "-"
43
+ puts "use 'rubyapple help' for more information"
29
44
  end
30
45
 
31
46
  unless args[0]
32
- puts "correct syntax:"
33
- puts " rubyapple type image.png"
34
- puts "use 'rubyapple help' for more information"
47
+ puts "correct syntax:"
48
+ puts " rubyapple type image.png"
49
+ puts "use 'rubyapple help' for more information"
35
50
  end
36
51
 
37
52
  end
@@ -74,12 +89,12 @@ class Rubyapple
74
89
 
75
90
  puts "Generating pictures.. drawable-types"
76
91
 
77
- temp.resize_to_fill(36,36).write(path + "drawable-ldpi-icon.png")
78
- temp.resize_to_fill(48,48).write(path + "drawable-mdpi-icon.png")
79
- temp.resize_to_fill(72,72).write(path + "drawable-hdpi-icon.png")
80
- temp.resize_to_fill(96,96).write(path + "drawable-xhdpi-icon.png")
81
- temp.resize_to_fill(144,144).write(path + "drawable-xxhdpi-icon.png")
82
- temp.resize_to_fill(192,192).write(path + "drawable-xxxhdpi-icon.png")
92
+ temp.resize_to_fill(36, 36).write(path + "drawable-ldpi-icon.png")
93
+ temp.resize_to_fill(48, 48).write(path + "drawable-mdpi-icon.png")
94
+ temp.resize_to_fill(72, 72).write(path + "drawable-hdpi-icon.png")
95
+ temp.resize_to_fill(96, 96).write(path + "drawable-xhdpi-icon.png")
96
+ temp.resize_to_fill(144, 144).write(path + "drawable-xxhdpi-icon.png")
97
+ temp.resize_to_fill(192, 192).write(path + "drawable-xxxhdpi-icon.png")
83
98
 
84
99
  puts "Done!"
85
100
  end
@@ -88,4 +103,4 @@ class Rubyapple
88
103
  FileUtils.mkdir_p(folname)
89
104
  end
90
105
  end
91
-
106
+ end
data/rubyapple.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.email = ["larsgrav@gmail.com"]
10
10
 
11
11
  spec.summary = %q{System command to logfile gem}
12
- spec.description = %q{A gem to convert argument picture into apple-touch-icon and -precomposed .png files}
12
+ spec.description = %q{A gem to replicate argument picture into various icon and mobile types, apple-touch-icon, *-precomposed, drawables-* type .png files}
13
13
  spec.homepage = "https://github.com/Juksefantomet/rubyapple"
14
14
  spec.license = "MIT"
15
15
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyapple
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lars Grav
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-18 00:00:00.000000000 Z
11
+ date: 2018-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rmagick
@@ -90,8 +90,8 @@ dependencies:
90
90
  - - ">="
91
91
  - !ruby/object:Gem::Version
92
92
  version: 12.3.1
93
- description: A gem to convert argument picture into apple-touch-icon and -precomposed
94
- .png files
93
+ description: A gem to replicate argument picture into various icon and mobile types,
94
+ apple-touch-icon, *-precomposed, drawables-* type .png files
95
95
  email:
96
96
  - larsgrav@gmail.com
97
97
  executables:
@@ -102,6 +102,7 @@ extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
104
  - Gemfile
105
+ - Gemfile.lock
105
106
  - README.md
106
107
  - bin/rubyapple
107
108
  - bin/rubyapple-console