Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
annotate
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
annotate
Commits
bb8cdf84
Commit
bb8cdf84
authored
8 years ago
by
Guillermo Guerrero Ibarra
Committed by
Cuong Tran
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Force https git readme, added ruby docs badge. (#421)
parent
e2b250b5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
README.rdoc
README.rdoc
+3
-2
annotate_routes_spec.rb
spec/annotate/annotate_routes_spec.rb
+9
-0
No files found.
README.rdoc
View file @
bb8cdf84
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
{<img src="https://travis-ci.org/ctran/annotate_models.svg?branch=develop" />}[https://travis-ci.org/ctran/annotate_models]
{<img src="https://travis-ci.org/ctran/annotate_models.svg?branch=develop" />}[https://travis-ci.org/ctran/annotate_models]
{<img src="https://coveralls.io/repos/ctran/annotate_models/badge.svg?branch=develop" />}[https://coveralls.io/r/ctran/annotate_models?branch=develop]
{<img src="https://coveralls.io/repos/ctran/annotate_models/badge.svg?branch=develop" />}[https://coveralls.io/r/ctran/annotate_models?branch=develop]
{<img src="https://codeclimate.com/github/ctran/annotate_models/badges/gpa.svg" />}[https://codeclimate.com/github/ctran/annotate_models]
{<img src="https://codeclimate.com/github/ctran/annotate_models/badges/gpa.svg" />}[https://codeclimate.com/github/ctran/annotate_models]
{<img src="http://inch-ci.org/github/ctran/annotate_models.svg?branch=develop" alt="Inline docs" />}[http://inch-ci.org/github/ctran/annotate_models]
{<img src="https://gemnasium.com/ctran/annotate_models.png" />}[https://gemnasium.com/ctran/annotate_models]
{<img src="https://gemnasium.com/ctran/annotate_models.png" />}[https://gemnasium.com/ctran/annotate_models]
Add a comment summarizing the current schema to the top or bottom of each of
Add a comment summarizing the current schema to the top or bottom of each of
...
@@ -58,7 +59,7 @@ Into Gemfile from rubygems.org:
...
@@ -58,7 +59,7 @@ Into Gemfile from rubygems.org:
Into Gemfile from Github:
Into Gemfile from Github:
gem 'annotate', git
hub: 'ctran/annotate_models
'
gem 'annotate', git
: 'https://github.com/ctran/annotate_models.git
'
Into environment gems from rubygems.org:
Into environment gems from rubygems.org:
...
@@ -66,7 +67,7 @@ Into environment gems from rubygems.org:
...
@@ -66,7 +67,7 @@ Into environment gems from rubygems.org:
Into environment gems from Github checkout:
Into environment gems from Github checkout:
git clone
git
://github.com/ctran/annotate_models.git annotate_models
git clone
https
://github.com/ctran/annotate_models.git annotate_models
cd annotate_models
cd annotate_models
rake build
rake build
gem install pkg/annotate-*.gem
gem install pkg/annotate-*.gem
...
...
This diff is collapsed.
Click to expand it.
spec/annotate/annotate_routes_spec.rb
View file @
bb8cdf84
...
@@ -41,6 +41,15 @@ describe AnnotateRoutes do
...
@@ -41,6 +41,15 @@ describe AnnotateRoutes do
AnnotateRoutes
.
do_annotations
(
ignore_routes:
'my_route'
)
AnnotateRoutes
.
do_annotations
(
ignore_routes:
'my_route'
)
end
end
it
'should insert annotations if file does not contain annotations and position top'
do
expect
(
File
).
to
receive
(
:read
).
with
(
ROUTE_FILE
).
and_return
(
""
)
expect
(
File
).
to
receive
(
:open
).
with
(
ROUTE_FILE
,
'wb'
).
and_yield
(
mock_file
)
expect
(
@mock_file
).
to
receive
(
:puts
).
with
(
"# == Route Map
\n
#
\n
"
)
expect
(
AnnotateRoutes
).
to
receive
(
:puts
).
with
(
ANNOTATION_ADDED
)
AnnotateRoutes
.
do_annotations
(
position_in_routes:
'top'
)
end
it
'should skip annotations if file does already contain annotation'
do
it
'should skip annotations if file does already contain annotation'
do
expect
(
File
).
to
receive
(
:read
).
with
(
ROUTE_FILE
).
and_return
(
"
\n
# == Route Map
\n
#
\n
"
)
expect
(
File
).
to
receive
(
:read
).
with
(
ROUTE_FILE
).
and_return
(
"
\n
# == Route Map
\n
#
\n
"
)
expect
(
AnnotateRoutes
).
to
receive
(
:puts
).
with
(
FILE_UNCHANGED
)
expect
(
AnnotateRoutes
).
to
receive
(
:puts
).
with
(
FILE_UNCHANGED
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment