dryrun 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e6f400659917e3d3764733f7f825bd3e4382fe3b
4
- data.tar.gz: 68ec64b5647983c3bae540e38a01f7a02e3d221c
3
+ metadata.gz: a5676f796c1d453bf044fc7031346909e51dc245
4
+ data.tar.gz: 3122a4e8abc40501acf5f720f6ece872586d356b
5
5
  SHA512:
6
- metadata.gz: 8be697b9dc78f72eae34f332d755867c8260b6065a1e2ff4e29533eddff77b794bc8ad0fb30a68e43f12001bf28ba214de530bba3ba4444c9bf5a64be9967fbc
7
- data.tar.gz: 574fd6e7e9e1aee7409297eba3038ff451dac6c0eab5ecf8cf0177cf7d4a90b82ce2f24b414686357e2d9cba7b997d0ce89c35a13e1e20163b19597ea1b22546
6
+ metadata.gz: 7d813d4dad7189e67fd90cc5f3d62e56e69b37f1cb817b7e70e99cd05a155b333cd5245c940c64289013231a20190f7fade8424f7b06b785c31db8918fb000f2
7
+ data.tar.gz: 03a5a9f2250e957edd64f88c28ab9cd19d3794662097430b952110b8a783e326e47828856c77124c1d8fa9b2764a6da4b1b2c99d2bcc4405decd76bca50c046f
@@ -2,5 +2,3 @@ language: ruby
2
2
  sudo: false
3
3
  rvm:
4
4
  - 2.2.1
5
- - 2.1.5
6
- - 2.0.0
data/README.md CHANGED
@@ -1,54 +1,45 @@
1
- # dryrun
2
- [![Build Status](https://travis-ci.org/cesarferreira/dryrun.svg?branch=master)](https://travis-ci.org/cesarferreira/dryrun) [![Gem Version](https://badge.fury.io/rb/dryrun.svg)](http://badge.fury.io/rb/dryrun) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-dryrun-green.svg?style=flat)](https://android-arsenal.com/details/1/2361)
1
+ # dryrun
2
+ [![Build Status](https://travis-ci.org/cesarferreira/dryrun.svg?branch=master)](https://travis-ci.org/cesarferreira/dryrun) [![Gem Version](https://badge.fury.io/rb/dryrun.svg)](http://badge.fury.io/rb/dryrun)
3
3
 
4
- **Try** any **android library** on your **smartphone** **directly** from the **command line**
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/usage.gif" width="100%" />
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
- ```shell
13
+ ```bash
15
14
  dryrun https://github.com/cesarferreira/android-helloworld
16
15
  ```
17
16
 
18
- Wait a few seconds... and `voilà`! The app is opened on your phone :smiley:
19
-
17
+ Wait a few seconds and the app is now opened on your phone :smiley:
20
18
 
21
- ## Advanced usage
19
+ ### Advanced usage
20
+ ```bash
21
+ $ dryrun -h
22
+ Usage: dryrun GITHUB_URL [OPTIONS]
22
23
 
23
- - From a custom repository folder:
24
-
25
- ```shell
26
- dryrun repository_url -p custom/path/to/gradle_application
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
- - A custom module:
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
- - assuming that you have the corresponding `private ssh keys` in your `~./ssh/`
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
- ```
@@ -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.1'
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
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
- system("touch #{file_name}")
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
- system('chmod +x gradlew')
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
- system('gradle wrap') if File.exist?('gradlew') and !is_gradle_wrapped
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
- system("#{builder} clean :#{@custom_module}:installDebug")
94
+ DryrunUtils.execute("#{builder} clean :#{@custom_module}:installDebug")
94
95
  else
95
- system("#{builder} clean installDebug")
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
- system(execute_line)
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
- system(get_clear_app_command)
139
+ DryrunUtils.execute(get_clear_app_command)
139
140
  end
140
141
 
141
142
  def uninstall_application
142
- system(get_uninstall_command) # > /dev/null 2>&1")
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
@@ -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
- system("git clone #{clonable} #{tmpdir}")
58
+ DryrunUtils.execute("git clone #{clonable} #{tmpdir}")
58
59
 
59
60
  tmpdir
60
61
  end
@@ -1,3 +1,3 @@
1
1
  module DryRun
2
- VERSION = "0.5.1"
2
+ VERSION = '0.5.2'
3
3
  end
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.1
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: 2015-09-21 00:00:00.000000000 Z
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.1'
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.1'
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.8
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