toadie 0.0.7 → 0.0.8

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: 59262bad32718220e17e0a7f858149915bd7cf22
4
- data.tar.gz: e29c37c819088f3f809b3efe760efff19322758d
3
+ metadata.gz: e95097061c361ec97ecd18e8861ea96b6d2be91a
4
+ data.tar.gz: 52674a10610a578eba4f54623c8cd9c370462748
5
5
  SHA512:
6
- metadata.gz: 2a68889d26dd4f1c677af48b3e0f416f01a1d38d26ad76f2adebb6a0213200a68ac7d2bee321df87ed9a421f26acfff95096a97ad0a004ff5399e37bcfc78b93
7
- data.tar.gz: 61b6185ee0bcaa9835ae91d2690f4058ad129f87715be26e0e928a480fe5dd18b22751f747c64d22b297482d4784e188c4ee54a100b333c3f474169ca652c5ac
6
+ metadata.gz: e12a6532a70f944f8b43369d7afd89f12b4ac6e2dd153ea5bb0da158b88dbfcd4b8e640d45b9114ff07f1a7068ceedc8382155d87dcf79633a2fce8602abded2
7
+ data.tar.gz: 07f0e36473bffc4274682fc7c797175f2e224f2e06ac3d987fa8dfdb5d8cf1a6050f376df96d2d1128fb2352b0f136ec7942773930e7af5791f565379879f4c0
@@ -1 +1 @@
1
- ruby-1.9.3-p392
1
+ ruby-2.3.0
@@ -1,7 +1,7 @@
1
1
  rvm:
2
- - 1.9.2
3
2
  - 1.9.3
4
- - 2.0.0
3
+ - 2.1.5
4
+ - 2.2.0
5
5
 
6
6
  script: "bundle exec rake spec --trace"
7
7
 
data/bin/toadie CHANGED
@@ -5,18 +5,10 @@ require 'toadie'
5
5
  require 'slop'
6
6
  require 'json'
7
7
 
8
- opts = Slop.parse do
9
- banner "Toadie, todo grepper, blamer, analyzer\n"
10
- on :c, :config, 'Configuration file', :argument => :optional
8
+ opts = Slop.parse do |o|
9
+ o.string '-c', '--config', 'configuration file'
11
10
  end
12
11
 
13
- # puts opts.help
14
-
15
- # # if ARGV is `--name Lee -v`
16
- # opts.verbose? #=> true
17
- # opts.password? #=> false
18
- # opts[:name] #=> 'lee'
19
-
20
12
  config_file = opts[:config] || File.join(Toadie.root, '.toadie.json')
21
13
  if File.exist?(config_file)
22
14
  config = JSON.parse(File.read(config_file))
@@ -4,49 +4,49 @@ describe Toadie::Author do
4
4
  let(:author) { Toadie::Author.new(name: 'Geordi LaForge', emails: ['Geordi@uss-enterprise.com'], nicknames: ['geordi', 'laforge']) }
5
5
 
6
6
  it "sets attributes on initialize" do
7
- author.name.should == 'Geordi LaForge'
8
- author.emails.should == ['Geordi@uss-enterprise.com']
9
- author.nicknames.should == ['geordi', 'laforge']
7
+ expect(author.name).to eq 'Geordi LaForge'
8
+ expect(author.emails).to eq ['Geordi@uss-enterprise.com']
9
+ expect(author.nicknames).to eq ['geordi', 'laforge']
10
10
  end
11
11
 
12
12
  it "builds a identifier by using the email" do
13
- author.identifier.should == 'geordiussenterprisecom'
13
+ expect(author.identifier).to eq 'geordiussenterprisecom'
14
14
  end
15
15
 
16
16
  describe "#to_s" do
17
17
  it "uses the name attribute if present" do
18
- author.to_s.should == "Geordi LaForge"
18
+ expect(author.to_s).to eq "Geordi LaForge"
19
19
  end
20
20
 
21
21
  it "uses a nickname if present" do
22
22
  author.name = nil
23
- author.to_s.should == 'geordi'
23
+ expect(author.to_s).to eq 'geordi'
24
24
  end
25
25
 
26
26
  it "uses the email address finally" do
27
27
  author.name = nil
28
28
  author.nicknames = []
29
- author.to_s.should == 'Geordi@uss-enterprise.com'
29
+ expect(author.to_s).to eq 'Geordi@uss-enterprise.com'
30
30
  end
31
31
  end
32
32
 
33
33
  describe "#find_by_email" do
34
34
  it "returns a author if it exists" do
35
35
  author = Toadie::Author.create(emails: ['androids@humanafterall.org', 'data@uss-enterprise.com'])
36
- Toadie::Author.find_by_email('data@uss-enterprise.com').should == author
36
+ expect(Toadie::Author.find_by_email('data@uss-enterprise.com')).to eq author
37
37
  end
38
38
 
39
39
  it "returns nil if no author was found" do
40
- Toadie::Author.find_by_email('q@uss-enterprise.com').should be_nil
40
+ expect(Toadie::Author.find_by_email('q@uss-enterprise.com')).to be_nil
41
41
  end
42
42
  end
43
43
 
44
44
  describe "#create" do
45
45
  it "assigns all attributes to the author" do
46
46
  author = Toadie::Author.create(emails: ['data@uss-enterprise.com'], name: 'Data', nicknames: ['data'])
47
- author.name.should == 'Data'
48
- author.emails.should == ['data@uss-enterprise.com']
49
- author.nicknames.should == ['data']
47
+ expect(author.name).to eq 'Data'
48
+ expect(author.emails).to eq ['data@uss-enterprise.com']
49
+ expect(author.nicknames).to eq ['data']
50
50
  end
51
51
 
52
52
  it "works with symbolized hash key" do
@@ -72,17 +72,17 @@ describe Toadie::Author do
72
72
  it "returns a author if it was found" do
73
73
  author = Toadie::Author.create(emails: ['no1@uss-enterprise.com'])
74
74
  expect {
75
- Toadie::Author.find_or_create('no1@uss-enterprise.com').should == author
75
+ expect(Toadie::Author.find_or_create('no1@uss-enterprise.com')).to eq author
76
76
  }.to_not change { Toadie::Author.all.size }
77
77
  end
78
78
 
79
79
  it "creates a author if it was not found" do
80
80
  expect {
81
81
  author = Toadie::Author.find_or_create('no1@uss-enterprise.com', name: 'William T. Riker', nicknames: ['riker', 'no1'])
82
- author.emails.should == ['no1@uss-enterprise.com']
83
- author.name.should == 'William T. Riker'
84
- author.nicknames.should == ['riker', 'no1']
82
+ expect(author.emails).to eq ['no1@uss-enterprise.com']
83
+ expect(author.name).to eq 'William T. Riker'
84
+ expect(author.nicknames).to eq ['riker', 'no1']
85
85
  }.to change { Toadie::Author.all.size }.by(1)
86
86
  end
87
87
  end
88
- end
88
+ end
@@ -4,13 +4,13 @@ describe Toadie::Blame do
4
4
  it "builds a author on initialize" do
5
5
  expect {
6
6
  blame = Toadie::Blame.new('fakefile', 42)
7
- blame.author.should be_a(Toadie::Author)
7
+ expect(blame.author).to be_a(Toadie::Author)
8
8
  }.to change { Toadie::Author.all.size }.by(1)
9
9
  end
10
10
 
11
11
  describe "#execute" do
12
12
  it "returns test results in test mode" do
13
- Toadie::Blame.execute('fakefile', 42).should == Toadie::FakeResults.blame
13
+ expect(Toadie::Blame.execute('fakefile', 42)).to eq Toadie::FakeResults.blame
14
14
  end
15
15
  end
16
16
 
@@ -18,8 +18,8 @@ describe Toadie::Blame do
18
18
  it "gets name and email correctly from a blame porcelain result" do
19
19
  result = Toadie::FakeResults.blame
20
20
  name, email = Toadie::Blame.extract_author(result)
21
- name.should == 'Beverly Crusher'
22
- email.should == 'crusher@uss-enterprise.com'
21
+ expect(name).to eq 'Beverly Crusher'
22
+ expect(email).to eq 'crusher@uss-enterprise.com'
23
23
  end
24
24
  end
25
- end
25
+ end
@@ -5,12 +5,12 @@ describe Toadie::Configuration do
5
5
 
6
6
  describe "#todo_markers" do
7
7
  it "returns default todo markers if nothing was provided" do
8
- config.todo_markers.should eq Toadie.default_todo_markers
8
+ expect(config.todo_markers).to eq Toadie.default_todo_markers
9
9
  end
10
10
 
11
11
  it "returns custom todo markers if provided" do
12
12
  config.todo_markers = [:foo, :bar]
13
- config.todo_markers.should eq [:foo, :bar]
13
+ expect(config.todo_markers).to eq [:foo, :bar]
14
14
  end
15
15
  end
16
16
  end
@@ -1,6 +1,6 @@
1
1
  require 'simplecov'
2
2
 
3
- SimpleCov.adapters.define 'gem' do
3
+ SimpleCov.profiles.define 'gem' do
4
4
  add_filter '/spec/'
5
5
  add_filter '/autotest/'
6
6
  add_group 'Libraries', '/lib/'
@@ -5,14 +5,14 @@ describe Toadie::Todo do
5
5
 
6
6
  describe "#initialize" do
7
7
  it "assigns the given attributes" do
8
- todo.file.should == 'fakefile'
9
- todo.line.should == 42
10
- todo.text.should == 'TODO text'
8
+ expect(todo.file).to eq 'fakefile'
9
+ expect(todo.line).to eq 42
10
+ expect(todo.text).to eq 'TODO text'
11
11
  end
12
12
 
13
13
  it "converts provided input into string without failing" do
14
14
  todo = Toadie::Todo.new('fakefile', 42, self.class)
15
- todo.text.should be_a String
15
+ expect(todo.text).to be_a String
16
16
  end
17
17
  end
18
18
 
@@ -21,19 +21,19 @@ describe Toadie::Todo do
21
21
  todo = Toadie::Todo.new('fakefile', 42, 'TODO jean-luc go to the doctor!')
22
22
  crusher = Toadie::Author.find_by_email('crusher@uss-enterprise.com') # created by fake blame
23
23
 
24
- todo.author.should == crusher
25
- todo.responsible.should == picard
26
- todo.should be_reassigned
24
+ expect(todo.author).to eq crusher
25
+ expect(todo.responsible).to eq picard
26
+ expect(todo).to be_reassigned
27
27
  end
28
28
 
29
29
  describe "#to_s" do
30
30
  it "returns the text is present" do
31
- todo.to_s.should == todo.text
31
+ expect(todo.to_s).to eq todo.text
32
32
  end
33
33
 
34
34
  it "returns a no-text message otherwise" do
35
35
  todo.text = ''
36
- todo.to_s.should == '<no content>'
36
+ expect(todo.to_s).to eq '<no content>'
37
37
  end
38
38
  end
39
- end
39
+ end
@@ -9,18 +9,18 @@ describe Toadie::Todolist do
9
9
  end
10
10
 
11
11
  it "builds Todos for the input data" do
12
- todolist.size.should == todolist.todos.size.should
13
- todolist.size.should == 2
14
- todolist.todos.first.should be_a Toadie::Todo
15
- todolist.todos.last.should be_a Toadie::Todo
12
+ expect(todolist.size).to eq todolist.todos.size
13
+ expect(todolist.size).to eq 2
14
+ expect(todolist.todos.first).to be_a Toadie::Todo
15
+ expect(todolist.todos.last).to be_a Toadie::Todo
16
16
  end
17
17
 
18
18
  it "groups todos by responsible author" do
19
19
  responsible = todolist.todos.first.responsible
20
20
  grouped = todolist.grouped
21
21
 
22
- grouped.should be_a Hash
23
- grouped.should have_key responsible
24
- grouped[responsible].should == todolist.todos
22
+ expect(grouped).to be_a Hash
23
+ expect(grouped).to have_key responsible
24
+ expect(grouped[responsible]).to eq todolist.todos
25
25
  end
26
- end
26
+ end
@@ -16,6 +16,7 @@ Gem::Specification.new do |gem|
16
16
  gem.version = Toadie::VERSION
17
17
 
18
18
  gem.add_runtime_dependency 'slim'
19
+ gem.add_runtime_dependency 'slop'
19
20
 
20
21
  gem.add_development_dependency 'rake'
21
22
  gem.add_development_dependency 'rspec'
@@ -36,8 +36,8 @@ html
36
36
  - grouped.each do |author, todos|
37
37
  li
38
38
  a href="##{author.identifier}_tab" data-toggle='tab'
39
- span.badge=' todos.size
40
- =' author
39
+ span.badge=> todos.size
40
+ => author
41
41
 
42
42
  .tab-content
43
43
  .tab-pane.active
@@ -45,7 +45,7 @@ html
45
45
  - grouped.each do |author, todos|
46
46
  .tab-pane id="#{author.identifier}_tab"
47
47
  .alert.alert-info
48
- p.lead=' author.name
48
+ p.lead=> author.name
49
49
  dl.dl-horizontal
50
50
  - if !author.emails.empty?
51
51
  dt Email adresses
@@ -61,7 +61,7 @@ html
61
61
  span.muted
62
62
  ' assigned by
63
63
  span.label.label-warning
64
- =' todo.author
64
+ => todo.author
65
65
  small
66
66
  = todo.file
67
67
  |:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toadie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johannes Opper
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-21 00:00:00.000000000 Z
11
+ date: 2016-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slim
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: slop
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rake
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -128,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
142
  version: '0'
129
143
  requirements: []
130
144
  rubyforge_project:
131
- rubygems_version: 2.2.2
145
+ rubygems_version: 2.5.1
132
146
  signing_key:
133
147
  specification_version: 4
134
148
  summary: Analyze your source code, find open todos and output a nice html report.
@@ -139,3 +153,4 @@ test_files:
139
153
  - spec/spec_helper.rb
140
154
  - spec/todo_spec.rb
141
155
  - spec/todolist_spec.rb
156
+ has_rdoc: