middleman-tansu 0.1.1 → 0.1.2

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: bad745d140fedddb0e4fe94910dbd396d38f0d9c
4
- data.tar.gz: c0787d6126e53ea25fbb45d03176e880e9e4e58b
3
+ metadata.gz: b062e5143a8ff3b6f7ea5e0d130acaa7004671a8
4
+ data.tar.gz: 8182a19a35a914404b08cc375b309077d14618bd
5
5
  SHA512:
6
- metadata.gz: f594799c8f773ffbef2a8445724509addd03dd5cae7fad8310440a8d781c0ebf3817bead81db0a25986c60c2d48cfde97574f1c4d8ca7a3539b269fd4c172e90
7
- data.tar.gz: 9fbce8a427bbcb4af8adbe612de3b027db0f6558dcb4c290c367061ee391577dbcede6fe8b4d801a57347b5801ea7a094aa0ea583d7a9ffed95d3e04fdc8c9e0
6
+ metadata.gz: 3b3d9f1c72320919efbf994e8cf58ec848700c68a11f6b5cb542a3793cedc0681ba412548fc5d0e4aec391a5ff8be01a67cf997bf3178262f2c5b56d16b83198
7
+ data.tar.gz: 80c017632967da703f8fbf0552dbe217d80eb78a5f537b1fed7ddfb929f05be3bb0dcc3cd0c01a97ceec7b562ea80417c803a345c371263cf3c95373c3658850
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 0.1.2
2
+
3
+ - Drop `--current` (alias: `-c`) from `tansu` command.
4
+ - This option does't work.(but cucumber test was passed.)
5
+
1
6
  # 0.1.1
2
7
 
3
8
  - Add option `--current` (alias: `-c`) into `tansu` command.
@@ -4,8 +4,8 @@ Feature: Tansu Command
4
4
  Given a fixture app "empty-app"
5
5
  When I run `middleman tansu foo`
6
6
  Then the exit status should be 0
7
- And a file named "source/foo.html.md" should exist
8
7
  And the output should contain "create tansu page: foo.html.md"
8
+ And a file named "source/foo.html.md" should exist
9
9
  And the file "source/foo.html.md" should contain "title: foo"
10
10
  And the file "source/foo.html.md" should not contain "title: foo.html.md"
11
11
  And the file "source/foo.html.md" should contain "author:"
@@ -117,15 +117,3 @@ Feature: Tansu Command
117
117
  And the file "source/foo.html.md" should contain "author:"
118
118
  And the file "source/foo.html.md" should contain "date:"
119
119
  And the file "source/foo.html.md" should contain "+0900"
120
-
121
- Scenario: `middleman tansu` create a markdown file with -c
122
- Given a fixture app "empty-app"
123
- And a directory named "source/subdirectory"
124
- And I cd to "source/subdirectory"
125
- When I run `middleman tansu foo -c`
126
- Then the exit status should be 0
127
- And the output should contain "create tansu page: foo.html.md"
128
- And a file named "foo.html.md" should exist
129
- And the file "foo.html.md" should contain "title: foo"
130
- And the file "foo.html.md" should contain "author:"
131
- And the file "foo.html.md" should contain "date:"
@@ -47,11 +47,6 @@ module Middleman
47
47
  method_option 'author',
48
48
  aliases: '-a',
49
49
  desc: 'The author name of Frontmatter (default: ENV["USER"])'
50
- method_option 'current',
51
- type: :boolean,
52
- aliases: '-c',
53
- default: false,
54
- desc: 'Create file from current direcotry'
55
50
  method_option 'frontmatter',
56
51
  desc: 'Additions of Frontmatter ex:"category:sample,tags:frontmatter"',
57
52
  default: ''
@@ -68,13 +63,10 @@ module Middleman
68
63
  filename = "#{title}.html.#{ext}"
69
64
  end
70
65
 
71
- if options[:current]
72
- file = File.join(filename)
73
- else
74
- dir = destination_dir(paths)
75
- file = File.join(dir, filename)
76
- FileUtils.mkdir_p dir unless Dir.exist?(dir)
77
- end
66
+ dir = destination_dir(paths)
67
+ file = File.join(dir, filename)
68
+
69
+ FileUtils.mkdir_p dir unless Dir.exist?(dir)
78
70
 
79
71
  if File.exist?(file)
80
72
  say "#{display_path(file)} is exist"
@@ -137,7 +129,7 @@ module Middleman
137
129
  end
138
130
 
139
131
  def display_path(path)
140
- path.sub(Regexp.new("^#{source}/"), '')
132
+ path.sub(Regexp.new("^#{source}/"), "")
141
133
  end
142
134
  end
143
135
  end
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Tansu
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-tansu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuya Terajima