rubyhtmlapp 0.0.3 → 0.0.4
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 +4 -4
- data/bin/rubyhtmlapp +4 -4
- data/lib/{RubyHtmlApp.rb → rubyhtmlapp.rb} +3 -3
- data/lib/{RubyHtmlApp → rubyhtmlapp}/cli.rb +0 -0
- data/lib/{RubyHtmlApp → rubyhtmlapp}/helpers.rb +36 -36
- data/lib/{RubyHtmlApp → rubyhtmlapp}/templates/cli.rb +9 -9
- data/lib/{RubyHtmlApp → rubyhtmlapp}/templates/helpers.rb +3 -3
- data/lib/{RubyHtmlApp → rubyhtmlapp}/templates/html/application.html.haml +0 -0
- data/lib/{RubyHtmlApp → rubyhtmlapp}/templates/html/layout.html.haml +9 -9
- data/lib/{RubyHtmlApp → rubyhtmlapp}/templates/javascripts/application.js +6 -6
- data/lib/{RubyHtmlApp → rubyhtmlapp}/templates/newgem.gemspec +0 -0
- data/lib/{RubyHtmlApp → rubyhtmlapp}/templates/newgem.rb +0 -0
- data/lib/{RubyHtmlApp → rubyhtmlapp}/templates/run +5 -5
- data/lib/{RubyHtmlApp → rubyhtmlapp}/templates/stylesheets/application.css +9 -9
- data/lib/{RubyHtmlApp → rubyhtmlapp}/version.rb +1 -1
- data/{RubyHtmlApp.gemspec → rubyhtmlapp.gemspec} +31 -31
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0f5688ccfaed49b594b240fdd426a0d6a31e6d1
|
4
|
+
data.tar.gz: fafaab8ae29358f4bec6a9330692026f91c9553b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bcee26f2e8a2d590c0c6a471a0cb94206c2256995e6265877e1cdd8b9f4802abf6923cf36cc0d224d860780a1c13960059700edf6e2676493811f478b53fc32
|
7
|
+
data.tar.gz: 15478db0e37a66c3381cfed7a09cf8174837226d68b8fa8ab1d1407abd8feaf221ea02297667096d8ed25d5a7ca7b246ca9d2fd670efd71cc4e838533ed570d7
|
data/bin/rubyhtmlapp
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'rubyhtmlapp'
|
4
|
-
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'rubyhtmlapp'
|
4
|
+
|
5
5
|
RubyHtmlApp::CLI.start(ARGV)
|
@@ -11,9 +11,9 @@ require 'thor'
|
|
11
11
|
require 'templater'
|
12
12
|
|
13
13
|
#gem files
|
14
|
-
require '
|
15
|
-
require '
|
16
|
-
require '
|
14
|
+
require 'rubyhtmlapp/version'
|
15
|
+
require 'rubyhtmlapp/helpers'
|
16
|
+
require 'rubyhtmlapp/cli'
|
17
17
|
|
18
18
|
module RubyHtmlApp
|
19
19
|
class HtmlApp
|
File without changes
|
@@ -1,37 +1,37 @@
|
|
1
|
-
require 'tilt'
|
2
|
-
require 'sprockets'
|
3
|
-
require 'find'
|
4
|
-
|
5
|
-
module RubyHtmlApp
|
6
|
-
module Helpers
|
7
|
-
def render(partial, locals={}, &block)
|
8
|
-
Tilt.new(find_f(@partial_path, "_#{partial}.html*")).render(self, locals, &block)
|
9
|
-
end
|
10
|
-
|
11
|
-
def include_dir(dir, locals={}, &block)
|
12
|
-
html = ""
|
13
|
-
find_f_each(File.join(@partial_path, dir), "*.html*") do |f|
|
14
|
-
html.concat(Tilt.new(f).render(self, locals, &block))
|
15
|
-
end
|
16
|
-
return html
|
17
|
-
end
|
18
|
-
|
19
|
-
def asset_data_uri(path)
|
20
|
-
asset = @sprocket_env[path]
|
21
|
-
Sprockets::Context.new(@sprocket_env, asset.logical_path, asset.pathname).asset_data_uri(path)
|
22
|
-
end
|
23
|
-
|
24
|
-
def find_f(path, pattern)
|
25
|
-
Find.find(path) do |f|
|
26
|
-
return f if File.fnmatch?(pattern, File.basename(f))
|
27
|
-
end
|
28
|
-
nil
|
29
|
-
end
|
30
|
-
|
31
|
-
def find_f_each(path, pattern)
|
32
|
-
Find.find(path) do |f|
|
33
|
-
yield(f) if File.fnmatch?(pattern, File.basename(f))
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
1
|
+
require 'tilt'
|
2
|
+
require 'sprockets'
|
3
|
+
require 'find'
|
4
|
+
|
5
|
+
module RubyHtmlApp
|
6
|
+
module Helpers
|
7
|
+
def render(partial, locals={}, &block)
|
8
|
+
Tilt.new(find_f(@partial_path, "_#{partial}.html*")).render(self, locals, &block)
|
9
|
+
end
|
10
|
+
|
11
|
+
def include_dir(dir, locals={}, &block)
|
12
|
+
html = ""
|
13
|
+
find_f_each(File.join(@partial_path, dir), "*.html*") do |f|
|
14
|
+
html.concat(Tilt.new(f).render(self, locals, &block))
|
15
|
+
end
|
16
|
+
return html
|
17
|
+
end
|
18
|
+
|
19
|
+
def asset_data_uri(path)
|
20
|
+
asset = @sprocket_env[path]
|
21
|
+
Sprockets::Context.new(@sprocket_env, asset.logical_path, asset.pathname).asset_data_uri(path)
|
22
|
+
end
|
23
|
+
|
24
|
+
def find_f(path, pattern)
|
25
|
+
Find.find(path) do |f|
|
26
|
+
return f if File.fnmatch?(pattern, File.basename(f))
|
27
|
+
end
|
28
|
+
nil
|
29
|
+
end
|
30
|
+
|
31
|
+
def find_f_each(path, pattern)
|
32
|
+
Find.find(path) do |f|
|
33
|
+
yield(f) if File.fnmatch?(pattern, File.basename(f))
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
37
|
end
|
@@ -1,10 +1,10 @@
|
|
1
|
-
require 'thor'
|
2
|
-
|
3
|
-
module <%= @params[:constant_name] %>
|
4
|
-
class CLI < Thor
|
5
|
-
desc "compile", "compile all js, css, and html into a single file"
|
6
|
-
def compile()
|
7
|
-
app = RubyHtmlApp::HtmlApp.new('<%= @params[:name] %>').compile_resources
|
8
|
-
end
|
9
|
-
end
|
1
|
+
require 'thor'
|
2
|
+
|
3
|
+
module <%= @params[:constant_name] %>
|
4
|
+
class CLI < Thor
|
5
|
+
desc "compile", "compile all js, css, and html into a single file"
|
6
|
+
def compile()
|
7
|
+
app = RubyHtmlApp::HtmlApp.new('<%= @params[:name] %>').compile_resources
|
8
|
+
end
|
9
|
+
end
|
10
10
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module RubyHtmlApp
|
2
|
-
module Helpers
|
3
|
-
end
|
1
|
+
module RubyHtmlApp
|
2
|
+
module Helpers
|
3
|
+
end
|
4
4
|
end
|
File without changes
|
@@ -1,9 +1,9 @@
|
|
1
|
-
!!! 5
|
2
|
-
%html
|
3
|
-
%head
|
4
|
-
%title= title ||= ""
|
5
|
-
:javascript
|
6
|
-
#{inline_js}
|
7
|
-
:css
|
8
|
-
#{inline_css}
|
9
|
-
%body= yield
|
1
|
+
!!! 5
|
2
|
+
%html
|
3
|
+
%head
|
4
|
+
%title= title ||= ""
|
5
|
+
:javascript
|
6
|
+
#{inline_js}
|
7
|
+
:css
|
8
|
+
#{inline_css}
|
9
|
+
%body= yield
|
@@ -1,6 +1,6 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into including all the files listed below.
|
2
|
-
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
3
|
-
// be included in the compiled file. It's not advisable to add code directly here, but if you do, it'll appear
|
4
|
-
// at the bottom of the the compiled file.
|
5
|
-
//
|
6
|
-
//= require_tree .
|
1
|
+
// This is a manifest file that'll be compiled into including all the files listed below.
|
2
|
+
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
3
|
+
// be included in the compiled file. It's not advisable to add code directly here, but if you do, it'll appear
|
4
|
+
// at the bottom of the the compiled file.
|
5
|
+
//
|
6
|
+
//= require_tree .
|
File without changes
|
File without changes
|
@@ -1,6 +1,6 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'bundler/setup'
|
4
|
-
require '<%= @params[:name] %>'
|
5
|
-
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'bundler/setup'
|
4
|
+
require '<%= @params[:name] %>'
|
5
|
+
|
6
6
|
<%= @params[:constant_name] %>::CLI.start(ARGV)
|
@@ -1,9 +1,9 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll automatically include all the stylesheets available in this directo\
|
3
|
-
ry
|
4
|
-
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear\
|
5
|
-
at
|
6
|
-
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
7
|
-
*= require_self
|
8
|
-
*= require_tree .
|
9
|
-
*/
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll automatically include all the stylesheets available in this directo\
|
3
|
+
ry
|
4
|
+
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear\
|
5
|
+
at
|
6
|
+
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
7
|
+
*= require_self
|
8
|
+
*= require_tree .
|
9
|
+
*/
|
@@ -1,31 +1,31 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require '
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "rubyhtmlapp"
|
8
|
-
spec.version = RubyHtmlApp::VERSION
|
9
|
-
spec.authors = ["Curtis Bissonnette"]
|
10
|
-
spec.email = ["cbissonnette@gmail.com"]
|
11
|
-
spec.description = %q{Creates an inlined html app using sprockets and tilt}
|
12
|
-
spec.summary = %q{A simple generator used to setup a project for sprockets and tilt
|
13
|
-
which will compile all source files into a single html file}
|
14
|
-
spec.homepage = "https://github.com/cjbissonnette/rubyhtmlapp"
|
15
|
-
spec.license = "MIT"
|
16
|
-
|
17
|
-
spec.files = `git ls-files`.split($/)
|
18
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
-
spec.require_paths = ["lib"]
|
21
|
-
|
22
|
-
spec.add_development_dependency "bundler", "~> 1.3"
|
23
|
-
spec.add_development_dependency "rake"
|
24
|
-
spec.add_development_dependency "pry"
|
25
|
-
|
26
|
-
spec.add_dependency "tilt", "~> 1.3.6"
|
27
|
-
spec.add_dependency "sprockets", "~> 2.9.0"
|
28
|
-
spec.add_dependency "templater", "~> 1.0.0"
|
29
|
-
spec.add_dependency "thor", "~> 0.18.1"
|
30
|
-
|
31
|
-
end
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'rubyhtmlapp/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "rubyhtmlapp"
|
8
|
+
spec.version = RubyHtmlApp::VERSION
|
9
|
+
spec.authors = ["Curtis Bissonnette"]
|
10
|
+
spec.email = ["cbissonnette@gmail.com"]
|
11
|
+
spec.description = %q{Creates an inlined html app using sprockets and tilt}
|
12
|
+
spec.summary = %q{A simple generator used to setup a project for sprockets and tilt
|
13
|
+
which will compile all source files into a single html file}
|
14
|
+
spec.homepage = "https://github.com/cjbissonnette/rubyhtmlapp"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files`.split($/)
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
23
|
+
spec.add_development_dependency "rake"
|
24
|
+
spec.add_development_dependency "pry"
|
25
|
+
|
26
|
+
spec.add_dependency "tilt", "~> 1.3.6"
|
27
|
+
spec.add_dependency "sprockets", "~> 2.9.0"
|
28
|
+
spec.add_dependency "templater", "~> 1.0.0"
|
29
|
+
spec.add_dependency "thor", "~> 0.18.1"
|
30
|
+
|
31
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubyhtmlapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Curtis Bissonnette
|
@@ -121,21 +121,21 @@ files:
|
|
121
121
|
- LICENSE.txt
|
122
122
|
- README.md
|
123
123
|
- Rakefile
|
124
|
-
- RubyHtmlApp.gemspec
|
125
124
|
- bin/rubyhtmlapp
|
126
|
-
- lib/
|
127
|
-
- lib/
|
128
|
-
- lib/
|
129
|
-
- lib/
|
130
|
-
- lib/
|
131
|
-
- lib/
|
132
|
-
- lib/
|
133
|
-
- lib/
|
134
|
-
- lib/
|
135
|
-
- lib/
|
136
|
-
- lib/
|
137
|
-
- lib/
|
138
|
-
- lib/
|
125
|
+
- lib/rubyhtmlapp.rb
|
126
|
+
- lib/rubyhtmlapp/cli.rb
|
127
|
+
- lib/rubyhtmlapp/helpers.rb
|
128
|
+
- lib/rubyhtmlapp/templates/cli.rb
|
129
|
+
- lib/rubyhtmlapp/templates/helpers.rb
|
130
|
+
- lib/rubyhtmlapp/templates/html/application.html.haml
|
131
|
+
- lib/rubyhtmlapp/templates/html/layout.html.haml
|
132
|
+
- lib/rubyhtmlapp/templates/javascripts/application.js
|
133
|
+
- lib/rubyhtmlapp/templates/newgem.gemspec
|
134
|
+
- lib/rubyhtmlapp/templates/newgem.rb
|
135
|
+
- lib/rubyhtmlapp/templates/run
|
136
|
+
- lib/rubyhtmlapp/templates/stylesheets/application.css
|
137
|
+
- lib/rubyhtmlapp/version.rb
|
138
|
+
- rubyhtmlapp.gemspec
|
139
139
|
homepage: https://github.com/cjbissonnette/rubyhtmlapp
|
140
140
|
licenses:
|
141
141
|
- MIT
|
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
156
|
version: '0'
|
157
157
|
requirements: []
|
158
158
|
rubyforge_project:
|
159
|
-
rubygems_version: 2.0.0
|
159
|
+
rubygems_version: 2.0.0
|
160
160
|
signing_key:
|
161
161
|
specification_version: 4
|
162
162
|
summary: A simple generator used to setup a project for sprockets and tilt which will
|