newclear 0.5 → 0.6
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/README.md +11 -3
- data/lib/newclear.rb +12 -14
- data/lib/newclear_helper.rb +52 -0
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a54eac1de2140ec44532333a327aa7515b7e0f0d
|
4
|
+
data.tar.gz: e1f8b351efa4bf1f20ead759afbe6b59bde2e828
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8858492966dcbb2427e8b6793f25f0be32db15d0e1f52a461e1844a5abf182b7b19f26f42651ab2f51a057af7ac77c8e8b94b127bb4ae05a2a9894a144d0017
|
7
|
+
data.tar.gz: c6c40376ff4ee1fce469dbc30369c948a37f9f33d9d9cde43503e919a1f55a007f87d5768f268f3194220a351051f1c9997d5b1a52d38e2dd28bacbad4257873
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|

|
2
2
|
|
3
|
-
**newclear gem** - Your one line and
|
3
|
+
**newclear gem** - Your one line and relax solution to a ground up rebuild of your iOS or Android RubyMotion app.
|
4
4
|
|
5
5
|
## Usage
|
6
6
|
|
@@ -9,12 +9,20 @@
|
|
9
9
|
#### nuke
|
10
10
|
`[bundle exec] rake nuke`
|
11
11
|
|
12
|
-
`nuke` clears everything. Which actually just runs
|
12
|
+
`nuke` clears everything. Which actually just runs the following commands:
|
13
|
+
|
14
|
+
```
|
15
|
+
rake clean:all
|
16
|
+
reset-sim #if you're on an iOS project
|
17
|
+
bundle install
|
18
|
+
pod setup && rake pod:install # if you're using motion-cocoapods
|
19
|
+
rake gradle:install # if you're using motion-gradle
|
20
|
+
```
|
13
21
|
|
14
22
|
#### newclear
|
15
23
|
`[bundle exec] rake newclear`
|
16
24
|
|
17
|
-
`newclear` gives you a new and clear run of your build. This runs `nuke` and then `rake
|
25
|
+
`newclear` gives you a new and clear run of your build. This runs `nuke` and then `rake` (`rake device` for android).
|
18
26
|
|
19
27
|
|
20
28
|
## Install
|
data/lib/newclear.rb
CHANGED
@@ -1,27 +1,25 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
|
3
2
|
unless defined?(Motion::Project::Config)
|
4
3
|
raise "This file must be required within a RubyMotion project Rakefile."
|
5
4
|
end
|
6
5
|
|
6
|
+
# Bring in functionality
|
7
|
+
require_relative "newclear_helper"
|
8
|
+
include NewclearHelper
|
9
|
+
|
7
10
|
|
8
11
|
desc "Completely resets everything for your project"
|
9
12
|
task :nuke do
|
10
|
-
|
11
|
-
|
12
|
-
puts "\nResetting simulator..."
|
13
|
-
`reset-sim`
|
14
|
-
puts "\nBundling..."
|
15
|
-
`bundle`
|
16
|
-
puts "\nSetting up cocoapods..."
|
17
|
-
`pod setup`
|
18
|
-
puts "\nInstalling cocoapod dependencies..."
|
19
|
-
`rake pod:install`
|
13
|
+
nuke_project
|
14
|
+
puts NewclearHelper::NUKE_MESSAGE
|
20
15
|
end
|
21
16
|
|
22
17
|
desc "Completely reset everything in project and run"
|
23
18
|
task :newclear do
|
24
|
-
|
25
|
-
|
26
|
-
|
19
|
+
# out with the old
|
20
|
+
nuke_project
|
21
|
+
# in with the new
|
22
|
+
build_project
|
27
23
|
end
|
24
|
+
|
25
|
+
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module NewclearHelper
|
2
|
+
|
3
|
+
NUKE_MESSAGE = <<-eos
|
4
|
+
*********************************
|
5
|
+
N U K E COMPLETE
|
6
|
+
*********************************
|
7
|
+
eos
|
8
|
+
|
9
|
+
def nuke_project
|
10
|
+
puts "\nCleaning Project..."
|
11
|
+
`rake clean:all`
|
12
|
+
|
13
|
+
unless is_android?
|
14
|
+
puts "\nResetting simulator..."
|
15
|
+
`reset-sim`
|
16
|
+
end
|
17
|
+
|
18
|
+
puts "\nBundling..."
|
19
|
+
`bundle install`
|
20
|
+
|
21
|
+
# iOS Depencies
|
22
|
+
if has_task? "pod:install"
|
23
|
+
puts "\nSetting up cocoapods..."
|
24
|
+
`pod setup`
|
25
|
+
puts "\nInstalling cocoapod dependencies..."
|
26
|
+
`rake pod:install`
|
27
|
+
end
|
28
|
+
|
29
|
+
# Android Dependencies
|
30
|
+
if has_task? "gradle:install"
|
31
|
+
puts "\nSetting up gradle automation dependencies..."
|
32
|
+
`rake gradle:install`
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def build_project
|
37
|
+
puts "Building project..."
|
38
|
+
if is_android?
|
39
|
+
`rake device`
|
40
|
+
else
|
41
|
+
`rake`
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def has_task?(task_name)
|
46
|
+
Rake.application.tasks.count{ |rt| rt.name == "task_name"} > 0
|
47
|
+
end
|
48
|
+
|
49
|
+
def is_android?
|
50
|
+
@android ||= system("rake -T | grep -q .apk")
|
51
|
+
end
|
52
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: newclear
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.6'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gant
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: reset-sim
|
@@ -48,9 +48,10 @@ extra_rdoc_files: []
|
|
48
48
|
files:
|
49
49
|
- README.md
|
50
50
|
- lib/newclear.rb
|
51
|
-
|
51
|
+
- lib/newclear_helper.rb
|
52
|
+
homepage: https://github.com/IconoclastLabs/newclear
|
52
53
|
licenses:
|
53
|
-
-
|
54
|
+
- MIT
|
54
55
|
metadata: {}
|
55
56
|
post_install_message:
|
56
57
|
rdoc_options: []
|
@@ -71,5 +72,5 @@ rubyforge_project:
|
|
71
72
|
rubygems_version: 2.4.5
|
72
73
|
signing_key:
|
73
74
|
specification_version: 4
|
74
|
-
summary: rake task to rebuild entire rubymotion project
|
75
|
+
summary: rake task to rebuild entire rubymotion project from scratch.
|
75
76
|
test_files: []
|