constraintClean 1.0.2 → 1.0.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 +4 -4
- data/bin/constraintClean +5 -0
- data/lib/constraintClean/version.rb +1 -1
- data/lib/constraintClean.rb +4 -1
- data/lib/version_update.rb +17 -0
- metadata +27 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c1caf259f62c8fc228cfb09c73f609a8137449c
|
4
|
+
data.tar.gz: f887ce4da91cd691db6603851b532d421645ea30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a65d53a17f183a5f40f47a4a642178b77c4c42edf273dbe01c73942ed97e0fd962f3479dea28ae8495707c669ef77b93568bd3e37b6a42460a80ef0670cc5862
|
7
|
+
data.tar.gz: f62606f5945b5e058fd62a018f53ed3ec3bbbd1ac7a32f797301ade26c6fa792ab55682e8f929d174971435d003d00e449e78a69631af32ba68fa8b774c8ef74
|
data/bin/constraintClean
CHANGED
@@ -1,9 +1,14 @@
|
|
1
1
|
#!/usr/bin/ruby
|
2
2
|
|
3
3
|
require 'constraintClean'
|
4
|
+
require 'version_update'
|
5
|
+
|
6
|
+
notifyAboutUpdates
|
4
7
|
|
5
8
|
files = Dir.glob("**/*.{storyboard,xib}")
|
6
9
|
files.each{ |file| cleanupConstraints(file)}
|
10
|
+
print "\r"
|
11
|
+
STDOUT.flush
|
7
12
|
|
8
13
|
if files.count == 0
|
9
14
|
p "There is no any 'storyboard' or 'xib' files"
|
data/lib/constraintClean.rb
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'open-uri'
|
2
|
+
require 'json'
|
3
|
+
require 'colorize'
|
4
|
+
|
5
|
+
def notifyAboutUpdates
|
6
|
+
json_object = JSON.parse(open("https://rubygems.org/api/v1/versions/constraintClean/latest.json").read)
|
7
|
+
highest_version = Gem.loaded_specs['constraintClean'].version.to_s
|
8
|
+
if json_object["version"].nil?
|
9
|
+
return
|
10
|
+
end
|
11
|
+
if json_object["version"] > highest_version
|
12
|
+
puts "Updates are available!".green
|
13
|
+
puts "Your current version of constraintClean is #{highest_version}".green
|
14
|
+
puts "Run 'gem update constraintClean' to get latest version #{json_object['version']}".green
|
15
|
+
puts ""
|
16
|
+
end
|
17
|
+
end
|
metadata
CHANGED
@@ -1,29 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: constraintClean
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oleg Kohtenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '1.6'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: colorize
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.7'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
40
|
+
version: '0.7'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,8 +66,11 @@ dependencies:
|
|
52
66
|
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '10.0'
|
55
|
-
description:
|
56
|
-
constraints.
|
69
|
+
description: |
|
70
|
+
Simple gem to cleanup all your storyboard and xib files from useless constraints.
|
71
|
+
Are you tired from uncountable constraints you don't need anymore? Xcode's interface builder thinks it's smart enough and keep all constraints you remove in case you want use them with `Size Classes`, but in most cases you just don't want it anymore!
|
72
|
+
|
73
|
+
If you use some constraint for `Size Classes` it will not be removed! Constraints removed only if they are really useless.
|
57
74
|
email:
|
58
75
|
- kohtenko@gmail.com
|
59
76
|
executables:
|
@@ -64,7 +81,8 @@ files:
|
|
64
81
|
- bin/constraintClean
|
65
82
|
- lib/constraintClean.rb
|
66
83
|
- lib/constraintClean/version.rb
|
67
|
-
|
84
|
+
- lib/version_update.rb
|
85
|
+
homepage: https://github.com/kohtenko/KOConstraintClean
|
68
86
|
licenses:
|
69
87
|
- MIT
|
70
88
|
metadata: {}
|