cordova-rake 0.3.1 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cordova/rake/version.rb +1 -1
- data/lib/cordova/rake.rb +7 -6
- data/lib/tasks/application.rake +1 -1
- data/lib/tasks/cordova.rake +13 -8
- data/lib/tasks/deploy.rake +1 -1
- data/lib/templates/Gemfile +9 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9aab2bf1ee1f37dd51d019893e17420fe161970
|
4
|
+
data.tar.gz: fcedac6d2d0286f30c41bd2674eb8ff3d3313ad7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e13a5195f7f02b6cd40f01007337115e04526d3376efbc0c918a2e40523c630f9bca22c0009c282aac8123ce0536dcb22aed81f1ba366c32969286222def911c
|
7
|
+
data.tar.gz: 836915e56626832735c0b80b59a878adc9523f415fd0885164c280f4d2ce2dc962c39b67c7ce954dc69339886ab9530a6ca6a27ad25e2a9296cad95556a4bd45
|
data/lib/cordova/rake/version.rb
CHANGED
data/lib/cordova/rake.rb
CHANGED
@@ -4,15 +4,16 @@ require 'tilt'
|
|
4
4
|
require 'paint'
|
5
5
|
require 'nokogiri'
|
6
6
|
require 'erb'
|
7
|
+
|
7
8
|
START = Time.now
|
8
9
|
|
9
10
|
#
|
10
11
|
# Some helper methods
|
11
12
|
#
|
12
13
|
def get_sources(ext, dir = 'app')
|
13
|
-
|
14
|
-
fl.exclude(
|
15
|
-
fl.exclude(
|
14
|
+
Rake::FileList.new("#{dir}/**/*.#{ext}") do |fl|
|
15
|
+
fl.exclude('~*')
|
16
|
+
fl.exclude(%r{^scratch/})
|
16
17
|
# fl.exclude { |f| `git ls-files #{f}`.empty? } # Only commited
|
17
18
|
end
|
18
19
|
end
|
@@ -21,9 +22,9 @@ def config(key)
|
|
21
22
|
return @xml[key] if @xml
|
22
23
|
xml = Nokogiri::XML(File.open('config.xml'))
|
23
24
|
@xml = {
|
24
|
-
app: xml.xpath(
|
25
|
-
desc: xml.xpath(
|
26
|
-
platforms: xml.xpath(
|
25
|
+
app: xml.xpath('//xmlns:name').text,
|
26
|
+
desc: xml.xpath('//xmlns:description').text,
|
27
|
+
platforms: xml.xpath('//xmlns:platform').map { |os| os['name'] }
|
27
28
|
}
|
28
29
|
config(key)
|
29
30
|
end
|
data/lib/tasks/application.rake
CHANGED
data/lib/tasks/cordova.rake
CHANGED
@@ -3,6 +3,15 @@
|
|
3
3
|
#
|
4
4
|
task default: [:compile]
|
5
5
|
|
6
|
+
def find_or_create_file(name)
|
7
|
+
if File.exist?(name)
|
8
|
+
print Paint["#{name} already exists! Overwrite? [y/N] ", :red]
|
9
|
+
return unless STDIN.gets.chomp == 'y'
|
10
|
+
end
|
11
|
+
puts "Creating #{name}..."
|
12
|
+
FileUtils.cp(File.join(__dir__, '..', 'templates', name), '.')
|
13
|
+
end
|
14
|
+
|
6
15
|
task :greet do
|
7
16
|
puts Paint["Cordova Rake [#{env}] #{ENV['CORDOVA_PLATFORMS']}", :red]
|
8
17
|
puts Paint[' ----', :red]
|
@@ -10,11 +19,12 @@ end
|
|
10
19
|
|
11
20
|
desc 'Setup env for development'
|
12
21
|
task :setup do
|
13
|
-
puts Paint['Installing NPM stuff...', :
|
22
|
+
puts Paint['Installing NPM stuff...', :blue]
|
14
23
|
sh 'npm -g install phonegap cordova coffee-script '
|
15
24
|
sh 'npm -g install ios-deploy ios-sim ' if RUBY_PLATFORM =~ /darwin/
|
16
25
|
puts Paint['Installing GEM stuff...', :red]
|
17
|
-
|
26
|
+
find_or_create_file 'Gemfile'
|
27
|
+
sh 'bundle update'
|
18
28
|
end
|
19
29
|
|
20
30
|
task :report do
|
@@ -37,12 +47,7 @@ end
|
|
37
47
|
|
38
48
|
desc 'Prepare & Ripple emulate'
|
39
49
|
task :guard do
|
40
|
-
|
41
|
-
puts 'Guardfile already exists.'
|
42
|
-
else
|
43
|
-
puts 'Creating Guardfile...'
|
44
|
-
FileUtils.cp(File.join(__FILE__, '..', 'templates', 'Guardfile'), '.')
|
45
|
-
end
|
50
|
+
find_or_create_file('Guardfile')
|
46
51
|
end
|
47
52
|
|
48
53
|
namespace :emulate do
|
data/lib/tasks/deploy.rake
CHANGED
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.3
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcos Piccinini
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tilt
|
@@ -74,6 +74,7 @@ files:
|
|
74
74
|
- lib/tasks/application.rake
|
75
75
|
- lib/tasks/cordova.rake
|
76
76
|
- lib/tasks/deploy.rake
|
77
|
+
- lib/templates/Gemfile
|
77
78
|
- lib/templates/Guardfile
|
78
79
|
homepage: http://github.com/nofxx/cordova-rake
|
79
80
|
licenses:
|
@@ -95,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
96
|
version: '0'
|
96
97
|
requirements: []
|
97
98
|
rubyforge_project:
|
98
|
-
rubygems_version: 2.
|
99
|
+
rubygems_version: 2.6.6
|
99
100
|
signing_key:
|
100
101
|
specification_version: 4
|
101
102
|
summary: Rake tasks to help cordova development
|