pakyow-slim 1.0.0 → 2.0.0.rc1

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
- SHA1:
3
- metadata.gz: 95c60340648f2e9dd1ff4fa5ada0c66e44c6e4c6
4
- data.tar.gz: dc3f44588415641deeb8e254af42ef537ee1760f
2
+ SHA256:
3
+ metadata.gz: eb60e0d665da39be8a91fdb5c24189870ba1ebdf697df673e193af178f49e531
4
+ data.tar.gz: d0de3ac35aec20debfe2fcfce2bc0df6f78de6d20952f1517ca7dcc1aaec07f1
5
5
  SHA512:
6
- metadata.gz: 9dc6b9d946ddc474fec39c06de3e713e503dd72d71520a6faedf8bf23ddc6e1af0fd5eb8fe9bf6bcc99c1d536cbe8e2cd97a2edb745530755cc9d8437c4d1c89
7
- data.tar.gz: cf36124114805850afbd671cd977054cd5f5304db480dcc5db573bb7a12600f80a3dcd5c35013217a1235cb22d78dc76def3342f56ae476e7d1409b9e2959d78
6
+ metadata.gz: 7c883f764b9f9277089c7193618c88a29e3db71ec614f1246eb5f1a76ba356033b0858a2e906dce7045eff2de3b413723e764a65209ad8477de90d4cdfceec90
7
+ data.tar.gz: d9a6733e105b3612bafd5f0289c8344221fe3afca3adcba9308db16cbfd4452b438e2d0559c7b801ed0653742d696ef454eb4d13f7f8665ad1057d56ee73e661
data/LICENSE CHANGED
@@ -1,20 +1,4 @@
1
- Copyright (c) 2015 Daniel McGuire
1
+ Copyright (c) Metabahn, LLC
2
2
 
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3
+ Pakyow Slim is an open-source project licensed under the terms of the LGPLv3 license.
4
+ See <https://choosealicense.com/licenses/gpl-3.0/> for license text.
data/README.md CHANGED
@@ -1,39 +1,7 @@
1
- # pakyow-slim
1
+ # pakyow/slim
2
2
 
3
- Slim templating plugin for [Pakyow](http://pakyow.com).
3
+ Slim support for [pakyow/presenter](https://github.com/pakyow/pakyow/tree/master/pakyow-presenter).
4
4
 
5
- # Installation
5
+ ## Usage
6
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).
7
+ Add `pakyow-slim` to your `Gemfile`. Any view template with a `slim` file extension will be processed during presentation and rendered as HTML.
@@ -0,0 +1,2 @@
1
+ require "pakyow/slim/version"
2
+ require "pakyow/slim/framework"
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "pakyow/framework"
4
+
5
+ require "pakyow/slim/processor"
6
+
7
+ module Pakyow
8
+ module Slim
9
+ class Framework < Pakyow::Framework(:slim)
10
+ def boot
11
+ object.state(:processor) << Pakyow::Slim::Processor
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "slim"
4
+
5
+ require "pakyow/presenter/processor"
6
+
7
+ module Pakyow
8
+ module Slim
9
+ class Processor < Pakyow::Presenter::Processor
10
+ extensions :slim
11
+
12
+ def call(content)
13
+ ::Slim::Template.new {
14
+ @data = content
15
+ }.render
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pakyow
4
+ module Slim
5
+ VERSION = "2.0.0.rc1".freeze
6
+ end
7
+ end
metadata CHANGED
@@ -1,124 +1,59 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pakyow-slim
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
- - Dan McGuire
7
+ - Bryan Powell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-18 00:00:00.000000000 Z
11
+ date: 2019-07-04 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'
27
- - !ruby/object:Gem::Dependency
28
- name: pakyow-core
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
13
  - !ruby/object:Gem::Dependency
42
14
  name: pakyow-presenter
43
15
  requirement: !ruby/object:Gem::Requirement
44
16
  requirements:
45
- - - "~>"
17
+ - - ">="
46
18
  - !ruby/object:Gem::Version
47
- version: '0'
19
+ version: 1.0.0.rc1
48
20
  type: :runtime
49
21
  prerelease: false
50
22
  version_requirements: !ruby/object:Gem::Requirement
51
23
  requirements:
52
- - - "~>"
24
+ - - ">="
53
25
  - !ruby/object:Gem::Version
54
- version: '0'
26
+ version: 1.0.0.rc1
55
27
  - !ruby/object:Gem::Dependency
56
28
  name: slim
57
29
  requirement: !ruby/object:Gem::Requirement
58
30
  requirements:
59
31
  - - "~>"
60
32
  - !ruby/object:Gem::Version
61
- version: '3.0'
33
+ version: '4.0'
62
34
  type: :runtime
63
35
  prerelease: false
64
36
  version_requirements: !ruby/object:Gem::Requirement
65
37
  requirements:
66
38
  - - "~>"
67
39
  - !ruby/object:Gem::Version
68
- version: '3.0'
69
- - !ruby/object:Gem::Dependency
70
- name: rake
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
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
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '5.8'
97
- description: Slim support for Pakyow views
98
- email: dan@metabahn.com
40
+ version: '4.0'
41
+ description: Slim support for Pakyow Presenter
42
+ email: bryan@metabahn.com
99
43
  executables: []
100
44
  extensions: []
101
45
  extra_rdoc_files: []
102
46
  files:
103
- - ".gitignore"
104
- - ".travis.yml"
105
47
  - CHANGELOG.md
106
- - Gemfile
107
48
  - LICENSE
108
49
  - 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
50
+ - lib/pakyow/slim.rb
51
+ - lib/pakyow/slim/framework.rb
52
+ - lib/pakyow/slim/processor.rb
53
+ - lib/pakyow/slim/version.rb
54
+ homepage: https://pakyow.org
120
55
  licenses:
121
- - MIT
56
+ - LGPL-3.0
122
57
  metadata: {}
123
58
  post_install_message:
124
59
  rdoc_options: []
@@ -128,17 +63,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
128
63
  requirements:
129
64
  - - ">="
130
65
  - !ruby/object:Gem::Version
131
- version: '0'
66
+ version: 2.5.0
132
67
  required_rubygems_version: !ruby/object:Gem::Requirement
133
68
  requirements:
134
- - - ">="
69
+ - - ">"
135
70
  - !ruby/object:Gem::Version
136
- version: '0'
71
+ version: 1.3.1
137
72
  requirements: []
138
- rubyforge_project:
139
- rubygems_version: 2.4.5
73
+ rubygems_version: 3.0.3
140
74
  signing_key:
141
75
  specification_version: 4
142
76
  summary: Pakyow Slim
143
77
  test_files: []
144
- has_rdoc:
data/.gitignore DELETED
@@ -1,42 +0,0 @@
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 DELETED
@@ -1,11 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.0.0
4
- - 2.1.0
5
- - ruby-head
6
- notifications:
7
- email: true
8
- hipchat: dc38d765431b4f0b3119274f433524@#meta
9
- branches:
10
- only:
11
- - master
data/Gemfile DELETED
@@ -1,9 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'slim', '~> 3.0'
4
- gem 'pakyow', '~> 0'
5
-
6
- group :test do
7
- gem 'rake'
8
- gem 'minitest'
9
- end
data/lib/pakyow-slim.rb DELETED
@@ -1,16 +0,0 @@
1
- require 'slim'
2
-
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
-
14
- Pakyow::App.processor :slim do |content|
15
- Slim::Template.new { @data = content }.render
16
- end
data/lib/version.rb DELETED
@@ -1,5 +0,0 @@
1
- module Pakyow
2
- module Slim
3
- VERSION = '1.0.0'.freeze
4
- end
5
- end
data/pakyow-slim.gemspec DELETED
@@ -1,23 +0,0 @@
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 DELETED
@@ -1,13 +0,0 @@
1
- require 'rake'
2
- require 'rake/testtask'
3
-
4
- task :default => [:test]
5
-
6
- desc "Run basic tests"
7
- Rake::TestTask.new("test") do |t|
8
- t.libs << 'test'
9
- t.pattern = 'test/*_test.rb'
10
- t.verbose = false
11
- t.warning = false
12
- end
13
-
@@ -1,16 +0,0 @@
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
@@ -1,4 +0,0 @@
1
- require 'minitest/autorun'
2
- require 'pakyow'
3
- require File.expand_path('../../../lib/pakyow-slim', __FILE__)
4
- require 'support/test_application'
@@ -1,8 +0,0 @@
1
- <h1>this should be a header</h1>
2
- <div class="foo">
3
- some content
4
- </div>
5
- <div data-scope="test_scope">
6
- <div data-prop="test_property">
7
- </div>
8
- </div>
@@ -1,5 +0,0 @@
1
- Pakyow::App.define do
2
- configure :test do
3
- presenter.view_stores[:default] = "test/support/views"
4
- end
5
- end
@@ -1,10 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>pakyow</title>
5
- </head>
6
-
7
- <body>
8
- <!-- @container -->
9
- </body>
10
- </html>
@@ -1,8 +0,0 @@
1
- h1
2
- |this should be a header
3
-
4
- .foo
5
- |some content
6
-
7
- @@test_scope
8
- @test_property