dryrun 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +25 -6
- data/extras/usage.gif +0 -0
- data/lib/dryrun.rb +4 -2
- data/lib/dryrun/android_project.rb +13 -7
- data/lib/dryrun/github.rb +0 -2
- data/lib/dryrun/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca486cb2e2a7d3e857950f165602a2dcc9250d48
|
4
|
+
data.tar.gz: a82c615ae248f5ebc4a10dc79a5505ed0bec26b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 617020127650fbede45c17bae6fa43f7e3ef96c8da738b52c63b55df2875e41d603889773d2fe1836dc9a66557cf52202889604f9dcf81b4b5fa5e20ddc7a44e
|
7
|
+
data.tar.gz: de3d3e3679c9a5354a798ac5f61464b1507734365378985b13c2e8ebbd87a6c8fdd0bb339e42ace8a40fe372318b5fdb849563baa7c3e9e3b4565378fcdd4a2b
|
data/README.md
CHANGED
@@ -3,31 +3,50 @@
|
|
3
3
|
|
4
4
|
**Try** an **android** library on your **smartphone** **directly** from the **command line**
|
5
5
|
|
6
|
+
|
7
|
+
> A dry run (or a practice run) is a testing process where the effects of a possible failure are intentionally mitigated. For example, an aerospace company may conduct a "dry run" test of a jet's new pilot ejection seat while the jet is parked on the ground, rather than while it is in flight.
|
8
|
+
|
9
|
+
<p align="center">
|
10
|
+
<img src="https://raw.githubusercontent.com/cesarferreira/dryrun/master/extras/usage.gif" width="100%" />
|
11
|
+
</p>
|
12
|
+
|
13
|
+
|
6
14
|
## Typical scenario
|
7
15
|
|
8
|
-
1. Find the github url (lets say `https://github.com/cesarferreira/
|
16
|
+
1. Find the github url (lets say `https://github.com/cesarferreira/android-helloworld`)
|
9
17
|
2. Click the `download zip`
|
10
|
-
3. Extract the `
|
18
|
+
3. Extract the `zip file`
|
11
19
|
4. Open Android Studio
|
12
20
|
5. Import the project you just downloaded
|
13
21
|
6. Sync gradle
|
14
22
|
7. Run the project
|
15
23
|
8. Choose the device you want to run
|
24
|
+
9. Test all you want
|
25
|
+
10. Delete the `project folder` and the `zip file` when you don't want it anymore
|
16
26
|
|
17
27
|
... or you can use `dryrun`:
|
18
28
|
|
19
29
|
## Usage
|
30
|
+
```bash
|
31
|
+
dryrun https://github.com/cesarferreira/android-helloworld
|
32
|
+
```
|
20
33
|
|
21
|
-
|
22
|
-
|
23
|
-
Wait a few seconds... `et voilà !`
|
24
|
-
The app is installed on your phone :smiley:
|
34
|
+
Wait a few seconds... and `voilà`! The app is installed and opened on your phone :smiley:
|
25
35
|
|
26
36
|
|
27
37
|
## Installation
|
28
38
|
|
29
39
|
$ gem install dryrun
|
30
40
|
|
41
|
+
**Requirements `(if you haven't already)`:**
|
42
|
+
|
43
|
+
> $ANDROID_HOME defined on the environment variables [how-to](http://stackoverflow.com/questions/5526470/trying-to-add-adb-to-path-variable-osx)
|
44
|
+
|
45
|
+
**hint:** in your `~/.bashrc` add `export ANDROID_HOME="/Users/cesarferreira/Library/Android/sdk/"`
|
46
|
+
|
47
|
+
> Android SDK defined on the environment variables [how-to](http://stackoverflow.com/questions/19986214/setting-android-home-enviromental-variable-on-mac-os-x)
|
48
|
+
|
49
|
+
**hint:** in your `~/.bashrc` add `export PATH="/Users/cesarferreira/.rvm/bin:/Users/cesarferreira/Library/Android/sdk/platform-tools/:$PATH"`
|
31
50
|
|
32
51
|
## Contributing
|
33
52
|
|
data/extras/usage.gif
ADDED
Binary file
|
data/lib/dryrun.rb
CHANGED
@@ -26,14 +26,16 @@ module DryRun
|
|
26
26
|
exit 1
|
27
27
|
end
|
28
28
|
|
29
|
-
puts "\nLets work this one out: #{url.green}\n\n"
|
29
|
+
# puts "\nLets work this one out: #{url.green}\n\n"
|
30
30
|
|
31
31
|
# clone the repository
|
32
32
|
clonable = github.clonable_url
|
33
|
-
puts "git clone #{clonable.yellow}.....\n\n"
|
33
|
+
#puts "git clone #{clonable.yellow}.....\n\n"
|
34
34
|
|
35
35
|
repository = github.clone
|
36
36
|
|
37
|
+
Dir.chdir repository
|
38
|
+
|
37
39
|
project = AndroidProject.new(repository)
|
38
40
|
|
39
41
|
# is a valid android project?
|
@@ -31,20 +31,26 @@ module DryRun
|
|
31
31
|
# ./gradlew clean installDebug
|
32
32
|
def clean_install
|
33
33
|
|
34
|
+
Dir.chdir @base_path
|
35
|
+
|
36
|
+
#self.uninstall
|
37
|
+
|
38
|
+
# clean assemble and install
|
39
|
+
|
34
40
|
path, execute_line = self.sample_project
|
35
41
|
|
36
42
|
|
37
43
|
if path == false and execute_line==false
|
38
44
|
puts "Couldn't open, sorry!".red
|
39
|
-
|
45
|
+
exit 1
|
40
46
|
end
|
41
47
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
+
if !File.exist?("gradlew")
|
49
|
+
system("gradle clean assembleDebug installDebug")
|
50
|
+
else
|
51
|
+
system("chmod +x gradlew")
|
52
|
+
system("./gradlew clean assembleDebug installDebug")
|
53
|
+
end
|
48
54
|
|
49
55
|
|
50
56
|
puts "Installing #{@package.green}...\n"
|
data/lib/dryrun/github.rb
CHANGED
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: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cesar ferreira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -96,6 +96,7 @@ files:
|
|
96
96
|
- Rakefile
|
97
97
|
- bin/dryrun
|
98
98
|
- dryrun.gemspec
|
99
|
+
- extras/usage.gif
|
99
100
|
- lib/dryrun.rb
|
100
101
|
- lib/dryrun/android_project.rb
|
101
102
|
- lib/dryrun/github.rb
|