middleman-presentation 0.15.6 → 0.15.7

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: fbe3e0ab8f49e4f2c64520d6f0726c9ff11737a7
4
- data.tar.gz: 2804f20ff4cdd7ccb99e48a2e44c27a776288dcf
3
+ metadata.gz: 58c10edea93c0d927782843a1d76e3f5142d19e9
4
+ data.tar.gz: 1baaeed9de730c623a6f7fa494233258a96ee1e3
5
5
  SHA512:
6
- metadata.gz: 2ba9d7811db8702126371dd5e0458c5ae752179e2aab57ab9270010a1cf3b34b8b7c98f373cdc99fc0913db8d04ead686a658d749cd63006c90ae71cded08b41
7
- data.tar.gz: a2dd3ea9ce2c54c3cfacb17d27c348fb7d5259aaf428574b46153b004fb2b14d805001e008213f39a29c132f8e5a967cb21b4fc046dbec3243f4c7138bd5f2df
6
+ metadata.gz: ccb0426eba03d4cadf0d866f8dd7de7180b2bee44e4bc7d839e288002d701b4ceb8e7da39e561a20474ea72f1d75c74e1558e0768e3807e0d0a9c42ee4f604f2
7
+ data.tar.gz: 7e5c658770ef6ae0c1b9bf019c9f77241a08cf177a58d2110d1bfffb838726a3ca699f05c82a130dd81979f0015518ec367ef0c38d91569c0bdb5efd459d9987
data/Gemfile.lock CHANGED
@@ -11,7 +11,7 @@ GIT
11
11
  PATH
12
12
  remote: .
13
13
  specs:
14
- middleman-presentation (0.15.5)
14
+ middleman-presentation (0.15.6)
15
15
  addressable (~> 2.3.5)
16
16
  bundler
17
17
  erubis
@@ -10,11 +10,6 @@ Feature: Grouping slides
10
10
  And I successfully run `middleman-presentation create presentation presentation1 --title "My Presentation"`
11
11
  And I cd to "presentation1"
12
12
 
13
- Scenario: Create slides in subfolder
14
- When I successfully run `middleman slide 01namespace:01`
15
- Then the following files should exist:
16
- | source/slides/01namespace/01.html.md |
17
-
18
13
  Scenario: Read slides from filesystem
19
14
  Given a slide named "01namespace/01.html.erb" with:
20
15
  """
@@ -298,3 +298,15 @@ Feature: Add new slide
298
298
  """
299
299
  exist slides/01.html.md
300
300
  """
301
+
302
+ Scenario: Create Group of slides in subfolder
303
+ When I successfully run `middleman slide 01namespace:01`
304
+ Then the following files should exist:
305
+ | source/slides/01namespace/01.html.md |
306
+
307
+ @wip
308
+ Scenario: Create Group with same name as slide
309
+ When I successfully run `middleman slide 01:01`
310
+ Then the following files should exist:
311
+ | source/slides/01/01.html.md |
312
+
@@ -148,7 +148,7 @@ module Middleman
148
148
  if ENV['MM_ENV'] == 'development'
149
149
  append_to_file File.join(root_directory, 'Gemfile'), <<-EOS.strip_heredoc
150
150
 
151
- gem 'middleman-presentation', path: '#{File.expand_path('../../../../', __FILE__)}
151
+ gem 'middleman-presentation', path: '#{File.expand_path('../../../../', __FILE__)}'
152
152
 
153
153
  EOS
154
154
  else
@@ -12,7 +12,7 @@ module Middleman
12
12
  public
13
13
 
14
14
  def initialize(input, base_path:)
15
- @input = input
15
+ @input = input.split(/:/)
16
16
  @name = extract_name
17
17
  @slide_directory_path = Pathname.new(base_path)
18
18
  @base_path = @slide_directory_path.dirname
@@ -131,16 +131,14 @@ module Middleman
131
131
  end
132
132
 
133
133
  def extract_name
134
- input.split(/:/).last
134
+ input.last
135
135
  end
136
136
 
137
137
  # Extract group from name
138
138
  def extract_group
139
- group = input.split(/:/).first
139
+ return nil if input.size < 2 # no group given
140
140
 
141
- return nil if group == name
142
-
143
- group.to_s
141
+ input.first.to_s
144
142
  end
145
143
  end
146
144
  end
@@ -3,6 +3,6 @@
3
3
  module Middleman
4
4
  # Presentation
5
5
  module Presentation
6
- VERSION = '0.15.6'
6
+ VERSION = '0.15.7'
7
7
  end
8
8
  end
@@ -121,6 +121,12 @@ RSpec.describe NewSlide do
121
121
  expect(slide).to be_group 'group'
122
122
  end
123
123
 
124
+ it 'succeeds if slide has same name for group and slide' do
125
+ slide = NewSlide.new('02:02', base_path: File.join(working_directory, 'source', 'slides'))
126
+
127
+ expect(slide).to be_group '02'
128
+ end
129
+
124
130
  it 'fails if slide has not group' do
125
131
  slide = NewSlide.new('02.md', base_path: File.join(working_directory, 'source'))
126
132
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-presentation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.6
4
+ version: 0.15.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Meyer