cordova-rake 0.0.7 → 0.0.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 70d12e1fd9d7513756bc92fe1edfa7a641913ef7
4
- data.tar.gz: ab842a6b53d717dd8523375ce5ba1dfa05da37cc
3
+ metadata.gz: 11dff11147550990d8b4d43e47a3e62063a75f5a
4
+ data.tar.gz: 56359274bfdc8a85ad01288dbfd9b6e19ff59406
5
5
  SHA512:
6
- metadata.gz: a66bc53073b0237732ecf048a4808765633658d4533fb5b7281d0835ccf4b678753081f721330ebacf05682af9e686967c73120508c0178d8ac5cd70ab3ec000
7
- data.tar.gz: 033e9ce4b6038f4192e4a362e28183c02716a347362b77d55b59f46b8ed2319d4c297e88f812f8d483e242588908c507574f1b963b00a07f1bd6d3807ca7ad57
6
+ metadata.gz: 0d943c8b9e2eef04c8892961a5dc5aee5546ca8b233137c7d29aaa24f1250619bd5c02b2e3e1aa685164f7864f4ca4495a61a27b6c7a7405ff0f62b45f2229bd
7
+ data.tar.gz: 06512a1e681f815e368417ef5e5821da2d414418eac8272f67df3ca7f5cc3963d6a77698645886ba4ac9f262246f545573c5a93b3632e8d57ccd3825ab8b23d9
data/cordova-rake.gemspec CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.push File.expand_path('../lib', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'cordova-rake'
6
- s.version = '0.0.7'
6
+ s.version = '0.0.8'
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ['Marcos Piccinini']
9
9
  s.email = ['nofxx@github.com']
@@ -13,6 +13,7 @@ class Erbs < OpenStruct
13
13
  end
14
14
  end
15
15
 
16
+ CONFIG_YML = 'config/app.yml'
16
17
 
17
18
  namespace :compile do
18
19
  task :all => [:js, :css, :html, :vars]
@@ -28,8 +29,9 @@ namespace :compile do
28
29
 
29
30
  desc 'Postcompile ENV variables'
30
31
  task :vars do
31
- data = YAML.load_file('config/app.yml')[env]
32
- # STDOUT.puts 'ERB.new(config/app.yml).render on www/'
32
+ next unless File.exist?(CONFIG_YML)
33
+ data = YAML.load_file(CONFIG_YML)[env]
34
+ # STDOUT.puts 'ERB.new(CONFIG_YML).render on www/'
33
35
  [:js, :css, :html].map { |f| get_sources(f, 'www') }.flatten.each do |file|
34
36
  out = Erbs.new(data).render(File.read(file))
35
37
  File.open(file, 'w') { |f| f << out }
@@ -51,6 +53,7 @@ namespace :compile do
51
53
  next if t.name =~ /layout/
52
54
  template = Tilt.new(t.source)
53
55
  # => #<Tilt::HAMLTemplate @file="path/to/file.haml" ...>
56
+
54
57
  File.open(t.name.gsub(/app\//, 'www/'), 'w') do |f|
55
58
  f.puts layout.render { template.render }
56
59
  end
@@ -37,7 +37,7 @@ namespace :release do
37
37
  next if File.exist?('.keys/google.keystore')
38
38
  puts Paint["\nGenerate key first!\n\n", :red]
39
39
  sh "keytool -genkey -v -keystore ./.keys/google.keystore "\
40
- "-alias #{app} -keyalg RSA -keysize 2048 -validity 10000"
40
+ "-alias '#{app}' -keyalg RSA -keysize 2048 -validity 10000"
41
41
  end
42
42
 
43
43
  task :archive do
@@ -52,14 +52,14 @@ namespace :release do
52
52
  key = GOOGLE_KEY if Object.const_defined?(:GOOGLE_KEY)
53
53
  comm = " jarsigner -verbose -sigalg SHA1withRSA "\
54
54
  "-digestalg SHA1 -keystore "\
55
- "./.keys/google.keystore build/#{app}-unsigned.apk #{app}"
55
+ "./.keys/google.keystore 'build/#{app}-unsigned.apk' '#{app}'"
56
56
  comm = "echo '#{key}' | #{comm}" if key
57
57
  sh comm
58
58
  FileUtils.cp "build/#{app}-unsigned.apk", "build/#{app}-signed.apk"
59
59
  end
60
60
 
61
61
  task :align do
62
- sh "zipalign -f -v 4 build/#{app}-signed.apk build/#{app}.apk"
62
+ sh "zipalign -f -v 4 'build/#{app}-signed.apk' 'build/#{app}.apk'"
63
63
  end
64
64
 
65
65
  task :check do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cordova-rake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcos Piccinini
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-13 00:00:00.000000000 Z
11
+ date: 2015-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paint