- 01 Feb, 2020 3 commits
-
-
Andrew W. Lee authored
The integration tests were removed since they were outdated and not working. These are dead files so let's remove them. #725 #744
-
Andrew W. Lee authored
Helper methods were moved into Annotate::Helpers but instances in bin/annotate had not been updated. Because of this, bin/annotate would throw NoMethodError.
-
Andrew W. Lee authored
There's some left over files from #725, this change cleans up the remaining files in `spec/integration/`.
-
- 27 Jan, 2020 3 commits
-
-
Andrew W. Lee authored
`spec/integration` contains a lot of files that were used for integration tests. They stopped were [disabled in 2014](https://github.com/ctran/annotate_models/commit/9540121243da58cad3ab3c0ba444f22445a995ed#diff-78ddf877ecc2a9344997ef077a77955a) and haven't been working since. Removing because those tests don't run, don't work, and are outdated. The plan is to re-introduce integration tests sometime in the future.
-
Shu Fujita authored
# Summary * Removed unnecessary variables * Renamed variables that have same name as reserved word (`p`) * Other tiny fixes
-
Shu Fujita authored
I fixed message to make them more natural English.
-
- 26 Jan, 2020 3 commits
-
-
Shu Fujita authored
Refactor RSpec for AnnotateModels (4) - AnnotateModels.get_schema_info (without custom options) (#735) I refactored test cases of AnnotateModels without custom options.
-
Shu Fujita authored
I refactored RSpec file for another large scale refactor in another PR.
-
Shu Fujita authored
-
- 24 Jan, 2020 1 commit
-
-
tvallois authored
The scope of this pull request is to allow annotate_models to generate models documentation using YARD. This is the first step, I'll add more features later.
-
- 22 Jan, 2020 1 commit
-
-
Manuel Hoffmann authored
-
- 20 Jan, 2020 5 commits
-
-
Shu Fujita authored
I moved `puts` from `AnnotateRoutes.rewrite_contents` to `.do_annotations` and `.remove_annotations`.
-
Shu Fujita authored
* Structuralize RSpec test cases of AnnotateModels.get_schema_info (with custom options) * Replace expression expansion to plain text * Refactor RSpec test cases of AnnotateModels.get_schema_info (with custom options) * Change position of test cases
-
Shu Fujita authored
-
Shu Fujita authored
I removed `AnnotateRoutes.rewrite_contents_with_header` because the logic of `AnnotateRoutes.rewrite_contents_with_header` is as same as `.rewrite_contents`.
-
Peter Gundel authored
* Add columns managed by Globalize gem Globalize hooks into the model and removes the translated columns from the `klass.columns`. This commit checks if globalize is hooked into the model and adds the necessary columns to the annotation array. * Disable Rubocop Metrics/BlockLength for spec files RSpec spec files can contain long blocks easily because of the outher describe methods. So this rule makes not too much sense for these files.
-
- 19 Jan, 2020 4 commits
-
-
Shu Fujita authored
I refactored `AnnotateRoutes.annotate_routes` and `.rewrite_contents_with_header` in order to add an empty string to `new_content` array in `.annotate_routes`. I will refactor `.rewrite_contents_with_header` more, and remove `. rewrite_contents_with_header` in the next PR.
-
Shu Fujita authored
# Summary * I replaced `#blank?` of ActiveSupport to `#present?` * I moved `AnnotateModels::Parser#commit` after `#parser ` because `#commit` is used after `#parser` in `#parse`.
-
Shu Fujita authored
I removed invalid document of AnnotateRoutes.rewrite_contents. I will add valid documents in YARD format in another PR.
-
Shu Fujita authored
I refactored and structuralized RSpec test cases of AnnotateModels for readability and scalability because it was too complex to read. cf. #718 In this PR, I refactored test cases of some methods in `AnnotateModels`. I will refactor test cases of other methods in another PR.
-
- 18 Jan, 2020 2 commits
-
-
Shu Fujita authored
I refactored two methods in AnnotateModels::Helpers for readability.
-
Shu Fujita authored
I refactored `AnnotateRoutes.routes_exists?` and methods using this. The points are as follows. * Removing `puts` in `AnnotateRoutes.routes_exists?` * Using `File.exist?` instead of `File.exists?` because `File.exists?` is deprecated * Renaming `AnnotateRoutes.routes_exists?` to `AnnotateRoutes.routes_file_exists?` in order to make the name of method more explanatory
-
- 16 Jan, 2020 4 commits
-
-
Shu Fujita authored
* Refactor AnnotateRoutes.rewrite_contents and .remove_annotations * Refactor AnnotateRoutes.remove_annotations and .strip_on_removal
-
Shu Fujita authored
* Remove Annotate.#loaded_tasks= and .loaded_tasks * Remove unnecessary comment for Rubocop * Make Annotate.load_requires private * Refactor Annotate.load_tasks
-
Shu Fujita authored
-
Shu Fujita authored
-
- 15 Jan, 2020 3 commits
-
-
Shu Fujita authored
I refactored `AnnotateRoutes.header` for performance, and add `AnnotateRoutes.comment` to make code DRY.
-
Shu Fujita authored
As the change log shows, I froze the constant `HEADER_ROW` in accordance with the normal Ruby style regulation.
-
Shu Fujita authored
I added `AnnotateModels::MAGIC_COMMENT_MATCHER` and `AnnotateRoutes::MAGIC_COMMENT_MATCHER` instad of `AnnotateModels.magic_comment_matcher` and `AnnotateRoutes.magic_comment_matcher`. I think that they should be constants because the result of Regexp is always fixed.
-
- 06 Jan, 2020 2 commits
-
-
Shu Fujita authored
Before I commited, the method `AnnotateRoutes.where_header_found` returned an array of `real_content` and `header_found_at`. I fixed the name of method and variable because they did not match. I renamed the method `real_content_and_header_position` and unified related variable names to `header_position`.
-
Andrew W. Lee authored
The integration tests require RVM to run. Without them they can't run. Added Dockerfile to make it easier to run the project in an isolated environment.
-
- 30 Dec, 2019 1 commit
-
-
Andrew W. Lee authored
This change converts .all_options into a constant and moves it into Annotate::Constants. It also changes usages of .all_options.
-
- 18 Dec, 2019 5 commits
-
-
naari3 authored
Replace soft-deprecated constant `HashWithIndifferentAccess` to `ActiveSupport::HashWithIndifferentAccess` (#699)
-
Andrew W. Lee authored
Removing `TODO.md` as prior to renaming it hasn't been touched in 5 years. See https://github.com/ctran/annotate_models/commits/v3.0.3/TODO.rdoc
-
Alexander Belozerov authored
-
Andrew W. Lee authored
* Fix instances of `additional file patterns` in README Other CLI flags are using dash, so using `--additional-file-patterns` notation to keep it similar to others. * Tidy: Replace `*` with `*` Doing some tidying now that we switched from RDoc to markdown.
-
inkstak authored
Same problem returned by @janosrusiczki in #430 Spatial columns with activerecord-postgis-adapter (5.2.2) are not displayed nice ``` # name :string(3) # active :boolean default(FALSE), not null # geom :geometry({:srid= geometry, 4326 ``` That's come from activerecord-postgis-adapter, with redefined columns as such : ``` #<ActiveRecord::ConnectionAdapters::PostGIS::SpatialColumn @sql_type="geometry(Geometry,4326)", @geo_type="Geometry", @geometric_type=RGeo::Feature::Geometry, @srid=4326, @limit={:srid=>4326, :type=>"geometry"} [...] > ``` This fix displays them like this : ``` # name :string(3) # active :boolean default(FALSE), not null # geometry :geometry geometry, 4326 ``` Another possibility would have been to display them as below, but it involves a lot of extra-spaces for other columns. ``` # name :string(3) # active :boolean default(FALSE), not null # geometry :geometry(Geometry, 4326) ```
-
- 17 Dec, 2019 2 commits
-
-
Vasily Fedoseyev authored
* Convert documentation files to Markdown * Add notice about models not being annotated by default to changelog in 3.0
-
Andrew W. Lee authored
Looks like it's breaking in Github CI because Ruby 2.3.X is no longer supported by `actions/setup-ruby@v1`. Ruby 2.3.X has stopped being supported since March of 2019, so I've removed Ruby 2.3.X versions from both Github and Travis CI. It's also breaking in Travis CI because it's timing out in an interactive prompt when trying to do `gem update --system`. This is due to changes to [Ruby Gems 3.1.1](https://github.com/rubygems/rubygems/issues/3036). This has been fixed. Failing Github CI build: https://github.com/ctran/annotate_models/runs/335456181 Failing Travis build: https://api.travis-ci.org/v3/job/625759725/log.txt
-
- 02 Dec, 2019 1 commit
-
-
Daniel Rice authored
ActiveAdmin defaults to false. Add `active_admin` option so people using this gem can more easily enable annotating files in `app/admin`.
-