redbreast 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: acb449e6185cec29a8b5db4b37b9c2d1171a8cee
4
- data.tar.gz: ed1ca1fae6e110d58b10bf64368a3292fa60d213
3
+ metadata.gz: 22c722797f1f14175a60e950a437b8a911e513c1
4
+ data.tar.gz: cf567bc1622e84458528aa04e551fa9cc2da872d
5
5
  SHA512:
6
- metadata.gz: caeabd7ec6255affe9e59c2e5c56bd9bba1ada4bc0ae62a8294385df7cd141fedcdbe7995ed56b607b71f0215f7fec6668c9f4007914a2971551a22693ced72f
7
- data.tar.gz: 89e95780148d0e1ce307d1ac2965c96612663a9c1ac7910b3acfa686f4efd2a65033f5ac95930e6cba0c5d0879554e47cd232947e51ee947861a8e388d807e7e
6
+ metadata.gz: d501788cf54ae96fc178a77df69c4f6c40c478a1dc92cc1b1775089757aac6c71268bc67350b1002b6d77e7f1dfa781bf3425af4582dbc4a46b40ba9727404f8
7
+ data.tar.gz: 905824edaff3e1cf7de6f4d107ccd9a25a8355ebda8d4bb182543d4af5f3c62e0b15a5876c129f635a8e6a4e784d0749c05daa560218cdf0a61c8a3e7441109a
data/.DS_Store CHANGED
Binary file
data/exe/redbreast CHANGED
@@ -28,4 +28,14 @@ command :generate do |c|
28
28
  Redbreast::Command::TestGenerator.init
29
29
  end
30
30
  end
31
+ end
32
+
33
+ command :install do |c|
34
+ c.syntax = 'redbreast install'
35
+ c.description = 'Sets up file generator in your xcproject build phases. Whenewer you run a buld, new image names will be created'
36
+ c.action do |_args, options|
37
+ Redbreast::ErrorHandler.rescuable do
38
+ Redbreast::Command::ConfigurationInstaller.init
39
+ end
40
+ end
31
41
  end
@@ -0,0 +1,37 @@
1
+ require 'xcodeproj'
2
+
3
+ module Redbreast
4
+ module Command
5
+ class ConfigurationInstaller
6
+ include Helper::Terminal
7
+ include Helper::General
8
+
9
+ def self.init
10
+ new.call
11
+ end
12
+
13
+ def call
14
+ prompt.say("Adding generation script to xcode buid phases...")
15
+ project = fetch_project
16
+ configure_target project.targets.first
17
+ project.save()
18
+ success("Build phase setup!")
19
+ end
20
+
21
+ private
22
+
23
+ def fetch_project()
24
+ path = Dir.glob("*.xcodeproj").first
25
+ raise ".xcodeproj file not found" if path.nil?
26
+ project = Xcodeproj::Project.open(path)
27
+ end
28
+
29
+ def configure_target(target)
30
+ phase = target.new_shell_script_build_phase("Redbreast generate")
31
+ phase.shell_script = "redbreast generate"
32
+ end
33
+
34
+ end
35
+ end
36
+ end
37
+
@@ -1,3 +1,3 @@
1
1
  module Redbreast
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/redbreast.rb CHANGED
@@ -11,6 +11,7 @@ require "redbreast/helpers/hash"
11
11
  require "redbreast/commands/setup"
12
12
  require "redbreast/commands/image_generator"
13
13
  require "redbreast/commands/test_generator"
14
+ require "redbreast/commands/configuration_installer"
14
15
 
15
16
  # File Accessors
16
17
  require "redbreast/io/config"
data/redbreast.gemspec CHANGED
@@ -36,5 +36,6 @@ Gem::Specification.new do |spec|
36
36
  spec.add_dependency 'tty-prompt'
37
37
  spec.add_dependency 'commander'
38
38
  spec.add_dependency 'activesupport'
39
+ spec.add_dependency 'xcodeproj'
39
40
 
40
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redbreast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vlaho
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-31 00:00:00.000000000 Z
11
+ date: 2019-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: xcodeproj
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
97
111
  description:
98
112
  email:
99
113
  - vlaho.poluta@infinum.hr
@@ -115,6 +129,7 @@ files:
115
129
  - bin/setup
116
130
  - exe/redbreast
117
131
  - lib/redbreast.rb
132
+ - lib/redbreast/commands/configuration_installer.rb
118
133
  - lib/redbreast/commands/image_generator.rb
119
134
  - lib/redbreast/commands/setup.rb
120
135
  - lib/redbreast/commands/test_generator.rb