microservice_precompiler 0.1.5 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +3 -0
- data/.travis.yml +2 -2
- data/Gemfile +3 -1
- data/README.md +27 -24
- data/lib/microservice_precompiler/builder.rb +100 -64
- data/lib/microservice_precompiler/version.rb +1 -1
- data/microservice_precompiler.gemspec +8 -14
- data/test/dummy/sass/dependencies/link_icons.scss +4 -6
- data/test/unit/builder_test.rb +10 -11
- metadata +62 -115
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 057e951e2e6a5c9e71f7dcdc00a77078143be3c1
|
4
|
+
data.tar.gz: 949304f729f0cf6e3413a13ea78e32fd69049ecd
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 18bff90e9b509a28acbfa9fbf8c721e1ffa29765c082546a095d9d39ab76ae3596f5a37c7593bebb702ebd4830f6bca6dfdeb2e434b36cff4e5a142263138ca9
|
7
|
+
data.tar.gz: a60fa823a061be41b3b694d2493b05c0d6a927e109a7f486789709710ef65fd27143871a14a3c3685cbae2637f57bd65c1ac5829d82a9cb65dc5a32deb2c081f
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -6,50 +6,48 @@
|
|
6
6
|
[![Gem Version](https://badge.fury.io/rb/microservice_precompiler.png)](http://badge.fury.io/rb/microservice_precompiler)
|
7
7
|
[![Coverage Status](https://coveralls.io/repos/barnabyalter/microservice_precompiler/badge.png?branch=master)](https://coveralls.io/r/barnabyalter/microservice_precompiler)
|
8
8
|
|
9
|
-
The microservice precompiler uses a handful of technologies to compile Javascripts and Stylesheets and create HTML pages from templates into a distribution folder ready for deployment. The microservices used are CoffeeScript, SASS and Mustache, compiling and minifying (where possible) into Javascript, CSS and HTML, respectively.
|
9
|
+
The microservice precompiler uses a handful of technologies to compile Javascripts and Stylesheets and create HTML pages from templates into a distribution folder ready for deployment. The so-called "microservices" used are CoffeeScript, SASS and Mustache, compiling and minifying (where possible) into Javascript, CSS and HTML, respectively.
|
10
10
|
|
11
|
-
The SASS is compiled into CSS via Compass; the CoffeeScript is translated to Javascript via Sprockets; both CSS and JS have their dependency trees included in-file by Sprockets; CSS and JS are then minified and compressed via YUICompressor and Uglifier, respectively.
|
11
|
+
The SASS (or SCSS) is compiled into CSS via Compass; the CoffeeScript is translated to Javascript via Sprockets; both CSS and JS have their dependency trees included in-file by Sprockets; CSS and JS are then minified and compressed via YUICompressor and Uglifier, respectively.
|
12
12
|
|
13
13
|
The gem requires that your project root be a Compass project and expects that you have a folder structure matching the following in the root of your project:
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
javascripts/
|
16
|
+
sass/
|
17
|
+
templates/
|
18
18
|
mustaches.yml
|
19
19
|
|
20
|
-
Where javascripts contains your Coffee, sass contains your SASS, templates contains a folder structure matching your mustaches.yml file for building out pages from mustache templates.
|
20
|
+
Where javascripts/ contains your Coffee, sass/ contains your SASS, and templates contains a folder structure matching your mustaches.yml file for building out pages from mustache templates (see below).
|
21
21
|
|
22
22
|
## Installation
|
23
23
|
|
24
|
-
|
24
|
+
To use with bundler add this to your Gemfile:
|
25
25
|
|
26
26
|
gem 'microservice_precompiler'
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
$ bundle
|
31
|
-
|
32
|
-
Or install it yourself as:
|
28
|
+
Or install it yourself:
|
33
29
|
|
34
30
|
$ gem install microservice_precompiler
|
35
31
|
|
36
32
|
## Usage
|
37
33
|
|
38
|
-
To build all assets and templates into the distribution (./dist by default) folder
|
34
|
+
To build all assets and templates into the distribution (./dist by default) folder:
|
35
|
+
|
36
|
+
```ruby
|
37
|
+
require 'microservice_precompiler'
|
38
|
+
precompiler = MicroservicePrecompiler::Builder.new
|
39
|
+
precompiler.compile
|
40
|
+
```
|
39
41
|
|
40
|
-
require 'microservice_precompiler'
|
41
|
-
precompiler = MicroservicePrecompiler::Builder.new
|
42
|
-
precompiler.compile
|
43
|
-
|
44
42
|
Or with initialize options:
|
45
|
-
|
43
|
+
|
46
44
|
require 'microservice_precompiler'
|
47
45
|
precompiler = MicroservicePrecompiler::Builder.new
|
48
46
|
precompiler.project_root = "."
|
49
47
|
precompiler.build_path = "dist"
|
50
|
-
precompiler.
|
48
|
+
precompiler.mustaches_filename = "mustaches.yml"
|
51
49
|
precompiler.compile
|
52
|
-
|
50
|
+
|
53
51
|
This runs all the precompiling options. Each can also be invoked individually:
|
54
52
|
|
55
53
|
# Clears the dist folder and sass cache files
|
@@ -60,14 +58,16 @@ This runs all the precompiling options. Each can also be invoked individually:
|
|
60
58
|
precompiler.sprockets_build
|
61
59
|
# Runs the Mustache template build, which creates output files with the same syntax from the mustaches config yaml
|
62
60
|
precompiler.mustache_build
|
63
|
-
|
61
|
+
|
64
62
|
### SASS and CoffeeScript
|
65
63
|
|
66
64
|
These two parts are pretty simple. They are contained within their relevant directories and are written in their respective technologies. Because Sprockets is used to compile them the folders may contain subfolders which are automatically included in-line if the following line is present in a top-level file (where dependencies is the name of the subfolder you wish to include):
|
67
65
|
|
68
|
-
|
69
|
-
|
70
|
-
|
66
|
+
```coffee
|
67
|
+
/*
|
68
|
+
*=require_tree ./dependencies
|
69
|
+
*/
|
70
|
+
```
|
71
71
|
|
72
72
|
### Mustache templating
|
73
73
|
|
@@ -98,3 +98,6 @@ The mustache builder requires you to provide a template file and a logic file fr
|
|
98
98
|
3. Commit your changes (`git commit -am 'Added some feature'`)
|
99
99
|
4. Push to the branch (`git push origin my-new-feature`)
|
100
100
|
5. Create new Pull Request
|
101
|
+
|
102
|
+
|
103
|
+
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/barnabyalter/microservice_precompiler/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
|
@@ -1,44 +1,46 @@
|
|
1
1
|
module MicroservicePrecompiler
|
2
2
|
class Builder
|
3
|
-
attr_accessor :project_root, :build_path, :
|
4
|
-
|
5
|
-
def initialize
|
3
|
+
attr_accessor :project_root, :build_path, :mustaches_filename
|
4
|
+
|
5
|
+
def initialize(project_root = ".", build_path = "dist", mustaches_filename = "mustaches.yml.tml")
|
6
6
|
@project_root = project_root
|
7
7
|
@build_path = File.join(@project_root, build_path)
|
8
|
-
@
|
8
|
+
@mustaches_filename = mustaches_filename
|
9
9
|
end
|
10
10
|
|
11
|
+
# Convenience method runs all the compilation tasks in order
|
11
12
|
def compile
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
end
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
13
|
+
cleanup
|
14
|
+
compass_build
|
15
|
+
sprockets_build
|
16
|
+
mustache_build
|
17
|
+
end
|
18
|
+
|
19
|
+
# Public function for running cleanup of previous build
|
20
|
+
def cleanup(sprocket_assets = [:javascripts, :stylesheets])
|
21
|
+
# Remove previous dist path
|
22
|
+
FileUtils.rm_r build_path if File.exists?(build_path)
|
23
|
+
# Clean compass project
|
24
|
+
Compass::Exec::SubCommandUI.new(["clean", project_root]).run!
|
21
25
|
# Don't initialize Compass assets, the config will take care of it
|
22
26
|
sprocket_assets.each do |asset|
|
23
|
-
FileUtils.mkdir_p File.join(
|
27
|
+
FileUtils.mkdir_p File.join(build_path, asset.to_s)
|
24
28
|
end
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
if mustaches_config
|
29
|
-
mustaches_config.each_key do |dir|
|
30
|
-
FileUtils.mkdir_p File.join(@build_path, dir.to_s)
|
31
|
-
end
|
29
|
+
if mustaches_config_file_exists?
|
30
|
+
mustaches_yaml.each_key do |dir|
|
31
|
+
FileUtils.mkdir_p File.join(build_path, dir.to_s)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
35
|
-
|
35
|
+
|
36
|
+
# Public function for wrapping a compass compiler
|
36
37
|
def compass_build
|
37
|
-
Compass::Exec::SubCommandUI.new(["compile",
|
38
|
+
Compass::Exec::SubCommandUI.new(["compile", project_root, "-s", "compact"]).run!
|
38
39
|
end
|
39
40
|
alias_method :compass, :compass_build
|
40
|
-
|
41
|
-
|
41
|
+
|
42
|
+
# Public function for building sprockets assets and minifying
|
43
|
+
def sprockets_build(sprocket_assets = [:javascripts, :stylesheets])
|
42
44
|
sprocket_assets.each do |asset_type|
|
43
45
|
load_path = File.join(@project_root, asset_type.to_s)
|
44
46
|
next unless File.exists?(load_path)
|
@@ -47,35 +49,45 @@ module MicroservicePrecompiler
|
|
47
49
|
file = File.join(load_path, filename)
|
48
50
|
if File.file?(file)
|
49
51
|
asset = sprockets_env[filename]
|
50
|
-
attributes = sprockets_env.
|
51
|
-
|
52
|
+
attributes = sprockets_env.find_asset(asset.pathname)
|
53
|
+
# logical_path is the filename
|
54
|
+
build_file = File.join(build_path, asset_type.to_s, attributes.logical_path)
|
52
55
|
File.open(build_file, 'w') do |f|
|
53
|
-
|
56
|
+
extension = attributes.logical_path.split(".").last
|
57
|
+
f.write(minify(asset, extension))
|
54
58
|
end
|
55
59
|
end
|
56
60
|
end
|
57
61
|
end
|
58
62
|
end
|
59
63
|
alias_method :sprockets, :sprockets_build
|
60
|
-
|
64
|
+
|
65
|
+
# Public function for building mustache tree into html
|
61
66
|
def mustache_build
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
mustaches_config = YAML.load_file(mustaches_config_file)
|
66
|
-
if mustaches_config.is_a? Hash
|
67
|
-
mustache_build_folder_structure(mustaches_config)
|
67
|
+
if mustaches_config_file_exists?
|
68
|
+
if mustaches_yaml.is_a? Hash
|
69
|
+
mustache_build_folder_structure(mustaches_yaml)
|
68
70
|
end
|
69
71
|
end
|
70
72
|
end
|
71
73
|
alias_method :mustache, :mustache_build
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
74
|
+
|
75
|
+
private
|
76
|
+
|
77
|
+
def method_missing(method_id, *args)
|
78
|
+
if match = matches_file_exists_check?(method_id)
|
79
|
+
File.exists?(send(method_id.to_s.gsub(/_exists\?/,"")))
|
80
|
+
else
|
81
|
+
super
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# Render mustache into html for complex directory structure
|
86
|
+
# Loop through each directory matched to a set of mustache classes/subclasses
|
87
|
+
def mustache_build_folder_structure(logic_file, parent = nil)
|
88
|
+
logic_file.each do |dir, mustaches|
|
89
|
+
dir = [parent, dir].join("/")
|
90
|
+
|
79
91
|
mustaches.each do |mustache|
|
80
92
|
# Get the name of the template class
|
81
93
|
template_class = (mustache.is_a? Hash) ? mustache.keys.first : mustache
|
@@ -85,60 +97,84 @@ module MicroservicePrecompiler
|
|
85
97
|
if mustache[template_class].is_a? Array
|
86
98
|
mustache[template_class].each do |logic_file|
|
87
99
|
if logic_file.is_a? Hash
|
88
|
-
|
100
|
+
# If the logic file is an array, then treat it like a folder and recurse
|
89
101
|
mustache_build_folder_structure(logic_file, dir)
|
90
102
|
else
|
103
|
+
# If the logic file is a single file, then render the template
|
91
104
|
mustache_template_build(dir, template_file, logic_file)
|
92
105
|
end
|
93
106
|
end
|
94
107
|
else
|
108
|
+
# Base case: If the logic file is not an array of clases, render the template
|
95
109
|
mustache_template_build(dir, template_file, template_class)
|
96
110
|
end
|
97
111
|
end
|
98
|
-
end
|
112
|
+
end
|
99
113
|
end
|
100
|
-
|
101
|
-
|
114
|
+
|
115
|
+
# Render html from a mustache template
|
116
|
+
def mustache_template_build(dir, template_file, logic_file)
|
117
|
+
# Get the class name from an underscore-named file
|
102
118
|
logic_class_name = underscore_to_camelcase(logic_file)
|
103
|
-
|
119
|
+
# Output file should match the syntax of the mustaches config
|
120
|
+
output_file = logic_file
|
121
|
+
# Now we can name the logic_file to underscored version
|
104
122
|
logic_file = camelcase_to_underscore(logic_file)
|
105
123
|
# Require logic file, used to generate content from template
|
106
|
-
require File.join(
|
124
|
+
require File.join(project_root, camelcase_to_underscore(dir), logic_file)
|
107
125
|
# Create relevant directory path
|
108
|
-
FileUtils.mkdir_p File.join(
|
126
|
+
FileUtils.mkdir_p File.join(build_path, dir.to_s)
|
109
127
|
# Instantiate class from required file
|
110
128
|
mustache = Kernel.const_get(logic_class_name).new
|
111
|
-
# Set the template
|
112
|
-
mustache.template_file = File.join(
|
129
|
+
# Set the template file
|
130
|
+
mustache.template_file = File.join(project_root, camelcase_to_underscore(dir), template_file) + ".html.mustache"
|
113
131
|
# Get the name of the file we will write to after it's template is processed
|
114
|
-
build_file = File.join(
|
132
|
+
build_file = File.join(build_path, dir, "#{output_file}.html")
|
115
133
|
File.open(build_file, 'w') do |f|
|
116
134
|
f.write(mustache.render)
|
117
|
-
end
|
118
|
-
end
|
119
|
-
|
120
|
-
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
# Convert a camelcase string to underscores
|
139
|
+
def camelcase_to_underscore(camelcase_string)
|
121
140
|
return camelcase_string.gsub(/([A-Za-z0-9])([A-Z])/,'\1_\2').downcase
|
122
141
|
end
|
123
|
-
|
124
|
-
|
142
|
+
|
143
|
+
# Conver underscore to camelcase
|
144
|
+
def underscore_to_camelcase(underscore_string)
|
125
145
|
underscore_string = underscore_string.gsub(/(_)/,' ').split(' ').each { |word| word.capitalize! }.join("") unless underscore_string.match(/_/).nil?
|
126
146
|
underscore_string = underscore_string if underscore_string.match(/_/).nil?
|
127
147
|
return underscore_string
|
128
148
|
end
|
129
|
-
|
149
|
+
|
150
|
+
# Initialize sprockets environment
|
130
151
|
def sprockets_env
|
131
|
-
|
132
|
-
@sprockets_env ||= Sprockets::Environment.new(@project_root) { |env| env.logger = Logger.new(STDOUT) }
|
152
|
+
@sprockets_env ||= Sprockets::Environment.new(project_root) { |env| env.logger = Logger.new(STDOUT) }
|
133
153
|
end
|
134
|
-
|
135
|
-
|
154
|
+
|
155
|
+
# Minify assets in format
|
156
|
+
def minify(asset, format)
|
136
157
|
asset = asset.to_s
|
137
158
|
# Minify JS
|
138
159
|
return Uglifier.compile(asset) if format.eql?(".js")
|
139
160
|
# Minify CSS
|
140
161
|
return YUI::CssCompressor.new.compress(asset) if format.eql?(".css")
|
141
162
|
end
|
142
|
-
|
163
|
+
|
164
|
+
# Get the mustache config file with fullpath
|
165
|
+
def mustaches_config_file
|
166
|
+
@mustaches_config_file ||= File.join(project_root, mustaches_filename)
|
167
|
+
end
|
168
|
+
|
169
|
+
# Load the mustaches yaml file into a yaml object
|
170
|
+
def mustaches_yaml
|
171
|
+
@mustaches_yaml ||= YAML.load_file(mustaches_config_file)
|
172
|
+
end
|
173
|
+
|
174
|
+
# Match arbitrary_filename_file_exists?
|
175
|
+
def matches_file_exists_check?(method_id)
|
176
|
+
/^(.+)_file_exists\?$/.match(method_id.to_s)
|
177
|
+
end
|
178
|
+
|
143
179
|
end
|
144
180
|
end
|
@@ -7,25 +7,19 @@ Gem::Specification.new do |gem|
|
|
7
7
|
gem.description = %q{The microservice precompiler uses a handful of technologies to compile Javascripts and Stylesheets and create HTML pages from templates into a distribution folder ready for deployment. The microservices used are CoffeeScript, SASS and Mustache, compiling and minifying (where possible) into Javascript, CSS and HTML, respectively.}
|
8
8
|
gem.summary = %q{The microservice precompiler uses a handful of technologies to compile Javascripts and Stylesheets and create HTML pages from templates into a distribution folder ready for deployment.}
|
9
9
|
gem.homepage = "https://github.com/barnabyalter/microservice-precompiler"
|
10
|
+
gem.licenses = ['MIT']
|
10
11
|
|
11
|
-
|
12
12
|
gem.files = `git ls-files`.split($\)
|
13
13
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
14
14
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
15
15
|
gem.name = "microservice_precompiler"
|
16
16
|
gem.require_paths = ["lib"]
|
17
17
|
gem.version = MicroservicePrecompiler::VERSION
|
18
|
-
|
19
|
-
#gem.add_development_dependency "rspec", "~> 2.6"
|
20
|
-
gem.add_dependency "rake", "~> 10.0.2"
|
21
|
-
gem.add_development_dependency "debugger"
|
22
|
-
gem.add_development_dependency "travis-lint"
|
23
|
-
gem.add_development_dependency "reek"
|
24
|
-
gem.add_dependency "compass", "~> 0.12.1"
|
25
|
-
gem.add_dependency "sprockets", "~> 2.8.2"
|
26
|
-
gem.add_dependency "uglifier", "~> 1.3.0"
|
27
|
-
gem.add_dependency "mustache", "~> 0.99.4"
|
28
|
-
gem.add_dependency "yui-compressor", "~> 0.9.6"
|
29
|
-
gem.add_dependency "coffee-script", "~> 2.2.0"
|
30
|
-
end
|
31
18
|
|
19
|
+
gem.add_dependency 'compass', '~> 1.0', '>= 1.0.0'
|
20
|
+
gem.add_dependency 'sprockets', '~> 3.0', '>= 3.0.0'
|
21
|
+
gem.add_dependency 'uglifier', '~> 2.7', '>= 2.7.1'
|
22
|
+
gem.add_dependency 'mustache', '>= 0.99.4'
|
23
|
+
gem.add_dependency 'yui-compressor', '~> 0.12', '>= 0.12.0'
|
24
|
+
gem.add_dependency 'coffee-script', '~> 2.4', '>= 2.4.0'
|
25
|
+
end
|
@@ -1,13 +1,11 @@
|
|
1
|
-
@import "
|
1
|
+
@import "compass/utilities/sprites";
|
2
|
+
@import "link_icons/*.png";
|
3
|
+
@include all-link-icons-sprites;
|
2
4
|
|
3
5
|
// This turns link icons on for all links. You can change the scoping selector from
|
4
6
|
// body to something more specific if you prefer.
|
5
7
|
body {
|
6
|
-
@include link-icons;
|
7
|
-
// Use this class if a link gets an icon when it shouldn't.
|
8
|
-
a.noicon {
|
9
|
-
@include no-link-icon; }
|
10
8
|
// Not all links have a url structure that can be detected,
|
11
9
|
// So you can set them explicitly yourself like so:
|
12
10
|
a#this-is-a-pdf-link {
|
13
|
-
@include link-
|
11
|
+
@include link-icons-sprite(doc); } }
|
data/test/unit/builder_test.rb
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
require 'rubygems'
|
2
|
-
require 'ruby-debug'
|
3
2
|
require 'test_helper'
|
4
3
|
|
5
4
|
class BuilderTest < Test::Unit::TestCase
|
6
|
-
|
5
|
+
|
7
6
|
def setup
|
8
7
|
@project_root = File.dirname(__FILE__) + '/../dummy'
|
9
8
|
@precompiler = MicroservicePrecompiler::Builder.new(@project_root)
|
10
9
|
@sprocket_assets = [:javascripts, :stylesheets]
|
11
10
|
end
|
12
|
-
|
11
|
+
|
13
12
|
def test_initialize
|
14
13
|
precompiler = nil
|
15
14
|
assert_nothing_raised(){ precompiler = MicroservicePrecompiler::Builder.new(@project_root) }
|
@@ -17,10 +16,10 @@ class BuilderTest < Test::Unit::TestCase
|
|
17
16
|
assert_equal(precompiler.project_root, @project_root)
|
18
17
|
assert_not_nil(precompiler.build_path)
|
19
18
|
assert_equal(precompiler.build_path, @project_root + "/dist")
|
20
|
-
assert_not_nil(precompiler.
|
21
|
-
assert_equal(precompiler.
|
19
|
+
assert_not_nil(precompiler.mustaches_filename)
|
20
|
+
assert_equal(precompiler.mustaches_filename, "mustaches.yml.tml")
|
22
21
|
end
|
23
|
-
|
22
|
+
|
24
23
|
def test_cleanup
|
25
24
|
cleanup = nil
|
26
25
|
assert_nothing_raised(){ cleanup = @precompiler.cleanup }
|
@@ -30,13 +29,13 @@ class BuilderTest < Test::Unit::TestCase
|
|
30
29
|
assert((File.exists? "#{@project_root}/dist/javascripts"), "No javascripts folder found")
|
31
30
|
assert((File.exists? "#{@project_root}/dist/templates"), "No templates folder found")
|
32
31
|
end
|
33
|
-
|
32
|
+
|
34
33
|
def test_compass_build
|
35
34
|
compass = nil
|
36
35
|
assert_nothing_raised(){ compass = @precompiler.compass_build }
|
37
36
|
assert((File.exists? "#{@project_root}/stylesheets"), "No stylesheets folder found, compass build failed")
|
38
37
|
end
|
39
|
-
|
38
|
+
|
40
39
|
def test_sprockets_build
|
41
40
|
sprockets = nil
|
42
41
|
assert_nothing_raised(){ sprockets = @precompiler.sprockets_build }
|
@@ -48,7 +47,7 @@ class BuilderTest < Test::Unit::TestCase
|
|
48
47
|
#Check that the files in javascripts are minimized
|
49
48
|
#TODO
|
50
49
|
end
|
51
|
-
|
50
|
+
|
52
51
|
def test_mustache_build
|
53
52
|
mustache = nil
|
54
53
|
assert_nothing_raised(){ mustache = @precompiler.mustache_build }
|
@@ -56,6 +55,6 @@ class BuilderTest < Test::Unit::TestCase
|
|
56
55
|
assert((File.exists? "#{@project_root}/dist/templates"), "No templates folder found")
|
57
56
|
assert((File.exists? "#{@project_root}/dist/templates/Sample.html"), "File not found.")
|
58
57
|
end
|
59
|
-
|
60
58
|
|
61
|
-
|
59
|
+
|
60
|
+
end
|
metadata
CHANGED
@@ -1,176 +1,129 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: microservice_precompiler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- barnabyalter
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-04-29 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
14
|
+
name: compass
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
- - ">="
|
20
21
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
22
|
+
version: 1.0.0
|
22
23
|
type: :runtime
|
23
24
|
prerelease: false
|
24
25
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
26
|
requirements:
|
27
|
-
- - ~>
|
27
|
+
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
30
|
-
-
|
31
|
-
name: debugger
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - ! '>='
|
29
|
+
version: '1.0'
|
30
|
+
- - ">="
|
36
31
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
38
|
-
type: :development
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ! '>='
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '0'
|
32
|
+
version: 1.0.0
|
46
33
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
|
-
requirements:
|
51
|
-
- - ! '>='
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ! '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: reek
|
34
|
+
name: sprockets
|
64
35
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
36
|
requirements:
|
67
|
-
- -
|
37
|
+
- - "~>"
|
68
38
|
- !ruby/object:Gem::Version
|
69
|
-
version: '0'
|
70
|
-
|
71
|
-
prerelease: false
|
72
|
-
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
|
-
requirements:
|
75
|
-
- - ! '>='
|
39
|
+
version: '3.0'
|
40
|
+
- - ">="
|
76
41
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
78
|
-
- !ruby/object:Gem::Dependency
|
79
|
-
name: compass
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
|
-
requirements:
|
83
|
-
- - ~>
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: 0.12.1
|
42
|
+
version: 3.0.0
|
86
43
|
type: :runtime
|
87
44
|
prerelease: false
|
88
45
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
|
-
requirements:
|
91
|
-
- - ~>
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: 0.12.1
|
94
|
-
- !ruby/object:Gem::Dependency
|
95
|
-
name: sprockets
|
96
|
-
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
46
|
requirements:
|
99
|
-
- - ~>
|
47
|
+
- - "~>"
|
100
48
|
- !ruby/object:Gem::Version
|
101
|
-
version:
|
102
|
-
|
103
|
-
prerelease: false
|
104
|
-
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
|
-
requirements:
|
107
|
-
- - ~>
|
49
|
+
version: '3.0'
|
50
|
+
- - ">="
|
108
51
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
52
|
+
version: 3.0.0
|
110
53
|
- !ruby/object:Gem::Dependency
|
111
54
|
name: uglifier
|
112
55
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
56
|
requirements:
|
115
|
-
- - ~>
|
57
|
+
- - "~>"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '2.7'
|
60
|
+
- - ">="
|
116
61
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
62
|
+
version: 2.7.1
|
118
63
|
type: :runtime
|
119
64
|
prerelease: false
|
120
65
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
66
|
requirements:
|
123
|
-
- - ~>
|
67
|
+
- - "~>"
|
124
68
|
- !ruby/object:Gem::Version
|
125
|
-
version:
|
69
|
+
version: '2.7'
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 2.7.1
|
126
73
|
- !ruby/object:Gem::Dependency
|
127
74
|
name: mustache
|
128
75
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
76
|
requirements:
|
131
|
-
- -
|
77
|
+
- - ">="
|
132
78
|
- !ruby/object:Gem::Version
|
133
79
|
version: 0.99.4
|
134
80
|
type: :runtime
|
135
81
|
prerelease: false
|
136
82
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
83
|
requirements:
|
139
|
-
- -
|
84
|
+
- - ">="
|
140
85
|
- !ruby/object:Gem::Version
|
141
86
|
version: 0.99.4
|
142
87
|
- !ruby/object:Gem::Dependency
|
143
88
|
name: yui-compressor
|
144
89
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
90
|
requirements:
|
147
|
-
- - ~>
|
91
|
+
- - "~>"
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0.12'
|
94
|
+
- - ">="
|
148
95
|
- !ruby/object:Gem::Version
|
149
|
-
version: 0.
|
96
|
+
version: 0.12.0
|
150
97
|
type: :runtime
|
151
98
|
prerelease: false
|
152
99
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
100
|
requirements:
|
155
|
-
- - ~>
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.12'
|
104
|
+
- - ">="
|
156
105
|
- !ruby/object:Gem::Version
|
157
|
-
version: 0.
|
106
|
+
version: 0.12.0
|
158
107
|
- !ruby/object:Gem::Dependency
|
159
108
|
name: coffee-script
|
160
109
|
requirement: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
110
|
requirements:
|
163
|
-
- - ~>
|
111
|
+
- - "~>"
|
164
112
|
- !ruby/object:Gem::Version
|
165
|
-
version: 2.
|
113
|
+
version: '2.4'
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: 2.4.0
|
166
117
|
type: :runtime
|
167
118
|
prerelease: false
|
168
119
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
none: false
|
170
120
|
requirements:
|
171
|
-
- - ~>
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '2.4'
|
124
|
+
- - ">="
|
172
125
|
- !ruby/object:Gem::Version
|
173
|
-
version: 2.
|
126
|
+
version: 2.4.0
|
174
127
|
description: The microservice precompiler uses a handful of technologies to compile
|
175
128
|
Javascripts and Stylesheets and create HTML pages from templates into a distribution
|
176
129
|
folder ready for deployment. The microservices used are CoffeeScript, SASS and Mustache,
|
@@ -181,8 +134,8 @@ executables: []
|
|
181
134
|
extensions: []
|
182
135
|
extra_rdoc_files: []
|
183
136
|
files:
|
184
|
-
- .gitignore
|
185
|
-
- .travis.yml
|
137
|
+
- ".gitignore"
|
138
|
+
- ".travis.yml"
|
186
139
|
- Gemfile
|
187
140
|
- LICENSE
|
188
141
|
- README.md
|
@@ -222,34 +175,28 @@ files:
|
|
222
175
|
- test/test_helper.rb
|
223
176
|
- test/unit/builder_test.rb
|
224
177
|
homepage: https://github.com/barnabyalter/microservice-precompiler
|
225
|
-
licenses:
|
178
|
+
licenses:
|
179
|
+
- MIT
|
180
|
+
metadata: {}
|
226
181
|
post_install_message:
|
227
182
|
rdoc_options: []
|
228
183
|
require_paths:
|
229
184
|
- lib
|
230
185
|
required_ruby_version: !ruby/object:Gem::Requirement
|
231
|
-
none: false
|
232
186
|
requirements:
|
233
|
-
- -
|
187
|
+
- - ">="
|
234
188
|
- !ruby/object:Gem::Version
|
235
189
|
version: '0'
|
236
|
-
segments:
|
237
|
-
- 0
|
238
|
-
hash: 385532644168721467
|
239
190
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
240
|
-
none: false
|
241
191
|
requirements:
|
242
|
-
- -
|
192
|
+
- - ">="
|
243
193
|
- !ruby/object:Gem::Version
|
244
194
|
version: '0'
|
245
|
-
segments:
|
246
|
-
- 0
|
247
|
-
hash: 385532644168721467
|
248
195
|
requirements: []
|
249
196
|
rubyforge_project:
|
250
|
-
rubygems_version:
|
197
|
+
rubygems_version: 2.2.3
|
251
198
|
signing_key:
|
252
|
-
specification_version:
|
199
|
+
specification_version: 4
|
253
200
|
summary: The microservice precompiler uses a handful of technologies to compile Javascripts
|
254
201
|
and Stylesheets and create HTML pages from templates into a distribution folder
|
255
202
|
ready for deployment.
|