noir 0.1.6 → 0.1.7

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
2
  SHA1:
3
- metadata.gz: f042636641282955a738c7e58147f0376594aafb
4
- data.tar.gz: e6d854008154865700b3601c29894d02f47ab471
3
+ metadata.gz: bdf37cb436e6fa50b65f833bcecc28b459fc4c8f
4
+ data.tar.gz: b7186bffbd09eca787d78040bbbbe9f4edd823d5
5
5
  SHA512:
6
- metadata.gz: da65e20c426057d8903654b8feaf534d8d21f7527382ff93f2b2b6b1282ebcd80a27d89136c1822e9da14c0f11d1bbff92e6bf5367bbc90c0949bdc9df49b5f0
7
- data.tar.gz: ee01b757c552f30a3597053e0cd205464044569189b8fbf90d5d091f50edc9a92c10253fcbe04bc0b1fdd74ee73d8d225a3911572c3d6bc0ed27845a8341bf29
6
+ metadata.gz: 2e454b33b7edd35c77c371d645dc3e30763edea37205c8d7fd5d08094a3ba97391c05d2f500509000413160d60c1c5e1ba333c8118428bf64f629e90eaf2e255
7
+ data.tar.gz: 9ab600c4cecc3ebec37933465269081c58f784f4258e36c88ff139b87b1ac73c8db598004bb1f547072ee01922e269746687318f1242c8280488f5ca3dd8da6d
@@ -1,5 +1,13 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - 2.2.2
4
+ - 2.2.1
5
+ - 2.2.0
6
+ - 2.1.6
7
+ - 2.1.5
8
+ - 2.1.4
9
+ - 2.1.3
10
+ - 2.1.2
3
11
  - 2.1.1
4
12
  - 2.0.0
5
13
  - 1.9.3
@@ -13,5 +13,6 @@ require 'noir/command/completion'
13
13
 
14
14
  require 'noir/command/calculate'
15
15
  require 'noir/command/edit'
16
+ require 'noir/command/format'
16
17
  require 'noir/command/help'
17
18
  require 'noir/command/new'
@@ -0,0 +1,5 @@
1
+ class Noir::Command::Format < Noir::Base::Command
2
+ @description = 'format string utils'
3
+ end
4
+
5
+ require 'noir/command/format/pdf_url'
@@ -0,0 +1,19 @@
1
+ require 'uri'
2
+
3
+ class Noir::Command::Format::PDFURL < Noir::Base::TerminalCommand
4
+ @description = 'get raw URL from link that is searched by google'
5
+
6
+ def self.execute *args
7
+ raise 'URL Missing. Please input a link in argument.'if args.empty?
8
+
9
+ args.each do |url|
10
+ if URI.regexp.match(url)
11
+ puts URI.decode_www_form(url).find{|a| a.first == 'url'}
12
+ else
13
+ puts 'PDF URL missing'
14
+ end
15
+ end
16
+
17
+ end
18
+ end
19
+
@@ -1,13 +1,54 @@
1
- class Noir::Command::New::GitIgnore < Noir::Base::Command
2
- @description = 'Create new .gitignore'
1
+ class Noir::Command::New::GitIgnore < Noir::Base::TerminalCommand
2
+ module GitIgnoreTexts
3
+ Vim = %q(
4
+ *.swp
5
+ )
6
+
7
+ TeX = %q(
8
+ *.aux
9
+ *.bbl
10
+ *.blg
11
+ *.cpt
12
+ *.dvi
13
+ *.lof
14
+ *.log
15
+ *.lol
16
+ *.lot
17
+ *.toc
18
+ *.xbb
19
+ )
20
+
21
+ Agda = %q(
22
+ *.agdai
23
+ *.*~
24
+ )
25
+ end
3
26
 
4
27
  GitIgnoreName = '.gitignore'
28
+ SupportedKinds = GitIgnoreTexts.constants.map{|c| c.to_s.downcase}.join(' ')
29
+
30
+
31
+
32
+ def self.ignore_texts_from_kinds kinds
33
+ kinds = kinds.map(&:downcase).map(&:to_sym)
34
+ if kinds.empty?
35
+ raise "Please input some kinds of ignore\n supported: #{SupportedKinds}"
36
+ end
37
+ unless kinds.all?{|k| GitIgnoreTexts.constants.map(&:downcase).include?(k)}
38
+ raise 'Unsupported kinds'
39
+ end
40
+
41
+ kinds.map{|k| GitIgnoreTexts.const_get(GitIgnoreTexts.constants.find{|c| c.downcase == k})}.join("\n")
42
+ end
5
43
 
6
44
  def self.createGitIgnore text
7
45
  Noir::Command::New.createFile(GitIgnoreName, text)
8
46
  end
9
47
 
10
- end
11
48
 
12
- require 'noir/command/new/gitignore/vim'
13
- require 'noir/command/new/gitignore/tex'
49
+
50
+ @description = 'Create new .gitignore. supported kinds:' + SupportedKinds
51
+ def self.execute *args
52
+ createGitIgnore ignore_texts_from_kinds(args)
53
+ end
54
+ end
@@ -1,14 +1,11 @@
1
- class Noir::Command::New::HgIgnore < Noir::Base::Command
2
- @description = 'Create new .hgignore'
1
+ class Noir::Command::New::HgIgnore < Noir::Base::TerminalCommand
2
+ @description = "Create new .hgignore. supported #{Noir::Command::New::GitIgnore::SupportedKinds}"
3
3
 
4
- HgIgnoreName = '.hgignore'
4
+ HgIgnoreName = '.hgignore'
5
+ HgIgnoreHeader = "syntax: glob\n\n"
5
6
 
6
- def self.createHgIgnore text
7
- Noir::Command::New.createFile(HgIgnoreName, text)
7
+ def self.execute *args
8
+ text = Noir::Command::New::GitIgnore.ignore_texts_from_kinds(args)
9
+ Noir::Command::New.createFile(HgIgnoreName, HgIgnoreHeader + text)
8
10
  end
9
-
10
11
  end
11
-
12
- require 'noir/command/new/hgignore/agda'
13
- require 'noir/command/new/hgignore/tex'
14
- require 'noir/command/new/hgignore/vim'
@@ -2,24 +2,34 @@ class Noir::Command::New::Makefile::Tex < Noir::Base::TerminalCommand
2
2
  @description = 'Create new Makefile for TeX'
3
3
 
4
4
  MakefileText = %q(
5
- # target name
6
- TARGET=<tex_file_name_without_extension>
5
+ # Settings
6
+ TARGET=<`1:filename_without_extension`>
7
+ BIBTEX=echo # pbibtex
8
+ BB=extractbb
9
+
10
+ vpath pdf fig
11
+ FIGURES=$(wildcard fig/*.pdf)
12
+ FIGURES_FOR_TEX=$(subst .pdf,.xbb,$(FIGURES))
7
13
 
8
14
  # dependencies
9
15
  $(TARGET).pdf : $(TARGET).dvi
10
16
  dvipdfmx $<
11
17
 
12
- $(TARGET).dvi : $(wildcard **/*.tex) $(TARGET).tex
13
- platex $(TARGET).tex
14
- platex $(TARGET).tex
15
- platex $(TARGET).tex
18
+ $(TARGET).dvi : $(wildcard *.tex) $(FIGURES_FOR_TEX) $(SOURCES_FOR_TEX)
19
+ platex $(TARGET).tex
20
+ $(BIBTEX) $(TARGET)
21
+ platex $(TARGET).tex
22
+ platex $(TARGET).tex
23
+
24
+ %.xbb: %.pdf
25
+ $(BB) $<
16
26
 
17
27
 
18
28
  # commands
19
29
  .PHONY : clean all open remake
20
30
 
21
31
  clean:
22
- rm -f *.dvi *.aux *.log *.pdf *.ps *.gz *.bbl *.blg *.toc *~ *.core *.cpt
32
+ rm -f *.dvi *.aux *.log *.pdf *.ps *.gz *.bbl *.blg *.toc *~ *.core *.cpt *.lof *.lot *.lol *.bbl *.blg
23
33
 
24
34
  all: $(TARGET).pdf
25
35
 
@@ -1,3 +1,3 @@
1
1
  module Noir
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
@@ -20,7 +20,8 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.required_ruby_version = '>= 1.9.2'
22
22
 
23
- spec.add_development_dependency "bundler", "~> 1.5"
24
- spec.add_development_dependency "rake", "10.3.2"
25
- spec.add_development_dependency "rspec", "3.0.0"
23
+ spec.add_development_dependency 'bundler', '~> 1.6'
24
+ spec.add_development_dependency 'rake', '10.4.2'
25
+ spec.add_development_dependency 'rspec', '3.2.0'
26
+ spec.add_development_dependency 'pry', '0.10.1'
26
27
  end
@@ -0,0 +1,28 @@
1
+ require 'noir'
2
+ require 'spec_helper'
3
+
4
+ describe 'Noir::Command::Edit' do
5
+ it 'is inherited Noir::Base::Terminalcommand' do
6
+ expect(Noir::Command::Format::PDFURL.superclass).to eq(Noir::Base::TerminalCommand)
7
+ end
8
+
9
+ it 'is raise exception when argument is empty' do
10
+ expect{Noir::Command::Format::PDFURL.execute}.to raise_error(/URL Missing/)
11
+ end
12
+
13
+ it 'is output url from a link that is searched by google' do
14
+ url = 'http://www.google.co.jp/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CCcQFjAA&url=http%3A%2F%2Fwww.paultaylor.eu%2Fstable%2Fprot.pdf&ei=vZU9VYutJOfEmwXVqYCACQ&usg=AFQjCNFjVoGxnV_G4uQ18BzFs7z4iOPYkA&bvm=bv.91665533,d.dGY'
15
+ expect{ Noir::Command::Format::PDFURL.execute(url) }.to output(/http:/).to_stdout
16
+ end
17
+
18
+ it 'is output message, if link is not valid' do
19
+ expect{ Noir::Command::Format::PDFURL.execute('hoge') }.to output(/missing/).to_stdout
20
+ end
21
+
22
+ it 'is support multi URL' do
23
+ url = 'http://www.google.co.jp/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CCcQFjAA&url=http%3A%2F%2Fwww.paultaylor.eu%2Fstable%2Fprot.pdf&ei=vZU9VYutJOfEmwXVqYCACQ&usg=AFQjCNFjVoGxnV_G4uQ18BzFs7z4iOPYkA&bvm=bv.91665533,d.dGY'
24
+ expect{ Noir::Command::Format::PDFURL.execute(url,url,url) }.to output(/http:/).to_stdout
25
+ end
26
+ end
27
+
28
+
@@ -0,0 +1,10 @@
1
+ require 'noir'
2
+ require 'spec_helper'
3
+
4
+ describe 'Noir::Command::Format' do
5
+ it 'is inherited Noir::Base::Command' do
6
+ expect(Noir::Command::Format.superclass).to eq(Noir::Base::Command)
7
+ end
8
+ end
9
+
10
+
@@ -2,8 +2,39 @@ require 'noir'
2
2
  require 'spec_helper'
3
3
 
4
4
  describe 'Noir::Command::New::GitIgnore' do
5
- it 'is Command' do
6
- expect(Noir::Command::New::GitIgnore.superclass).to eq(Noir::Base::Command)
5
+ it 'is TerminalCommand' do
6
+ expect(Noir::Command::New::GitIgnore.superclass).to eq(Noir::Base::TerminalCommand)
7
+ end
8
+
9
+ it 'is create .gitignore' do
10
+ allow(Noir::Command::New).to receive(:createFile)
11
+ expect(Noir::Command::New).to receive(:createFile).with('.gitignore', /.swp/)
12
+ Noir::Command::New::GitIgnore.execute('vim')
13
+ end
14
+
15
+ describe '.ignore_texts_from_kinds' do
16
+ it 'is raise error when arguments is empty' do
17
+ expect{Noir::Command::New::GitIgnore.ignore_texts_from_kinds([])}.to raise_error(/input/)
18
+ end
19
+
20
+ it 'is raise errors when arguments has invalid kinds' do
21
+ expect{Noir::Command::New::GitIgnore.ignore_texts_from_kinds(['hoge'])}.to raise_error(/Un/)
22
+ end
23
+
24
+ it 'is same text when valid a kind' do
25
+ %w(Vim TeX).each do |k|
26
+ valid_gitignore_text = Noir::Command::New::GitIgnore::GitIgnoreTexts.const_get(k)
27
+ expect(Noir::Command::New::GitIgnore.ignore_texts_from_kinds([k])).to eq(valid_gitignore_text)
28
+ end
29
+ end
30
+
31
+ it 'is support multi kinds' do
32
+ kinds = %w(Vim TeX Vim)
33
+ texts = (Noir::Command::New::GitIgnore.ignore_texts_from_kinds(kinds))
34
+ kinds.each do |k|
35
+ expect(texts).to include(Noir::Command::New::GitIgnore::GitIgnoreTexts.const_get(k))
36
+ end
37
+ end
7
38
  end
8
39
  end
9
40
 
@@ -2,8 +2,32 @@ require 'noir'
2
2
  require 'spec_helper'
3
3
 
4
4
  describe 'Noir::Command::New::HgIgnore' do
5
- it 'is Command' do
6
- expect(Noir::Command::New::HgIgnore.superclass).to eq(Noir::Base::Command)
5
+ it 'is TerminalCommand' do
6
+ expect(Noir::Command::New::HgIgnore.superclass).to eq(Noir::Base::TerminalCommand)
7
+ end
8
+
9
+ it 'is create .hgignore' do
10
+ allow(Noir::Command::New).to receive(:createFile)
11
+ expect(Noir::Command::New).to receive(:createFile).with('.hgignore', /glob/)
12
+ Noir::Command::New::HgIgnore.execute('vim')
13
+ end
14
+
15
+ it 'is raise when arguments is empty by .ignore_texts_from_kinds' do
16
+ expect{Noir::Command::New::HgIgnore.execute}.to raise_error(/input/)
17
+ end
18
+
19
+ it 'is raise when arguments includes invalid kinds' do
20
+ expect{Noir::Command::New::HgIgnore.execute('hoge')}.to raise_error(/Unsupported kinds/)
21
+ end
22
+
23
+
24
+ it 'use texts is generated by GitIgnore.ignore_texts_from_kinds' do
25
+ allow(Noir::Command::New::GitIgnore).to receive(:ignore_texts_from_kinds)
26
+ expect(Noir::Command::New::GitIgnore).to receive(:ignore_texts_from_kinds).with(['tex']).and_return('')
27
+
28
+ allow(Noir::Command::New).to receive(:createFile)
29
+ expect(Noir::Command::New).to receive(:createFile).with('.hgignore', /glob/)
30
+ Noir::Command::New::HgIgnore.execute('tex')
7
31
  end
8
32
  end
9
33
 
@@ -217,6 +217,7 @@ describe 'Noir::Executer' do
217
217
  end
218
218
 
219
219
  it 'not has help flag. execute command.execute' do
220
+ stub_const 'ARGV', []
220
221
  expect(Noir::Executer.execute).to eq(:call_execute)
221
222
  end
222
223
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noir
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - atton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-02 00:00:00.000000000 Z
11
+ date: 2015-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,42 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.5'
19
+ version: '1.6'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.5'
26
+ version: '1.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 10.3.2
33
+ version: 10.4.2
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 10.3.2
40
+ version: 10.4.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 3.0.0
47
+ version: 3.2.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: 3.0.0
54
+ version: 3.2.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '='
60
+ - !ruby/object:Gem::Version
61
+ version: 0.10.1
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '='
67
+ - !ruby/object:Gem::Version
68
+ version: 0.10.1
55
69
  description: Untility commands with completion for atton.
56
70
  email:
57
71
  - e115763@gmail.com
@@ -85,17 +99,14 @@ files:
85
99
  - lib/noir/command/edit/weekly_report/thursday.rb
86
100
  - lib/noir/command/edit/weekly_report/tuesday.rb
87
101
  - lib/noir/command/edit/weekly_report/wednesday.rb
102
+ - lib/noir/command/format.rb
103
+ - lib/noir/command/format/pdf_url.rb
88
104
  - lib/noir/command/help.rb
89
105
  - lib/noir/command/init.rb
90
106
  - lib/noir/command/init/zsh.rb
91
107
  - lib/noir/command/new.rb
92
108
  - lib/noir/command/new/gitignore.rb
93
- - lib/noir/command/new/gitignore/tex.rb
94
- - lib/noir/command/new/gitignore/vim.rb
95
109
  - lib/noir/command/new/hgignore.rb
96
- - lib/noir/command/new/hgignore/agda.rb
97
- - lib/noir/command/new/hgignore/tex.rb
98
- - lib/noir/command/new/hgignore/vim.rb
99
110
  - lib/noir/command/new/makefile.rb
100
111
  - lib/noir/command/new/makefile/tex.rb
101
112
  - lib/noir/command/new/note.rb
@@ -116,15 +127,12 @@ files:
116
127
  - spec/noir/command/edit/weekly_report/wednesday_spec.rb
117
128
  - spec/noir/command/edit/weekly_report_spec.rb
118
129
  - spec/noir/command/edit_spec.rb
130
+ - spec/noir/command/format/pdf_url_spec.rb
131
+ - spec/noir/command/format_spec.rb
119
132
  - spec/noir/command/help_spec.rb
120
133
  - spec/noir/command/init/zsh_spec.rb
121
134
  - spec/noir/command/init_spec.rb
122
- - spec/noir/command/new/gitignore/tex_spec.rb
123
- - spec/noir/command/new/gitignore/vim_spec.rb
124
135
  - spec/noir/command/new/gitignore_spec.rb
125
- - spec/noir/command/new/hgignore/agda_spec.rb
126
- - spec/noir/command/new/hgignore/tex_spec.rb
127
- - spec/noir/command/new/hgignore/vim_spec.rb
128
136
  - spec/noir/command/new/hgignore_spec.rb
129
137
  - spec/noir/command/new/makefile/tex_spec.rb
130
138
  - spec/noir/command/new/makefile_spec.rb
@@ -158,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
166
  version: '0'
159
167
  requirements: []
160
168
  rubyforge_project:
161
- rubygems_version: 2.4.2
169
+ rubygems_version: 2.4.6
162
170
  signing_key:
163
171
  specification_version: 4
164
172
  summary: Utilities for atton.
@@ -176,15 +184,12 @@ test_files:
176
184
  - spec/noir/command/edit/weekly_report/wednesday_spec.rb
177
185
  - spec/noir/command/edit/weekly_report_spec.rb
178
186
  - spec/noir/command/edit_spec.rb
187
+ - spec/noir/command/format/pdf_url_spec.rb
188
+ - spec/noir/command/format_spec.rb
179
189
  - spec/noir/command/help_spec.rb
180
190
  - spec/noir/command/init/zsh_spec.rb
181
191
  - spec/noir/command/init_spec.rb
182
- - spec/noir/command/new/gitignore/tex_spec.rb
183
- - spec/noir/command/new/gitignore/vim_spec.rb
184
192
  - spec/noir/command/new/gitignore_spec.rb
185
- - spec/noir/command/new/hgignore/agda_spec.rb
186
- - spec/noir/command/new/hgignore/tex_spec.rb
187
- - spec/noir/command/new/hgignore/vim_spec.rb
188
193
  - spec/noir/command/new/hgignore_spec.rb
189
194
  - spec/noir/command/new/makefile/tex_spec.rb
190
195
  - spec/noir/command/new/makefile_spec.rb
@@ -198,3 +203,4 @@ test_files:
198
203
  - spec/noir/noir_spec.rb
199
204
  - spec/noir/options_spec.rb
200
205
  - spec/spec_helper.rb
206
+ has_rdoc:
@@ -1,20 +0,0 @@
1
- class Noir::Command::New::GitIgnore::Tex < Noir::Base::TerminalCommand
2
- @description = 'Create new .gitignore for TeX'
3
-
4
- GitIgnoreText = %q(
5
- *.swp
6
-
7
- *.log
8
- *.aux
9
- *.dvi
10
- *.pdf
11
- *.toc
12
- *.cpt
13
- )
14
-
15
- def self.execute *args
16
- Noir::Command::New::GitIgnore.createGitIgnore GitIgnoreText
17
- end
18
-
19
- end
20
-
@@ -1,13 +0,0 @@
1
- class Noir::Command::New::GitIgnore::Vim < Noir::Base::TerminalCommand
2
- @description = 'Create new .gitignore for vim'
3
-
4
- GitIgnoreText = %q(
5
- *.swp
6
- )
7
-
8
- def self.execute *args
9
- Noir::Command::New::GitIgnore.createGitIgnore GitIgnoreText
10
- end
11
-
12
- end
13
-
@@ -1,17 +0,0 @@
1
- class Noir::Command::New::HgIgnore::Agda < Noir::Base::TerminalCommand
2
- @description = 'Create new .hgignore for Agda'
3
-
4
- HgIgnoreText = %q(
5
- syntax: glob
6
-
7
- *.swp
8
-
9
- *.agdai
10
- *.*~
11
- )
12
-
13
- def self.execute *args
14
- Noir::Command::New::HgIgnore.createHgIgnore HgIgnoreText
15
- end
16
-
17
- end
@@ -1,22 +0,0 @@
1
- class Noir::Command::New::HgIgnore::Tex < Noir::Base::TerminalCommand
2
- @description = 'Create new .hgignore for TeX'
3
-
4
- HgIgnoreText = %q(
5
- syntax: glob
6
-
7
- *.swp
8
-
9
- *.log
10
- *.aux
11
- *.dvi
12
- *.pdf
13
- *.toc
14
- *.cpt
15
- )
16
-
17
- def self.execute *args
18
- Noir::Command::New::HgIgnore.createHgIgnore HgIgnoreText
19
- end
20
-
21
- end
22
-
@@ -1,15 +0,0 @@
1
- class Noir::Command::New::HgIgnore::Vim < Noir::Base::TerminalCommand
2
- @description = 'Create new .hgignore for vim'
3
-
4
- HgIgnoreText = %q(
5
- syntax: glob
6
-
7
- *.swp
8
- )
9
-
10
- def self.execute *args
11
- Noir::Command::New::HgIgnore.createHgIgnore HgIgnoreText
12
- end
13
-
14
- end
15
-
@@ -1,14 +0,0 @@
1
- require 'noir'
2
- require 'spec_helper'
3
-
4
- describe 'Noir::Command::New::GitIgnore::Tex' do
5
- it 'is TerminalCommand' do
6
- expect(Noir::Command::New::GitIgnore::Tex.superclass).to eq(Noir::Base::TerminalCommand)
7
- end
8
-
9
- it 'is create .gitignore by Noir::Command::New.createFile' do
10
- allow(Noir::Command::New).to receive(:createFile)
11
- expect(Noir::Command::New).to receive(:createFile).with('.gitignore', /dvi/)
12
- Noir::Command::New::GitIgnore::Tex.execute
13
- end
14
- end
@@ -1,15 +0,0 @@
1
- require 'noir'
2
- require 'spec_helper'
3
-
4
- describe 'Noir::Command::New::GitIgnore::Vim' do
5
- it 'is TerminalCommand' do
6
- expect(Noir::Command::New::GitIgnore::Vim.superclass).to eq(Noir::Base::TerminalCommand)
7
- end
8
-
9
- it 'is create .gitignore by Noir::Command::New.createFile' do
10
- allow(Noir::Command::New).to receive(:createFile)
11
- expect(Noir::Command::New).to receive(:createFile).with('.gitignore', /swp/)
12
- Noir::Command::New::GitIgnore::Vim.execute
13
- end
14
- end
15
-
@@ -1,15 +0,0 @@
1
- require 'noir'
2
- require 'spec_helper'
3
-
4
- describe 'Noir::Command::New::HgIgnore::Agda' do
5
- it 'is TerminalCommand' do
6
- expect(Noir::Command::New::HgIgnore::Agda.superclass).to eq(Noir::Base::TerminalCommand)
7
- end
8
-
9
- it 'is create .hgignore by Noir::Command::New.createFile' do
10
- allow(Noir::Command::New).to receive(:createFile)
11
- expect(Noir::Command::New).to receive(:createFile).with('.hgignore', /agdai/)
12
- Noir::Command::New::HgIgnore::Agda.execute
13
- end
14
- end
15
-
@@ -1,14 +0,0 @@
1
- require 'noir'
2
- require 'spec_helper'
3
-
4
- describe 'Noir::Command::New::HgIgnore::Tex' do
5
- it 'is TerminalCommand' do
6
- expect(Noir::Command::New::HgIgnore::Tex.superclass).to eq(Noir::Base::TerminalCommand)
7
- end
8
-
9
- it 'is create .hgignore by Noir::Command::New.createFile' do
10
- allow(Noir::Command::New).to receive(:createFile)
11
- expect(Noir::Command::New).to receive(:createFile).with('.hgignore', /dvi/)
12
- Noir::Command::New::HgIgnore::Tex.execute
13
- end
14
- end
@@ -1,15 +0,0 @@
1
- require 'noir'
2
- require 'spec_helper'
3
-
4
- describe 'Noir::Command::New::HgIgnore::Vim' do
5
- it 'is TerminalCommand' do
6
- expect(Noir::Command::New::HgIgnore::Vim.superclass).to eq(Noir::Base::TerminalCommand)
7
- end
8
-
9
- it 'is create .hgignore by Noir::Command::New.createFile' do
10
- allow(Noir::Command::New).to receive(:createFile)
11
- expect(Noir::Command::New).to receive(:createFile).with('.hgignore', /swp/)
12
- Noir::Command::New::HgIgnore::Vim.execute
13
- end
14
- end
15
-