tug 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -11
- data/lib/tug/deployment/deployer.rb +7 -4
- data/lib/tug/deployment/notes_file_parser.rb +10 -0
- data/lib/tug/deployment/notes_parser.rb +20 -0
- data/lib/tug/interface/interface.rb +1 -0
- data/lib/tug/version.rb +1 -1
- data/lib/tug.rb +3 -1
- data/spec/deployer_spec.rb +3 -2
- data/spec/notes_file_parser_spec.rb +12 -0
- data/spec/output.txt +2 -0
- data/spec/release_notes_spec.rb +22 -0
- data/spec/spec_helper.rb +4 -0
- data/spec/test_notes.txt +1 -0
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5cb7e7608dd93ade99bb9d66231af0e3f9c5c8b9
|
4
|
+
data.tar.gz: 13d26a4e20c86f9b9c66926d2c125302d08b9464
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43d9868ee52f371d4f772671530c52abebe95cbc3148f2c03fea5b4b71cc13bf6d678a4ef6a0f9aa983ed8e2fbbbecb62b6cf31e2fbfbb738deb5db47d6d1ad8
|
7
|
+
data.tar.gz: 02cd175263f7f45e6fe330255e5f6d6a9482e9e3ea75e93fa873fbc26ee02e9340eecea1e5bd39f9ea62b28d688c0f9013304acbadf7dc5950ad254530ace81d
|
data/README.md
CHANGED
@@ -49,7 +49,7 @@ $ tug build
|
|
49
49
|
##### Options
|
50
50
|
|
51
51
|
```
|
52
|
-
-c, [--config
|
52
|
+
-c, [--config] # the tug config file to use (optional, defaults to .tug.yml)
|
53
53
|
```
|
54
54
|
|
55
55
|
### IPA
|
@@ -63,8 +63,8 @@ $ tug ipa
|
|
63
63
|
##### Options
|
64
64
|
|
65
65
|
```
|
66
|
-
-c, [--config
|
67
|
-
-e, [--export
|
66
|
+
-c, [--config] # the tug config file to use (optional, defaults to .tug.yml)
|
67
|
+
-e, [--export] # the directory to export the .ipa to (optional, defaults to current directory)
|
68
68
|
```
|
69
69
|
|
70
70
|
### Deploy
|
@@ -82,11 +82,12 @@ $ tug deploy testflight
|
|
82
82
|
###### Options
|
83
83
|
|
84
84
|
```
|
85
|
-
-f, [--file
|
86
|
-
-a, [--api-token
|
87
|
-
-t, [--team-token
|
88
|
-
-l, [--lists
|
89
|
-
-n, [--notify
|
85
|
+
-f, [--file] # path to an ipa to deploy (optional, searches current directory by default)
|
86
|
+
-a, [--api-token] # testflight api token (optional, environmental variable by default)
|
87
|
+
-t, [--team-token] # testflight tea, token (optional, environmental variable by default)
|
88
|
+
-l, [--lists] # testflight distrubution lists to send the buld to (optional, defaults to none)
|
89
|
+
-n, [--notify] # notify testflight users of the new build (optional, defaults to false)
|
90
|
+
-r, [--release-notes] # release notes for the build, can be plain text or a path to a file (optional)
|
90
91
|
```
|
91
92
|
|
92
93
|
>
|
@@ -105,9 +106,9 @@ $ tug provision
|
|
105
106
|
##### Options
|
106
107
|
|
107
108
|
```
|
108
|
-
-c, [--config
|
109
|
-
-k, [--keychain
|
110
|
-
-p, [--password
|
109
|
+
-c, [--config] # the tug config file to use (optional, defaults to .tug.yml)
|
110
|
+
-k, [--keychain] # the keychain to install the certificates to (optional, defaults to tug)
|
111
|
+
-p, [--password] # the password required to access your .p12 private key (optional, environment variable by default)
|
111
112
|
```
|
112
113
|
|
113
114
|
> The following environment variable is used to set your .p12 private key password
|
@@ -6,6 +6,7 @@ module Tug
|
|
6
6
|
attr_reader :team_token
|
7
7
|
attr_reader :lists
|
8
8
|
attr_reader :notify
|
9
|
+
attr_reader :notes
|
9
10
|
|
10
11
|
class << self
|
11
12
|
def deployer(options)
|
@@ -19,6 +20,7 @@ module Tug
|
|
19
20
|
@notify = options[:notify]
|
20
21
|
@api_token = options[:api_token]
|
21
22
|
@team_token = options[:team_token]
|
23
|
+
self.notes = options[:release_notes]
|
22
24
|
end
|
23
25
|
|
24
26
|
def deploy
|
@@ -27,16 +29,17 @@ module Tug
|
|
27
29
|
end
|
28
30
|
end
|
29
31
|
|
32
|
+
def notes=(notes)
|
33
|
+
parser = Tug::NotesParser.notes_parser(notes)
|
34
|
+
@notes = parser.notes
|
35
|
+
end
|
36
|
+
|
30
37
|
private
|
31
38
|
|
32
39
|
def url
|
33
40
|
"http://testflightapp.com/api/builds.json"
|
34
41
|
end
|
35
42
|
|
36
|
-
def notes
|
37
|
-
"This build was uploaded via Tug"
|
38
|
-
end
|
39
|
-
|
40
43
|
def params
|
41
44
|
params = "-F file=@#{ipa} "
|
42
45
|
params += "-F api_token='#{api_token}' "
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Tug
|
2
|
+
class NotesParser
|
3
|
+
|
4
|
+
attr_reader :notes
|
5
|
+
|
6
|
+
class << self
|
7
|
+
def notes_parser(notes)
|
8
|
+
if File.file? notes
|
9
|
+
Tug::NotesFileParser.new(notes)
|
10
|
+
else
|
11
|
+
Tug::NotesParser.new(notes)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def initialize(notes)
|
17
|
+
@notes = notes
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -8,6 +8,7 @@ module Tug
|
|
8
8
|
option :team_token, :aliases => "-t", :default => ENV['TUG_TESTFLIGHT_TEAM_TOKEN']
|
9
9
|
option :lists, :aliases => "-l"
|
10
10
|
option :notify, :aliases => "-n", :default => false
|
11
|
+
option :release_notes, :aliases => "-r", :default => "This build was uploaded via Tug"
|
11
12
|
def testflight
|
12
13
|
deployer = Tug::Deployer.deployer(options)
|
13
14
|
deployer.deploy
|
data/lib/tug/version.rb
CHANGED
data/lib/tug.rb
CHANGED
data/spec/deployer_spec.rb
CHANGED
@@ -7,7 +7,8 @@ describe Tug::Deployer do
|
|
7
7
|
:api_token => "api_token",
|
8
8
|
:team_token => "team_token",
|
9
9
|
:file => "test.ipa",
|
10
|
-
:notify => true
|
10
|
+
:notify => true,
|
11
|
+
:release_notes => "Notes"
|
11
12
|
}
|
12
13
|
|
13
14
|
@deployer = Tug::Deployer.deployer(@options)
|
@@ -42,7 +43,7 @@ describe Tug::Deployer do
|
|
42
43
|
end
|
43
44
|
|
44
45
|
it "should have some release notes" do
|
45
|
-
expect(IO).to receive(:popen).with(/-F notes='
|
46
|
+
expect(IO).to receive(:popen).with(/-F notes='Notes'/)
|
46
47
|
@deployer.deploy
|
47
48
|
end
|
48
49
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Tug::NotesFileParser do
|
4
|
+
|
5
|
+
describe "When parsing notes" do
|
6
|
+
|
7
|
+
it "should parse notes from a file" do
|
8
|
+
parser = Tug::NotesFileParser.new(release_notes_path)
|
9
|
+
expect(parser.notes).to match("Hello World")
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
data/spec/output.txt
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Tug::NotesParser do
|
4
|
+
|
5
|
+
describe "When returning a parser" do
|
6
|
+
|
7
|
+
it "should return a notes parser for plain text notes" do
|
8
|
+
expect(File).to receive(:file?).and_return(false)
|
9
|
+
expect(Tug::NotesParser.notes_parser("test")).to be_kind_of(Tug::NotesParser)
|
10
|
+
end
|
11
|
+
|
12
|
+
it "should return a notes file parser for file notes" do
|
13
|
+
expect(File).to receive(:file?).and_return(true)
|
14
|
+
|
15
|
+
file = double(File)
|
16
|
+
expect(file).to receive(:read)
|
17
|
+
expect(File).to receive(:open).and_return(file)
|
18
|
+
|
19
|
+
expect(Tug::NotesParser.notes_parser("test")).to be_kind_of(Tug::NotesFileParser)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/spec/spec_helper.rb
CHANGED
data/spec/test_notes.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Hello World
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Fish
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -107,6 +107,8 @@ files:
|
|
107
107
|
- lib/tug/config/config_file.rb
|
108
108
|
- lib/tug/config/missing_config_file.rb
|
109
109
|
- lib/tug/deployment/deployer.rb
|
110
|
+
- lib/tug/deployment/notes_file_parser.rb
|
111
|
+
- lib/tug/deployment/notes_parser.rb
|
110
112
|
- lib/tug/interface/interface.rb
|
111
113
|
- lib/tug/keychain/keychain.rb
|
112
114
|
- lib/tug/project/project.rb
|
@@ -121,9 +123,12 @@ files:
|
|
121
123
|
- spec/deployer_spec.rb
|
122
124
|
- spec/ipa_command_spec.rb
|
123
125
|
- spec/keychain_spec.rb
|
126
|
+
- spec/notes_file_parser_spec.rb
|
124
127
|
- spec/output.txt
|
125
128
|
- spec/project_spec.rb
|
129
|
+
- spec/release_notes_spec.rb
|
126
130
|
- spec/spec_helper.rb
|
131
|
+
- spec/test_notes.txt
|
127
132
|
- spec/xctool_spec.rb
|
128
133
|
- tug.gemspec
|
129
134
|
homepage: https://github.com/alexfish/tug
|
@@ -157,7 +162,10 @@ test_files:
|
|
157
162
|
- spec/deployer_spec.rb
|
158
163
|
- spec/ipa_command_spec.rb
|
159
164
|
- spec/keychain_spec.rb
|
165
|
+
- spec/notes_file_parser_spec.rb
|
160
166
|
- spec/output.txt
|
161
167
|
- spec/project_spec.rb
|
168
|
+
- spec/release_notes_spec.rb
|
162
169
|
- spec/spec_helper.rb
|
170
|
+
- spec/test_notes.txt
|
163
171
|
- spec/xctool_spec.rb
|