high_five 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTAyMzUzMWYxNDFiMzc0NzEzMzQyNTQ0ZThjY2MwMGMzY2EzZTQwZA==
4
+ N2FjZTU0YjUwYzZjY2E3ZmJiOTA3NTM1ZDE0NzQ4ZGNlOTU1N2MyNw==
5
5
  data.tar.gz: !binary |-
6
- MjZjMmY4N2Q1ZTdlZjkwYzBiMDAzMjFiN2RlY2RmMzg4MDJlZjJhMg==
6
+ ZWU0ZTIzMGI1YzlmMDI0MzhiNjVlMzMwYzk1MDNkMWJkYmRmYTVkMg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZGNlY2QyZDEwNDRiMzJiYjRjZDM4ZjY4YmZkZWZmNDA1YWExN2M5ZTJhMWQ3
10
- MGQ0M2Y4ZjYxNGM1ZjVmNDc4NTM5NDc1YzYyYjYyMmQ2ODRlNDUxZjQ3YmJk
11
- NWQ2Y2QzMjVhZjU1YmZhOWFmODZiNTMwODNhODNkOTZkM2QzZDY=
9
+ NzI5YmJjNTYyNjUzYTk2YzIyYTAzNDhlN2FkZTk4MDAyMTdhMGRhYjZlZjFh
10
+ NWMzNWRhMmRkOWFhYTExM2RlMTM3M2IzM2E4YWViOTU5NTFmYjM3MDZjODlh
11
+ ZDE1MmEwN2QyOGU1NmY4OTg0ZmIyNTQxNmIyODEyZWFkNzE3YWQ=
12
12
  data.tar.gz: !binary |-
13
- YzYyZjk0YzA2MTQ3ZmE5ZDA4NDBmOGJmY2IwZGI4ZTdkNjJlNTUwMjM0NDQ2
14
- NzNjNDI3OTQyYTMwNTFjZWNmYzhlNmQyYTc2Njg5OGYzZWRjMzMzYjJmY2Rm
15
- MTM4NmMyYmQxNGQwYTU5YWE1MjQ1YWEwMTFkY2U0YjI5NzMzNDI=
13
+ ZjQ3NDU2MzQ0ODRiMmIyYjJmMTdhZDFjODk2MmEyYzE2YTA5ZGRhYTkzM2Ix
14
+ MGEzZDJiNjZiYTI4NzYxMGRkNzQ2YmIxNmQxMjlmYTBkYzlkYjI5ZWFkMTYy
15
+ NzYyOGUwZmU3MTlkMDg5MWU0OWU4M2I1YTRiMzljNzRkM2E0NWQ=
@@ -13,7 +13,7 @@ module HighFive
13
13
 
14
14
 
15
15
  # shorthand for me to define lots and lots of config settings that need to be handled
16
- # as attr_accessible, settable via setting(blah) instead of settings=blah, and also
16
+ # as attr_accessible, settable via setting(blah) instead of settings=blah, and also
17
17
  # persisted to derived platform configs
18
18
  def self.config_setting(*settings)
19
19
  config_variables = []
@@ -29,7 +29,7 @@ module HighFive
29
29
  @@config_variables = config_variables
30
30
  end
31
31
 
32
- config_setting :root, # Root of the project
32
+ config_setting :root, # Root of the project
33
33
  :destination, # generated folder for project('www')
34
34
  :page_title, # <title>#{page_title}</title>
35
35
  :compass_dir, # directory that contaings compass' config.rb
@@ -37,9 +37,10 @@ module HighFive
37
37
  :minify, # defaults to true in production mode and false otherwise, overridable
38
38
  :manifest, # generate html5 manifest
39
39
  :app_name, # App Name
40
- :app_id # App id (com.tenforwardconsulting.myapp)
40
+ :app_id, # App id (com.tenforwardconsulting.myapp)
41
+ :android_manifest # Path to the android manifest, relative to the project root
41
42
 
42
- def self.configure(&block)
43
+ def self.configure(&block)
43
44
  @@instance = HighFive::Config.new
44
45
  yield @@instance
45
46
 
@@ -54,7 +55,7 @@ module HighFive
54
55
  rescue LoadError
55
56
  raise "high_five configuration not found, forgot to run 'hi5 init'?"
56
57
  end
57
- return @@instance
58
+ return @@instance
58
59
  end
59
60
 
60
61
  def self.instance
@@ -78,7 +79,7 @@ module HighFive
78
79
  new_config.instance_variable_set(svar, self.instance_variable_get(svar))
79
80
  end
80
81
  end
81
- new_config.js_settings.merge! self.js_settings do |key, new_setting, old_setting|
82
+ new_config.js_settings.merge! self.js_settings do |key, new_setting, old_setting|
82
83
  new_setting || old_setting #don't clobber settings from the parent
83
84
  end
84
85
  new_config.platform_configs = @platform_configs.reject do |key, platform_config|
@@ -122,7 +123,7 @@ module HighFive
122
123
  @js_settings = {}
123
124
  end
124
125
  @is_environment = false
125
- end
126
+ end
126
127
 
127
128
  def assets(path)
128
129
  @static_assets << path.dup
@@ -132,7 +133,7 @@ module HighFive
132
133
  @static_javascripts << path.dup
133
134
  end
134
135
 
135
- def sass(path)
136
+ def sass(path)
136
137
  @sass_files << path.dup
137
138
  end
138
139
 
@@ -173,4 +174,4 @@ module HighFive
173
174
  end
174
175
 
175
176
  end
176
- end
177
+ end
@@ -15,7 +15,11 @@ module HighFive
15
15
  method_option :sign_identity, :aliases => "-s", :desc => "Full name of the code sign identity for use by xcode"
16
16
  method_option :provisioning_profile, :aliases => "-p", :desc => "Path to the provisioning profile"
17
17
  method_option :target, :desc => "iOS target to build"
18
+ method_option :install, :aliases => "-i", type: :boolean, :desc => "Install on device after building"
19
+ method_option :environment, :aliases => "-e", :desc => "Environemnt [production|development]", :default => "development"
20
+
18
21
  def dist(platform)
22
+ @environment = options[:environment]
19
23
  @output_file_name = options[:output_file_name]
20
24
  @sign_identity = options[:sign_identity]
21
25
  @provisioning_profile = options[:provisioning_profile]
@@ -27,10 +31,13 @@ module HighFive
27
31
  self.destination_root = @config.destination
28
32
 
29
33
  if @platform == "android" || @platform == "amazon"
30
- manifest_path = android_manifest_path
34
+ manifest_path = @config.android_manifest || android_manifest_path
31
35
  android_path = File.dirname(manifest_path)
32
36
 
33
37
  dist_android(android_path)
38
+ if options[:install]
39
+ install_android android_path
40
+ end
34
41
  elsif @platform == "ios"
35
42
  raise "Please pass in the code sign identity to build an ios app. -s [sign_identity]" if @sign_identity.nil?
36
43
  raise "Please pass in the path to the provisioning profile to build an ios app. -p [provisioning_profile]" if @provisioning_profile.nil?
@@ -68,7 +75,12 @@ module HighFive
68
75
  FileUtils.cp("#{android_path}/bin/#{android_name}-release.apk", "#{android_path}/bin/#{@output_file_name}.apk")
69
76
  end
70
77
  end
78
+
79
+ desc "install_android [ANDROID_PATH]", "Install the distribution package on the connected android device or emulator"
80
+ def install_android(android_path)
81
+ system("ant -file '#{android_path}/build.xml' installr")
82
+ end
71
83
  end
72
84
  end
73
85
  end
74
- end
86
+ end
@@ -1,3 +1,3 @@
1
1
  module HighFive
2
- VERSION = "0.2.3"
3
- end
2
+ VERSION = "0.2.4"
3
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: high_five
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Samson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-23 00:00:00.000000000 Z
11
+ date: 2014-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json