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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 33a6186d119b99e69c187c71a0237ce91445aec8
4
- data.tar.gz: e3f0bbfb5399c9ae5472710160a5072e9099992d
3
+ metadata.gz: 95c60340648f2e9dd1ff4fa5ada0c66e44c6e4c6
4
+ data.tar.gz: dc3f44588415641deeb8e254af42ef537ee1760f
5
5
  SHA512:
6
- metadata.gz: 871e2569cf999606916bb8db3017ecdcf53a5d3a574754714ad75fbaef850915c1114bec2cdb4c891fe7bb57fcd177407430b6f8347e892c5e82f7a29ab6c955
7
- data.tar.gz: 7371ae42dcf8d8307166d4b019d572e46df14e060290e318ce83a56d253c8046c233a388043f381a9e597693b719f170f05bf622acda2b751c24be3337ba6721
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
@@ -0,0 +1,11 @@
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/CHANGELOG.md ADDED
@@ -0,0 +1,3 @@
1
+ # 1.0.0 / 2015-10-18
2
+
3
+ * Remove version requirement from Pakyow gems
data/Gemfile ADDED
@@ -0,0 +1,9 @@
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
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
- module SetSlimOptions
4
- Slim::Engine.set_options(
5
- shortcut: {
6
- '@@' => { tag: 'div', attr: 'data-scope' },
7
- '@' => { tag: 'div', attr: 'data-prop' },
8
- '#' => { tag: 'div', attr: 'id' },
9
- '.' => { tag: 'div', attr: 'class' }
10
- }
11
- )
12
- end
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
@@ -0,0 +1,5 @@
1
+ module Pakyow
2
+ module Slim
3
+ VERSION = '1.0.0'.freeze
4
+ end
5
+ end
@@ -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,13 @@
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
+
@@ -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
@@ -0,0 +1,4 @@
1
+ require 'minitest/autorun'
2
+ require 'pakyow'
3
+ require File.expand_path('../../../lib/pakyow-slim', __FILE__)
4
+ require 'support/test_application'
@@ -0,0 +1,8 @@
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>
@@ -0,0 +1,5 @@
1
+ Pakyow::App.define do
2
+ configure :test do
3
+ presenter.view_stores[:default] = "test/support/views"
4
+ end
5
+ end
@@ -0,0 +1,10 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>pakyow</title>
5
+ </head>
6
+
7
+ <body>
8
+ <!-- @container -->
9
+ </body>
10
+ </html>
@@ -0,0 +1,8 @@
1
+ h1
2
+ |this should be a header
3
+
4
+ .foo
5
+ |some content
6
+
7
+ @@test_scope
8
+ @test_property
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.2.2
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-01-06 00:00:00.000000000 Z
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.9'
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.9'
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.9'
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.9'
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: ruby
70
+ name: rake
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
73
  - - "~>"
60
74
  - !ruby/object:Gem::Version
61
- version: '2.0'
62
- type: :runtime
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: '2.0'
69
- description: A view processor that will convert files under view/ with the .slim extension
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
- - "./MIT-LICENSE"
77
- - "./VERSION"
78
- - "./lib/pakyow-slim.rb"
79
- homepage: http://slim-lang.com
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.2.2
139
+ rubygems_version: 2.4.5
100
140
  signing_key:
101
141
  specification_version: 4
102
- summary: Slim processor for Pakyow views.
142
+ summary: Pakyow Slim
103
143
  test_files: []
104
144
  has_rdoc:
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.2.2