keynote 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of keynote might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3d4df088c95319b2d2eb5b3a78b5dab7422f55d1
4
- data.tar.gz: 3e8c978c76994b426d8e225f03f24c86241c2735
3
+ metadata.gz: fe0ac56847bb40c91206e3e3e40854bf60efd579
4
+ data.tar.gz: b81181cb6d60f7cbf441d9724a809977e7293de2
5
5
  SHA512:
6
- metadata.gz: b9d8d72594c5ba894db65e56b50ba87ee973e4f013d32ac8bffa7dc70a7c2cd351eb63092171f683a375aeeb116af5ddc19af7887401cd8306b0d0e27532ce70
7
- data.tar.gz: cd9788601c845d6cc22b9bf81ea33fdabfc462fcd3e2cc673f20cd45f5e936637eb1ff2e462f7b9b59891e09007589a97e4c16565db1d47bc92984bf24da5c3d
6
+ metadata.gz: 3b11e1e2610c5f467911bb09a90bd2d98cb410a256033fa252e03eebb6797ac706739c4a23332312979bfc29824fe7d132493c890be0f4a5f6aa39fb98547ee0
7
+ data.tar.gz: 08927b3f127d54403e289798d728d88ba6a8b50085ef71f475308d6f34811f3c74ed1822914980e4b23f6b3e53820056a30ac84ed26a25f6d8f1bb15c6be44b5
@@ -3,15 +3,20 @@ rvm:
3
3
  - 1.9.2
4
4
  - 1.9.3
5
5
  - 2.0.0
6
- - rbx-19mode
6
+ - 2.1.0
7
+ - rbx
8
+ - jruby-19mode
7
9
  gemfile:
8
10
  - gemfiles/rails30.gemfile
9
11
  - gemfiles/rails31.gemfile
10
12
  - gemfiles/rails32.gemfile
11
- - gemfiles/rails4.gemfile
13
+ - gemfiles/rails40.gemfile
14
+ - gemfiles/rails41.gemfile
12
15
  matrix:
13
16
  exclude:
14
17
  - rvm: 1.9.2
15
- gemfile: gemfiles/rails4.gemfile
18
+ gemfile: gemfiles/rails40.gemfile
19
+ - rvm: 1.9.2
20
+ gemfile: gemfiles/rails41.gemfile
16
21
  notifications:
17
22
  email: false
data/Appraisals CHANGED
@@ -1,19 +1,24 @@
1
1
  appraise "rails30" do
2
2
  gem "rails", "3.0.20"
3
- gem "keynote", path: "../"
3
+ gem "minitest", "< 5"
4
4
  end
5
5
 
6
6
  appraise "rails31" do
7
7
  gem "rails", "3.1.12"
8
- gem "keynote", path: "../"
8
+ gem "minitest", "< 5"
9
9
  end
10
10
 
11
11
  appraise "rails32" do
12
- gem "rails", "3.2.14"
13
- gem "keynote", path: "../"
12
+ gem "rails", "3.2.16"
13
+ gem "minitest", "< 5"
14
14
  end
15
15
 
16
- appraise "rails4" do
16
+ appraise "rails40" do
17
17
  gem "rails", "4.0.0"
18
- gem "keynote", path: "../"
18
+ gem "minitest", "< 5"
19
+ end
20
+
21
+ appraise "rails41" do
22
+ gem "rails", "4.1.0.beta1"
23
+ gem "minitest", "~> 5.0"
19
24
  end
@@ -1,3 +1,9 @@
1
+ ## v0.2.1
2
+ * Update configuration to test across MRI 1.9.2/1.9.3/2.0.0/2.1.0, Rubinius,
3
+ JRuby, Rails 3.0/3.1/3.2/4.0/4.1.
4
+ * Fix issue #6, in which the order of dependencies in the Gemfile could keep
5
+ Keynote's RSpec integration from loading correctly.
6
+
1
7
  ## v0.2.0
2
8
  * Add `Keynote::Inline`, a module that presenters can extend to enable inline
3
9
  templating in any language supported by Rails.
@@ -3,6 +3,6 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "rails", "3.0.20"
6
- gem "keynote", :path=>"../"
6
+ gem "minitest", "< 5"
7
7
 
8
8
  gemspec :path=>"../"
@@ -3,6 +3,6 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "rails", "3.1.12"
6
- gem "keynote", :path=>"../"
6
+ gem "minitest", "< 5"
7
7
 
8
8
  gemspec :path=>"../"
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "3.2.14"
6
- gem "keynote", :path=>"../"
5
+ gem "rails", "3.2.16"
6
+ gem "minitest", "< 5"
7
7
 
8
8
  gemspec :path=>"../"
@@ -3,6 +3,6 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "rails", "4.0.0"
6
- gem "keynote", :path=>"../"
6
+ gem "minitest", "< 5"
7
7
 
8
8
  gemspec :path=>"../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "4.1.0.beta1"
6
+ gem "minitest", "~> 5.0"
7
+
8
+ gemspec :path=>"../"
@@ -22,13 +22,22 @@ Gem::Specification.new do |gem|
22
22
  gem.add_dependency 'rails', '>= 3.0.0'
23
23
 
24
24
  gem.add_development_dependency 'appraisal'
25
- gem.add_development_dependency 'minitest', '< 5'
26
- gem.add_development_dependency 'mocha', '~> 0.13.3'
25
+ gem.add_development_dependency 'minitest'
26
+ gem.add_development_dependency 'mocha', '~> 1.0.0'
27
27
  gem.add_development_dependency 'pry'
28
- gem.add_development_dependency 'redcarpet'
29
28
  gem.add_development_dependency 'simplecov'
30
29
  gem.add_development_dependency 'yard'
31
30
 
32
31
  gem.add_development_dependency 'slim'
33
32
  gem.add_development_dependency 'haml'
33
+
34
+ unless RbConfig::CONFIG['ruby_install_name'] == 'jruby'
35
+ gem.add_development_dependency 'redcarpet'
36
+ end
37
+
38
+ if RbConfig::CONFIG['ruby_install_name'] == 'rbx'
39
+ gem.add_development_dependency 'racc'
40
+ gem.add_development_dependency 'rubysl'
41
+ gem.add_development_dependency 'rubysl-test-unit'
42
+ end
34
43
  end
@@ -1,5 +1,6 @@
1
1
  # encoding: UTF-8
2
2
 
3
+ require "action_view"
3
4
  require "thread"
4
5
 
5
6
  module Keynote
@@ -89,7 +90,6 @@ module Keynote
89
90
  # end
90
91
  # end
91
92
  def inline(*formats)
92
- require "action_view"
93
93
  require "action_view/context"
94
94
 
95
95
  Array(formats).each do |format|
@@ -37,7 +37,7 @@ module Keynote
37
37
  end
38
38
 
39
39
  def self.load_test_integration
40
- if defined?(RSpec::Rails) && RSpec.respond_to?(:configure)
40
+ if defined?(RSpec::Rails)
41
41
  require 'keynote/testing/rspec'
42
42
  end
43
43
 
@@ -1,5 +1,6 @@
1
1
  # encoding: UTF-8
2
2
 
3
+ require "rspec"
3
4
  require "keynote/testing/test_present_method"
4
5
 
5
6
  module Keynote
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Keynote
4
4
  # @private
5
- VERSION = "0.2.0"
5
+ VERSION = "0.2.1"
6
6
  end
@@ -66,41 +66,44 @@ describe "generators" do
66
66
  end
67
67
  end
68
68
 
69
- it "should generate a presenter and MiniTest::Rails spec file" do
70
- Rails.application.config.generators do |g|
71
- g.test_framework :mini_test, :spec => true
72
- end
73
-
74
- invoke_generator 'post' do |files|
75
- files.must_equal %w(
76
- app/presenters/post_presenter.rb
77
- test/presenters/post_presenter_test.rb
78
- )
79
-
80
- file_contents('app/presenters/post_presenter.rb').
81
- must_match /class PostPresenter < Keynote::Presenter/
82
-
83
- file_contents('test/presenters/post_presenter_test.rb').
84
- must_match /describe PostPresenter do/
69
+ # Temporary workaround until MT::R supports MT5 and Rails 4.1
70
+ unless Rails::VERSION.to_s.start_with? "4.1.0"
71
+ it "should generate a presenter and MiniTest::Rails spec file" do
72
+ Rails.application.config.generators do |g|
73
+ g.test_framework :mini_test, :spec => true
74
+ end
75
+
76
+ invoke_generator 'post' do |files|
77
+ files.must_equal %w(
78
+ app/presenters/post_presenter.rb
79
+ test/presenters/post_presenter_test.rb
80
+ )
81
+
82
+ file_contents('app/presenters/post_presenter.rb').
83
+ must_match /class PostPresenter < Keynote::Presenter/
84
+
85
+ file_contents('test/presenters/post_presenter_test.rb').
86
+ must_match /describe PostPresenter do/
87
+ end
85
88
  end
86
- end
87
89
 
88
- it "should generate a presenter and MiniTest::Rails unit file" do
89
- Rails.application.config.generators do |g|
90
- g.test_framework :mini_test, :spec => false
91
- end
90
+ it "should generate a presenter and MiniTest::Rails unit file" do
91
+ Rails.application.config.generators do |g|
92
+ g.test_framework :mini_test, :spec => false
93
+ end
92
94
 
93
- invoke_generator 'post' do |files|
94
- files.must_equal %w(
95
- app/presenters/post_presenter.rb
96
- test/presenters/post_presenter_test.rb
97
- )
95
+ invoke_generator 'post' do |files|
96
+ files.must_equal %w(
97
+ app/presenters/post_presenter.rb
98
+ test/presenters/post_presenter_test.rb
99
+ )
98
100
 
99
- file_contents('app/presenters/post_presenter.rb').
100
- must_match /class PostPresenter < Keynote::Presenter/
101
+ file_contents('app/presenters/post_presenter.rb').
102
+ must_match /class PostPresenter < Keynote::Presenter/
101
103
 
102
- file_contents('test/presenters/post_presenter_test.rb').
103
- must_match /class PostPresenterTest < Keynote::TestCase/
104
+ file_contents('test/presenters/post_presenter_test.rb').
105
+ must_match /class PostPresenterTest < Keynote::TestCase/
106
+ end
104
107
  end
105
108
  end
106
109
  end
@@ -5,8 +5,8 @@ if ENV["COVERAGE"]
5
5
  SimpleCov.start
6
6
  end
7
7
 
8
- require 'minitest/spec'
9
8
  require 'minitest/autorun'
9
+ require 'minitest/spec'
10
10
  require 'minitest/pride'
11
11
  require 'mocha/setup'
12
12
 
@@ -3,26 +3,28 @@
3
3
  require 'helper'
4
4
 
5
5
  describe Keynote do
6
+ let(:view) { Object.new }
7
+
6
8
  describe "with a normal presenter" do
7
9
  let(:model) { Normal.new }
8
10
 
9
11
  it "should find and instantiate implicitly" do
10
- p = Keynote.present(:view, model)
12
+ p = Keynote.present(view, model)
11
13
 
12
14
  p.wont_be_nil
13
15
  p.must_be_instance_of NormalPresenter
14
16
 
15
- p.view.must_equal :view
17
+ p.view.must_equal view
16
18
  p.model.must_equal model
17
19
  end
18
20
 
19
21
  it "should find and instantiate explicitly" do
20
- p = Keynote.present(:view, :normal, 'hello')
22
+ p = Keynote.present(view, :normal, 'hello')
21
23
 
22
24
  p.wont_be_nil
23
25
  p.must_be_instance_of NormalPresenter
24
26
 
25
- p.view.must_equal :view
27
+ p.view.must_equal view
26
28
  p.model.must_equal 'hello'
27
29
  end
28
30
 
@@ -30,19 +32,19 @@ describe Keynote do
30
32
  m = mock()
31
33
  m.expects(:block_yielded)
32
34
 
33
- Keynote.present(:view, :normal, 'hello') do |p|
35
+ Keynote.present(view, :normal, 'hello') do |p|
34
36
  m.block_yielded
35
37
 
36
38
  p.wont_be_nil
37
39
  p.must_be_instance_of NormalPresenter
38
40
 
39
- p.view.must_equal :view
41
+ p.view.must_equal view
40
42
  p.model.must_equal 'hello'
41
43
  end
42
44
  end
43
45
 
44
46
  it "should integrate with Rumble" do
45
- p = Keynote.present(:view, model)
47
+ p = Keynote.present(view, model)
46
48
  rx = /<div>&lt;script&gt;alert\(/
47
49
 
48
50
  p.some_bad_html.scan(rx).count.must_equal 3
@@ -53,29 +55,28 @@ describe Keynote do
53
55
  let(:model) { Keynote::Nested.new }
54
56
 
55
57
  it "should find and instantiate implicitly" do
56
- p = Keynote.present(:view, model)
58
+ p = Keynote.present(view, model)
57
59
 
58
60
  p.wont_be_nil
59
61
  p.must_be_instance_of Keynote::NestedPresenter
60
62
 
61
- p.view.must_equal :view
63
+ p.view.must_equal view
62
64
  p.model.must_equal model
63
65
  end
64
66
 
65
67
  it "should find and instantiate explicitly" do
66
- p = Keynote.present(:view, :"keynote/nested", 'hello')
68
+ p = Keynote.present(view, :"keynote/nested", 'hello')
67
69
 
68
70
  p.wont_be_nil
69
71
  p.must_be_instance_of Keynote::NestedPresenter
70
72
 
71
- p.view.must_equal :view
73
+ p.view.must_equal view
72
74
  p.model.must_equal 'hello'
73
75
  end
74
76
  end
75
77
 
76
78
  describe "caching" do
77
79
  describe "when there is a view context" do
78
- let(:view) { Object.new }
79
80
  let(:view_2) { Object.new }
80
81
 
81
82
  it "should cache based on the models" do
@@ -4,10 +4,14 @@
4
4
 
5
5
  require 'helper'
6
6
 
7
- Rumble = Keynote::Rumble
7
+ if defined?(Minitest::Test)
8
+ klass = Minitest::Test
9
+ else
10
+ klass = MiniTest::Unit::TestCase
11
+ end
8
12
 
9
- class TestRumble < MiniTest::Unit::TestCase
10
- include Rumble
13
+ class TestRumble < klass
14
+ include Keynote::Rumble
11
15
 
12
16
  def assert_rumble(str, &blk)
13
17
  exp = str.gsub(/(\s+(<)|>\s+)/) { $2 || '>' }
@@ -167,13 +171,13 @@ class TestRumble < MiniTest::Unit::TestCase
167
171
  end
168
172
 
169
173
  def test_error_tags_outside_rumble_context
170
- assert_raises Rumble::Error do
174
+ assert_raises Keynote::Rumble::Error do
171
175
  div "content"
172
176
  end
173
177
  end
174
178
 
175
179
  def test_error_selfclosing_content
176
- assert_raises Rumble::Error do
180
+ assert_raises Keynote::Rumble::Error do
177
181
  build_html {
178
182
  br "content"
179
183
  }
@@ -181,7 +185,7 @@ class TestRumble < MiniTest::Unit::TestCase
181
185
  end
182
186
 
183
187
  def test_error_css_proxy_continue
184
- assert_raises Rumble::Error do
188
+ assert_raises Keynote::Rumble::Error do
185
189
  build_html {
186
190
  p.one("test").two
187
191
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keynote
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Fitzgerald
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-30 00:00:00.000000000 Z
11
+ date: 2014-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -42,30 +42,30 @@ dependencies:
42
42
  name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - <
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
- version: '5'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - <
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
- version: '5'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: mocha
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: 0.13.3
61
+ version: 1.0.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ~>
67
67
  - !ruby/object:Gem::Version
68
- version: 0.13.3
68
+ version: 1.0.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pry
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: redcarpet
84
+ name: simplecov
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - '>='
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: simplecov
98
+ name: yard
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - '>='
@@ -109,7 +109,7 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: yard
112
+ name: slim
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - '>='
@@ -123,7 +123,7 @@ dependencies:
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
- name: slim
126
+ name: haml
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - '>='
@@ -137,7 +137,7 @@ dependencies:
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
- name: haml
140
+ name: redcarpet
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - '>='
@@ -172,7 +172,8 @@ files:
172
172
  - gemfiles/rails30.gemfile
173
173
  - gemfiles/rails31.gemfile
174
174
  - gemfiles/rails32.gemfile
175
- - gemfiles/rails4.gemfile
175
+ - gemfiles/rails40.gemfile
176
+ - gemfiles/rails41.gemfile
176
177
  - keynote.gemspec
177
178
  - lib/generators/presenter_generator.rb
178
179
  - lib/generators/templates/keynote_mini_test_spec.rb
@@ -222,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
223
  version: '0'
223
224
  requirements: []
224
225
  rubyforge_project:
225
- rubygems_version: 2.0.2
226
+ rubygems_version: 2.0.14
226
227
  signing_key:
227
228
  specification_version: 4
228
229
  summary: Flexible presenters for Rails.