1. 08 Mar, 2020 1 commit
  2. 25 Feb, 2020 1 commit
  3. 17 Feb, 2020 1 commit
  4. 13 Feb, 2020 2 commits
  5. 06 Feb, 2020 1 commit
  6. 04 Feb, 2020 1 commit
  7. 27 Jan, 2020 1 commit
  8. 26 Jan, 2020 2 commits
  9. 24 Jan, 2020 1 commit
    • Support YARD notation (#724) · 06255470
      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.
  10. 20 Jan, 2020 3 commits
    • AnnotateModels.get_schema_info (with custom options) (#732) · 1b51de89
      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
    • Fix typo in RSpec of AnnotateModels (#731) · fd663b96
      Shu Fujita authored
    • Add columns managed by Globalize gem (#602) · d894fa29
      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.
  11. 19 Jan, 2020 1 commit
    • Refactor RSpec for AnnotateModels (1) (#726) · 87b51c24
      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.
  12. 18 Jan, 2020 1 commit
    • Refactor AnnotateRoutes.routes_file_exist? (#716) · 9a8db1b7
      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
  13. 30 Dec, 2019 1 commit
    • Refactor lib/annotate.rb (#707) · 3f0b6b32
      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.
  14. 18 Dec, 2019 2 commits
    • [Fix #430] Handle columns from activerecord-postgis-adapter (#694) · c13fe49c
      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)
      ```
  15. 09 Nov, 2019 4 commits
  16. 28 Sep, 2019 1 commit
  17. 26 Sep, 2019 1 commit
  18. 03 Sep, 2019 1 commit
    • Make it possible to annotate models and routes together (#647) · 846c7f8e
      Andrew W. Lee authored
      Prior to this change, `Annotate.include_models?` returned the inverse of `Annotate.include_routes?`. This made it so annotating models and routes was not possible to do together.
      
      This PR adds an explicit `--models` flag and also adds it the option to `lib/generators/annotate/templates/auto_annotate_models.rake` with the default being set to `false`. 
      
      Fixes #563 and undoes the bug introduced in #485.
  19. 02 Sep, 2019 1 commit
    • Tidy spec directory (#646) · 2775001d
      Andrew W. Lee authored
      In looking into #563, I realized there are gaps in test coverage. For example, `bin/annotate` doesn't have any tests. 
      
      Tidying the spec directory to make it easier to add tests in future work.