motion-rubberstamp 0.0.4 → 0.0.5
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/README.md +19 -6
- data/lib/motion/project/assets/.DS_Store +0 -0
- data/lib/motion/project/assets/Icon-72.png +0 -0
- data/lib/motion/project/assets/Icon-72@2x.png +0 -0
- data/lib/motion/project/assets/Icon-Small-50.png +0 -0
- data/lib/motion/project/assets/Icon-Small-50@2x.png +0 -0
- data/lib/motion/project/assets/Icon-Small.png +0 -0
- data/lib/motion/project/assets/Icon-Small@2x.png +0 -0
- data/lib/motion/project/assets/Icon.png +0 -0
- data/lib/motion/project/assets/Icon@2x.png +0 -0
- data/lib/motion/project/rubberstamp.rb +17 -19
- data/lib/rubberstamp/version.rb +1 -1
- metadata +12 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd56b3b1cf2ca1f77318cc1639b5d979f16240aa
|
4
|
+
data.tar.gz: 10d307b54c21fb1362d0a7210246afc909d95551
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 023c17feb568fd4fcf238c71ba7e71d1a0d8f7db2c7afe32a628d2a85549d0c0f7c54a7771d7683232d175ade99d2139d5de5320e88aace0fce4eef63b765b99
|
7
|
+
data.tar.gz: b2a3fa27d5caf6c50f55ed42185c55e9819d62141732d17bcfa3ef6488025a091d8a562183f0bc5a2f9b03a5098d1f547866c1674f390f18914bdbc579056cd7
|
data/README.md
CHANGED
@@ -1,11 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-

|
1
|
+

|
2
|
+
#### 1. Just add this gem to your RubyMotion project, and your app icons will get stamped!
|
4
3
|
App Icon _Before_:
|
5
4
|

|
6
5
|
App Icon _After:_
|
7
6
|

|
8
7
|
|
8
|
+
#### 2. If you don't have an icon, we will automatically provide one.
|
9
|
+

|
10
|
+
|
11
|
+
#### 3. Removal
|
12
|
+
This gem will intelligently omit itself from your archive builds, but you can also do it manually via rake.
|
13
|
+
|
14
|
+
$ rake rubberstamp:revert
|
15
|
+
|
16
|
+
#### 4. TADAAA!
|
9
17
|
This is aimed at being a development tool, it will create an
|
10
18
|
overlay for your iOS app icon that includes your version, commit
|
11
19
|
and branch information so you can know exactly what version of
|
@@ -63,17 +71,22 @@ Or to remove the overlays and restore your original icons, you can run
|
|
63
71
|
## Notes
|
64
72
|
|
65
73
|
The iOS Simulator is trying to cache your app icons. For this reason we've put in a significant refresh step!
|
66
|
-
Your app data and simulator are restarted
|
74
|
+
Your app data and simulator are restarted to refresh the icon to the latest version, which means your simulator will restart each time you build. It's a small but notable necessary evil.
|
67
75
|
|
68
76
|
Motion-rubberstamp _currently_ only checks for app icons in the `/resources`
|
69
77
|
path, regardless of what your Rakefile is configured for.
|
70
78
|
|
71
|
-
##
|
79
|
+
## Uninstall
|
80
|
+
#### Bye?
|
81
|
+
Rubberstamp will not stamp your archive/production apps. No need to leave us like that! But if you must...
|
72
82
|
|
73
|
-
Motion-rubberstamp duplicates your original icon files with `_base` suffixed counterparts.
|
74
83
|
To uninstall, simply run `rake rubberstamp:revert` to restore your original icons, then
|
75
84
|
delete motion-rubberstamp from your gemfile or rakefile.
|
76
85
|
|
86
|
+
#### Changing Icons?
|
87
|
+
If you have our starter icon, or you've changed your mind on your icon it's easy to switch!
|
88
|
+
Run `rake rubberstamp:revert` and then copy in your new icons to your resource folder.
|
89
|
+
|
77
90
|
## Contributing
|
78
91
|
|
79
92
|
I've probably made the file management more difficult and rigid than it needs to be, and I have no
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -30,28 +30,31 @@ namespace :rubberstamp do
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
+
# have we made base icons yet?
|
33
34
|
def installed?
|
34
35
|
icons = Dir.glob('resources/Icon*')
|
35
36
|
prexisting_base_icons = icons.map{|icon| icon.include?("base") }
|
36
37
|
prexisting_base_icons.include?(true)
|
37
38
|
end
|
38
39
|
|
40
|
+
# check if this app even has icons yet.
|
41
|
+
def has_icons?
|
42
|
+
Dir.glob('resources/Icon*').size > 0
|
43
|
+
end
|
44
|
+
|
39
45
|
# stub to check if the app needs to be restamped or not.
|
40
46
|
def updated?
|
41
47
|
true
|
42
48
|
end
|
43
49
|
|
44
|
-
#
|
45
|
-
def
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
Dir.glob("
|
50
|
-
|
51
|
-
|
52
|
-
rm_rf File.dirname(app_bundle)
|
53
|
-
break
|
54
|
-
end
|
50
|
+
# copy over rubberstamp icons to use!
|
51
|
+
def deploy_icons
|
52
|
+
lib_dir = File.dirname(__FILE__)
|
53
|
+
local_icons = File.join(lib_dir, "assets/*")
|
54
|
+
App.info "motion-rubberstamp", "Deploying Icons from #{local_icons}"
|
55
|
+
Dir.glob(File.join(lib_dir, "assets/*")).each do |icon|
|
56
|
+
App.info "motion", icon
|
57
|
+
FileUtils.cp(icon, './resources', :verbose => true)
|
55
58
|
end
|
56
59
|
end
|
57
60
|
|
@@ -71,10 +74,6 @@ namespace :rubberstamp do
|
|
71
74
|
git_branch = `git rev-parse --abbrev-ref HEAD`
|
72
75
|
|
73
76
|
caption = "v#{app_version} #{git_commit.strip} #{git_branch.strip}"
|
74
|
-
# process_icon("Icon_base.png", caption)
|
75
|
-
# process_icon("Icon@2x_base.png", caption)
|
76
|
-
# process_icon("Icon-72_base.png", caption)
|
77
|
-
# process_icon("Icon-72@2x_base.png", caption)
|
78
77
|
App.info "motion-rubberstamp", "Rubberstamping icons..."
|
79
78
|
Dir.glob('resources/*_base.png').each do |icon|
|
80
79
|
process_icon(icon, caption)
|
@@ -91,6 +90,7 @@ namespace :rubberstamp do
|
|
91
90
|
if installed?
|
92
91
|
raise("Error: It appears that motion-rubberstamp is already installed.")
|
93
92
|
else
|
93
|
+
deploy_icons unless has_icons?
|
94
94
|
Dir.glob('resources/Icon*').each do |icon|
|
95
95
|
FileUtils.cp(icon, icon.gsub('.png', '_base.png'), :verbose => true)
|
96
96
|
end
|
@@ -102,15 +102,13 @@ namespace :rubberstamp do
|
|
102
102
|
App.info "motion-rubberstamp", "Reverting icons to their original versions."
|
103
103
|
icons = Dir.glob('resources/Icon*_base.png')
|
104
104
|
icons.each do |icon|
|
105
|
-
FileUtils.
|
106
|
-
p "Restored #{icon.gsub('_base.png', '.png')})"
|
105
|
+
FileUtils.mv(icon, icon.gsub('_base.png', '.png'), :verbose => true)
|
107
106
|
end
|
108
107
|
end
|
109
108
|
|
110
109
|
desc "Deletes app and kills the simulator (for cache reasons)"
|
111
110
|
task :sim_clean do
|
112
|
-
App.info "motion-rubberstamp", "
|
113
|
-
wipe
|
111
|
+
App.info "motion-rubberstamp", "Closing simulator to clear cached icons"
|
114
112
|
scripts_dir = File.join(File.dirname(__FILE__), "scripts")
|
115
113
|
close_script = File.expand_path(File.join(scripts_dir, "close_simulator.applescript"))
|
116
114
|
|
data/lib/rubberstamp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-rubberstamp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Garrison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -51,6 +51,15 @@ files:
|
|
51
51
|
- README.md
|
52
52
|
- Rakefile
|
53
53
|
- lib/motion-rubberstamp.rb
|
54
|
+
- lib/motion/project/assets/.DS_Store
|
55
|
+
- lib/motion/project/assets/Icon-72.png
|
56
|
+
- lib/motion/project/assets/Icon-72@2x.png
|
57
|
+
- lib/motion/project/assets/Icon-Small-50.png
|
58
|
+
- lib/motion/project/assets/Icon-Small-50@2x.png
|
59
|
+
- lib/motion/project/assets/Icon-Small.png
|
60
|
+
- lib/motion/project/assets/Icon-Small@2x.png
|
61
|
+
- lib/motion/project/assets/Icon.png
|
62
|
+
- lib/motion/project/assets/Icon@2x.png
|
54
63
|
- lib/motion/project/rubberstamp.rb
|
55
64
|
- lib/motion/project/scripts/close_simulator.applescript
|
56
65
|
- lib/rubberstamp/version.rb
|
@@ -80,3 +89,4 @@ signing_key:
|
|
80
89
|
specification_version: 4
|
81
90
|
summary: Adds version and git information overlays to your iOS app icon
|
82
91
|
test_files: []
|
92
|
+
has_rdoc:
|