frameit 2.6.1 → 2.6.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 +4 -4
- data/bin/frameit +3 -3
- data/lib/frameit/options.rb +25 -5
- data/lib/frameit/runner.rb +6 -1
- data/lib/frameit/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae5b2a61b61d15ef95e284805becd33d3065083a
|
4
|
+
data.tar.gz: 3fbf7039b8199813d8a6ee553eb87d3759ced1d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d75de50c72ad4ae38c93897140d1f334c567c25a585f1f82ec2ed44fc370d6f046a3da0a8c03aa578917f4934a66493776fe98fc011169af98d0201038f7f686
|
7
|
+
data.tar.gz: cd98080626e3d436cc3e916fd585f1928d25d2d00b35a57291ec58816b483dd1d0334686ae8d4a2cc41c79ce94f1f644b26e7dc0dae6461930dfe64012baf30a
|
data/bin/frameit
CHANGED
@@ -21,15 +21,15 @@ class FrameItApplication
|
|
21
21
|
global_option('--verbose') { $verbose = true }
|
22
22
|
FastlaneCore::CommanderGenerator.new.generate(Frameit::Options.available_options)
|
23
23
|
|
24
|
-
default_command :
|
24
|
+
default_command :run
|
25
25
|
|
26
|
-
command :
|
26
|
+
command :run do |c|
|
27
27
|
c.syntax = 'frameit black'
|
28
28
|
c.description = "Adds a black frame around all screenshots."
|
29
29
|
|
30
30
|
c.action do |args, options|
|
31
31
|
load_config(options)
|
32
|
-
Frameit::Runner.new.run('.',
|
32
|
+
Frameit::Runner.new.run('.', nil)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
data/lib/frameit/options.rb
CHANGED
@@ -2,12 +2,32 @@ module Frameit
|
|
2
2
|
class Options
|
3
3
|
def self.available_options
|
4
4
|
@options ||= [
|
5
|
-
|
6
|
-
|
5
|
+
|
6
|
+
FastlaneCore::ConfigItem.new(key: :white,
|
7
|
+
env_name: "FRAMEIT_WHITE_FRAME",
|
8
|
+
description: "Use white device frames",
|
9
|
+
optional: true,
|
10
|
+
is_string: false),
|
11
|
+
FastlaneCore::ConfigItem.new(key: :silver,
|
12
|
+
description: "Use white device frames. Alias for :white",
|
13
|
+
optional: true,
|
14
|
+
is_string: false),
|
15
|
+
FastlaneCore::ConfigItem.new(key: :force_device_type,
|
16
|
+
env_name: "FRAMEIT_FORCE_DEVICE_TYPE",
|
17
|
+
description: "Forces a given device type, useful for Mac screenshots, as their sizes vary",
|
7
18
|
optional: true,
|
8
|
-
|
9
|
-
|
10
|
-
|
19
|
+
verify_block: proc do |value|
|
20
|
+
available = ['iPhone_6_Plus', 'iPhone_5s', 'iPhone_4', 'iPad_mini', 'Mac']
|
21
|
+
unless available.include? value
|
22
|
+
UI.user_error!("Invalid device type '#{value}'. Available values: #{available}")
|
23
|
+
end
|
24
|
+
end),
|
25
|
+
FastlaneCore::ConfigItem.new(key: :use_legacy_iphone5s,
|
26
|
+
env_name: "FRAMEIT_USE_LEGACY_IPHONE_5_S",
|
27
|
+
optional: true,
|
28
|
+
is_string: false,
|
29
|
+
description: "use iPhone 5s instead of iPhone SE frames",
|
30
|
+
default_value: false)
|
11
31
|
]
|
12
32
|
end
|
13
33
|
end
|
data/lib/frameit/runner.rb
CHANGED
@@ -14,7 +14,12 @@ module Frameit
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
def run(path, color =
|
17
|
+
def run(path, color = nil)
|
18
|
+
unless color
|
19
|
+
color = Frameit::Color::BLACK
|
20
|
+
color = Frameit::Color::SILVER if Frameit.config[:white] || Frameit.config[:silver]
|
21
|
+
end
|
22
|
+
|
18
23
|
screenshots = Dir.glob("#{path}/**/*.{png,PNG}").uniq # uniq because thanks to {png,PNG} there are duplicates
|
19
24
|
|
20
25
|
if screenshots.count > 0
|
data/lib/frameit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: frameit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.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: 2016-05-
|
11
|
+
date: 2016-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane_core
|
@@ -258,7 +258,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
258
258
|
version: '0'
|
259
259
|
requirements: []
|
260
260
|
rubyforge_project:
|
261
|
-
rubygems_version: 2.
|
261
|
+
rubygems_version: 2.6.2
|
262
262
|
signing_key:
|
263
263
|
specification_version: 4
|
264
264
|
summary: Quickly put your screenshots into the right device frames
|