motion-dryclean 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +41 -0
- data/Rakefile +1 -0
- data/lib/motion-dryclean/scripts/reset_simulator.applescript +18 -0
- data/lib/motion-dryclean/tasks.rb +20 -0
- data/lib/motion-dryclean/version.rb +5 -0
- data/lib/motion-dryclean.rb +1 -0
- data/motion-dryclean.gemspec +19 -0
- metadata +55 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Ben Sheldon
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# motion-dryclean
|
2
|
+
|
3
|
+
> This shirt is "dry-clean only"...which means it's dirty.
|
4
|
+
>
|
5
|
+
> -- <cite>Mitch Hedberg</cite>
|
6
|
+
|
7
|
+
This gem provides rake tasks for programmatically reseting the iOS simulator in advance of running tests (or other development activities):
|
8
|
+
|
9
|
+
```
|
10
|
+
rake dryclean # Same as dryclean:simulator
|
11
|
+
rake dryclean:simulator # Reset the iOS Simulator
|
12
|
+
rake dryclean:spec # Run specs with a clean simulator
|
13
|
+
|
14
|
+
```
|
15
|
+
|
16
|
+
## Installation
|
17
|
+
|
18
|
+
Install the gem:
|
19
|
+
|
20
|
+
```
|
21
|
+
$ gem install motion-dryclean
|
22
|
+
```
|
23
|
+
|
24
|
+
Add it to your Gemfile (inside development group):
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
gem 'motion-dryclean'
|
28
|
+
```
|
29
|
+
|
30
|
+
Make sure Guard::Motion is loaded in your project Rakefile:
|
31
|
+
|
32
|
+
```ruby
|
33
|
+
require 'motion-dryclean'
|
34
|
+
```
|
35
|
+
|
36
|
+
|
37
|
+
## Development
|
38
|
+
|
39
|
+
* Source hosted at [GitHub](https://github.com/bensheldon/guard-dryclean)
|
40
|
+
* Report issues/Questions/Feature requests on [GitHub Issues](https://github.com/bensheldon/guard-dryclean/issues)
|
41
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
tell application "iPhone Simulator"
|
2
|
+
activate
|
3
|
+
end tell
|
4
|
+
|
5
|
+
tell application "System Events"
|
6
|
+
tell process "iPhone Simulator"
|
7
|
+
tell menu bar 1
|
8
|
+
tell menu bar item "iOs Simulator"
|
9
|
+
tell menu "iOs Simulator"
|
10
|
+
click menu item "Reset Content and Settings…"
|
11
|
+
end tell
|
12
|
+
end tell
|
13
|
+
end tell
|
14
|
+
tell window 1
|
15
|
+
click button "Reset"
|
16
|
+
end tell
|
17
|
+
end tell
|
18
|
+
end tell
|
@@ -0,0 +1,20 @@
|
|
1
|
+
namespace "dryclean" do
|
2
|
+
|
3
|
+
desc "Reset the iOS Simulator"
|
4
|
+
task :simulator do
|
5
|
+
scripts_dir = File.join(File.dirname(__FILE__), "scripts")
|
6
|
+
reset_script = File.expand_path(File.join(scripts_dir, "reset_simulator.applescript"))
|
7
|
+
|
8
|
+
system("osascript #{reset_script}")
|
9
|
+
end
|
10
|
+
|
11
|
+
desc "Run specs with a clean simulator"
|
12
|
+
task :spec => [
|
13
|
+
:'dryclean:simulator',
|
14
|
+
:'spec:simulator'
|
15
|
+
]
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
desc "Same as dryclean:simulator"
|
20
|
+
task "dryclean" => "dryclean:simulator"
|
@@ -0,0 +1 @@
|
|
1
|
+
require "motion-dryclean/tasks"
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'motion-dryclean/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = "motion-dryclean"
|
8
|
+
gem.version = Motion::Dryclean::VERSION
|
9
|
+
gem.authors = ["Ben Sheldon"]
|
10
|
+
gem.email = ["bensheldon@gmail.com"]
|
11
|
+
gem.description = %q{Rake tasks for cleaning the RubyMotion environment}
|
12
|
+
gem.summary = %q{Rake tasks for cleaning the RubyMotion environment}
|
13
|
+
gem.homepage = "https://github.com/bensheldon/guard-dryclean"
|
14
|
+
|
15
|
+
gem.files = `git ls-files`.split($/)
|
16
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
|
+
gem.require_paths = ["lib"]
|
19
|
+
end
|
metadata
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: motion-dryclean
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Ben Sheldon
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-05-06 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: Rake tasks for cleaning the RubyMotion environment
|
15
|
+
email:
|
16
|
+
- bensheldon@gmail.com
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- .gitignore
|
22
|
+
- Gemfile
|
23
|
+
- LICENSE.txt
|
24
|
+
- README.md
|
25
|
+
- Rakefile
|
26
|
+
- lib/motion-dryclean.rb
|
27
|
+
- lib/motion-dryclean/scripts/reset_simulator.applescript
|
28
|
+
- lib/motion-dryclean/tasks.rb
|
29
|
+
- lib/motion-dryclean/version.rb
|
30
|
+
- motion-dryclean.gemspec
|
31
|
+
homepage: https://github.com/bensheldon/guard-dryclean
|
32
|
+
licenses: []
|
33
|
+
post_install_message:
|
34
|
+
rdoc_options: []
|
35
|
+
require_paths:
|
36
|
+
- lib
|
37
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
39
|
+
requirements:
|
40
|
+
- - ! '>='
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '0'
|
43
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
44
|
+
none: false
|
45
|
+
requirements:
|
46
|
+
- - ! '>='
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
requirements: []
|
50
|
+
rubyforge_project:
|
51
|
+
rubygems_version: 1.8.24
|
52
|
+
signing_key:
|
53
|
+
specification_version: 3
|
54
|
+
summary: Rake tasks for cleaning the RubyMotion environment
|
55
|
+
test_files: []
|