high_five 0.3.22 → 0.3.23
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 +4 -4
- data/Gemfile.lock +13 -17
- data/high_five.gemspec +1 -1
- data/lib/high_five/image_helper.rb +7 -3
- data/lib/high_five/thor/tasks/android.rb +19 -0
- data/lib/high_five/thor/tasks/dist.rb +2 -2
- data/lib/high_five/thor/tasks/ios.rb +31 -0
- data/lib/high_five/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b486b96a9bcc56b3a53084cd19542feb75d8af4c
|
4
|
+
data.tar.gz: 9f65c1f458d231991db76929430122031c102a42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09ca19bdd47defd916de38d886e99957645e107d1ce3cffba637202d81d6d4696672a9c420f03a7cafbc2b975bbe38b2d25cfbdfeb6c5ec2179547f693223a26'
|
7
|
+
data.tar.gz: 8e4d72fc5e8cbc154304973f05a7d5e90bd276d1c3b8cb056a35305959dbb3849f53fd4e4c65d7d08cfee91cf1b5bb8f76f9cb90e9284277098f3f1f2f166266
|
data/Gemfile.lock
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
high_five (0.3.
|
4
|
+
high_five (0.3.23)
|
5
5
|
chunky_png
|
6
6
|
coffee-script (~> 2.2.0)
|
7
7
|
multi_json (~> 1.0)
|
8
8
|
nokogiri (>= 1.5.0)
|
9
9
|
plist (>= 3.0)
|
10
|
-
sprockets
|
10
|
+
sprockets
|
11
11
|
thor (>= 0.18.0)
|
12
|
-
uglifier (
|
12
|
+
uglifier (>= 2.0)
|
13
13
|
webrick
|
14
14
|
yui-compressor (~> 0.12.0)
|
15
15
|
|
@@ -26,13 +26,13 @@ GEM
|
|
26
26
|
chunky_png (~> 1.2)
|
27
27
|
fssm (>= 0.2.7)
|
28
28
|
sass (~> 3.2.19)
|
29
|
+
concurrent-ruby (1.0.5)
|
29
30
|
diff-lcs (1.2.5)
|
30
31
|
execjs (2.7.0)
|
31
32
|
fssm (0.2.10)
|
32
|
-
hike (1.2.3)
|
33
33
|
method_source (0.8.2)
|
34
34
|
mini_portile2 (2.2.0)
|
35
|
-
multi_json (1.12.
|
35
|
+
multi_json (1.12.2)
|
36
36
|
nokogiri (1.8.0)
|
37
37
|
mini_portile2 (~> 2.2.0)
|
38
38
|
plist (3.3.0)
|
@@ -40,7 +40,7 @@ GEM
|
|
40
40
|
coderay (~> 1.1.0)
|
41
41
|
method_source (~> 0.8.1)
|
42
42
|
slop (~> 3.4)
|
43
|
-
rack (
|
43
|
+
rack (2.0.3)
|
44
44
|
rspec (2.13.0)
|
45
45
|
rspec-core (~> 2.13.0)
|
46
46
|
rspec-expectations (~> 2.13.0)
|
@@ -51,16 +51,12 @@ GEM
|
|
51
51
|
rspec-mocks (2.13.1)
|
52
52
|
sass (3.2.19)
|
53
53
|
slop (3.6.0)
|
54
|
-
sprockets (
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
tilt (1.4.1)
|
61
|
-
uglifier (2.1.2)
|
62
|
-
execjs (>= 0.3.0)
|
63
|
-
multi_json (~> 1.0, >= 1.0.2)
|
54
|
+
sprockets (3.7.1)
|
55
|
+
concurrent-ruby (~> 1.0)
|
56
|
+
rack (> 1, < 3)
|
57
|
+
thor (0.20.0)
|
58
|
+
uglifier (3.2.0)
|
59
|
+
execjs (>= 0.3.0, < 3)
|
64
60
|
webrick (1.3.1)
|
65
61
|
yui-compressor (0.12.0)
|
66
62
|
|
@@ -74,4 +70,4 @@ DEPENDENCIES
|
|
74
70
|
rspec (~> 2.13.0)
|
75
71
|
|
76
72
|
BUNDLED WITH
|
77
|
-
1.
|
73
|
+
1.15.4
|
data/high_five.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.add_runtime_dependency "thor", ">= 0.18.0"
|
20
20
|
s.add_runtime_dependency "yui-compressor", "~>0.12.0"
|
21
21
|
s.add_runtime_dependency "uglifier", ">=2.0"
|
22
|
-
s.add_runtime_dependency "sprockets"
|
22
|
+
s.add_runtime_dependency "sprockets"
|
23
23
|
s.add_runtime_dependency "coffee-script", "~>2.2.0"
|
24
24
|
s.add_runtime_dependency "plist", ">=3.0"
|
25
25
|
s.add_runtime_dependency "nokogiri", ">=1.5.0"
|
@@ -31,7 +31,7 @@ module HighFive
|
|
31
31
|
source.write(image_path)
|
32
32
|
end
|
33
33
|
|
34
|
-
def generate_ios_splash_screen_image(type, ios_path, path, color)
|
34
|
+
def generate_ios_splash_screen_image(type, ios_path, path, color, replace=false)
|
35
35
|
raise "Requires RMagick gem" unless rmagick?
|
36
36
|
case type
|
37
37
|
when 'iphone_portrait_8_retina_hd_5_5'
|
@@ -87,8 +87,12 @@ module HighFive
|
|
87
87
|
filename = "#{type}.png"
|
88
88
|
splash_path = Dir.glob("#{ios_path}/**/Images.xcassets/LaunchImage.launchimage").first + "/#{filename}"
|
89
89
|
puts "Creating #{splash_path}"
|
90
|
-
Magick::Image.new(
|
91
|
-
|
90
|
+
Magick::Image.new(height, width).write(splash_path)
|
91
|
+
if replace
|
92
|
+
replace_image(splash_path, path)
|
93
|
+
else
|
94
|
+
generate_splash_screen_image splash_path, path, color
|
95
|
+
end
|
92
96
|
end
|
93
97
|
|
94
98
|
private
|
@@ -101,6 +101,25 @@ module HighFive
|
|
101
101
|
end
|
102
102
|
end
|
103
103
|
|
104
|
+
desc "set_splash_screen", "Replace splash screens from base png image"
|
105
|
+
method_option :platform_path, desc: "Path to the ios or android directory"
|
106
|
+
def set_splash_screen(path)
|
107
|
+
image = ChunkyPNG::Image.from_file(path)
|
108
|
+
|
109
|
+
splash_name = 'screen.png'
|
110
|
+
|
111
|
+
drawable_dir = File.join File.dirname(android_manifest_path), 'res'
|
112
|
+
Dir.glob(File.join drawable_dir, "drawable*").each do |dir|
|
113
|
+
splash_path = File.join(dir, splash_name)
|
114
|
+
if File.exists?(splash_path)
|
115
|
+
res = parse_resolution(splash_path)
|
116
|
+
size = res_map[res]
|
117
|
+
replace_image splash_path, path
|
118
|
+
puts "Writing #{size}x#{size} -> #{splash_path}"
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
104
123
|
desc "generate_splash_screen", "Generate and replace splash screens from logo and background color"
|
105
124
|
method_option :color, desc: "Background color"
|
106
125
|
method_option :platform_path, desc: "Path to the ios or android directory"
|
@@ -68,7 +68,7 @@ module HighFive
|
|
68
68
|
def dist_android(android_path)
|
69
69
|
@output_file_name = options[:output_file_name]
|
70
70
|
ant_flags = options[:"ant-flags"] || ""
|
71
|
-
system_or_die("android update project --path #{android_path} --subprojects")
|
71
|
+
# system_or_die("android update project --path #{android_path} --subprojects")
|
72
72
|
gradle_file = File.join(android_path, "build.gradle")
|
73
73
|
gradle = File.exists?(gradle_file) && !options[:ant]
|
74
74
|
debug = options[:debug]
|
@@ -128,7 +128,7 @@ module HighFive
|
|
128
128
|
if gradle
|
129
129
|
system_or_die("adb install -r #{Dir["#{android_path}/build/outputs/apk/*-debug.apk"][0]}")
|
130
130
|
else
|
131
|
-
system_or_die("adb install -r #{Dir["#{android_path}/bin
|
131
|
+
system_or_die("adb install -r #{Dir["#{android_path}/bin/*-debug.apk"][0]}")
|
132
132
|
end
|
133
133
|
end
|
134
134
|
else
|
@@ -78,6 +78,37 @@ module HighFive
|
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
81
|
+
desc "set_splash_screen", "Replace splash screens from base png image"
|
82
|
+
method_option :color, desc: "Background color"
|
83
|
+
def set_splash_screen(path)
|
84
|
+
image = ChunkyPNG::Image.from_file(path)
|
85
|
+
|
86
|
+
splashes_to_make = [
|
87
|
+
'iphone_portrait_8_retina_hd_5_5',
|
88
|
+
'iphone_portrait_8_retina_hd_4_7',
|
89
|
+
'iphone_landscape_8_retina_hd_5_5',
|
90
|
+
'iphone_portrait_1x',
|
91
|
+
'iphone_portrait_2x',
|
92
|
+
'iphone_portrait_retina_4',
|
93
|
+
'ios-7-iphone_portrait_2x',
|
94
|
+
'ios-7-iphone_portrait_retina_4',
|
95
|
+
'ipad_portrait_1x',
|
96
|
+
'ipad_portrait_2x',
|
97
|
+
'ipad_landscape_1x',
|
98
|
+
'ipad_landscape_2x',
|
99
|
+
'ipad_portrait_without_status_bar_5_6_1x',
|
100
|
+
'ipad_portrait_without_status_bar_5_6_2x',
|
101
|
+
'ipad_landscape_without_status_bar_5_6_1x',
|
102
|
+
'ipad_landscape_without_status_bar_5_6_2x'
|
103
|
+
]
|
104
|
+
|
105
|
+
splashes_to_make.each do |type|
|
106
|
+
generate_ios_splash_screen_image(type, ios_path, path, nil, true)
|
107
|
+
end
|
108
|
+
|
109
|
+
puts "Make sure you assign them in xcode if this is the first time you generated these"
|
110
|
+
end
|
111
|
+
|
81
112
|
desc "generate_splash_screen", "Generate and replace splash screens from logo and background color"
|
82
113
|
method_option :color, desc: "Background color"
|
83
114
|
def generate_splash_screen(path)
|
data/lib/high_five/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: high_five
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Samson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: sprockets
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: coffee-script
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|