dryrun 1.1.4 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile.lock +28 -30
- data/README.md +4 -7
- data/docs/css/main.css +76 -0
- data/docs/index.html +73 -0
- data/docs/js/index.js +42 -0
- data/docs/js/vendor/.keep +0 -0
- data/docs/res/.keep +0 -0
- data/dryrun.gemspec +1 -1
- data/facelift.json +30 -0
- data/lib/dryrun.rb +3 -3
- data/lib/dryrun/android_project.rb +20 -13
- data/lib/dryrun/dryrun_utils.rb +2 -2
- data/lib/dryrun/version.rb +1 -1
- metadata +14 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e625af732d2cac1a7ff91456df893ed554ebf86cabbaaa6efffdfbc770dc6577
|
4
|
+
data.tar.gz: 14deafe867251227fd7881f6161246127055e94c275a9b192ee5dd7e81603357
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9861b97096691445b0c8057f487a011889a77a15d72a8803f7ea8413a11f9d09fd0403ba3ae5890a4838ec4f4cce08c6cb4342411fb4fea9284237b0fd90c43a
|
7
|
+
data.tar.gz: daa80c74cec2cec3075033af1877760931a29145a1aeb0cba0bb55fa050d4b46bfa31b3f11b87915e661fb815cbbc7baed2c9808a292e25107dff3744ca36bea
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dryrun (1.
|
4
|
+
dryrun (1.3.0)
|
5
5
|
bundler
|
6
6
|
colorize
|
7
7
|
highline
|
@@ -12,42 +12,40 @@ GEM
|
|
12
12
|
remote: https://rubygems.org/
|
13
13
|
specs:
|
14
14
|
ansi (1.5.0)
|
15
|
-
ast (2.4.
|
16
|
-
byebug (
|
17
|
-
coderay (1.1.
|
15
|
+
ast (2.4.1)
|
16
|
+
byebug (11.1.3)
|
17
|
+
coderay (1.1.3)
|
18
18
|
colorize (0.8.1)
|
19
|
-
diff-lcs (1.
|
20
|
-
highline (
|
21
|
-
method_source (0.
|
22
|
-
oga (
|
19
|
+
diff-lcs (1.4.4)
|
20
|
+
highline (2.0.3)
|
21
|
+
method_source (1.0.0)
|
22
|
+
oga (3.3)
|
23
23
|
ast
|
24
24
|
ruby-ll (~> 2.1)
|
25
|
-
pry (0.
|
26
|
-
coderay (~> 1.1
|
27
|
-
method_source (~> 0
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
rspec-
|
36
|
-
rspec-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
rspec-expectations (3.6.0)
|
25
|
+
pry (0.13.1)
|
26
|
+
coderay (~> 1.1)
|
27
|
+
method_source (~> 1.0)
|
28
|
+
pry-byebug (3.9.0)
|
29
|
+
byebug (~> 11.0)
|
30
|
+
pry (~> 0.13.0)
|
31
|
+
rake (13.0.1)
|
32
|
+
rjb (1.6.2)
|
33
|
+
rspec (3.9.0)
|
34
|
+
rspec-core (~> 3.9.0)
|
35
|
+
rspec-expectations (~> 3.9.0)
|
36
|
+
rspec-mocks (~> 3.9.0)
|
37
|
+
rspec-core (3.9.2)
|
38
|
+
rspec-support (~> 3.9.3)
|
39
|
+
rspec-expectations (3.9.2)
|
41
40
|
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
-
rspec-support (~> 3.
|
43
|
-
rspec-mocks (3.
|
41
|
+
rspec-support (~> 3.9.0)
|
42
|
+
rspec-mocks (3.9.1)
|
44
43
|
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
-
rspec-support (~> 3.
|
46
|
-
rspec-support (3.
|
44
|
+
rspec-support (~> 3.9.0)
|
45
|
+
rspec-support (3.9.3)
|
47
46
|
ruby-ll (2.1.2)
|
48
47
|
ansi
|
49
48
|
ast
|
50
|
-
slop (3.6.0)
|
51
49
|
|
52
50
|
PLATFORMS
|
53
51
|
ruby
|
@@ -59,4 +57,4 @@ DEPENDENCIES
|
|
59
57
|
rspec
|
60
58
|
|
61
59
|
BUNDLED WITH
|
62
|
-
1.
|
60
|
+
2.1.4
|
data/README.md
CHANGED
@@ -1,20 +1,17 @@
|
|
1
|
-
|
1
|
+
<!--<p align="center">
|
2
2
|
<a href="https://github.com/cesarferreira/dryrun" target="_blank">
|
3
3
|
<img width="200"src="extras/gift.gif">
|
4
4
|
</a>
|
5
|
-
</p
|
5
|
+
</p>-->
|
6
6
|
<h1 align="center">dryrun</h1>
|
7
7
|
<p align="center"><strong>Try any android library</strong> hosted online <strong>directly</strong> from the <strong>command line</strong></p>
|
8
8
|
<p align="center">
|
9
9
|
<a href="https://github.com/cesarferreira/dryrun"><img src="http://ruby-gem-downloads-badge.herokuapp.com/dryrun?type=total" alt="downloads"></a>
|
10
10
|
<a href="https://github.com/cesarferreira/dryrun"><img src="https://badge.fury.io/rb/dryrun.svg" alt="npm"></a>
|
11
|
-
<a href="https://travis-ci.org/cesarferreira/dryrun"><img src="https://travis-ci.org/cesarferreira/dryrun.svg?branch=master" alt="Build Status"></a>
|
12
|
-
<!-- <a href="http://android-arsenal.com/details/1/2361"><img src="https://img.shields.io/badge/Android%20Arsenal-dryrun-brightgreen.svg?style=flat" alt="Android Arsenal"></a> -->
|
13
11
|
<a href="http://androidweekly.net/issues/issue-200"><img src="https://img.shields.io/badge/Android%20Weekly-%23200-blue.svg" alt="Android Weekly"></a>
|
14
12
|
<a href="https://www.codacy.com/app/cesarferreira/dryrun?utm_source=github.com&utm_medium=referral&utm_content=cesarferreira/dryrun&utm_campaign=badger"><img src="https://api.codacy.com/project/badge/Grade/c9f73e75e72547008558b3e337acbff3" alt="Codacy Badge"></a>
|
15
|
-
|
16
|
-
|
17
|
-
<a href="https://github.com/cesarferreira/dryrun/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"></a> -->
|
13
|
+
<a href="https://github.com/cesarferreira/dryrun/issues?q=is%3Aissue+is%3Aclosed"><img src="https://img.shields.io/github/issues-closed-raw/cesarferreira/dryrun.svg?color=%23FF69B4" alt="Closed"></a>
|
14
|
+
|
18
15
|
</p>
|
19
16
|
|
20
17
|
<p align="center">
|
data/docs/css/main.css
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
div.notification.notification-producthunt {
|
2
|
+
border-radius: 0 !important;
|
3
|
+
background: #da552f;
|
4
|
+
}
|
5
|
+
|
6
|
+
p.install-text code {
|
7
|
+
border-radius: 5px;
|
8
|
+
padding: 0.75rem;
|
9
|
+
}
|
10
|
+
|
11
|
+
p.install-text code::before {
|
12
|
+
content: '$ ';
|
13
|
+
}
|
14
|
+
|
15
|
+
p.install-text code:hover {
|
16
|
+
cursor: text;
|
17
|
+
}
|
18
|
+
|
19
|
+
p.install-text code:hover span {
|
20
|
+
background: pink;
|
21
|
+
}
|
22
|
+
|
23
|
+
.hero .hero-foot {
|
24
|
+
margin-bottom: 1rem;
|
25
|
+
}
|
26
|
+
|
27
|
+
#madeWithBulma {
|
28
|
+
vertical-align: bottom;
|
29
|
+
}
|
30
|
+
|
31
|
+
div.column.has-content-vcentered {
|
32
|
+
display: flex;
|
33
|
+
flex-direction: column;
|
34
|
+
justify-content: center;
|
35
|
+
}
|
36
|
+
|
37
|
+
div.notification.copy-notification {
|
38
|
+
position: absolute;
|
39
|
+
top: 0;
|
40
|
+
right: 0;
|
41
|
+
z-index: 999;
|
42
|
+
}
|
43
|
+
|
44
|
+
.makerlink {
|
45
|
+
font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
46
|
+
right: 0px;
|
47
|
+
bottom: 0px;
|
48
|
+
position: fixed;
|
49
|
+
z-index: 100;
|
50
|
+
border-top-left-radius: 5px;
|
51
|
+
color: rgb(111, 111, 111);
|
52
|
+
padding: 6px;
|
53
|
+
border-top: 1px solid rgb(239, 239, 239);
|
54
|
+
border-left: 1px solid rgb(239, 239, 239);
|
55
|
+
background: rgb(255, 255, 255);
|
56
|
+
text-decoration: none;
|
57
|
+
}
|
58
|
+
|
59
|
+
.makerlink .makerlink__img {
|
60
|
+
width: 22px;
|
61
|
+
vertical-align: middle;
|
62
|
+
border-radius: 100%;
|
63
|
+
}
|
64
|
+
|
65
|
+
.makerlink .makerlink__author {
|
66
|
+
vertical-align: middle;
|
67
|
+
display: inline;
|
68
|
+
font-weight: 500;
|
69
|
+
font-size: 14px;
|
70
|
+
margin: 0px 0px 0px 7px;
|
71
|
+
}
|
72
|
+
|
73
|
+
h1 a {
|
74
|
+
color:inherit;
|
75
|
+
text-decoration: none;
|
76
|
+
}
|
data/docs/index.html
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
<!-- Generated with: https://github.com/cesarferreira/facelift -->
|
2
|
+
<!DOCTYPE html>
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="utf-8">
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
8
|
+
<title>dryrun - ☁️ Try the demo project of any Android Library</title>
|
9
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css" />
|
10
|
+
<link rel="stylesheet" href="./css/main.css" />
|
11
|
+
<!-- Twitter Meta -->
|
12
|
+
<meta name="twitter:card" content="summary" />
|
13
|
+
<meta name="twitter:title" content="dryrun" />
|
14
|
+
<meta name="twitter:url" content="https://github.com/cesarferreira/dryrun" />
|
15
|
+
<meta name="twitter:description" content="☁️ Try the demo project of any Android Library" />
|
16
|
+
<meta property="og:url" content="https://github.com/cesarferreira/dryrun" />
|
17
|
+
|
18
|
+
<meta property="og:title" content="dryrun" />
|
19
|
+
<meta property="og:description" content="☁️ Try the demo project of any Android Library" />
|
20
|
+
</head>
|
21
|
+
<body>
|
22
|
+
<div class="hero is-fullheight">
|
23
|
+
<div class="hero-body">
|
24
|
+
<div class="container">
|
25
|
+
<div class="columns is-variable is-6">
|
26
|
+
<!-- Content Left -->
|
27
|
+
<div class="column is-5 has-content-vcentered">
|
28
|
+
<h1 class="title is-1"><a href="https://github.com/cesarferreira/dryrun">dryrun</a></h1>
|
29
|
+
<h2 class="subtitle">☁️ Try the demo project of any Android Library</h2>
|
30
|
+
<div class="call-to-action content">
|
31
|
+
<p class="install-text is-size-4">
|
32
|
+
<code><span>gem install dryrun</span></code>
|
33
|
+
</p>
|
34
|
+
<div class="notification is-link is-hidden copy-notification">Copied to clipboard!</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div class="features content">
|
38
|
+
<strong>Features</strong>
|
39
|
+
<ul>
|
40
|
+
<li>Try any android library hosted online directly from the command line</li>
|
41
|
+
<li>Specify any custom branch to run</li>
|
42
|
+
<li>Specify any flavour to run</li>
|
43
|
+
<li>Specify any app module to run</li>
|
44
|
+
<li>Checkout tag/commit hash to clone (e.g. "v0.4.5", "6f7dd4b")</li>
|
45
|
+
</ul>
|
46
|
+
</div>
|
47
|
+
<div class="features content">
|
48
|
+
<strong>Links</strong>
|
49
|
+
<ul>
|
50
|
+
<li>GitHub: <a href='https://github.com/cesarferreira/dryrun'>https://github.com/cesarferreira/dryrun</a></li>
|
51
|
+
<li>rubygems: <a href='https://rubygems.org/gems/dryrun/'>https://rubygems.org/gems/dryrun/</a></li>
|
52
|
+
</ul>
|
53
|
+
</div>
|
54
|
+
|
55
|
+
</div>
|
56
|
+
<!-- Media Right -->
|
57
|
+
<div class="column is-7 has-content-vcentered">
|
58
|
+
<figure class="image is-4by2">
|
59
|
+
<img src="https://raw.githubusercontent.com/cesarferreira/dryrun/master/extras/ss.gif" />
|
60
|
+
</figure>
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
</div>
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
|
67
|
+
<a target="_blank" rel="noopener" class="makerlink" href="http://cesarferreira.com">
|
68
|
+
<img class="makerlink__img" src="https://pbs.twimg.com/profile_images/884351017097322496/2mmpORsM_400x400.jpg" style="display: inline-block">
|
69
|
+
<p class="makerlink__author">by cesar ferreira</p>
|
70
|
+
</a>
|
71
|
+
<script async type="text/javascript" src="./js/index.js"></script>
|
72
|
+
</body>
|
73
|
+
</html>
|
data/docs/js/index.js
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
// `copyToClipboard()` courtesy @chalarangelo (Angelos Chalaris)
|
2
|
+
// refs: https://hackernoon.com/copying-text-to-clipboard-with-javascript-df4d4988697f
|
3
|
+
const copyToClipboard = (str) => {
|
4
|
+
const el = document.createElement('textarea'); // Create a <textarea> element
|
5
|
+
el.value = str; // Set its value to the string that you want copied
|
6
|
+
el.setAttribute('readonly', ''); // Make it readonly to be tamper-proof
|
7
|
+
el.style.position = 'absolute';
|
8
|
+
el.style.left = '-9999px'; // Move outside the screen to make it invisible
|
9
|
+
document.body.appendChild(el); // Append the <textarea> element to the HTML document
|
10
|
+
const selected =
|
11
|
+
document.getSelection().rangeCount > 0 // Check if there is any content selected previously
|
12
|
+
? document.getSelection().getRangeAt(0) // Store selection if found
|
13
|
+
: false; // Mark as false to know no selection existed before
|
14
|
+
el.select(); // Select the <textarea> content
|
15
|
+
document.execCommand('copy'); // Copy - only works as a result of a user action (e.g. click events)
|
16
|
+
document.body.removeChild(el); // Remove the <textarea> element
|
17
|
+
if (selected) { // If a selection existed before copying
|
18
|
+
document.getSelection().removeAllRanges(); // Unselect everything on the HTML document
|
19
|
+
document.getSelection().addRange(selected); // Restore the original selection
|
20
|
+
}
|
21
|
+
};
|
22
|
+
|
23
|
+
const showCopyNotification = () => {
|
24
|
+
const notification = document.querySelector('div.notification.copy-notification');
|
25
|
+
notification.classList.remove('is-hidden');
|
26
|
+
setTimeout(() => {
|
27
|
+
notification.classList.add('is-hidden');
|
28
|
+
}, 2000);
|
29
|
+
};
|
30
|
+
|
31
|
+
const installTextCode = document.querySelector('p.install-text code');
|
32
|
+
const installTextSpan = document.querySelector('p.install-text code span');
|
33
|
+
|
34
|
+
const clickableElements = [installTextCode, installTextSpan];
|
35
|
+
|
36
|
+
clickableElements.forEach((el) => {
|
37
|
+
const npmInstallText = installTextSpan.textContent; // 'npm i -g amo-cli'
|
38
|
+
el.addEventListener('click', () => {
|
39
|
+
copyToClipboard(npmInstallText);
|
40
|
+
showCopyNotification();
|
41
|
+
});
|
42
|
+
});
|
File without changes
|
data/docs/res/.keep
ADDED
File without changes
|
data/dryrun.gemspec
CHANGED
data/facelift.json
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
{
|
2
|
+
"title": "dryrun",
|
3
|
+
"subtitle": "☁️ Try the demo project of any Android Library",
|
4
|
+
"installation": "gem install dryrun",
|
5
|
+
"url": "https://github.com/cesarferreira/dryrun",
|
6
|
+
"screenshot": "https://raw.githubusercontent.com/cesarferreira/dryrun/master/extras/ss.gif",
|
7
|
+
"author": {
|
8
|
+
"name": "cesar ferreira",
|
9
|
+
"thumbnail": "https://pbs.twimg.com/profile_images/884351017097322496/2mmpORsM_400x400.jpg",
|
10
|
+
"homepage": "http://cesarferreira.com"
|
11
|
+
},
|
12
|
+
"highlights": [{
|
13
|
+
"title": "Features",
|
14
|
+
"items": [
|
15
|
+
"Try any android library hosted online directly from the command line",
|
16
|
+
"Specify any custom branch to run",
|
17
|
+
"Specify any flavour to run",
|
18
|
+
"Specify any app module to run",
|
19
|
+
"Checkout tag/commit hash to clone (e.g. \"v0.4.5\", \"6f7dd4b\")"
|
20
|
+
]
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"title": "Links",
|
24
|
+
"items": [
|
25
|
+
"GitHub: <a href='https://github.com/cesarferreira/dryrun'>https://github.com/cesarferreira/dryrun</a>",
|
26
|
+
"rubygems: <a href='https://rubygems.org/gems/dryrun/'>https://rubygems.org/gems/dryrun/</a>"
|
27
|
+
]
|
28
|
+
}
|
29
|
+
]
|
30
|
+
}
|
data/lib/dryrun.rb
CHANGED
@@ -94,7 +94,7 @@ module Dryrun
|
|
94
94
|
input = ask "\n#{'Your Dryrun version is outdated, want to update?'.yellow} #{'[Y/n]:'.white}"
|
95
95
|
end until %w(y n s).include?(input.downcase)
|
96
96
|
|
97
|
-
DryrunUtils.execute('gem update dryrun') if input.casecmp
|
97
|
+
DryrunUtils.execute('gem update dryrun') if input.casecmp('y') == 0
|
98
98
|
end
|
99
99
|
|
100
100
|
def pick_device
|
@@ -102,12 +102,12 @@ module Dryrun
|
|
102
102
|
|
103
103
|
if !Gem.win_platform?
|
104
104
|
@sdk = `echo $ANDROID_HOME`.delete("\n")
|
105
|
-
@sdk += '/platform-tools/adb'
|
106
105
|
else
|
107
106
|
@sdk = `echo %ANDROID_HOME%`.delete("\n")
|
108
|
-
@sdk += '/platform-tools/adb.exe'
|
109
107
|
end
|
110
108
|
|
109
|
+
@sdk = 'adb' if @sdk.empty?
|
110
|
+
|
111
111
|
$sdk = @sdk
|
112
112
|
|
113
113
|
puts 'Searching for devices...'.yellow
|
@@ -14,7 +14,7 @@ module Dryrun
|
|
14
14
|
@base_path = @custom_app_path ? File.join(path, @custom_app_path) : path
|
15
15
|
@flavour = flavour
|
16
16
|
@device = device
|
17
|
-
|
17
|
+
@gradle_file_extension = gradle_file_extension
|
18
18
|
@settings_gradle_path = settings_gradle_file
|
19
19
|
@main_gradle_file = main_gradle_file
|
20
20
|
|
@@ -23,6 +23,14 @@ module Dryrun
|
|
23
23
|
@modules = find_modules
|
24
24
|
end
|
25
25
|
|
26
|
+
def gradle_file_extension
|
27
|
+
gradle_file = File.join(@base_path, 'settings.gradle.kts')
|
28
|
+
if (File.exist?(gradle_file))
|
29
|
+
return ".gradle.kts"
|
30
|
+
end
|
31
|
+
".gradle"
|
32
|
+
end
|
33
|
+
|
26
34
|
def check_custom_app_path
|
27
35
|
return unless @custom_app_path
|
28
36
|
|
@@ -50,7 +58,7 @@ module Dryrun
|
|
50
58
|
# Open temporary file
|
51
59
|
tmp = Tempfile.new('extract')
|
52
60
|
|
53
|
-
file = "#{@path_to_sample}/build
|
61
|
+
file = "#{@path_to_sample}/build#{@gradle_file_extension}"
|
54
62
|
|
55
63
|
# Write good lines to temporary file
|
56
64
|
File.open(file, 'r') do |f|
|
@@ -65,11 +73,11 @@ module Dryrun
|
|
65
73
|
end
|
66
74
|
|
67
75
|
def settings_gradle_file(path = @base_path)
|
68
|
-
File.join(path,
|
76
|
+
File.join(path, "settings#{@gradle_file_extension}")
|
69
77
|
end
|
70
78
|
|
71
79
|
def main_gradle_file(path = @base_path)
|
72
|
-
File.join(path,
|
80
|
+
File.join(path, "build#{@gradle_file_extension}")
|
73
81
|
end
|
74
82
|
|
75
83
|
def valid?(main_gradle_file = @main_gradle_file)
|
@@ -81,7 +89,10 @@ module Dryrun
|
|
81
89
|
return [] unless valid?
|
82
90
|
|
83
91
|
content = File.open(@settings_gradle_path, 'rb').read
|
84
|
-
|
92
|
+
|
93
|
+
content = content.split(/\n/).delete_if { |x| !x.start_with?("include")}.join("\n")
|
94
|
+
modules = content.scan(/'([^']*)'/) + content.scan(/\"([^"]*)\"/)
|
95
|
+
|
85
96
|
modules.each {|replacement| replacement.first.tr!(':', '')}
|
86
97
|
end
|
87
98
|
|
@@ -89,9 +100,7 @@ module Dryrun
|
|
89
100
|
Dir.chdir @base_path
|
90
101
|
|
91
102
|
path = sample_project
|
92
|
-
|
93
|
-
|
94
|
-
if path == false && manifest_parsed == false or !@launcher_activity
|
103
|
+
if path == false or !@launcher_activity
|
95
104
|
puts "Couldn't open or there isnt any sample project, sorry!".red
|
96
105
|
exit 1
|
97
106
|
end
|
@@ -114,12 +123,12 @@ module Dryrun
|
|
114
123
|
def sample_project
|
115
124
|
if @custom_module && @modules.any? {|m| m.first == "#{@custom_module}"}
|
116
125
|
@path_to_sample = File.join(@base_path, "#{@custom_module}")
|
117
|
-
return @path_to_sample
|
126
|
+
return @path_to_sample if parse_manifest(@path_to_sample)
|
118
127
|
else
|
119
128
|
@modules.each do |child|
|
120
129
|
full_path = File.join(@base_path, child.first)
|
121
130
|
@path_to_sample = full_path
|
122
|
-
return full_path
|
131
|
+
return full_path if parse_manifest(full_path)
|
123
132
|
end
|
124
133
|
end
|
125
134
|
false
|
@@ -141,10 +150,8 @@ module Dryrun
|
|
141
150
|
manifest_parser = ManifestParser.new(manifest_file)
|
142
151
|
@package = manifest_parser.package
|
143
152
|
@launcher_activity = manifest_parser.launcher_activity
|
144
|
-
|
145
|
-
return false unless @launcher_activity
|
146
|
-
|
147
153
|
manifest_file.close
|
154
|
+
@launcher_activity && @package
|
148
155
|
end
|
149
156
|
|
150
157
|
def get_manifest(path_to_sample)
|
data/lib/dryrun/dryrun_utils.rb
CHANGED
@@ -27,7 +27,7 @@ module Dryrun
|
|
27
27
|
page_string = f.read
|
28
28
|
end
|
29
29
|
else
|
30
|
-
open(url) do |f|
|
30
|
+
URI.open(url) do |f|
|
31
31
|
page_string = f.read
|
32
32
|
end
|
33
33
|
end
|
@@ -40,7 +40,7 @@ module Dryrun
|
|
40
40
|
latest.to_s <= Dryrun::VERSION.to_s
|
41
41
|
end
|
42
42
|
|
43
|
-
def self.run_adb(args)
|
43
|
+
def self.run_adb(args)
|
44
44
|
adb_arg = " -s #{$device.name} " unless $device.nil?
|
45
45
|
path = "#{$sdk} #{adb_arg} #{args} "
|
46
46
|
run(path)
|
data/lib/dryrun/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dryrun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cesar ferreira
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
-
description:
|
125
|
+
description:
|
126
126
|
email:
|
127
127
|
- cesar.manuel.ferreira@gmail.com
|
128
128
|
executables:
|
@@ -141,6 +141,11 @@ files:
|
|
141
141
|
- README.md
|
142
142
|
- Rakefile
|
143
143
|
- bin/dryrun
|
144
|
+
- docs/css/main.css
|
145
|
+
- docs/index.html
|
146
|
+
- docs/js/index.js
|
147
|
+
- docs/js/vendor/.keep
|
148
|
+
- docs/res/.keep
|
144
149
|
- dryrun.gemspec
|
145
150
|
- extras/gift.gif
|
146
151
|
- extras/logo.png
|
@@ -149,6 +154,7 @@ files:
|
|
149
154
|
- extras/usage_v2.gif
|
150
155
|
- extras/usage_v3.gif
|
151
156
|
- extras/usage_v4.gif
|
157
|
+
- facelift.json
|
152
158
|
- lib/dryrun.rb
|
153
159
|
- lib/dryrun/android_project.rb
|
154
160
|
- lib/dryrun/android_utils.rb
|
@@ -167,7 +173,7 @@ homepage: http://cesarferreira.com
|
|
167
173
|
licenses:
|
168
174
|
- MIT
|
169
175
|
metadata: {}
|
170
|
-
post_install_message:
|
176
|
+
post_install_message:
|
171
177
|
rdoc_options: []
|
172
178
|
require_paths:
|
173
179
|
- lib
|
@@ -176,16 +182,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
176
182
|
requirements:
|
177
183
|
- - ">="
|
178
184
|
- !ruby/object:Gem::Version
|
179
|
-
version:
|
185
|
+
version: '0'
|
180
186
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
181
187
|
requirements:
|
182
188
|
- - ">="
|
183
189
|
- !ruby/object:Gem::Version
|
184
190
|
version: '0'
|
185
191
|
requirements: []
|
186
|
-
|
187
|
-
|
188
|
-
signing_key:
|
192
|
+
rubygems_version: 3.1.4
|
193
|
+
signing_key:
|
189
194
|
specification_version: 4
|
190
195
|
summary: Tool to try any android library hosted online directly from the command line
|
191
196
|
test_files: []
|