marv 0.6.5 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17f87af99f31d79f72bb5742d583dcb6e090580aa5eefb3fd7486179cf1cfe31
4
- data.tar.gz: c5fc4ec9e6c14901358d97a305b4d2c99c3db358f8806f6488a83d6c81518d50
3
+ metadata.gz: 8a1ef1b62b59fe9ad5e2e7e30c4cfba2374691f1f92c5d0ec9fc306af4813a27
4
+ data.tar.gz: 6b7244651f5e6b802d9380455e03490e1afa81c13b3dd8297c5ac2f586bf3e87
5
5
  SHA512:
6
- metadata.gz: e3236f7f405fbd3398002f3c012a699cc50bf6f63fc94b791a66fce055f14dce1d0f3ff7185365dc62763c17492446840ba0950acec4ad59e4b217018412302b
7
- data.tar.gz: a8e117675329a0013c5617ad637ec7abc4feea87ffe5c35510998f8c93a61142a4b58706f2dd1297f6258472704d6f96796c3997a350a23ca91d2e2ace7f98ac
6
+ metadata.gz: 4adc2ca6a4cdd4c15150978a8f63e6afa129d1d6afc58cf98245e6517f3201e241f8653977011624d8a2856dd66df13746d8df94521cdd86e68c3fd77f6e6433
7
+ data.tar.gz: c09d515a03593a71d5006d16f05f089b94b75191b95f2af3b9def9ac949ef24c01549c2cb933ac327ed5df69c63b91a615b24594d2cf5abcca53add33bba775d
@@ -1,3 +1,12 @@
1
+ ## v0.7.0
2
+ * Bug fixes
3
+ * Add hotel support
4
+ * Optimize ui and messages
5
+
6
+ ## v0.6.5
7
+ * Bug fixes
8
+ * Add autoprefixer
9
+
1
10
  ## v0.6.4
2
11
  * Fix port availability check
3
12
  * Update gem dependencies
@@ -97,4 +106,4 @@
97
106
  * Fork from Forge (https://github.com/thethemefoundry/forge)
98
107
  * Update dependencies
99
108
  * Fix errors from old dependencies
100
- * Add extras folder
109
+ * Add extras folder
data/Gemfile CHANGED
@@ -1,23 +1,4 @@
1
- source 'http://rubygems.org'
2
- # Add dependencies required to use your gem here.
3
- gem 'guard', '~> 2.8', '< 2.9'
4
- gem 'guard-livereload', '~> 2.4'
5
- gem 'thor', '~> 0.19'
6
- gem 'sprockets', '~> 2.12'
7
- gem 'childprocess', '~> 0.5'
8
- gem 'mysql2', '~> 0.3'
9
- gem 'uglifier', '~> 2.7'
10
- gem 'sass', '~> 3.4'
11
- gem 'less', '~> 2.6'
12
- gem 'coffee-script', '~> 2.3'
13
- gem 'therubyracer', '~> 0.12'
14
- gem 'rubyzip', '~> 1.1'
15
- gem 'autoprefixer-rails', '~> 7.2'
1
+ source "https://rubygems.org"
16
2
 
17
- # Add dependencies to develop your gem here.
18
- # Include everything needed to run rake, tests, features, etc.
19
- group :development do
20
- gem 'rdoc'
21
- gem 'bundler'
22
- gem 'jeweler'
23
- end
3
+ # Specify your gem's dependencies in marv.gemspec
4
+ gemspec
@@ -1,13 +1,30 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ marv (0.7.0)
5
+ autoprefixer-rails (~> 9.3)
6
+ childprocess (~> 0.5)
7
+ coffee-script (~> 2.3)
8
+ guard (~> 2.8, < 2.9)
9
+ guard-livereload (~> 2.4)
10
+ less (~> 2.6)
11
+ mini_racer (~> 0.2)
12
+ mysql2 (~> 0.3)
13
+ rubyzip (~> 1.1)
14
+ sass (~> 3.4)
15
+ sprockets (~> 3.7)
16
+ thor (~> 0.19)
17
+ tilt (~> 1.1, != 1.3)
18
+ uglifier (~> 4.1)
19
+
1
20
  GEM
2
- remote: http://rubygems.org/
21
+ remote: https://rubygems.org/
3
22
  specs:
4
- addressable (2.4.0)
5
- autoprefixer-rails (7.2.4)
23
+ autoprefixer-rails (9.3.1)
6
24
  execjs
7
- builder (3.2.3)
8
25
  celluloid (0.16.0)
9
26
  timers (~> 4.0.0)
10
- childprocess (0.8.0)
27
+ childprocess (0.9.0)
11
28
  ffi (~> 1.0, >= 1.0.11)
12
29
  coderay (1.1.2)
13
30
  coffee-script (2.4.1)
@@ -15,25 +32,15 @@ GEM
15
32
  execjs
16
33
  coffee-script-source (1.12.2)
17
34
  commonjs (0.2.7)
18
- descendants_tracker (0.0.4)
19
- thread_safe (~> 0.3, >= 0.3.1)
35
+ concurrent-ruby (1.1.3)
36
+ diff-lcs (1.3)
20
37
  em-websocket (0.5.1)
21
38
  eventmachine (>= 0.12.9)
22
39
  http_parser.rb (~> 0.6.0)
23
- eventmachine (1.2.5)
40
+ eventmachine (1.2.7)
24
41
  execjs (2.7.0)
25
- faraday (0.9.2)
26
- multipart-post (>= 1.2, < 3)
27
- ffi (1.9.18)
42
+ ffi (1.9.25)
28
43
  formatador (0.2.5)
29
- git (1.3.0)
30
- github_api (0.16.0)
31
- addressable (~> 2.4.0)
32
- descendants_tracker (~> 0.0.4)
33
- faraday (~> 0.8, < 0.10)
34
- hashie (>= 3.4)
35
- mime-types (>= 1.16, < 3.0)
36
- oauth2 (~> 1.0)
37
44
  guard (2.8.2)
38
45
  formatador (>= 0.2.4)
39
46
  listen (~> 2.7)
@@ -46,102 +53,66 @@ GEM
46
53
  guard (~> 2.8)
47
54
  guard-compat (~> 1.0)
48
55
  multi_json (~> 1.8)
49
- hashie (3.5.7)
50
- highline (1.7.10)
51
- hike (1.2.3)
52
- hitimes (1.2.6)
56
+ hitimes (1.3.0)
53
57
  http_parser.rb (0.6.0)
54
- jeweler (2.3.7)
55
- builder
56
- bundler (>= 1)
57
- git (>= 1.2.5)
58
- github_api (~> 0.16.0)
59
- highline (>= 1.6.15)
60
- nokogiri (>= 1.5.10)
61
- psych (~> 2.2)
62
- rake
63
- rdoc
64
- semver2
65
- json (2.1.0)
66
- jwt (1.5.6)
67
58
  less (2.6.0)
68
59
  commonjs (~> 0.2.7)
69
- libv8 (3.16.14.19)
60
+ libv8 (6.7.288.46.1-x86_64-linux)
70
61
  listen (2.10.1)
71
62
  celluloid (~> 0.16.0)
72
63
  rb-fsevent (>= 0.9.3)
73
64
  rb-inotify (>= 0.9)
74
- lumberjack (1.0.12)
75
- method_source (0.9.0)
76
- mime-types (2.99.3)
77
- mini_portile2 (2.3.0)
65
+ lumberjack (1.0.13)
66
+ method_source (0.9.2)
67
+ mini_racer (0.2.4)
68
+ libv8 (>= 6.3)
78
69
  multi_json (1.13.1)
79
- multi_xml (0.6.0)
80
- multipart-post (2.0.0)
81
- mysql2 (0.4.10)
82
- nokogiri (1.8.1)
83
- mini_portile2 (~> 2.3.0)
84
- oauth2 (1.4.0)
85
- faraday (>= 0.8, < 0.13)
86
- jwt (~> 1.0)
87
- multi_json (~> 1.3)
88
- multi_xml (~> 0.5)
89
- rack (>= 1.2, < 3)
90
- pry (0.11.3)
70
+ mysql2 (0.5.2)
71
+ pry (0.12.2)
91
72
  coderay (~> 1.1.0)
92
73
  method_source (~> 0.9.0)
93
- psych (2.2.4)
94
- rack (1.6.8)
95
- rake (12.3.0)
96
- rb-fsevent (0.10.2)
74
+ rack (2.0.6)
75
+ rake (12.3.1)
76
+ rb-fsevent (0.10.3)
97
77
  rb-inotify (0.9.10)
98
78
  ffi (>= 0.5.0, < 2)
99
- rdoc (6.0.1)
100
- ref (2.0.0)
101
- rubyzip (1.2.1)
102
- sass (3.5.5)
79
+ rspec (3.8.0)
80
+ rspec-core (~> 3.8.0)
81
+ rspec-expectations (~> 3.8.0)
82
+ rspec-mocks (~> 3.8.0)
83
+ rspec-core (3.8.0)
84
+ rspec-support (~> 3.8.0)
85
+ rspec-expectations (3.8.2)
86
+ diff-lcs (>= 1.2.0, < 2.0)
87
+ rspec-support (~> 3.8.0)
88
+ rspec-mocks (3.8.0)
89
+ diff-lcs (>= 1.2.0, < 2.0)
90
+ rspec-support (~> 3.8.0)
91
+ rspec-support (3.8.0)
92
+ rubyzip (1.2.2)
93
+ sass (3.7.2)
103
94
  sass-listen (~> 4.0.0)
104
95
  sass-listen (4.0.0)
105
96
  rb-fsevent (~> 0.9, >= 0.9.4)
106
97
  rb-inotify (~> 0.9, >= 0.9.7)
107
- semver2 (3.4.2)
108
- sprockets (2.12.4)
109
- hike (~> 1.2)
110
- multi_json (~> 1.0)
111
- rack (~> 1.0)
112
- tilt (~> 1.1, != 1.3.0)
113
- therubyracer (0.12.3)
114
- libv8 (~> 3.16.14.15)
115
- ref
116
- thor (0.20.0)
117
- thread_safe (0.3.6)
98
+ sprockets (3.7.2)
99
+ concurrent-ruby (~> 1.0)
100
+ rack (> 1, < 3)
101
+ thor (0.20.3)
118
102
  tilt (1.4.1)
119
103
  timers (4.0.4)
120
104
  hitimes
121
- uglifier (2.7.2)
122
- execjs (>= 0.3.0)
123
- json (>= 1.8.0)
105
+ uglifier (4.1.20)
106
+ execjs (>= 0.3.0, < 3)
124
107
 
125
108
  PLATFORMS
126
109
  ruby
127
110
 
128
111
  DEPENDENCIES
129
- autoprefixer-rails (~> 7.2)
130
- bundler
131
- childprocess (~> 0.5)
132
- coffee-script (~> 2.3)
133
- guard (~> 2.8, < 2.9)
134
- guard-livereload (~> 2.4)
135
- jeweler
136
- less (~> 2.6)
137
- mysql2 (~> 0.3)
138
- rdoc
139
- rubyzip (~> 1.1)
140
- sass (~> 3.4)
141
- sprockets (~> 2.12)
142
- therubyracer (~> 0.12)
143
- thor (~> 0.19)
144
- uglifier (~> 2.7)
112
+ bundler (~> 1.15)
113
+ marv!
114
+ rake (~> 12.3)
115
+ rspec (~> 3.0)
145
116
 
146
117
  BUNDLED WITH
147
- 1.16.1
118
+ 1.17.1
data/Rakefile CHANGED
@@ -1,44 +1,6 @@
1
- # encoding: utf-8
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
2
3
 
3
- require 'rubygems'
4
- require 'bundler'
4
+ RSpec::Core::RakeTask.new(:spec)
5
5
 
6
- begin
7
- Bundler.setup(:default, :development)
8
- rescue Bundler::BundlerError => e
9
- $stderr.puts e.message
10
- $stderr.puts "Run `bundle install` to install missing gems"
11
- exit e.status_code
12
- end
13
-
14
- require 'rake'
15
- require 'jeweler'
16
-
17
- Jeweler::Tasks.new do |gem|
18
- # gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
19
- gem.name = "marv"
20
- gem.executables = ["marv"]
21
- gem.homepage = "http://hardpixel.github.io/marv"
22
- gem.license = "MIT"
23
- gem.summary = %Q{A command-line tool for developing wordpress themes and plugins}
24
- gem.description = %Q{A toolkit for bootstrapping and developing WordPress themes and plugins using Sass, LESS, and CoffeeScript.}
25
- gem.email = "info@hardpixel.eu"
26
- gem.authors = ["Jonian Guveli", "Olibia Tsati"]
27
- # dependencies defined in Gemfile
28
- gem.files.include Dir.glob('**/*')
29
- end
30
-
31
- Jeweler::RubygemsDotOrgTasks.new
32
-
33
- require 'rdoc/task'
34
-
35
- Rake::RDocTask.new do |rdoc|
36
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
37
-
38
- rdoc.rdoc_dir = 'rdoc'
39
- rdoc.title = "marv #{version}"
40
- rdoc.rdoc_files.include('README*')
41
- rdoc.rdoc_files.include('LICENSE*')
42
- rdoc.rdoc_files.include('CHANGELOG*')
43
- rdoc.rdoc_files.include('lib/**/*.rb')
44
- end
6
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "marv"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -9,4 +9,9 @@ $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
9
9
 
10
10
  require 'marv'
11
11
 
12
- Marv::CLI::Commands.start
12
+ at_exit do
13
+ Marv.exit_message
14
+ end
15
+
16
+ Marv.banner_message
17
+ Marv::CLI::Commands.start
@@ -2,17 +2,40 @@ require 'thor'
2
2
  require 'marv/cli'
3
3
  require 'marv/global'
4
4
 
5
+ BANNER = <<-TEXT
6
+
7
+ :::: :::: ::: ::::::::: ::: :::
8
+ +:+:+: :+:+:+ :+: :+: :+: :+: :+: :+:
9
+ +:+ +:+:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+
10
+ +#+ +:+ +#+ +#++:++#++: +#++:++#: +#+ +:+
11
+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+
12
+ #+# #+# #+# #+# #+# #+# #+#+#+#
13
+ ### ### ### ### ### ### ###
14
+
15
+ TEXT
16
+
5
17
  module Marv
6
18
 
7
19
  def self.root
8
20
  ::File.expand_path(::File.join(::File.dirname(__FILE__), '..'))
9
21
  end
10
22
 
23
+ def self.banner_message
24
+ puts BANNER
25
+ end
26
+
27
+ def self.exit_message
28
+ time = ::Time.now.strftime('%T')
29
+ puts "\n\n#{time} - INFO - Bye bye..."
30
+ end
31
+
32
+ def self.colorize(text, color)
33
+ @colorizer ||= Thor::Shell::Color.new
34
+ @colorizer.set_color(text, color)
35
+ end
36
+
11
37
  end
12
38
 
13
39
  trap 'SIGINT' do
14
- puts
15
- puts
16
- puts ::Time.now.strftime('%T') + ' - INFO - Bye bye...'
17
40
  exit 130
18
41
  end
@@ -5,12 +5,19 @@ module Marv
5
5
  module CLI
6
6
  class Commands < Project
7
7
 
8
+ # Print version
9
+ desc "version", "Show version information"
10
+ map %w(--version -v) => :version
11
+ def version
12
+ require_relative "version"
13
+ puts "v#{Marv::VERSION}"
14
+ end
15
+
8
16
  # Configure marv
9
17
  desc "config", "Configure Marv projects and servers"
10
18
  long_desc "Creates a global config.rb file that can be used to auto-configure your projects and servers"
11
19
  def config
12
- global = Marv::Global.new(self)
13
- global.reconfigure
20
+ Marv::Global.new(self, true)
14
21
  end
15
22
 
16
23
  desc "server [SUBCOMMAND]", "Manage marv servers (create, start and more...)"
@@ -18,4 +25,4 @@ module Marv
18
25
 
19
26
  end
20
27
  end
21
- end
28
+ end
@@ -0,0 +1,80 @@
1
+ module Marv
2
+ module CLI
3
+ class Base < Thor
4
+
5
+ # Include action helpers
6
+ include Thor::Actions
7
+
8
+ # Set layouts root path
9
+ def self.source_root
10
+ ::File.expand_path(::File.join(Marv.root, 'layouts'))
11
+ end
12
+
13
+ no_commands do
14
+ # Print an empty message
15
+ def say_empty(lines=1)
16
+ (1..lines).each { self.say('') }
17
+ end
18
+
19
+ # Print general message
20
+ def say_message(text, space_below=true, space_above=false, color=nil)
21
+ self.say_empty if space_above
22
+ self.say("#{text}", color)
23
+ self.say_empty if space_below
24
+ end
25
+
26
+ # Print error message
27
+ def say_error(text, message=nil, space_below=true, space_above=false)
28
+ say_message(text, false, space_above, :red)
29
+ say_message(message, space_below, false) unless message.nil?
30
+ end
31
+
32
+ # Print info message
33
+ def say_info(text, space_below=false, space_above=false)
34
+ say_message(text, space_below, space_above, :cyan)
35
+ end
36
+
37
+ # Print warning message
38
+ def say_warning(text, space_below=true, space_above=false)
39
+ say_message(text, space_below, space_above, :yellow)
40
+ end
41
+
42
+ # Print success message
43
+ def say_success(text, space_below=true, space_above=false)
44
+ say_message(text, space_below, space_above, :green)
45
+ end
46
+
47
+ # Ask for user input
48
+ def ask_input(text, color=nil, *args)
49
+ self.ask("#{text}", color, *args)
50
+ end
51
+
52
+ # Ask for option value
53
+ def ask_option(text, color=nil, *args)
54
+ self.ask(" #{text}", color, *args)
55
+ end
56
+
57
+ # Ask to change options
58
+ def said_change?(text, *args)
59
+ self.yes?("» #{text}", :cyan, *args)
60
+ end
61
+
62
+ # Ask for yes answer
63
+ def said_yes?(text, *args)
64
+ self.yes?("#{text}", :cyan, *args)
65
+ end
66
+
67
+ # Ask for no answer
68
+ def said_no?(text, *args)
69
+ self.no?("#{text}", :yellow, *args)
70
+ end
71
+
72
+ # Check if executable exists
73
+ def exec_exixts?(name)
74
+ `which #{name}`.start_with?('/')
75
+ end
76
+ end
77
+
78
+ end
79
+ end
80
+ end