high_five 0.2.4 → 0.2.5

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
- N2FjZTU0YjUwYzZjY2E3ZmJiOTA3NTM1ZDE0NzQ4ZGNlOTU1N2MyNw==
4
+ MWU1YmFlNWExOGYzNzM1Yzg4NzVjZjE0YmJjMWM1ODc3ZTNkMGI5OQ==
5
5
  data.tar.gz: !binary |-
6
- ZWU0ZTIzMGI1YzlmMDI0MzhiNjVlMzMwYzk1MDNkMWJkYmRmYTVkMg==
6
+ OTgxMjUyMThjYzU1ZjcyZDRjYzE5ZmVmZTU3MjU1NmU4ODY4MWVmNg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NzI5YmJjNTYyNjUzYTk2YzIyYTAzNDhlN2FkZTk4MDAyMTdhMGRhYjZlZjFh
10
- NWMzNWRhMmRkOWFhYTExM2RlMTM3M2IzM2E4YWViOTU5NTFmYjM3MDZjODlh
11
- ZDE1MmEwN2QyOGU1NmY4OTg0ZmIyNTQxNmIyODEyZWFkNzE3YWQ=
9
+ Nzk0NzYwZjY1ZWMwYzg1Y2EwYjZhMmIwYTFjMWNiZGM2NDhmYWZhYmI3OGVl
10
+ ZjA3NGRlMjk5ZjkzNDdlMGFlY2Q1MmFkMWMwMThhYTMxNzhjYWQ2ZTZkODUy
11
+ NzYxZWJiMmU2MTE3NjY1ZjcxODMzYzA0NmQxNmRhZjAxZDEzMzg=
12
12
  data.tar.gz: !binary |-
13
- ZjQ3NDU2MzQ0ODRiMmIyYjJmMTdhZDFjODk2MmEyYzE2YTA5ZGRhYTkzM2Ix
14
- MGEzZDJiNjZiYTI4NzYxMGRkNzQ2YmIxNmQxMjlmYTBkYzlkYjI5ZWFkMTYy
15
- NzYyOGUwZmU3MTlkMDg5MWU0OWU4M2I1YTRiMzljNzRkM2E0NWQ=
13
+ ZDg0ZGIyZWQyZTE2NGMxNjNhNmMyNWUwN2YxMjA5MjQ3ZDhlZDg1Yjk3ZmFi
14
+ ZWRmZmExNGM3ZTQ0MGU4ZWNhM2FhMDMwMzcwOGRmNGI2NmZjZWU3NGExM2E1
15
+ ZGQxZTUxNmE4NmE2MzU5OWJiYTg0ZjhlNjE2ZDZiN2E1Njc0OGE=
@@ -29,16 +29,18 @@ module HighFive
29
29
  @@config_variables = config_variables
30
30
  end
31
31
 
32
- config_setting :root, # Root of the project
33
- :destination, # generated folder for project('www')
34
- :page_title, # <title>#{page_title}</title>
35
- :compass_dir, # directory that contaings compass' config.rb
36
- :dev_index, # copy generated index.html to here on build for use in development
37
- :minify, # defaults to true in production mode and false otherwise, overridable
38
- :manifest, # generate html5 manifest
39
- :app_name, # App Name
40
- :app_id, # App id (com.tenforwardconsulting.myapp)
41
- :android_manifest # Path to the android manifest, relative to the project root
32
+ config_setting :root, # Root of the project
33
+ :destination, # generated folder for project('www')
34
+ :page_title, # <title>#{page_title}</title>
35
+ :compass_dir, # directory that contaings compass' config.rb
36
+ :dev_index, # copy generated index.html to here on build for use in development
37
+ :minify, # defaults to true in production mode and false otherwise, overridable
38
+ :manifest, # generate html5 manifest
39
+ :app_name, # App Name
40
+ :app_id, # App id (com.tenforwardconsulting.myapp)
41
+ # config options below are used in the dist/build tasks
42
+ :android_manifest, # Path to the android manifest, relative to the project root
43
+ :ios_target # ios target to be used by dist tasks
42
44
 
43
45
  def self.configure(&block)
44
46
  @@instance = HighFive::Config.new
@@ -25,9 +25,11 @@ module HighFive
25
25
  desc "set_version", "Change the version and build number"
26
26
  method_option :version, :aliases => "-v", :desc => "Set main version"
27
27
  method_option :build_number, :aliases => '-b', :desc => "set build number"
28
+ method_option :environment, :aliases => '-e', :desc => "Set environment"
28
29
  def set_version
30
+ config = base_config.build_platform_config(:android).build_platform_config(options[:environment])
29
31
  # read and parse the old file
30
- file = File.read(android_manifest_path)
32
+ file = File.read(config.android_manifest || android_manifest_path)
31
33
  xml = Nokogiri::XML(file)
32
34
 
33
35
  # replace \n and any additional whitespace with a space
@@ -14,7 +14,7 @@ module HighFive
14
14
  method_option :output_file_name, :aliases => "-o", :desc => "Name of the final output file. Defaults to project_name.apk/ipa"
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
- method_option :target, :desc => "iOS target to build"
17
+ method_option :target, :desc => "iOS target to build (can also be set in environment)"
18
18
  method_option :install, :aliases => "-i", type: :boolean, :desc => "Install on device after building"
19
19
  method_option :environment, :aliases => "-e", :desc => "Environemnt [production|development]", :default => "development"
20
20
 
@@ -49,7 +49,7 @@ module HighFive
49
49
  end
50
50
 
51
51
  ios_project_name = File.basename(Dir[ios_path + "/*.xcodeproj"].first, '.xcodeproj')
52
- ios_target = options[:target] || ios_project_name
52
+ ios_target = options[:target] || @config.ios_target || ios_project_name
53
53
  keychain = ios_project_name.gsub(/\s/, '').gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').gsub(/([a-z\d])([A-Z])/,'\1_\2').tr("-", "_").downcase + '-ios.keychain'
54
54
 
55
55
  @output_file_name ||= ios_target
@@ -12,9 +12,12 @@ module HighFive
12
12
  desc "set_version", "build the debug apk via ant debug"
13
13
  method_option :version, :aliases => "-v", :desc => "Set main version"
14
14
  method_option :build_number, :aliases => '-b', :desc => "set build number"
15
+ method_option :environment, :aliases => '-e', :desc => "environment"
15
16
  method_option :target, :aliases => '-t', :desc => "Use a specific target (i.e. <Target>.plist"
16
17
  def set_version
17
- info = info_plist_path(options[:target])
18
+ config = base_config.build_platform_config(:ios).build_platform_config(options[:environment])
19
+ target = options[:target] || config.ios_target
20
+ info = info_plist_path(target)
18
21
  puts "Using #{info}"
19
22
  plist = Plist::parse_xml(info)
20
23
 
@@ -1,3 +1,3 @@
1
1
  module HighFive
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
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.4
4
+ version: 0.2.5
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-05-19 00:00:00.000000000 Z
11
+ date: 2014-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json