high_five 0.2.10 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +14 -6
- data/bin/hi5 +0 -10
- data/high_five.gemspec +2 -1
- data/lib/high_five/config.rb +2 -2
- data/lib/high_five/thor/runner.rb +9 -15
- data/lib/high_five/thor/task.rb +16 -20
- data/lib/high_five/thor/tasks/{android_tasks.rb → android.rb} +2 -3
- data/lib/high_five/thor/tasks/deploy.rb +12 -13
- data/lib/high_five/thor/tasks/development.rb +2 -2
- data/lib/high_five/thor/tasks/{distribution.rb → dist.rb} +5 -3
- data/lib/high_five/thor/tasks/{initialization.rb → init.rb} +2 -2
- data/lib/high_five/thor/tasks/{ios_tasks.rb → ios.rb} +1 -2
- data/lib/high_five/thor/tasks.rb +12 -6
- data/lib/high_five/version.rb +1 -1
- data/spec/android_tasks_spec.rb +3 -3
- data/spec/init_spec.rb +2 -2
- metadata +22 -9
- data/lib/high_five/cli.rb +0 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27ccf2067d4538c720d326fb96971e01c2e2dd0d
|
4
|
+
data.tar.gz: 8523d2acf0203aaa308a1f05334f2d578411353a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57b2164752c7f2268ee5370526875b33365310e1fdfe6187308ba3697e2bebb268b287a38386f4037a88a5c44c733f446b5d873749bb158df7a81cbe0465f03d
|
7
|
+
data.tar.gz: dbedf9c1f5a827372a84f83c94bc2567f50db5c3970eaa34614f972998834728b7d7e6a37bfc8e2eb658515e7508abfd94f89deaa490efdbed53348b6b4c04ae
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
high_five (0.
|
4
|
+
high_five (0.3.0)
|
5
5
|
chunky_png
|
6
6
|
coffee-script (~> 2.2.0)
|
7
7
|
compass (~> 0.12.2)
|
@@ -9,7 +9,7 @@ PATH
|
|
9
9
|
nokogiri (>= 1.5.0)
|
10
10
|
plist (>= 3.0)
|
11
11
|
sprockets (>= 2.0)
|
12
|
-
thor (~> 0.
|
12
|
+
thor (~> 0.18.0)
|
13
13
|
uglifier (~> 2.1.1)
|
14
14
|
webrick
|
15
15
|
yui-compressor (~> 0.9.6)
|
@@ -22,24 +22,30 @@ GEM
|
|
22
22
|
open4
|
23
23
|
Platform (0.4.0)
|
24
24
|
chunky_png (1.3.1)
|
25
|
+
coderay (1.1.0)
|
25
26
|
coffee-script (2.2.0)
|
26
27
|
coffee-script-source
|
27
28
|
execjs
|
28
|
-
coffee-script-source (1.
|
29
|
+
coffee-script-source (1.8.0)
|
29
30
|
compass (0.12.7)
|
30
31
|
chunky_png (~> 1.2)
|
31
32
|
fssm (>= 0.2.7)
|
32
33
|
sass (~> 3.2.19)
|
33
34
|
diff-lcs (1.2.5)
|
34
|
-
execjs (2.2.
|
35
|
+
execjs (2.2.2)
|
35
36
|
fssm (0.2.10)
|
36
37
|
hike (1.2.3)
|
38
|
+
method_source (0.8.2)
|
37
39
|
mini_portile (0.6.0)
|
38
40
|
multi_json (1.10.1)
|
39
41
|
nokogiri (1.6.3.1)
|
40
42
|
mini_portile (= 0.6.0)
|
41
43
|
open4 (1.3.4)
|
42
44
|
plist (3.1.0)
|
45
|
+
pry (0.10.1)
|
46
|
+
coderay (~> 1.1.0)
|
47
|
+
method_source (~> 0.8.1)
|
48
|
+
slop (~> 3.4)
|
43
49
|
rack (1.5.2)
|
44
50
|
rspec (2.13.0)
|
45
51
|
rspec-core (~> 2.13.0)
|
@@ -50,12 +56,13 @@ GEM
|
|
50
56
|
diff-lcs (>= 1.1.3, < 2.0)
|
51
57
|
rspec-mocks (2.13.1)
|
52
58
|
sass (3.2.19)
|
53
|
-
|
59
|
+
slop (3.6.0)
|
60
|
+
sprockets (2.12.2)
|
54
61
|
hike (~> 1.2)
|
55
62
|
multi_json (~> 1.0)
|
56
63
|
rack (~> 1.0)
|
57
64
|
tilt (~> 1.1, != 1.3.0)
|
58
|
-
thor (0.
|
65
|
+
thor (0.18.1)
|
59
66
|
tilt (1.4.1)
|
60
67
|
uglifier (2.1.2)
|
61
68
|
execjs (>= 0.3.0)
|
@@ -69,4 +76,5 @@ PLATFORMS
|
|
69
76
|
|
70
77
|
DEPENDENCIES
|
71
78
|
high_five!
|
79
|
+
pry
|
72
80
|
rspec (~> 2.13.0)
|
data/bin/hi5
CHANGED
@@ -1,20 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# resolve bin path, ignoring symlinks
|
3
2
|
require 'high_five'
|
4
3
|
require 'high_five/thor/runner'
|
5
4
|
bin_file = Pathname.new(__FILE__).realpath
|
6
|
-
|
7
5
|
# add self to libpath
|
8
6
|
$:.unshift File.expand_path("../../lib", bin_file)
|
9
7
|
|
10
|
-
# begin
|
11
|
-
# require 'high_five'
|
12
|
-
# rescue LoadError
|
13
|
-
# require 'rubygems'
|
14
|
-
# require 'high_five'
|
15
|
-
# end
|
16
|
-
# require 'high_five/cli'
|
17
|
-
|
18
8
|
$thor_runner = true
|
19
9
|
$high_five_runner = true
|
20
10
|
::HighFive::Thor::Runner.start
|
data/high_five.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
}
|
17
17
|
|
18
18
|
s.add_dependency 'multi_json', '~> 1.0'
|
19
|
-
s.add_runtime_dependency "thor", "~>0.
|
19
|
+
s.add_runtime_dependency "thor", "~>0.18.0"
|
20
20
|
s.add_runtime_dependency "compass", "~>0.12.2"
|
21
21
|
s.add_runtime_dependency "yui-compressor", "~>0.9.6"
|
22
22
|
s.add_runtime_dependency "uglifier", "~>2.1.1"
|
@@ -27,6 +27,7 @@ Gem::Specification.new do |s|
|
|
27
27
|
s.add_runtime_dependency "chunky_png"
|
28
28
|
s.add_runtime_dependency "webrick"
|
29
29
|
s.add_development_dependency "rspec", "~>2.13.0"
|
30
|
+
s.add_development_dependency "pry"
|
30
31
|
|
31
32
|
|
32
33
|
s.files = `git ls-files`.split("\n")
|
data/lib/high_five/config.rb
CHANGED
@@ -19,9 +19,9 @@ module HighFive
|
|
19
19
|
config_variables = []
|
20
20
|
settings.each do |setting|
|
21
21
|
attr_accessor setting
|
22
|
+
var = "@#{setting}".to_sym
|
23
|
+
config_variables << var
|
22
24
|
define_method setting do |*args|
|
23
|
-
var = "@#{setting}".to_sym
|
24
|
-
config_variables << var
|
25
25
|
instance_variable_set(var, args[0]) if args.length == 1
|
26
26
|
instance_variable_get(var)
|
27
27
|
end
|
@@ -2,14 +2,14 @@ require "thor/runner"
|
|
2
2
|
require 'high_five/thor/task'
|
3
3
|
require 'high_five/thor/tasks'
|
4
4
|
|
5
|
+
|
5
6
|
module HighFive
|
6
7
|
module Thor
|
7
8
|
class Runner < ::Thor::Runner
|
8
|
-
|
9
9
|
#this works but I hate it
|
10
|
-
register(HighFive::Thor::Tasks::
|
10
|
+
register(HighFive::Thor::Tasks::Dist, "dist", "dist [PLATFORM]", "Shortcut to distribution:dist")
|
11
11
|
register(HighFive::Thor::Tasks::Deploy, "deploy", "deploy [PLATFORM]", "Shortcut to deploy:deploy")
|
12
|
-
register(HighFive::Thor::Tasks::
|
12
|
+
register(HighFive::Thor::Tasks::Init, "init", "init", "Shortcut to Initialization:init")
|
13
13
|
|
14
14
|
# Note: because of the way task.run works, there has to be a local
|
15
15
|
# definition. Also, we want tasks to work WITH our base namespace
|
@@ -17,21 +17,15 @@ module HighFive
|
|
17
17
|
# signature we would use thor
|
18
18
|
def method_missing(meth, *args)
|
19
19
|
meth = meth.to_s
|
20
|
-
|
21
|
-
if (!meth.match(/:/))
|
22
|
-
|
23
|
-
end
|
20
|
+
meth.sub!(/^high_five:/, '')
|
21
|
+
# if (!meth.match(/:/))
|
22
|
+
# meth = "high_five:#{meth}"
|
23
|
+
# end
|
24
24
|
super meth, *args
|
25
25
|
end
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
super
|
30
|
-
#override version task
|
31
|
-
if args[2][:current_task][:name] == "version"
|
32
|
-
puts "HighFive #{HighFive::VERSION}"
|
33
|
-
Process.exit(0)
|
34
|
-
end
|
27
|
+
def version
|
28
|
+
say "High Five v#{HighFive::VERSION}"
|
35
29
|
end
|
36
30
|
|
37
31
|
private
|
data/lib/high_five/thor/task.rb
CHANGED
@@ -3,13 +3,20 @@ require 'high_five/config'
|
|
3
3
|
module HighFive
|
4
4
|
module Thor
|
5
5
|
class Task < ::Thor
|
6
|
-
def self.banner(task, namespace = false, subcommand = true)
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
# def self.banner(task, namespace = false, subcommand = true)
|
7
|
+
# if self.namespace == "high_five"
|
8
|
+
# ns = ""
|
9
|
+
# else
|
10
|
+
# ns = "#{self.namespace}:"
|
11
|
+
# end
|
12
|
+
# "hi5 #{ns}" + task.formatted_usage(self, namespace, subcommand)
|
13
|
+
# end
|
14
|
+
|
15
|
+
|
16
|
+
class << self
|
17
|
+
def inherited(base) #:nodoc:
|
18
|
+
base.send :extend, ClassMethods
|
11
19
|
end
|
12
|
-
"hi5 #{ns}" + task.formatted_usage(self, namespace, subcommand)
|
13
20
|
end
|
14
21
|
|
15
22
|
no_tasks {
|
@@ -17,15 +24,9 @@ module HighFive
|
|
17
24
|
name.sub!(/^high_five:/, '') if name && $high_five_runner
|
18
25
|
super
|
19
26
|
end
|
20
|
-
|
21
|
-
class << self
|
22
|
-
def inherited(base) #:nodoc:
|
23
|
-
base.send :extend, ClassMethods
|
24
|
-
end
|
25
|
-
end
|
26
27
|
|
27
28
|
def base_config
|
28
|
-
begin
|
29
|
+
begin
|
29
30
|
@base_config ||= HighFive::Config.load
|
30
31
|
rescue StandardError => e
|
31
32
|
raise e
|
@@ -35,11 +36,6 @@ module HighFive
|
|
35
36
|
end
|
36
37
|
}
|
37
38
|
|
38
|
-
def initialize(*args)
|
39
|
-
super
|
40
|
-
|
41
|
-
end
|
42
|
-
|
43
39
|
module ClassMethods
|
44
40
|
def namespace(name=nil)
|
45
41
|
case name
|
@@ -47,13 +43,13 @@ module HighFive
|
|
47
43
|
constant = self.to_s.gsub(/^Thor::Sandbox::/, "")
|
48
44
|
strip = $high_five_runner ? /^HighFive::Thor::Tasks::/ : /(?<=HighFive::)Thor::Tasks::/
|
49
45
|
constant = constant.gsub(strip, "")
|
50
|
-
constant = ::Thor::Util.snake_case(constant).squeeze(":")
|
46
|
+
constant = ::Thor::Util.snake_case(constant).squeeze(":")
|
51
47
|
@namespace ||= constant
|
52
48
|
else
|
53
49
|
super
|
54
50
|
end
|
55
51
|
end
|
56
52
|
end
|
57
|
-
end
|
53
|
+
end
|
58
54
|
end
|
59
55
|
end
|
@@ -5,11 +5,10 @@ require 'nokogiri'
|
|
5
5
|
module HighFive
|
6
6
|
module Thor
|
7
7
|
module Tasks
|
8
|
-
class
|
8
|
+
class Android < ::HighFive::Thor::Task
|
9
9
|
include ::Thor::Actions
|
10
|
-
include HighFive::AndroidHelper
|
10
|
+
include ::HighFive::AndroidHelper
|
11
11
|
include ::HighFive::ImageHelper
|
12
|
-
namespace :android
|
13
12
|
|
14
13
|
desc "debug", "build the debug apk via ant debug"
|
15
14
|
def debug(target)
|
@@ -23,7 +23,7 @@ module HighFive
|
|
23
23
|
@meta = {}
|
24
24
|
@config = base_config.build_platform_config(@platform).build_platform_config(@environment)
|
25
25
|
@config_root = File.join("config", "high_five")
|
26
|
-
|
26
|
+
|
27
27
|
self.source_paths << File.join(base_config.root, @config_root)
|
28
28
|
self.source_paths << File.join(base_config.root)
|
29
29
|
self.source_paths << File.join(File.dirname(__FILE__), '..', '..', 'generators')
|
@@ -41,7 +41,8 @@ module HighFive
|
|
41
41
|
say "Deploying app: <#{@platform}> <#{options[:environment]}>"
|
42
42
|
say "\t#{self.destination_root}"
|
43
43
|
say " -Weinre url: #{@weinre_url}" if @weinre_url
|
44
|
-
|
44
|
+
|
45
|
+
|
45
46
|
if @config.compass_dir
|
46
47
|
compass_dir = File.join(base_config.root, @config.compass_dir)
|
47
48
|
say "Precompiling compass styles from #{compass_dir}}"
|
@@ -66,12 +67,12 @@ module HighFive
|
|
66
67
|
p source_paths
|
67
68
|
error "#{@platform} is not a valid target. Please create #{platform_file}" and Process.exit
|
68
69
|
end
|
69
|
-
|
70
|
+
|
70
71
|
|
71
72
|
if (@environment == "production")
|
72
73
|
appjs = File.join(self.destination_root, "app.js")
|
73
74
|
@javascripts = ["app.js"]
|
74
|
-
|
75
|
+
|
75
76
|
output_js = nil
|
76
77
|
if @config.minify == :uglifier
|
77
78
|
say " uglify #{appjs}", :green
|
@@ -83,7 +84,7 @@ module HighFive
|
|
83
84
|
say " create #{appjs}", :green
|
84
85
|
output_js = bundle.to_s
|
85
86
|
end
|
86
|
-
File.open(appjs, "w") do |file|
|
87
|
+
File.open(appjs, "w") do |file|
|
87
88
|
file.write output_js
|
88
89
|
end
|
89
90
|
output_js = nil
|
@@ -103,14 +104,14 @@ module HighFive
|
|
103
104
|
directory javascript
|
104
105
|
@javascripts.unshift(*Dir[File.join(javascript,'**','*.js')])
|
105
106
|
else
|
106
|
-
copy_file javascript unless javascript =~ /^https?:\/\//
|
107
|
+
copy_file javascript unless javascript =~ /^https?:\/\//
|
107
108
|
@javascripts.unshift javascript
|
108
109
|
end
|
109
110
|
end
|
110
111
|
|
111
112
|
@stylesheets = []
|
112
113
|
@config.sass_files.each do |sass_file|
|
113
|
-
asset_name = File.basename(sass_file, File.extname(sass_file))
|
114
|
+
asset_name = File.basename(sass_file, File.extname(sass_file))
|
114
115
|
css_file = File.join(self.destination_root, "stylesheets", "#{asset_name}.css")
|
115
116
|
say "Compiling #{sass_file} -> #{css_file}"
|
116
117
|
Sass.compile_file sass_file, css_file
|
@@ -131,12 +132,10 @@ module HighFive
|
|
131
132
|
# Adds each of the static assets to the generated folder (sylesheets etc)
|
132
133
|
@config.static_assets.each do |path, options|
|
133
134
|
asset = find_in_source_paths(path)
|
134
|
-
destination = path
|
135
|
+
destination = path
|
135
136
|
if (options[:destination])
|
136
137
|
destination = File.join(self.destination_root, options[:destination])
|
137
|
-
puts "OVERRIDING with #{options[:destination]}"
|
138
138
|
end
|
139
|
-
puts "DESTINATION: #{destination}"
|
140
139
|
if File.directory? asset
|
141
140
|
directory asset, destination
|
142
141
|
else
|
@@ -171,8 +170,8 @@ module HighFive
|
|
171
170
|
FileUtils.cp(File.join(self.destination_root, "index.html"), File.join(@config.root, @config.dev_index))
|
172
171
|
end
|
173
172
|
end
|
174
|
-
|
175
|
-
private
|
173
|
+
|
174
|
+
private
|
176
175
|
|
177
176
|
def builder
|
178
177
|
@builder ||= get_builder
|
@@ -190,7 +189,7 @@ module HighFive
|
|
190
189
|
builder
|
191
190
|
end
|
192
191
|
|
193
|
-
#TODO: this probably doesn't work on windows
|
192
|
+
#TODO: this probably doesn't work on windows
|
194
193
|
def compress_javascript(file_name)
|
195
194
|
say " -Compressing #{file_name} with yuicompressor", :yellow
|
196
195
|
|
@@ -4,7 +4,7 @@ module HighFive
|
|
4
4
|
module Tasks
|
5
5
|
class Development < ::HighFive::Thor::Task
|
6
6
|
include ::Thor::Actions
|
7
|
-
|
7
|
+
|
8
8
|
desc "server", "Run a web server for a specific environment or path"
|
9
9
|
method_option :platform, :aliases => "-e", :desc => "Environemnt [production|development]", :default => "development"
|
10
10
|
method_option :platform_path, :desc => "Path to ios or android directory for the platform we want to serve"
|
@@ -18,7 +18,7 @@ module HighFive
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
else
|
21
|
-
root = base_config.build_platform_config(platform).
|
21
|
+
root = base_config.build_platform_config(platform).destination
|
22
22
|
end
|
23
23
|
|
24
24
|
puts "Starting server with root=#{root}"
|
@@ -3,10 +3,10 @@ require 'high_five/android_helper'
|
|
3
3
|
module HighFive
|
4
4
|
module Thor
|
5
5
|
module Tasks
|
6
|
-
class
|
6
|
+
class Dist < ::HighFive::Thor::Task
|
7
7
|
include ::Thor::Actions
|
8
|
-
include IosHelper
|
9
|
-
include AndroidHelper
|
8
|
+
include ::HighFive::IosHelper
|
9
|
+
include ::HighFive::AndroidHelper
|
10
10
|
|
11
11
|
default_task :dist
|
12
12
|
|
@@ -68,7 +68,9 @@ module HighFive
|
|
68
68
|
system("ant -file '#{android_path}/build.xml' clean release #{ant_flags}")
|
69
69
|
|
70
70
|
android_name = HighFive::AndroidHelper.project_name_from_build_xml("#{android_path}/build.xml")
|
71
|
+
|
71
72
|
if @output_file_name
|
73
|
+
say "copying final build #{android_path}/bin/#{android_name}-release.apk -> #{android_path}/bin/#{@output_file_name}.apk"
|
72
74
|
FileUtils.cp("#{android_path}/bin/#{android_name}-release.apk", "#{android_path}/bin/#{@output_file_name}.apk")
|
73
75
|
end
|
74
76
|
end
|
@@ -2,7 +2,7 @@ require 'fileutils'
|
|
2
2
|
module HighFive
|
3
3
|
module Thor
|
4
4
|
module Tasks
|
5
|
-
class
|
5
|
+
class Init < ::HighFive::Thor::Task
|
6
6
|
include ::Thor::Actions
|
7
7
|
default_task :init
|
8
8
|
|
@@ -25,7 +25,7 @@ module HighFive
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
28
|
-
end
|
28
|
+
end
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
@@ -4,11 +4,10 @@ require 'plist'
|
|
4
4
|
module HighFive
|
5
5
|
module Thor
|
6
6
|
module Tasks
|
7
|
-
class
|
7
|
+
class Ios < ::HighFive::Thor::Task
|
8
8
|
include ::Thor::Actions
|
9
9
|
include ::HighFive::IosHelper
|
10
10
|
include ::HighFive::ImageHelper
|
11
|
-
namespace :ios
|
12
11
|
|
13
12
|
desc "set_version", "build the debug apk via ant debug"
|
14
13
|
method_option :version, :aliases => "-v", :desc => "Set main version"
|
data/lib/high_five/thor/tasks.rb
CHANGED
@@ -1,10 +1,16 @@
|
|
1
|
-
require 'high_five/thor/tasks/deploy'
|
2
|
-
require 'high_five/thor/tasks/distribution'
|
3
|
-
require 'high_five/thor/tasks/initialization'
|
4
|
-
require 'high_five/thor/tasks/android_tasks'
|
5
1
|
module HighFive
|
6
2
|
module Thor
|
7
|
-
module Tasks
|
3
|
+
module Tasks
|
4
|
+
def self.load
|
5
|
+
Dir.glob(File.join(File.dirname(__FILE__), 'tasks', '**/*.rb')) do |file|
|
6
|
+
if File.file?(file)
|
7
|
+
::Thor::Util.load_thorfile(file)
|
8
|
+
require file
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
8
12
|
end
|
9
13
|
end
|
10
|
-
end
|
14
|
+
end
|
15
|
+
|
16
|
+
HighFive::Thor::Tasks.load
|
data/lib/high_five/version.rb
CHANGED
data/spec/android_tasks_spec.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'chunky_png'
|
3
3
|
|
4
|
-
describe HighFive::Thor::Tasks::
|
4
|
+
describe HighFive::Thor::Tasks::Android do
|
5
5
|
include HighFive::TestHelper
|
6
6
|
include HighFive::AndroidHelper
|
7
7
|
|
@@ -23,7 +23,7 @@ describe HighFive::Thor::Tasks::AndroidTasks do
|
|
23
23
|
context 'Set icon' do
|
24
24
|
let(:drawable_dir) { File.join(@project_root, 'android', 'res') }
|
25
25
|
before(:all) do
|
26
|
-
cli(HighFive::Thor::Tasks::
|
26
|
+
cli(HighFive::Thor::Tasks::Android).set_icon File.join(@project_root, 'test_icon.png')
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'creates icons for each drawable- folder' do
|
@@ -53,7 +53,7 @@ describe HighFive::Thor::Tasks::AndroidTasks do
|
|
53
53
|
|
54
54
|
context "Set version" do
|
55
55
|
it 'updates version number' do
|
56
|
-
cli(HighFive::Thor::Tasks::
|
56
|
+
cli(HighFive::Thor::Tasks::Android, version: '2.0').set_version
|
57
57
|
manifest = File.read(File.join(@project_root, 'android', 'AndroidManifest.xml'))
|
58
58
|
expect(manifest).to match(/android:versionName="2.0"/)
|
59
59
|
end
|
data/spec/init_spec.rb
CHANGED
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
require 'tmpdir'
|
3
3
|
require 'fileutils'
|
4
4
|
|
5
|
-
describe HighFive::Thor::Tasks::
|
5
|
+
describe HighFive::Thor::Tasks::Init do
|
6
6
|
before :each do
|
7
7
|
@original_dir = Dir.pwd
|
8
8
|
@project_root = Dir.mktmpdir("hi5")
|
@@ -15,7 +15,7 @@ describe HighFive::Thor::Tasks::Initialization do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
it "should create high_five.rb in the config directory" do
|
18
|
-
::HighFive::Thor::Tasks::
|
18
|
+
::HighFive::Thor::Tasks::Init.start(["init"])
|
19
19
|
Dir.exists?(File.join(@project_root, "config")).should be_true
|
20
20
|
File.exists?(File.join(@project_root, "config", "high_five.rb")).should be_true
|
21
21
|
Dir.exists?(File.join(@project_root, "config", "high_five")).should be_true
|
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.
|
4
|
+
version: 0.3.0
|
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-
|
11
|
+
date: 2014-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.18.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.18.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: compass
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,6 +178,20 @@ dependencies:
|
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: 2.13.0
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: pry
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
181
195
|
description: "Build, minify, and deal with different platforms and environments for
|
182
196
|
your HTML5 app.\n This is often used with PhoneGap but designed not to require
|
183
197
|
it, and high_five can be used to deploy any kind of HTML/JS/CSS-based\n application
|
@@ -203,7 +217,6 @@ files:
|
|
203
217
|
- high_five.gemspec
|
204
218
|
- lib/high_five.rb
|
205
219
|
- lib/high_five/android_helper.rb
|
206
|
-
- lib/high_five/cli.rb
|
207
220
|
- lib/high_five/config.rb
|
208
221
|
- lib/high_five/generators/manifest.erb
|
209
222
|
- lib/high_five/image_helper.rb
|
@@ -211,12 +224,12 @@ files:
|
|
211
224
|
- lib/high_five/thor/runner.rb
|
212
225
|
- lib/high_five/thor/task.rb
|
213
226
|
- lib/high_five/thor/tasks.rb
|
214
|
-
- lib/high_five/thor/tasks/
|
227
|
+
- lib/high_five/thor/tasks/android.rb
|
215
228
|
- lib/high_five/thor/tasks/deploy.rb
|
216
229
|
- lib/high_five/thor/tasks/development.rb
|
217
|
-
- lib/high_five/thor/tasks/
|
218
|
-
- lib/high_five/thor/tasks/
|
219
|
-
- lib/high_five/thor/tasks/
|
230
|
+
- lib/high_five/thor/tasks/dist.rb
|
231
|
+
- lib/high_five/thor/tasks/init.rb
|
232
|
+
- lib/high_five/thor/tasks/ios.rb
|
220
233
|
- lib/high_five/version.rb
|
221
234
|
- spec/android_helper_spec.rb
|
222
235
|
- spec/android_tasks_spec.rb
|
data/lib/high_five/cli.rb
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
require 'thor'
|
2
|
-
require 'high_five/config'
|
3
|
-
|
4
|
-
module HighFive
|
5
|
-
class Cli < Thor
|
6
|
-
include Thor::Actions
|
7
|
-
include HighFive::InitTask
|
8
|
-
include HighFive::DeployTask
|
9
|
-
include HighFive::AndroidTasks
|
10
|
-
include HighFive::DistTask
|
11
|
-
# source root path for Thor::Actions commands
|
12
|
-
|
13
|
-
class_option :version, type: :boolean, desc: "Print version and ext", aliases: "-v"
|
14
|
-
def initialize(*args)
|
15
|
-
super
|
16
|
-
if options[:version]
|
17
|
-
puts "HighFive #{HighFive::VERSION}"
|
18
|
-
Process.exit(0)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
private
|
23
|
-
def base_config
|
24
|
-
begin
|
25
|
-
@base_config ||= HighFive::Config.load
|
26
|
-
rescue StandardError => e
|
27
|
-
say e.message, :red
|
28
|
-
exit
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|