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
0caccf14
Commit
0caccf14
authored
Dec 26, 2015
by
Cuong Tran
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #303 from amatsuda/wanings
Fix ruby wanings
parents
056fd421
2a073c8f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
annotate.rb
lib/annotate.rb
+2
-2
annotate_models.rb
lib/annotate/annotate_models.rb
+6
-6
No files found.
lib/annotate.rb
View file @
0caccf14
...
...
@@ -7,7 +7,7 @@ begin
# ActiveSupport 3.x...
require
'active_support/hash_with_indifferent_access'
require
'active_support/core_ext/object/blank'
rescue
Exception
=>
e
rescue
Exception
# ActiveSupport 2.x...
require
'active_support/core_ext/hash/indifferent_access'
require
'active_support/core_ext/blank'
...
...
@@ -140,7 +140,7 @@ module Annotate
def
self
.
bootstrap_rake
begin
require
'rake/dsl_definition'
rescue
Exception
=>
e
rescue
Exception
# We might just be on an old version of Rake...
end
require
'rake'
...
...
lib/annotate/annotate_models.rb
View file @
0caccf14
...
...
@@ -418,8 +418,8 @@ module AnnotateModels
unless
options
[
exclusion_key
]
did_annotate
=
self
.
get_patterns
(
key
).
map
{
|
f
ile
|
resolve_filename
(
file
,
model_name
,
table_name
)
}.
map
{
|
f
ile
|
annotate_one_file
(
file
,
info
,
position_key
,
options_with_position
(
options
,
position_key
))
}.
map
{
|
f
|
resolve_filename
(
f
,
model_name
,
table_name
)
}.
map
{
|
f
|
annotate_one_file
(
f
,
info
,
position_key
,
options_with_position
(
options
,
position_key
))
}.
detect
{
|
result
|
result
}
||
did_annotate
end
end
...
...
@@ -567,10 +567,10 @@ module AnnotateModels
deannotated_klass
=
true
if
(
remove_annotation_of_file
(
model_file_name
))
get_patterns
.
map
{
|
f
ile
|
resolve_filename
(
file
,
model_name
,
table_name
)
}.
each
do
|
f
ile
|
if
File
.
exist?
(
f
ile
)
remove_annotation_of_file
(
f
ile
)
map
{
|
f
|
resolve_filename
(
f
,
model_name
,
table_name
)
}.
each
do
|
f
|
if
File
.
exist?
(
f
)
remove_annotation_of_file
(
f
)
deannotated_klass
=
true
end
end
...
...
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