keynote 0.2.2 → 0.2.3

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: 9102d39344eda42029696b7429377d8f810ce744
4
- data.tar.gz: 23184e1d37ce25d16d59c4cca69a328fee4ef1d0
3
+ metadata.gz: db51baa66be9c4cbbce4723f556826bdf5cdf1e6
4
+ data.tar.gz: 8d90665dc6a5cb0d604fbabef3399169d8b24b8a
5
5
  SHA512:
6
- metadata.gz: 8bf61eefce03db8ae56df92f06b194893885b72de489319dcbd07fd755f3882744d0c992af77c80dbff634d1b09f3858f01b61e8becc7135f7374fc8e25f1dd1
7
- data.tar.gz: 0a626ab8db8b839edecbe915b16709b75860b716c067e6fc951288d4bc8b71a5d6ad3c053b5539d3c0d800ea7a19cc6f0cf8ae12e796aad9df4318d21a84a634
6
+ metadata.gz: 7b05cbcae3d9faac3fc259ad2457b2cbbeabc148511992a9d2fab8f7d13d6056a8006d39a69afedfcd54df29d756312c9f053a4be1c5b3e6c202b60f896728a4
7
+ data.tar.gz: 37695c36a41203f443ad7381199429c66811391fb09a8717f85782e72774642a01cac7887e5f15e819b2eac3ef490e9ec25ce360272da541543d3aacf8b3abe4
@@ -4,7 +4,7 @@ rvm:
4
4
  - 1.9.3
5
5
  - 2.0.0
6
6
  - 2.1.0
7
- - rbx
7
+ - rbx-2
8
8
  - jruby-19mode
9
9
  gemfile:
10
10
  - gemfiles/rails30.gemfile
@@ -1,3 +1,12 @@
1
+ ## v0.2.3
2
+ * Allow user to pass the string version of the presenter name into
3
+ `Keynote.present` as an alternative to passing a symbol. This makes it less
4
+ awkward to use namespaced presenters, but it does remove the possibility of
5
+ defining a `StringPresenter` and using it with code like
6
+ `k('some string').format_as_markdown`. It seems unlikely that anyone is
7
+ actually doing that though.
8
+ * Update RSpec integration to not print deprecation warnings with RSpec 3.
9
+
1
10
  ## v0.2.2
2
11
  * Fix another RSpec integration bug, which happened in cases where the app's
3
12
  Gemfile included rspec-rails but not the rspec gem itself.
data/README.md CHANGED
@@ -48,7 +48,7 @@ a view, helper, controller, or another presenter.
48
48
  </div>
49
49
  ```
50
50
 
51
- If you pass anything other than a symbol as the first parameter of
51
+ If you pass anything other than a symbol or string as the first parameter of
52
52
  `present`/`k`, Keynote will assume you want to instantiate a presenter named
53
53
  after the class of that object -- in this case, the model is a `User`, so
54
54
  Keynote looks for a class called `UserPresenter`.
@@ -42,12 +42,12 @@ module Keynote
42
42
  # @example
43
43
  # present(view, :foo_bar, MyModel.new) # => #<FooBarPresenter:0x0002>
44
44
  # @param [ActionView::Base] view
45
- # @param [Symbol] presenter_name
45
+ # @param [Symbol, String] presenter_name
46
46
  # @param [Array] objects
47
47
  # @return [Keynote::Presenter]
48
48
  #
49
49
  def present(view, *objects)
50
- if objects[0].is_a?(Symbol)
50
+ if objects[0].is_a?(Symbol) || objects[0].is_a?(String)
51
51
  name = objects.shift
52
52
  else
53
53
  name = presenter_name_from_object(objects[0])
@@ -14,7 +14,13 @@ module Keynote
14
14
  end
15
15
 
16
16
  RSpec.configure do |config|
17
- config.include Keynote::ExampleGroup,
18
- :type => :presenter,
19
- :example_group => {:file_path => %r/spec.presenters/}
17
+ if RSpec::Core::Version::STRING.starts_with?("3")
18
+ config.include Keynote::ExampleGroup,
19
+ :type => :presenter,
20
+ :file_path => %r/spec.presenters/
21
+ else
22
+ config.include Keynote::ExampleGroup,
23
+ :type => :presenter,
24
+ :example_group => { :file_path => %r/spec.presenters/ }
25
+ end
20
26
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Keynote
4
4
  # @private
5
- VERSION = "0.2.2"
5
+ VERSION = "0.2.3"
6
6
  end
@@ -65,7 +65,7 @@ describe Keynote do
65
65
  end
66
66
 
67
67
  it "should find and instantiate explicitly" do
68
- p = Keynote.present(view, :"keynote/nested", 'hello')
68
+ p = Keynote.present(view, "keynote/nested", 'hello')
69
69
 
70
70
  p.wont_be_nil
71
71
  p.must_be_instance_of Keynote::NestedPresenter
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.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Fitzgerald
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-05 00:00:00.000000000 Z
11
+ date: 2014-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails