pakyow-slim 0.2.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +42 -0
- data/.travis.yml +11 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +9 -0
- data/{MIT-LICENSE → LICENSE} +0 -0
- data/README.md +39 -0
- data/lib/pakyow-slim.rb +10 -10
- data/lib/version.rb +5 -0
- data/pakyow-slim.gemspec +23 -0
- data/rakefile +13 -0
- data/test/processor_test.rb +16 -0
- data/test/support/helper.rb +4 -0
- data/test/support/processed.html +8 -0
- data/test/support/test_application.rb +5 -0
- data/test/support/views/_templates/pakyow.html +10 -0
- data/test/support/views/index.slim +8 -0
- metadata +58 -18
- data/VERSION +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95c60340648f2e9dd1ff4fa5ada0c66e44c6e4c6
|
4
|
+
data.tar.gz: dc3f44588415641deeb8e254af42ef537ee1760f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9dc6b9d946ddc474fec39c06de3e713e503dd72d71520a6faedf8bf23ddc6e1af0fd5eb8fe9bf6bcc99c1d536cbe8e2cd97a2edb745530755cc9d8437c4d1c89
|
7
|
+
data.tar.gz: cf36124114805850afbd671cd977054cd5f5304db480dcc5db573bb7a12600f80a3dcd5c35013217a1235cb22d78dc76def3342f56ae476e7d1409b9e2959d78
|
data/.gitignore
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/test/tmp/
|
9
|
+
/test/version_tmp/
|
10
|
+
/tmp/
|
11
|
+
|
12
|
+
## Specific to RubyMotion:
|
13
|
+
.dat*
|
14
|
+
.repl_history
|
15
|
+
build/
|
16
|
+
|
17
|
+
## Documentation cache and generated files:
|
18
|
+
/.yardoc/
|
19
|
+
/_yardoc/
|
20
|
+
/doc/
|
21
|
+
/rdoc/
|
22
|
+
|
23
|
+
## Environment normalisation:
|
24
|
+
/.bundle/
|
25
|
+
/lib/bundler/man/
|
26
|
+
|
27
|
+
# for a library or gem, you might want to ignore these files since the code is
|
28
|
+
# intended to run in multiple environments; otherwise, check them in:
|
29
|
+
Gemfile.lock
|
30
|
+
# .ruby-version
|
31
|
+
# .ruby-gemset
|
32
|
+
*.gem
|
33
|
+
|
34
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
35
|
+
.rvmrc
|
36
|
+
|
37
|
+
[._]*.s[a-w][a-z]
|
38
|
+
[._]s[a-w][a-z]
|
39
|
+
*.un~
|
40
|
+
Session.vim
|
41
|
+
.netrwhist
|
42
|
+
*~
|
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
data/{MIT-LICENSE → LICENSE}
RENAMED
File without changes
|
data/README.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# pakyow-slim
|
2
|
+
|
3
|
+
Slim templating plugin for [Pakyow](http://pakyow.com).
|
4
|
+
|
5
|
+
# Installation
|
6
|
+
|
7
|
+
Place inside your Gemfile
|
8
|
+
|
9
|
+
gem 'pakyow-slim'
|
10
|
+
|
11
|
+
Inside app.rb
|
12
|
+
|
13
|
+
require 'pakyow-slim'
|
14
|
+
|
15
|
+
Run `bundle install` and restart your app server. Now any `.slim` views will be compiled for you!
|
16
|
+
|
17
|
+
For more info on slim templating language visit [slim-lang.com](http://slim-lang.com/)
|
18
|
+
|
19
|
+
# Pakyow-Specific shortcuts:
|
20
|
+
|
21
|
+
`.klass@@skope`
|
22
|
+
|
23
|
+
translates to
|
24
|
+
|
25
|
+
<div class='klass' data-scope='skope'></div>
|
26
|
+
|
27
|
+
and `.klass@prop`
|
28
|
+
|
29
|
+
translates to
|
30
|
+
|
31
|
+
<div class='klass' data-prop='prop'></div>
|
32
|
+
|
33
|
+
# Status
|
34
|
+
|
35
|
+
[![Build Status](https://travis-ci.org/pakyow/pakyow-slim.png)](https://travis-ci.org/pakyow/pakyow-slim)
|
36
|
+
|
37
|
+
# License
|
38
|
+
|
39
|
+
pakyow-slim is released under the [MIT License](http://opensource.org/licenses/MIT).
|
data/lib/pakyow-slim.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
require 'slim'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
}
|
11
|
-
|
12
|
-
|
3
|
+
require 'version'
|
4
|
+
|
5
|
+
Slim::Engine.set_options(
|
6
|
+
shortcut: {
|
7
|
+
'@@' => { tag: 'div', attr: 'data-scope' },
|
8
|
+
'@' => { tag: 'div', attr: 'data-prop' },
|
9
|
+
'#' => { tag: 'div', attr: 'id' },
|
10
|
+
'.' => { tag: 'div', attr: 'class' }
|
11
|
+
}
|
12
|
+
)
|
13
13
|
|
14
14
|
Pakyow::App.processor :slim do |content|
|
15
15
|
Slim::Template.new { @data = content }.render
|
data/lib/version.rb
ADDED
data/pakyow-slim.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require File.expand_path('../lib/version', __FILE__)
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = 'pakyow-slim'
|
5
|
+
spec.summary = 'Pakyow Slim'
|
6
|
+
spec.description = 'Slim support for Pakyow views'
|
7
|
+
spec.author = 'Dan McGuire'
|
8
|
+
spec.email = 'dan@metabahn.com'
|
9
|
+
spec.homepage = 'http://pakyow.org'
|
10
|
+
spec.version = Pakyow::Slim::VERSION
|
11
|
+
spec.require_path = 'lib'
|
12
|
+
spec.files = `git ls-files`.split("\n")
|
13
|
+
spec.license = 'MIT'
|
14
|
+
|
15
|
+
spec.add_dependency('pakyow-support', '~> 0')
|
16
|
+
spec.add_dependency('pakyow-core', '~> 0')
|
17
|
+
spec.add_dependency('pakyow-presenter', '~> 0')
|
18
|
+
|
19
|
+
spec.add_dependency('slim', '~> 3.0')
|
20
|
+
|
21
|
+
spec.add_development_dependency('rake', '~> 10.4')
|
22
|
+
spec.add_development_dependency('minitest', '~> 5.8')
|
23
|
+
end
|
data/rakefile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require_relative 'support/helper'
|
2
|
+
|
3
|
+
class ProcessorTest < MiniTest::Test
|
4
|
+
def setup
|
5
|
+
@view_store = :test
|
6
|
+
Pakyow::App.stage(:test)
|
7
|
+
end
|
8
|
+
|
9
|
+
def test_that_view_is_processed
|
10
|
+
v = Pakyow.app.presenter.store.composer('/')
|
11
|
+
assert_equal(
|
12
|
+
File.read('test/support/processed.html').gsub("\n", ''),
|
13
|
+
v.container(:default).to_html
|
14
|
+
)
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,43 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pakyow-slim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan McGuire
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: pakyow-support
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: pakyow-core
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - "~>"
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0
|
33
|
+
version: '0'
|
20
34
|
type: :runtime
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
38
|
- - "~>"
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: pakyow-presenter
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - "~>"
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0
|
47
|
+
version: '0'
|
34
48
|
type: :runtime
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
52
|
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: slim
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,30 +67,56 @@ dependencies:
|
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '3.0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
70
|
+
name: rake
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
73
|
- - "~>"
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
62
|
-
type: :
|
75
|
+
version: '10.4'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '10.4'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: minitest
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '5.8'
|
90
|
+
type: :development
|
63
91
|
prerelease: false
|
64
92
|
version_requirements: !ruby/object:Gem::Requirement
|
65
93
|
requirements:
|
66
94
|
- - "~>"
|
67
95
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
69
|
-
description:
|
70
|
-
into html.
|
96
|
+
version: '5.8'
|
97
|
+
description: Slim support for Pakyow views
|
71
98
|
email: dan@metabahn.com
|
72
99
|
executables: []
|
73
100
|
extensions: []
|
74
101
|
extra_rdoc_files: []
|
75
102
|
files:
|
76
|
-
- "
|
77
|
-
- "
|
78
|
-
-
|
79
|
-
|
103
|
+
- ".gitignore"
|
104
|
+
- ".travis.yml"
|
105
|
+
- CHANGELOG.md
|
106
|
+
- Gemfile
|
107
|
+
- LICENSE
|
108
|
+
- README.md
|
109
|
+
- lib/pakyow-slim.rb
|
110
|
+
- lib/version.rb
|
111
|
+
- pakyow-slim.gemspec
|
112
|
+
- rakefile
|
113
|
+
- test/processor_test.rb
|
114
|
+
- test/support/helper.rb
|
115
|
+
- test/support/processed.html
|
116
|
+
- test/support/test_application.rb
|
117
|
+
- test/support/views/_templates/pakyow.html
|
118
|
+
- test/support/views/index.slim
|
119
|
+
homepage: http://pakyow.org
|
80
120
|
licenses:
|
81
121
|
- MIT
|
82
122
|
metadata: {}
|
@@ -96,9 +136,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
136
|
version: '0'
|
97
137
|
requirements: []
|
98
138
|
rubyforge_project:
|
99
|
-
rubygems_version: 2.
|
139
|
+
rubygems_version: 2.4.5
|
100
140
|
signing_key:
|
101
141
|
specification_version: 4
|
102
|
-
summary:
|
142
|
+
summary: Pakyow Slim
|
103
143
|
test_files: []
|
104
144
|
has_rdoc:
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.2.2
|