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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0acac725429a09aaf834579172f504893e01a9af
4
- data.tar.gz: 4f73d8cafac08127724a8cb077f837850f983001
3
+ metadata.gz: 8c1caf259f62c8fc228cfb09c73f609a8137449c
4
+ data.tar.gz: f887ce4da91cd691db6603851b532d421645ea30
5
5
  SHA512:
6
- metadata.gz: 01beb3e7a9397d2ab30676c4d6e5dd8a487c802a68824c766734bd425152a7d486330ec9a0f2a0bc4613c8a494f271bebca1dcaf051297f8b35cd588b644b2a3
7
- data.tar.gz: a8614b060a292b34b1bb4b976119c89890281db927afb43d76a1e14eb33f8dfad5fda804c42fe84c8a216006994000911bfb7e51cc08f9c69e39064cc02a661a
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"
@@ -1,3 +1,3 @@
1
1
  module ConstraintClean
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -2,7 +2,10 @@ require "constraintClean/version"
2
2
  require 'nokogiri'
3
3
 
4
4
  def cleanupConstraints(file)
5
-
5
+
6
+ print "\r #{file}"
7
+ STDOUT.flush
8
+
6
9
  f = File.open(file)
7
10
  doc = Nokogiri::XML(f)
8
11
  f.close
@@ -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.2
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-06-30 00:00:00.000000000 Z
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: '0'
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: Simple gem to cleanup all your storyboard and xib files from useless
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
- homepage: http://rubygems.org/gems/constraintClean
84
+ - lib/version_update.rb
85
+ homepage: https://github.com/kohtenko/KOConstraintClean
68
86
  licenses:
69
87
  - MIT
70
88
  metadata: {}