Skip to content

Commit bb8cdf8

Browse files
ryanfox1985ctran
authored andcommitted
Force https git readme, added ruby docs badge. (#421)
1 parent e2b250b commit bb8cdf8

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

README.rdoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
{<img src="https://travis-ci.org/ctran/annotate_models.svg?branch=develop" />}[https://travis-ci.org/ctran/annotate_models]
66
{<img src="https://coveralls.io/repos/ctran/annotate_models/badge.svg?branch=develop" />}[https://coveralls.io/r/ctran/annotate_models?branch=develop]
77
{<img src="https://codeclimate.com/github/ctran/annotate_models/badges/gpa.svg" />}[https://codeclimate.com/github/ctran/annotate_models]
8+
{<img src="http://inch-ci.org/github/ctran/annotate_models.svg?branch=develop" alt="Inline docs" />}[http://inch-ci.org/github/ctran/annotate_models]
89
{<img src="https://gemnasium.com/ctran/annotate_models.png" />}[https://gemnasium.com/ctran/annotate_models]
910

1011
Add a comment summarizing the current schema to the top or bottom of each of
@@ -58,15 +59,15 @@ Into Gemfile from rubygems.org:
5859

5960
Into Gemfile from Github:
6061

61-
gem 'annotate', github: 'ctran/annotate_models'
62+
gem 'annotate', git: 'https://github.com/ctran/annotate_models.git'
6263

6364
Into environment gems from rubygems.org:
6465

6566
gem install annotate
6667

6768
Into environment gems from Github checkout:
6869

69-
git clone git://github.com/ctran/annotate_models.git annotate_models
70+
git clone https://github.com/ctran/annotate_models.git annotate_models
7071
cd annotate_models
7172
rake build
7273
gem install pkg/annotate-*.gem

spec/annotate/annotate_routes_spec.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ def mock_file(stubs={})
4141
AnnotateRoutes.do_annotations(ignore_routes: 'my_route')
4242
end
4343

44+
it 'should insert annotations if file does not contain annotations and position top' do
45+
expect(File).to receive(:read).with(ROUTE_FILE).and_return("")
46+
expect(File).to receive(:open).with(ROUTE_FILE, 'wb').and_yield(mock_file)
47+
expect(@mock_file).to receive(:puts).with("# == Route Map\n#\n")
48+
expect(AnnotateRoutes).to receive(:puts).with(ANNOTATION_ADDED)
49+
50+
AnnotateRoutes.do_annotations(position_in_routes: 'top')
51+
end
52+
4453
it 'should skip annotations if file does already contain annotation' do
4554
expect(File).to receive(:read).with(ROUTE_FILE).and_return("\n# == Route Map\n#\n")
4655
expect(AnnotateRoutes).to receive(:puts).with(FILE_UNCHANGED)

0 commit comments

Comments
 (0)