dryrun 0.5.1 → 0.5.2
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.
- checksums.yaml +4 -4
- data/.travis.yml +0 -2
- data/README.md +20 -49
- data/dryrun.gemspec +3 -1
- data/extras/usage_v3.gif +0 -0
- data/lib/dryrun/android_project.rb +9 -8
- data/lib/dryrun/dryrun_utils.rb +15 -0
- data/lib/dryrun/github.rb +2 -1
- data/lib/dryrun/version.rb +1 -1
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5676f796c1d453bf044fc7031346909e51dc245
|
4
|
+
data.tar.gz: 3122a4e8abc40501acf5f720f6ece872586d356b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d813d4dad7189e67fd90cc5f3d62e56e69b37f1cb817b7e70e99cd05a155b333cd5245c940c64289013231a20190f7fade8424f7b06b785c31db8918fb000f2
|
7
|
+
data.tar.gz: 03a5a9f2250e957edd64f88c28ab9cd19d3794662097430b952110b8a783e326e47828856c77124c1d8fa9b2764a6da4b1b2c99d2bcc4405decd76bca50c046f
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,54 +1,45 @@
|
|
1
|
-
# dryrun
|
2
|
-
[](https://travis-ci.org/cesarferreira/dryrun) [](http://badge.fury.io/rb/dryrun)
|
1
|
+
# dryrun
|
2
|
+
[](https://travis-ci.org/cesarferreira/dryrun) [](http://badge.fury.io/rb/dryrun)
|
3
3
|
|
4
|
-
**Try** any **android library**
|
4
|
+
**Try** any **android library** hosted online **directly** from the **command line**
|
5
5
|
|
6
6
|
> A dry 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.
|
7
7
|
|
8
8
|
<p align="center">
|
9
|
-
<img src="https://raw.githubusercontent.com/cesarferreira/dryrun/master/extras/
|
9
|
+
<img src="https://raw.githubusercontent.com/cesarferreira/dryrun/master/extras/usage_v2.gif" width="100%" />
|
10
10
|
</p>
|
11
11
|
|
12
|
-
|
13
12
|
## Usage
|
14
|
-
```
|
13
|
+
```bash
|
15
14
|
dryrun https://github.com/cesarferreira/android-helloworld
|
16
15
|
```
|
17
16
|
|
18
|
-
Wait a few seconds
|
19
|
-
|
17
|
+
Wait a few seconds and the app is now opened on your phone :smiley:
|
20
18
|
|
21
|
-
|
19
|
+
### Advanced usage
|
20
|
+
```bash
|
21
|
+
$ dryrun -h
|
22
|
+
Usage: dryrun GITHUB_URL [OPTIONS]
|
22
23
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
Options
|
25
|
+
-m, --module MODULE_NAME Custom module to run
|
26
|
+
-p, --path PATH Custom path to android project
|
27
|
+
-h, --help Displays help
|
28
|
+
-v, --version Displays version
|
27
29
|
```
|
28
30
|
|
29
|
-
|
30
|
-
|
31
|
-
```shell
|
32
|
-
dryrun repository_url -m custom_application_module
|
33
|
-
```
|
34
|
-
|
35
|
-
- Help at any time:
|
36
|
-
|
37
|
-
```shell
|
38
|
-
dryrun -h
|
39
|
-
```
|
31
|
+
## Installation
|
40
32
|
|
33
|
+
$ gem install dryrun
|
41
34
|
|
42
35
|
## Goodies
|
43
36
|
|
44
37
|
- Private repos can be tested too :smiley:
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
- > $ dryrun git@github.com:cesarferreira/android-helloworld.git
|
38
|
+
```
|
39
|
+
$ dryrun git@github.com:cesarferreira/android-helloworld.git
|
40
|
+
```
|
49
41
|
|
50
42
|
- No need to cleanup after you test the library.
|
51
|
-
- Your operating system will clean the /tmp/ folder for you.
|
52
43
|
|
53
44
|
- No need to wait for **Android Studio** to load.
|
54
45
|
|
@@ -65,26 +56,6 @@ dryrun -h
|
|
65
56
|
9. Test all you want
|
66
57
|
10. Delete the `project folder` and the `zip file` when you don't want it anymore
|
67
58
|
|
68
|
-
## Installation
|
69
|
-
|
70
|
-
$ gem install dryrun
|
71
|
-
|
72
|
-
|
73
|
-
**Requirements `(if you haven't already)`:**
|
74
|
-
|
75
|
-
> $ANDROID_HOME defined on the environment variables [(how-to)](http://stackoverflow.com/questions/5526470/trying-to-add-adb-to-path-variable-osx)
|
76
|
-
|
77
|
-
|
78
|
-
> Android SDK in your $PATH [(how-to)](http://stackoverflow.com/questions/19986214/setting-android-home-enviromental-variable-on-mac-os-x)
|
79
|
-
|
80
59
|
## Contributing
|
81
60
|
|
82
61
|
Bug reports and pull requests are welcome on GitHub at https://github.com/cesarferreira/dryrun.
|
83
|
-
|
84
|
-
To install gem as local you can use this:
|
85
|
-
```shell
|
86
|
-
# In the project folder:
|
87
|
-
rake install
|
88
|
-
# Next in the any gemset or place:
|
89
|
-
gem install --local path_to_dryrun/pkg/dryrun-<builded_version>.gem
|
90
|
-
```
|
data/dryrun.gemspec
CHANGED
@@ -26,12 +26,14 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.required_ruby_version = '>= 2.0.0'
|
27
27
|
|
28
28
|
spec.add_development_dependency 'rake', '~> 10.0'
|
29
|
-
spec.add_development_dependency 'pry-byebug', '~> 3.
|
29
|
+
spec.add_development_dependency 'pry-byebug', '~> 3.2'
|
30
30
|
spec.add_development_dependency 'rspec'
|
31
31
|
|
32
32
|
spec.add_dependency 'bundler', '~> 1.7'
|
33
33
|
spec.add_dependency 'colorize', '~> 0.7'
|
34
|
+
#spec.add_dependency 'oga', '~> 1.3.1'
|
34
35
|
spec.add_dependency 'nokogiri', '~> 1.6.6.2'
|
35
36
|
|
36
37
|
|
38
|
+
|
37
39
|
end
|
data/extras/usage_v3.gif
ADDED
Binary file
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'nokogiri'
|
2
2
|
require 'fileutils'
|
3
3
|
require 'tempfile'
|
4
|
+
require_relative 'dryrun_utils'
|
4
5
|
|
5
6
|
module DryRun
|
6
7
|
class AndroidProject
|
@@ -32,7 +33,7 @@ module DryRun
|
|
32
33
|
|
33
34
|
File.delete(file_name) if File.exist?(file_name)
|
34
35
|
|
35
|
-
|
36
|
+
DryrunUtils.execute("touch #{file_name}")
|
36
37
|
end
|
37
38
|
|
38
39
|
def remove_application_id
|
@@ -78,21 +79,21 @@ module DryRun
|
|
78
79
|
builder = "gradle"
|
79
80
|
|
80
81
|
if File.exist?('gradlew')
|
81
|
-
|
82
|
+
DryrunUtils.execute('chmod +x gradlew')
|
82
83
|
|
83
84
|
builder = 'sh gradlew'
|
84
85
|
end
|
85
86
|
|
86
87
|
# Generate the gradle/ folder
|
87
|
-
|
88
|
+
DryrunUtils.execute('gradle wrap') if File.exist?('gradlew') and !is_gradle_wrapped
|
88
89
|
|
89
90
|
remove_application_id
|
90
91
|
remove_local_properties
|
91
92
|
|
92
93
|
if @custom_module
|
93
|
-
|
94
|
+
DryrunUtils.execute("#{builder} clean :#{@custom_module}:installDebug")
|
94
95
|
else
|
95
|
-
|
96
|
+
DryrunUtils.execute("#{builder} clean installDebug")
|
96
97
|
end
|
97
98
|
|
98
99
|
clear_app_data
|
@@ -100,7 +101,7 @@ module DryRun
|
|
100
101
|
puts "Installing #{@package.green}...\n"
|
101
102
|
puts "executing: #{execute_line.green}\n\n"
|
102
103
|
|
103
|
-
|
104
|
+
DryrunUtils.execute(execute_line)
|
104
105
|
|
105
106
|
end
|
106
107
|
|
@@ -135,11 +136,11 @@ module DryRun
|
|
135
136
|
end
|
136
137
|
|
137
138
|
def clear_app_data
|
138
|
-
|
139
|
+
DryrunUtils.execute(get_clear_app_command)
|
139
140
|
end
|
140
141
|
|
141
142
|
def uninstall_application
|
142
|
-
|
143
|
+
DryrunUtils.execute(get_uninstall_command) # > /dev/null 2>&1")
|
143
144
|
end
|
144
145
|
|
145
146
|
def get_execution_line_command(path_to_sample)
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module DryRun
|
2
|
+
class DryrunUtils
|
3
|
+
|
4
|
+
def self.execute(command)
|
5
|
+
is_success = system command
|
6
|
+
unless is_success
|
7
|
+
puts "\n\n======================================================\n\n"
|
8
|
+
puts " Something went wrong while executing this:".red
|
9
|
+
puts " $ #{command}\n".yellow
|
10
|
+
puts "======================================================\n\n"
|
11
|
+
exit 1
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/dryrun/github.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'tmpdir'
|
2
2
|
require 'fileutils'
|
3
3
|
require 'uri'
|
4
|
+
require_relative 'dryrun_utils'
|
4
5
|
|
5
6
|
module DryRun
|
6
7
|
|
@@ -54,7 +55,7 @@ module DryRun
|
|
54
55
|
tmpdir = Dir.tmpdir+"/dryrun/#{@destination}"
|
55
56
|
FileUtils.rm_rf(tmpdir)
|
56
57
|
|
57
|
-
|
58
|
+
DryrunUtils.execute("git clone #{clonable} #{tmpdir}")
|
58
59
|
|
59
60
|
tmpdir
|
60
61
|
end
|
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.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cesar ferreira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '3.
|
33
|
+
version: '3.2'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '3.
|
40
|
+
version: '3.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -116,8 +116,10 @@ files:
|
|
116
116
|
- extras/thumb.png
|
117
117
|
- extras/usage.gif
|
118
118
|
- extras/usage_v2.gif
|
119
|
+
- extras/usage_v3.gif
|
119
120
|
- lib/dryrun.rb
|
120
121
|
- lib/dryrun/android_project.rb
|
122
|
+
- lib/dryrun/dryrun_utils.rb
|
121
123
|
- lib/dryrun/github.rb
|
122
124
|
- lib/dryrun/version.rb
|
123
125
|
homepage: https://github.com/cesarferreira/dryrun
|
@@ -139,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
141
|
version: '0'
|
140
142
|
requirements: []
|
141
143
|
rubyforge_project:
|
142
|
-
rubygems_version: 2.4.
|
144
|
+
rubygems_version: 2.4.5.1
|
143
145
|
signing_key:
|
144
146
|
specification_version: 4
|
145
147
|
summary: Tool which allows to quickly try the demo project of any Android Library
|