appsendr 0.0.2 → 0.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.
- data/Manifest +0 -1
- data/README.rdoc +25 -26
- data/appsendr.gemspec +3 -3
- data/lib/appsendr/client.rb +29 -22
- data/lib/appsendr/command.rb +2 -0
- data/lib/appsendr/commands/app.rb +29 -8
- data/lib/appsendr/commands/collaborators.rb +2 -2
- data/lib/appsendr/commands/testers.rb +10 -3
- data/lib/appsendr/constants.rb +1 -1
- metadata +6 -6
data/Manifest
CHANGED
data/README.rdoc
CHANGED
@@ -1,29 +1,16 @@
|
|
1
1
|
# == Synopsis
|
2
|
-
# Ruby command-line app that interacts with
|
2
|
+
# Ruby command-line app that interacts with Xcode and the AppSendr webservice
|
3
3
|
#
|
4
4
|
# == Examples
|
5
5
|
# Calling this in a Xcode project directory will build the project with an active configuration of AdHoc
|
6
|
-
# appsendr
|
6
|
+
# appsendr build AdHoc
|
7
7
|
#
|
8
8
|
# Other examples:
|
9
|
-
# appsendr
|
10
|
-
# appsendr --verbose
|
9
|
+
# appsendr deploy AdHoc
|
11
10
|
#
|
12
11
|
# == Usage
|
13
12
|
# appsendr [options]
|
14
13
|
#
|
15
|
-
# For help use: appsendr -h
|
16
|
-
#
|
17
|
-
# == Options
|
18
|
-
# -c, --active_config Sets the active configuration for the XCode project
|
19
|
-
# -u, --username Apple Developer portal username
|
20
|
-
# -p, --password Apple Developer portal password
|
21
|
-
# -d, --devices Path to profiles if different then devices.ad
|
22
|
-
# -h, --help Displays help message
|
23
|
-
# -v, --version Display the version, then exit
|
24
|
-
# -q, --quiet Output as little as possible, overrides verbose
|
25
|
-
# -V, --verbose Verbose output
|
26
|
-
#
|
27
14
|
#
|
28
15
|
# == Author
|
29
16
|
# Nolan Brown
|
@@ -35,16 +22,28 @@
|
|
35
22
|
|
36
23
|
=== General Commands
|
37
24
|
|
38
|
-
help
|
39
|
-
version
|
25
|
+
help # show this usage
|
26
|
+
version # show the gem version
|
27
|
+
|
28
|
+
list # list your apps
|
29
|
+
link # link your app with an exsiting one in appsendr
|
30
|
+
create <name> # create a new app
|
31
|
+
|
32
|
+
url # get the latest version install url. pass --copy to copy to the clipboard
|
33
|
+
|
34
|
+
build <active configuration> # build your xcode project and deploy
|
35
|
+
build:clean # clean your xcode project
|
36
|
+
|
37
|
+
deploy <active configuration> # deploy the current build. pass --notify to send notification to all testers
|
40
38
|
|
41
|
-
|
42
|
-
|
39
|
+
testers # list testers
|
40
|
+
testers:add <email> <name> # add a tester
|
41
|
+
testers:remove <email> # remove a tester
|
42
|
+
testers:clear # remove all testers
|
43
|
+
testers:notify <group> # notify testers about the latest build. group is optional.
|
43
44
|
|
44
|
-
|
45
|
-
testers:add <email> <name> #
|
46
|
-
testers:remove <email>
|
47
|
-
testers:clear
|
45
|
+
groups # list groups
|
48
46
|
|
49
|
-
|
50
|
-
|
47
|
+
collaborators # list collaborators
|
48
|
+
collaborators:add <email> # add collaborators
|
49
|
+
collaborators:remove <email> # add collaborators
|
data/appsendr.gemspec
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{appsendr}
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.3"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["AppSendr"]
|
9
|
-
s.date = %q{2010-12-
|
9
|
+
s.date = %q{2010-12-27}
|
10
10
|
s.default_executable = %q{appsendr}
|
11
11
|
s.description = %q{A gem that will build and distribute an iphone/ipad app to the web for remote install}
|
12
12
|
s.email = %q{nolanbrown@gmail.com}
|
13
13
|
s.executables = ["appsendr"]
|
14
14
|
s.extra_rdoc_files = ["README.rdoc", "bin/appsendr", "lib/appsendr.rb", "lib/appsendr/binary_plist.rb", "lib/appsendr/client.rb", "lib/appsendr/command.rb", "lib/appsendr/commands/app.rb", "lib/appsendr/commands/auth.rb", "lib/appsendr/commands/base.rb", "lib/appsendr/commands/build.rb", "lib/appsendr/commands/collaborators.rb", "lib/appsendr/commands/deploy.rb", "lib/appsendr/commands/help.rb", "lib/appsendr/commands/testers.rb", "lib/appsendr/commands/version.rb", "lib/appsendr/constants.rb", "lib/appsendr/helpers.rb"]
|
15
|
-
s.files = ["Manifest", "README.rdoc", "Rakefile", "
|
15
|
+
s.files = ["Manifest", "README.rdoc", "Rakefile", "bin/appsendr", "lib/appsendr.rb", "lib/appsendr/binary_plist.rb", "lib/appsendr/client.rb", "lib/appsendr/command.rb", "lib/appsendr/commands/app.rb", "lib/appsendr/commands/auth.rb", "lib/appsendr/commands/base.rb", "lib/appsendr/commands/build.rb", "lib/appsendr/commands/collaborators.rb", "lib/appsendr/commands/deploy.rb", "lib/appsendr/commands/help.rb", "lib/appsendr/commands/testers.rb", "lib/appsendr/commands/version.rb", "lib/appsendr/constants.rb", "lib/appsendr/helpers.rb", "terms", "appsendr.gemspec"]
|
16
16
|
s.homepage = %q{http://www.appsendr.com/gem}
|
17
17
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Appsendr", "--main", "README.rdoc"]
|
18
18
|
s.require_paths = ["lib"]
|
data/lib/appsendr/client.rb
CHANGED
@@ -42,79 +42,84 @@ class AppSendr::Client
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def authenticate
|
45
|
-
post('/api/user/authenticate');
|
45
|
+
post('/api/user/authenticate.json');
|
46
46
|
end
|
47
47
|
|
48
48
|
def list
|
49
|
-
|
49
|
+
get('/api/user/apps.json')
|
50
50
|
end
|
51
51
|
|
52
52
|
def link(id)
|
53
|
-
|
53
|
+
get('/api/app/show/'+id.to_s+'.json');
|
54
|
+
end
|
55
|
+
def current_version(app_id)
|
56
|
+
get('/api/app/versions/'+app_id.to_s+'.json',{:limit=>1})
|
54
57
|
end
|
55
58
|
|
56
|
-
def
|
57
|
-
|
59
|
+
def versions(app_id)
|
60
|
+
get('/api/app/versions/'+app_id.to_s+'.json')
|
58
61
|
end
|
59
62
|
|
60
63
|
def create(name)
|
61
|
-
|
64
|
+
post('/api/app/create.json', {:name=>name})
|
62
65
|
end
|
63
66
|
|
64
67
|
def add_tester(app_id,email,name,udid=nil)
|
65
|
-
post('/api/
|
68
|
+
post('/api/tester/create.json',{:email=>email, :name=>name, :app_id=>app_id.to_s});
|
66
69
|
end
|
67
70
|
|
68
71
|
def remove_tester(app_id,email)
|
69
|
-
post('/api/
|
72
|
+
post('/api/tester/destroy.json',{:email=>email, :app_id=>app_id.to_s});
|
70
73
|
end
|
71
74
|
|
72
75
|
def clear_testers(app_id)
|
73
|
-
delete('/api/
|
76
|
+
delete('/api/tester/clear.json',{:app_id=>app_id.to_s});
|
74
77
|
end
|
75
78
|
|
76
79
|
def add_group(app_id,name)
|
77
|
-
post('/api/
|
80
|
+
post('/api/group/create.json',{:name=>name,:app_id=>app_id.to_s});
|
78
81
|
end
|
79
82
|
|
80
83
|
def remove_group(app_id, name)
|
81
|
-
post('/api/
|
84
|
+
post('/api/group/destroy.json',{:name=>name,:app_id=>app_id.to_s});
|
82
85
|
end
|
83
86
|
|
84
87
|
def groups(app_id)
|
85
|
-
|
88
|
+
get('/api/app/groups/'+app_id.to_s+'.json')
|
86
89
|
end
|
87
90
|
|
88
91
|
### add_collaborator
|
89
92
|
|
90
93
|
def add_collaborator(app_id,emaill)
|
91
|
-
post('/api/
|
94
|
+
post('/api/collaborator/create.json',{:email=>email,:app_id=>app_id.to_s});
|
92
95
|
end
|
93
96
|
|
94
97
|
def remove_collaborator(app_id,email)
|
95
|
-
post('/api/
|
98
|
+
post('/api/collaborator/destroy.json',{:email=>email,:app_id=>app_id.to_s});
|
96
99
|
end
|
97
100
|
|
98
101
|
def collaborators(app_id)
|
99
|
-
|
102
|
+
get('/api/app/collaborators/'+app_id.to_s+'.json')
|
100
103
|
end
|
101
104
|
|
102
105
|
def testers(app_id)
|
103
|
-
|
106
|
+
get('/api/app/testers/'+app_id.to_s+'.json')
|
104
107
|
end
|
105
108
|
def notify(app_id)
|
106
|
-
|
109
|
+
get('/api/app/notify/'+app_id.to_s+'.json')
|
107
110
|
end
|
108
111
|
|
109
112
|
def upload(app_id, ipa,provisioning,notify, notes, bundle_id, icon)
|
110
113
|
params = {
|
111
|
-
:
|
114
|
+
:provisioning_profile => File.new(provisioning, 'rb'),
|
112
115
|
:notes=>notes,
|
113
116
|
:bundle_identifier => bundle_id,
|
114
117
|
:built_at=>Time.now,
|
115
|
-
:notify=>notify
|
118
|
+
:notify=>notify,
|
119
|
+
:app_id => app_id.to_s
|
116
120
|
# :ipa=>
|
117
121
|
}
|
122
|
+
|
118
123
|
if icon
|
119
124
|
params[:icon] = File.new(icon,'rb')
|
120
125
|
end
|
@@ -123,7 +128,7 @@ class AppSendr::Client
|
|
123
128
|
else
|
124
129
|
params[:ipa] = File.new(ipa, 'rb')
|
125
130
|
|
126
|
-
post('/api/
|
131
|
+
post('/api/version/create/', {:version=>params})
|
127
132
|
end
|
128
133
|
end
|
129
134
|
|
@@ -158,12 +163,14 @@ class AppSendr::Client
|
|
158
163
|
|
159
164
|
def get(uri,params={})
|
160
165
|
params[:api_key] ||= @api_key
|
161
|
-
RestClient.get @resource.url+uri, {:params=>params}
|
166
|
+
resp = RestClient.get @resource.url+uri, {:params=>params}
|
167
|
+
JSON.parse(resp)
|
162
168
|
#@resource[uri].get(api_params(params))#, :content_type => 'application/json')
|
163
169
|
end
|
164
170
|
def post(uri,params={})
|
165
171
|
params[:api_key] ||= @api_key
|
166
|
-
@resource[uri].post(params)#, :content_type => 'application/json')
|
172
|
+
resp = @resource[uri].post(params)#, :content_type => 'application/json')
|
173
|
+
JSON.parse(resp)
|
167
174
|
end
|
168
175
|
|
169
176
|
def delete(uri,params={})
|
data/lib/appsendr/command.rb
CHANGED
@@ -10,7 +10,7 @@ module AppSendr::Command
|
|
10
10
|
display "=== Your apps"
|
11
11
|
i = 0
|
12
12
|
display list["message"].map {|app, id|
|
13
|
-
"#{i+=1}. #{app['
|
13
|
+
"#{i+=1}. #{app['name'].ljust(35)}"
|
14
14
|
}.join("\n")
|
15
15
|
else
|
16
16
|
display "You have no apps."
|
@@ -28,7 +28,7 @@ module AppSendr::Command
|
|
28
28
|
name = args.join(" ").strip
|
29
29
|
resp = appsendr.create(name)
|
30
30
|
make_appsendr_dir if resp['message']
|
31
|
-
@app = [resp['message']['
|
31
|
+
@app = [resp['message']['id'],resp['message']['name']]
|
32
32
|
write_app
|
33
33
|
display "Your app has been created."
|
34
34
|
|
@@ -38,10 +38,10 @@ module AppSendr::Command
|
|
38
38
|
def url
|
39
39
|
if in_project_dir?
|
40
40
|
|
41
|
-
resp = appsendr.
|
41
|
+
resp = appsendr.current_version(get_app_id)
|
42
42
|
if resp["message"].size > 0
|
43
43
|
display "=== Your last install url is:"
|
44
|
-
url = resp["message"][
|
44
|
+
url = resp["message"][0]['install_url']
|
45
45
|
display url
|
46
46
|
do_copy = option_exists?('--copy', false)
|
47
47
|
if do_copy
|
@@ -66,7 +66,10 @@ module AppSendr::Command
|
|
66
66
|
|
67
67
|
link = appsendr.link(app['id'])
|
68
68
|
make_appsendr_dir if link
|
69
|
-
|
69
|
+
name = link['message']['name'] || app['name']
|
70
|
+
aid = link['message']['id'] || app['id']
|
71
|
+
|
72
|
+
@app = [aid,name]
|
70
73
|
write_app
|
71
74
|
display "Your app has been linked."
|
72
75
|
|
@@ -83,8 +86,8 @@ module AppSendr::Command
|
|
83
86
|
display "=== Your apps"
|
84
87
|
i = 0
|
85
88
|
list["message"].each{|app|
|
86
|
-
apps.push({"name"=>app['
|
87
|
-
lines.push("#{i+=1}. #{app['
|
89
|
+
apps.push({"name"=>app['name'], "id"=>app['id']})
|
90
|
+
lines.push("#{i+=1}. #{app['name'].ljust(35)}")
|
88
91
|
}
|
89
92
|
display lines.join("\n")
|
90
93
|
print "\n"
|
@@ -106,7 +109,7 @@ module AppSendr::Command
|
|
106
109
|
display "=== Your groups"
|
107
110
|
i = 0
|
108
111
|
display groups["message"].map {|app, id|
|
109
|
-
"#{i+=1}. #{app['
|
112
|
+
"#{i+=1}. #{app['name'].ljust(35)}"
|
110
113
|
}.join("\n")
|
111
114
|
else
|
112
115
|
display "You have no groups."
|
@@ -116,6 +119,24 @@ module AppSendr::Command
|
|
116
119
|
end
|
117
120
|
end
|
118
121
|
|
122
|
+
|
123
|
+
def versions
|
124
|
+
if in_project_dir?
|
125
|
+
|
126
|
+
groups = appsendr.versions(get_app_id)
|
127
|
+
if groups["message"].size > 0
|
128
|
+
display "=== Your versions"
|
129
|
+
i = 0
|
130
|
+
display groups["message"].map {|app, id|
|
131
|
+
"#{i+=1}. #{app['notes']} #{app['install_url']}"
|
132
|
+
}.join("\n")
|
133
|
+
else
|
134
|
+
display "You have no version."
|
135
|
+
end
|
136
|
+
else
|
137
|
+
error("You are not in a project directory")
|
138
|
+
end
|
139
|
+
end
|
119
140
|
# def info
|
120
141
|
# name = (args.first && !args.first =~ /^\-\-/) ? args.first : extract_app
|
121
142
|
# attrs = appsendr.info(name)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module AppSendr::Command
|
2
|
-
class
|
2
|
+
class Collaborators < Build ## Inherhits from Deploy
|
3
3
|
|
4
4
|
def index
|
5
5
|
if in_project_dir?
|
@@ -13,7 +13,7 @@ module AppSendr::Command
|
|
13
13
|
display "=== Your collaborators"
|
14
14
|
i = 0
|
15
15
|
display testers["message"].map {|app, id|
|
16
|
-
"#{i+=1}. #{app['
|
16
|
+
"#{i+=1}. #{app['name']} - #{app['email']}"
|
17
17
|
}.join("\n")
|
18
18
|
else
|
19
19
|
display "You have no collaborators."
|
@@ -12,7 +12,7 @@ module AppSendr::Command
|
|
12
12
|
display "=== Your testers"
|
13
13
|
i = 0
|
14
14
|
display testers["message"].map {|app, id|
|
15
|
-
"#{i+=1}. #{app['
|
15
|
+
"#{i+=1}. #{app['name']} - #{app['email']}"
|
16
16
|
}.join("\n")
|
17
17
|
else
|
18
18
|
display "You have no testers."
|
@@ -39,8 +39,15 @@ module AppSendr::Command
|
|
39
39
|
name = args.join(" ").strip
|
40
40
|
f.puts "#{email},#{name}"
|
41
41
|
f.close
|
42
|
-
|
43
|
-
appsendr.add_tester(read_app_id,email,name)
|
42
|
+
begin
|
43
|
+
response = appsendr.add_tester(read_app_id,email,name)
|
44
|
+
rescue RestClient::RequestFailed => e
|
45
|
+
display "=== Errors"
|
46
|
+
response = JSON.parse(e.http_body)
|
47
|
+
response['message'].each{|err|
|
48
|
+
display err.join(" ")
|
49
|
+
}
|
50
|
+
end
|
44
51
|
|
45
52
|
end
|
46
53
|
end
|
data/lib/appsendr/constants.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appsendr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- AppSendr
|
@@ -15,8 +15,8 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-12-
|
19
|
-
default_executable:
|
18
|
+
date: 2010-12-27 00:00:00 -08:00
|
19
|
+
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: rest-client
|
@@ -106,7 +106,6 @@ files:
|
|
106
106
|
- Manifest
|
107
107
|
- README.rdoc
|
108
108
|
- Rakefile
|
109
|
-
- appsendr.gemspec
|
110
109
|
- bin/appsendr
|
111
110
|
- lib/appsendr.rb
|
112
111
|
- lib/appsendr/binary_plist.rb
|
@@ -124,6 +123,7 @@ files:
|
|
124
123
|
- lib/appsendr/constants.rb
|
125
124
|
- lib/appsendr/helpers.rb
|
126
125
|
- terms
|
126
|
+
- appsendr.gemspec
|
127
127
|
has_rdoc: true
|
128
128
|
homepage: http://www.appsendr.com/gem
|
129
129
|
licenses: []
|