frameit 0.2.1 → 0.2.2

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: a2ea29a316f0210690c660402f312fc0e12a6f5f
4
- data.tar.gz: 660f85edcfac5539b7557da44c8f515e28e1620a
3
+ metadata.gz: 8b732092e13bc8a83c2a7a6f6d08fbb64a30a0d5
4
+ data.tar.gz: ca2ee3fc3416cd3f1f195c72cccdd49b3af8d987
5
5
  SHA512:
6
- metadata.gz: 7e24f34f1c9c13e65a5ee7b58c9df5f0b2554e49ba45dbc95cd1f3fd45886c3197714857e4ad009762190c84e3b8568cc3c4ed6af43e21078c02ac2a16a45c76
7
- data.tar.gz: e1b03f88f26ca92b933cd8e9737cd5e6458a8fac3fc34b3a93c33613470c30ee6d9a99c65b4ad530360e00b9116364ac1dfb36ef60775f7cf0ebc3883d3c5be5
6
+ metadata.gz: 583447f92f51ef7374c71ba8b7804298f0603e2b841bb1a511f5c0771eec0ee8dc854f8afaa5f5e0d7baaae301000e386f543b081ffcd1c5ed171b29a6468042
7
+ data.tar.gz: 2ca9c583de5ebb7f11538bbb65c74117c8a3136f97890772a603c99466c93f4ee531daa9959e92436d2675b015c72b9d511224df7b4fcc455f468fc3a5c15628
data/README.md CHANGED
@@ -10,7 +10,8 @@
10
10
  <a href="https://github.com/KrauseFx/snapshot">snapshot</a> &bull;
11
11
  <b>frameit</b> &bull;
12
12
  <a href="https://github.com/KrauseFx/PEM">PEM</a> &bull;
13
- <a href="https://github.com/KrauseFx/sigh">sigh</a>
13
+ <a href="https://github.com/KrauseFx/sigh">sigh</a> &bull;
14
+ <a href="https://github.com/KrauseFx/produce">produce</a>
14
15
  </p>
15
16
  -------
16
17
 
@@ -107,6 +108,7 @@ To run the setup process again to add new frames use:
107
108
  - [`snapshot`](https://github.com/KrauseFx/snapshot): Automate taking localized screenshots of your iOS app on every device
108
109
  - [`PEM`](https://github.com/KrauseFx/pem): Automatically generate and renew your push notification profiles
109
110
  - [`sigh`](https://github.com/KrauseFx/sigh): Because you would rather spend your time building stuff than fighting provisioning
111
+ - [`produce`](https://github.com/KrauseFx/produce): Create new iOS apps on iTunes Connect and Dev Portal using the command line
110
112
 
111
113
  ## Generate screenshots
112
114
  Check out [```Snapshot```](https://github.com/KrauseFx/snapshot) to automatically generate screenshots using ```UI Automation```.
@@ -119,7 +121,7 @@ You can use [SimulatorStatusMagic](https://github.com/shinydevelopment/Simulator
119
121
  - ```rm -rf ~/.frameit```
120
122
 
121
123
  # Need help?
122
- - If there is a technical problem with ```frameit```, submit an issue. Run ```frameit --trace``` to get the stacktrace.
124
+ - If there is a technical problem with ```frameit```, submit an issue.
123
125
  - I'm available for contract work - drop me an email: frameit@krausefx.com
124
126
 
125
127
  # License
data/bin/frameit CHANGED
@@ -16,7 +16,7 @@ program :help, 'Website', 'http://fastlane.tools'
16
16
  program :help, 'GitHub', 'https://github.com/krausefx/frameit'
17
17
  program :help_formatter, :compact
18
18
 
19
- global_option('--verbose') { $verbose = true }
19
+ always_trace!
20
20
 
21
21
 
22
22
  default_command :black
@@ -49,8 +49,4 @@ command :setup do |c|
49
49
  end
50
50
  end
51
51
 
52
- alias_command :white, :silver
53
-
54
- def shared_run(c)
55
- c.description = 'Find all screenshots in current folder and put a nice frame around it. This will duplicate the images.'
56
- end
52
+ alias_command :white, :silver
data/lib/frameit.rb CHANGED
@@ -1,17 +1,14 @@
1
- require 'json'
2
1
  require 'mini_magick'
3
2
  require 'frameit/version'
4
- require 'frameit/helper'
5
3
  require 'frameit/frame_converter'
6
4
  require 'frameit/editor'
7
- require 'frameit/update_checker'
8
5
  require 'frameit/dependency_checker'
9
- require 'deliver'
10
6
 
11
- # Third Party code
12
- require 'colored'
7
+ require 'fastlane_core'
13
8
 
14
9
  module Frameit
15
- Frameit::UpdateChecker.verify_latest_version
10
+ Helper = FastlaneCore::Helper # you gotta love Ruby: Helper.* should use the Helper class contained in FastlaneCore
11
+
12
+ FastlaneCore::UpdateChecker.verify_latest_version('frameit', Frameit::VERSION)
16
13
  Frameit::DependencyChecker.check_dependencies
17
14
  end
@@ -1,3 +1,4 @@
1
+ require 'deliver'
1
2
  require 'fastimage'
2
3
 
3
4
  module Frameit
@@ -48,6 +49,7 @@ module Frameit
48
49
  end
49
50
 
50
51
  output_path = screenshot.gsub('.png', '_framed.png').gsub('.PNG', '_framed.png')
52
+ result.format "png"
51
53
  result.write output_path
52
54
  Helper.log.info "Added frame: '#{File.expand_path(output_path)}'".green
53
55
  end
@@ -1,3 +1,3 @@
1
1
  module Frameit
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frameit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-19 00:00:00.000000000 Z
11
+ date: 2015-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: json
14
+ name: fastlane_core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - '>='
@@ -24,48 +24,6 @@ dependencies:
24
24
  - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: highline
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ~>
32
- - !ruby/object:Gem::Version
33
- version: 1.6.21
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ~>
39
- - !ruby/object:Gem::Version
40
- version: 1.6.21
41
- - !ruby/object:Gem::Dependency
42
- name: colored
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - '>='
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: commander
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ~>
60
- - !ruby/object:Gem::Version
61
- version: 4.2.0
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ~>
67
- - !ruby/object:Gem::Version
68
- version: 4.2.0
69
27
  - !ruby/object:Gem::Dependency
70
28
  name: fastimage
71
29
  requirement: !ruby/object:Gem::Requirement
@@ -207,8 +165,6 @@ files:
207
165
  - lib/frameit/dependency_checker.rb
208
166
  - lib/frameit/editor.rb
209
167
  - lib/frameit/frame_converter.rb
210
- - lib/frameit/helper.rb
211
- - lib/frameit/update_checker.rb
212
168
  - lib/frameit/version.rb
213
169
  homepage: http://fastlane.tools
214
170
  licenses:
@@ -1,51 +0,0 @@
1
- require 'logger'
2
-
3
- module Frameit
4
- class Helper
5
-
6
-
7
- # Logging happens using this method
8
- def self.log
9
- if is_test?
10
- @@log ||= Logger.new(STDOUT) # don't show any logs when running tests
11
- else
12
- @@log ||= Logger.new(STDOUT)
13
- end
14
-
15
- @@log.formatter = proc do |severity, datetime, progname, msg|
16
- string = "#{severity} [#{datetime.strftime('%Y-%m-%d %H:%M:%S.%2N')}]: "
17
- second = "#{msg}\n"
18
-
19
- if severity == "DEBUG"
20
- string = string.magenta
21
- elsif severity == "INFO"
22
- string = string.white
23
- elsif severity == "WARN"
24
- string = string.yellow
25
- elsif severity == "ERROR"
26
- string = string.red
27
- elsif severity == "FATAL"
28
- string = string.red.bold
29
- end
30
-
31
-
32
- [string, second].join("")
33
- end
34
-
35
- @@log
36
- end
37
-
38
- # @return true if the currently running program is a unit test
39
- def self.is_test?
40
- defined?SpecHelper
41
- end
42
-
43
- # @return the full path to the Xcode developer tools of the currently
44
- # running system
45
- def self.xcode_path
46
- return "" if self.is_test? and not OS.mac?
47
- `xcode-select -p`.gsub("\n", '') + "/"
48
- end
49
-
50
- end
51
- end
@@ -1,45 +0,0 @@
1
- require 'open-uri'
2
-
3
- module Frameit
4
- # Verifies, the user runs the latest version of this gem
5
- class UpdateChecker
6
- # This method will check if the latest version is installed and show a warning if that's not the case
7
- def self.verify_latest_version
8
- if self.update_available?
9
- v = fetch_latest
10
- puts '#######################################################################'.green
11
- puts "# FrameIt #{v} is available.".green
12
- puts "# It is recommended to use the latest version.".green
13
- puts "# Update using '(sudo) gem update frameit'.".green
14
- puts "# To see what's new, open https://github.com/KrauseFx/frameit/releases.".green
15
- puts '#######################################################################'.green
16
- return true
17
- end
18
- false
19
- end
20
-
21
- # Is a new official release available (this does not include pre-releases)
22
- def self.update_available?
23
- begin
24
- latest = fetch_latest
25
- if latest and Gem::Version.new(latest) > Gem::Version.new(current_version)
26
- return true
27
- end
28
- rescue => ex
29
- Helper.log.debug(ex)
30
- Helper.log.error("Could not check if 'frameit' is up to date.")
31
- end
32
- return false
33
- end
34
-
35
- # The currently used version of this gem
36
- def self.current_version
37
- Frameit::VERSION
38
- end
39
-
40
- private
41
- def self.fetch_latest
42
- JSON.parse(open("http://rubygems.org/api/v1/gems/frameit.json").read)["version"]
43
- end
44
- end
45
- end