israkel 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source 'http://rubygems.org'
2
2
 
3
3
  gem 'highline', '~> 1.6.15'
4
4
  gem 'json', '~> 1.7.6'
5
- gem 'rake', '~> 0.9.0'
5
+ gem 'rake', '~> 10.0.0'
6
6
 
7
7
  group :development do
8
8
  gem 'jeweler', '~> 1.8.4'
data/Gemfile.lock CHANGED
@@ -9,7 +9,7 @@ GEM
9
9
  rake
10
10
  rdoc
11
11
  json (1.7.6)
12
- rake (0.9.6)
12
+ rake (10.0.3)
13
13
  rdoc (3.12)
14
14
  json (~> 1.4)
15
15
 
@@ -20,4 +20,4 @@ DEPENDENCIES
20
20
  highline (~> 1.6.15)
21
21
  jeweler (~> 1.8.4)
22
22
  json (~> 1.7.6)
23
- rake (~> 0.9.0)
23
+ rake (~> 10.0.0)
data/README.md CHANGED
@@ -59,6 +59,9 @@ tasks to change some settings:
59
59
  end
60
60
  end
61
61
 
62
+ There's a second method called `edit_global_preferences` which works
63
+ the same, just edits a different file.
64
+
62
65
  ## Allow GPS access
63
66
 
64
67
  Allowing GPS access upfront can be required because it's not possible
@@ -70,9 +73,6 @@ to use KIF to tap on the OK button the the GPS access alert view.
70
73
  i.allow_gps_access("com.plu.FooApp")
71
74
  end
72
75
 
73
- There's a second method called `edit_global_preferences` which works
74
- the same, just edits a different file.
75
-
76
76
  ## Feedback
77
77
 
78
78
  Please raise issues if you find problems or have a feature request.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.4
1
+ 0.2.5
data/israkel.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "israkel"
8
- s.version = "0.2.4"
8
+ s.version = "0.2.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Johannes Plunien"]
12
- s.date = "2013-02-12"
12
+ s.date = "2013-02-24"
13
13
  s.description = "Collection of common rake tasks for the iPhone Simulator like start/stop and some more."
14
14
  s.email = "plu@pqpq.de"
15
15
  s.extra_rdoc_files = [
@@ -37,18 +37,18 @@ Gem::Specification.new do |s|
37
37
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
38
38
  s.add_runtime_dependency(%q<highline>, ["~> 1.6.15"])
39
39
  s.add_runtime_dependency(%q<json>, ["~> 1.7.6"])
40
- s.add_runtime_dependency(%q<rake>, ["~> 0.9.0"])
40
+ s.add_runtime_dependency(%q<rake>, ["~> 10.0.0"])
41
41
  s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
42
42
  else
43
43
  s.add_dependency(%q<highline>, ["~> 1.6.15"])
44
44
  s.add_dependency(%q<json>, ["~> 1.7.6"])
45
- s.add_dependency(%q<rake>, ["~> 0.9.0"])
45
+ s.add_dependency(%q<rake>, ["~> 10.0.0"])
46
46
  s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
47
47
  end
48
48
  else
49
49
  s.add_dependency(%q<highline>, ["~> 1.6.15"])
50
50
  s.add_dependency(%q<json>, ["~> 1.7.6"])
51
- s.add_dependency(%q<rake>, ["~> 0.9.0"])
51
+ s.add_dependency(%q<rake>, ["~> 10.0.0"])
52
52
  s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
53
53
  end
54
54
  end
data/lib/israkel/tasks.rb CHANGED
@@ -15,6 +15,7 @@ module ISRakel
15
15
 
16
16
  yield self if block_given?
17
17
 
18
+ define_allow_gps_access_task
18
19
  define_reset_task
19
20
  define_set_language_task
20
21
  define_start_task
@@ -55,6 +56,15 @@ module ISRakel
55
56
  @sdk_version ||= select_sdk_version
56
57
  end
57
58
 
59
+ def set_language(language)
60
+ edit_global_preferences do |p|
61
+ unless p['AppleLanguages'].include?(language)
62
+ fail "#{language} is not a valid language"
63
+ end
64
+ p['AppleLanguages'].unshift(language).uniq!
65
+ end
66
+ end
67
+
58
68
  private
59
69
 
60
70
  def edit_file(file)
@@ -66,6 +76,17 @@ module ISRakel
66
76
  hash_to_plist(content, file)
67
77
  end
68
78
 
79
+ def define_allow_gps_access_task
80
+ desc "Allow GPS access (via BUNDLE_ID environment variable)"
81
+ task "#{name}:allow_gps_access" do
82
+ bundle_id = ENV['BUNDLE_ID']
83
+ if bundle_id.nil?
84
+ fail "You must set the BUNDLE_ID environment variable"
85
+ end
86
+ allow_gps_access(bundle_id)
87
+ end
88
+ end
89
+
69
90
  def define_reset_task
70
91
  desc "Reset content and settings of the iPhone Simulator"
71
92
  task "#{name}:reset" do
@@ -80,12 +101,7 @@ module ISRakel
80
101
  if language.nil?
81
102
  fail "You must set the IOS_LANG environment variable"
82
103
  end
83
- edit_global_preferences do |p|
84
- unless p['AppleLanguages'].include?(language)
85
- fail "#{language} is not a valid language"
86
- end
87
- p['AppleLanguages'].unshift(language).uniq!
88
- end
104
+ set_language(language)
89
105
  end
90
106
  end
91
107
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: israkel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-12 00:00:00.000000000 Z
12
+ date: 2013-02-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: highline
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - ~>
52
52
  - !ruby/object:Gem::Version
53
- version: 0.9.0
53
+ version: 10.0.0
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
@@ -58,7 +58,7 @@ dependencies:
58
58
  requirements:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: 0.9.0
61
+ version: 10.0.0
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: jeweler
64
64
  requirement: !ruby/object:Gem::Requirement
@@ -106,7 +106,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
106
106
  version: '0'
107
107
  segments:
108
108
  - 0
109
- hash: -4002430742043640772
109
+ hash: 232127238159647738
110
110
  required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  none: false
112
112
  requirements: