opal-haml 0.4.4 → 0.4.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: '09295c5a78ced0158a3b1fa7e80aa2048fca99ed'
4
- data.tar.gz: 1549592bbd08fc4e9ddcaf743e4736413d2f05fd
2
+ SHA256:
3
+ metadata.gz: f594f01d2d7f69d721a93d23a8fe88466f83505dd99ea2e60706e1106fa41be8
4
+ data.tar.gz: 92ad9e7fcfa526b3003cc63c7309d4c40875f1dfa884481881d02cd97de2f50c
5
5
  SHA512:
6
- metadata.gz: 3a1385061b8c9d8e9255cab355fbc84808e21b1545407ed5bb6c3f739805e20fea2d5ff0783299af9412841105b25d7973cdbaaa7f265af4714f22d8c39f854a
7
- data.tar.gz: e58fc44ac5ebee247678509248157637c149892413a35d1716a7f13fb0773bf6dbd3d8f6cf7b7c26a71b3e2e6be9f0b741229f82cf4d8e21319c22c55f9253d2
6
+ metadata.gz: 29c63fb9eec91c9b2c7746ab383a5d9e3a27e1fa2d51667e26335df739f07c2bca1d80abbb6af638d6e94a8ad85816a9fb2e537ab5f5a26052a8adf25427b29d
7
+ data.tar.gz: e83e0aec5b8e30a403fe52de84b9dd0105a3233bfb5544d36edb05c3f4bec41e62eaa9f1625716200c0cb8ed10cb55849eb4435fbdab48a5a0c54cc58c96b9f5
data/.travis.yml CHANGED
@@ -6,25 +6,19 @@ rvm: 2.3.4
6
6
  env:
7
7
  - HAML_VERSION="~> 4.0" OPAL_VERSION='~> 0.10.0'
8
8
  - HAML_VERSION="~> 5.0" OPAL_VERSION='~> 0.10.0'
9
- - HAML_VERSION="~> 4.0" OPAL_VERSION='~> 0.11.0.rc1'
10
- - HAML_VERSION="~> 5.0" OPAL_VERSION='~> 0.11.0.rc1'
9
+ - HAML_VERSION="~> 5.0" OPAL_VERSION='~> 0.11.0'
10
+ - HAML_VERSION="~> 5.0" OPAL_VERSION=master
11
11
 
12
12
  cache:
13
13
  bundler: true
14
14
  directories:
15
15
  - node_modules
16
- - phantom20
17
16
 
18
17
  before_install:
19
- # Attempt to work around Travis issues and Ruby 2.3 - https://github.com/vcr/vcr/issues/582
20
18
  - gem update --system
21
- - "mkdir -p phantom20"
22
- - "export PATH=`pwd`/phantom20:$PATH"
23
- - "echo $PATH"
24
- - "pushd phantom20"
25
- - "ls phantomjs || curl -L -O https://s3.amazonaws.com/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2"
26
- - "ls phantomjs || tar xjvf phantomjs-2.0.0-ubuntu-12.04.tar.bz2"
27
- - "rm -rf phantomjs-2.0.0-ubuntu-12.04.tar.bz2"
28
- - "popd"
29
-
19
+ - "export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH"
20
+ - "if [ $(phantomjs --version) != '2.1.1' ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi"
21
+ - "if [ $(phantomjs --version) != '2.1.1' ]; then wget https://assets.membergetmember.co/software/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2; fi"
22
+ - "if [ $(phantomjs --version) != '2.1.1' ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi"
23
+ - "phantomjs --version"
30
24
 
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.4.5 2018-03-19
2
+
3
+ - Avoid warning from Opal v0.11
4
+
1
5
  ## 0.4.4 2017-05-13
2
6
 
3
7
  - Improve support for the attribute builder
data/Gemfile CHANGED
@@ -1,3 +1,13 @@
1
1
  source 'https://rubygems.org'
2
2
  gemspec
3
3
  gem 'haml', ENV['HAML_VERSION'] || '> 0'
4
+
5
+ if ENV['OPAL_VERSION'] == 'master'
6
+ gem 'opal', github: 'opal', branch: :master
7
+ gem 'opal-sprockets', github: 'opal/opal-sprockets'
8
+ gem 'opal-rspec', github: 'opal/opal-rspec', branch: 'elia/opal-master', submodules: true
9
+ elsif ENV['OPAL_VERSION'].to_f >= 0.11
10
+ gem 'opal-rspec', github: 'opal/opal-rspec', branch: 'elia/opal-master', submodules: true
11
+ else
12
+ gem 'opal', '~> 0.10.5'
13
+ end
data/Rakefile CHANGED
@@ -3,4 +3,7 @@ Bundler.require
3
3
  Bundler::GemHelper.install_tasks
4
4
 
5
5
  require 'opal/rspec/rake_task'
6
- Opal::RSpec::RakeTask.new(:default)
6
+ Opal::RSpec::RakeTask.new(:default) do |server, task|
7
+ task.pattern = 'spec-opal/**/*_spec.rb'
8
+ task.default_path = 'spec-opal'
9
+ end
data/config.ru CHANGED
@@ -1,9 +1,12 @@
1
1
  require 'bundler'
2
2
  Bundler.require
3
3
 
4
+ require 'opal-sprockets'
4
5
  require 'opal-rspec'
5
6
 
6
- run Opal::Server.new { |s|
7
+ OPAL_SPROCKETS_SERVER = defined?(Opal::Server) ? Opal::Server : Opal::Sprockets::Server
8
+
9
+ run OPAL_SPROCKETS_SERVER.new { |s|
7
10
  s.main = 'opal/rspec/sprockets_runner'
8
11
  s.append_path 'spec'
9
12
  s.debug = true
File without changes
@@ -68,7 +68,7 @@ class Template
68
68
  end
69
69
 
70
70
  def _attribute_escape(value)
71
- value.to_s.gsub /['"&<>]/, '"' => '&quot;', "'" => '&apos;', '&' => '&amp;', '<' => '&lt;', '>' => '&gt;'
71
+ value.to_s.gsub(/['"&<>]/, '"' => '&quot;', "'" => '&apos;', '&' => '&amp;', '<' => '&lt;', '>' => '&gt;')
72
72
  end
73
73
  end
74
74
  end
data/lib/opal/haml.rb CHANGED
@@ -35,4 +35,4 @@ module Opal
35
35
  end
36
36
  end
37
37
 
38
- Opal.append_path File.expand_path('../../../opal', __FILE__).untaint
38
+ Opal.append_path File.expand_path('../../../lib-opal', __FILE__).untaint
@@ -1,9 +1,13 @@
1
1
  require 'haml'
2
- require 'sprockets'
2
+ require 'opal-sprockets'
3
3
 
4
4
  module Opal
5
5
  module Haml
6
- class Processor < ::Opal::Processor
6
+ OPAL_SPROCKETS_PROCESSOR = defined?(Opal::Processor) ?
7
+ ::Opal::Processor :
8
+ ::Opal::Sprockets::Processor
9
+
10
+ class Processor < OPAL_SPROCKETS_PROCESSOR
7
11
  self.default_mime_type = 'application/javascript'
8
12
 
9
13
  def evaluate(context, locals, &block)
@@ -13,7 +17,7 @@ module Opal
13
17
 
14
18
  def self.compiler_options
15
19
  # otherwise would check current class `attr_accessor`s
16
- ::Opal::Processor.compiler_options
20
+ OPAL_SPROCKETS_PROCESSOR.compiler_options
17
21
  end
18
22
  end
19
23
  end
@@ -1,5 +1,5 @@
1
1
  module Opal
2
2
  module Haml
3
- VERSION = '0.4.4'
3
+ VERSION = '0.4.5'
4
4
  end
5
5
  end
data/opal-haml.gemspec CHANGED
@@ -17,9 +17,10 @@ Gem::Specification.new do |s|
17
17
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
18
  s.require_paths = ['lib']
19
19
 
20
- s.add_dependency 'opal', '~> 0.10.0'
20
+ s.add_dependency 'opal', ['~> 0.10', '< 0.12']
21
+ s.add_dependency 'opal-sprockets', '~> 0.4.1'
21
22
  s.add_dependency 'haml'
22
23
 
23
- s.add_development_dependency 'opal-rspec', '~> 0.6.0'
24
+ s.add_development_dependency 'opal-rspec'
24
25
  s.add_development_dependency 'rake'
25
26
  end
File without changes
File without changes
File without changes
File without changes
@@ -1,5 +1,8 @@
1
1
  require 'spec_helper'
2
- require_tree './fixtures'
2
+ require 'fixtures/simple'
3
+ require 'fixtures/advanced'
4
+ require 'fixtures/html_content'
5
+ require 'fixtures/attributes_helper'
3
6
 
4
7
  describe "Haml files" do
5
8
  let(:simple) { Template['fixtures/simple'] }
File without changes
@@ -0,0 +1,6 @@
1
+ require 'opal'
2
+ require 'opal-haml'
3
+
4
+ RSpec.configure do |c|
5
+ c.color = true
6
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opal-haml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Beynon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-13 00:00:00.000000000 Z
11
+ date: 2018-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal
@@ -16,14 +16,34 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.10.0
19
+ version: '0.10'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '0.12'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
- version: 0.10.0
29
+ version: '0.10'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '0.12'
33
+ - !ruby/object:Gem::Dependency
34
+ name: opal-sprockets
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: 0.4.1
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: 0.4.1
27
47
  - !ruby/object:Gem::Dependency
28
48
  name: haml
29
49
  requirement: !ruby/object:Gem::Requirement
@@ -42,16 +62,16 @@ dependencies:
42
62
  name: opal-rspec
43
63
  requirement: !ruby/object:Gem::Requirement
44
64
  requirements:
45
- - - "~>"
65
+ - - ">="
46
66
  - !ruby/object:Gem::Version
47
- version: 0.6.0
67
+ version: '0'
48
68
  type: :development
49
69
  prerelease: false
50
70
  version_requirements: !ruby/object:Gem::Requirement
51
71
  requirements:
52
- - - "~>"
72
+ - - ">="
53
73
  - !ruby/object:Gem::Version
54
- version: 0.6.0
74
+ version: '0'
55
75
  - !ruby/object:Gem::Dependency
56
76
  name: rake
57
77
  requirement: !ruby/object:Gem::Requirement
@@ -80,21 +100,21 @@ files:
80
100
  - README.md
81
101
  - Rakefile
82
102
  - config.ru
103
+ - lib-opal/haml/attribute_builder.rb
104
+ - lib-opal/opal-haml.rb
83
105
  - lib/opal-haml.rb
84
106
  - lib/opal/haml.rb
85
107
  - lib/opal/haml/builder.rb
86
108
  - lib/opal/haml/processor.rb
87
109
  - lib/opal/haml/version.rb
88
110
  - opal-haml.gemspec
89
- - opal/haml/attribute_builder.rb
90
- - opal/opal-haml.rb
91
- - spec/fixtures/advanced.haml
92
- - spec/fixtures/attributes_helper.haml
93
- - spec/fixtures/html_content.haml
94
- - spec/fixtures/simple.haml
95
- - spec/haml_spec.rb
96
- - spec/output_buffer_spec.rb
97
- - spec/spec_helper.rb
111
+ - spec-opal/fixtures/advanced.haml
112
+ - spec-opal/fixtures/attributes_helper.haml
113
+ - spec-opal/fixtures/html_content.haml
114
+ - spec-opal/fixtures/simple.haml
115
+ - spec-opal/haml_spec.rb
116
+ - spec-opal/output_buffer_spec.rb
117
+ - spec-opal/spec_helper.rb
98
118
  homepage: http://opalrb.org
99
119
  licenses:
100
120
  - MIT
@@ -115,15 +135,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
135
  version: '0'
116
136
  requirements: []
117
137
  rubyforge_project:
118
- rubygems_version: 2.6.8
138
+ rubygems_version: 2.7.4
119
139
  signing_key:
120
140
  specification_version: 4
121
141
  summary: Run Haml templates client-side with Opal
122
- test_files:
123
- - spec/fixtures/advanced.haml
124
- - spec/fixtures/attributes_helper.haml
125
- - spec/fixtures/html_content.haml
126
- - spec/fixtures/simple.haml
127
- - spec/haml_spec.rb
128
- - spec/output_buffer_spec.rb
129
- - spec/spec_helper.rb
142
+ test_files: []
data/spec/spec_helper.rb DELETED
@@ -1,2 +0,0 @@
1
- require 'opal'
2
- require 'opal-haml'