diff --git a/.envrc b/.envrc new file mode 100644 index 000000000..fe464f42a --- /dev/null +++ b/.envrc @@ -0,0 +1,6 @@ +use_devbox() { + watch_file devbox.json + eval $(devbox shell --print-env) +} + +# use devbox diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f907097a..1ac95c880 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['2.7'] + ruby: ['2.7.6'] steps: - name: Checkout diff --git a/.gitignore b/.gitignore index bd5cc0e0b..cee045635 100644 --- a/.gitignore +++ b/.gitignore @@ -2,13 +2,7 @@ .DS_Store .bundle .gems -.rbenv-version -.ruby-* -/.idea/ -/.rbx -/.rvmrc -/.yardoc/* -/Gemfile.lock +/out /coverage/* /dist /doc/* diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile new file mode 100644 index 000000000..f556d4709 --- /dev/null +++ b/.gitpod.Dockerfile @@ -0,0 +1,11 @@ +FROM gitpod/workspace-full +USER gitpod + +# Install Ruby version 2.7.6 and set it as default +RUN _ruby_version=ruby-2.7.6 \ + && printf "rvm_gems_path=/home/gitpod/.rvm\n" > ~/.rvmrc \ + && bash -lc "rvm reinstall ${_ruby_version} && \ + rvm use ${_ruby_version} --default" \ + && printf "rvm_gems_path=/workspace/.rvm" > ~/.rvmrc \ + && printf "{ rvm use \$(rvm current); } >/dev/null 2>&1\n" >> "$HOME/.bashrc.d/70-ruby" + diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 000000000..76f9bdd96 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,20 @@ +image: + file: .gitpod.Dockerfile + +github: + prebuilds: + develop: true + # enable for pull requests coming from this repo (defaults to true) + pullRequests: true + + # add a "Review in Gitpod" button as a comment to pull requests (defaults to true) + addComment: true + + # add a "Review in Gitpod" button to pull requests (defaults to false) + addBadge: true + + # add a label once the prebuild is ready to pull requests (defaults to false) + addLabel: prebuilt-in-gitpod + +tasks: + - init: bundle install diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 000000000..19f20a0a4 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 000000000..be4c02422 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 000000000..35eb1ddfb --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 000000000..90b77e517 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + { + "keyToString": { + "RunOnceActivity.OpenProjectViewOnStart": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "WebServerToolWindowFactoryState": "false", + "node.js.detected.package.eslint": "true", + "node.js.detected.package.tslint": "true", + "node.js.selected.package.eslint": "(autodetect)", + "node.js.selected.package.tslint": "(autodetect)", + "project.structure.last.edited": "Modules", + "project.structure.proportion": "0.0", + "project.structure.side.proportion": "0.2", + "ruby.rails.projectView.checked": "true", + "vue.rearranger.settings.migration": "true" + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1671885743351 + + + + + + + + + + + + \ No newline at end of file diff --git a/.rbenv-gemsets b/.rbenv-gemsets deleted file mode 100644 index a9606b749..000000000 --- a/.rbenv-gemsets +++ /dev/null @@ -1 +0,0 @@ -.gems diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 000000000..49cdd668e --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.7.6 diff --git a/Gemfile b/Gemfile index 0998ee0d0..f7e44b041 100644 --- a/Gemfile +++ b/Gemfile @@ -1,9 +1,9 @@ source 'https://rubygems.org' -ruby '>= 2.4.0' +ruby '>= 2.7.6' gem 'activerecord', '>= 4.2.5', '< 6', require: false -gem 'rake', require: false +gem 'rake', '>= 13.0.6' group :development do gem 'bump' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 000000000..66de42c38 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,231 @@ +GEM + remote: https://rubygems.org/ + specs: + activemodel (5.2.8.1) + activesupport (= 5.2.8.1) + activerecord (5.2.8.1) + activemodel (= 5.2.8.1) + activesupport (= 5.2.8.1) + arel (>= 9.0) + activesupport (5.2.8.1) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) + minitest (~> 5.1) + tzinfo (~> 1.1) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) + arel (9.0.0) + ast (2.4.2) + bump (0.10.0) + byebug (11.1.3) + childprocess (4.1.0) + codeclimate-test-reporter (1.0.7) + simplecov + coderay (1.1.3) + concurrent-ruby (1.1.10) + coveralls (0.8.23) + json (>= 1.8, < 3) + simplecov (~> 0.16.1) + term-ansicolor (~> 1.3) + thor (>= 0.19.4, < 2.0) + tins (~> 1.6) + diff-lcs (1.5.0) + docile (1.4.0) + faraday (1.10.2) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.0) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) + ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-multipart (1.0.4) + multipart-post (~> 2) + faraday-net_http (1.0.1) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) + faraday_middleware (1.2.0) + faraday (~> 1.0) + ffi (1.15.5) + files (0.4.0) + formatador (1.1.0) + gh (0.18.0) + activesupport (~> 5.0) + addressable (~> 2.4) + faraday (~> 1.0) + faraday_middleware (~> 1.0) + multi_json (~> 1.0) + net-http-persistent (~> 2.9) + net-http-pipeline + git (1.13.0) + addressable (~> 2.8) + rchardet (~> 1.8) + guard (2.18.0) + formatador (>= 0.2.4) + listen (>= 2.7, < 4.0) + lumberjack (>= 1.0.12, < 2.0) + nenv (~> 0.1) + notiffany (~> 0.0) + pry (>= 0.13.0) + shellany (~> 0.0) + thor (>= 0.18.1) + guard-compat (1.2.1) + guard-rspec (4.7.3) + guard (~> 2.1) + guard-compat (~> 1.1) + rspec (>= 2.99.0, < 4.0) + highline (2.0.3) + i18n (1.12.0) + concurrent-ruby (~> 1.0) + iniparse (1.5.0) + json (2.6.3) + json_pure (2.6.3) + launchy (2.4.3) + addressable (~> 2.3) + listen (3.7.1) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + lumberjack (1.2.8) + method_source (1.0.0) + mg (0.0.8) + rake + minitest (5.16.3) + multi_json (1.15.0) + multipart-post (2.2.3) + nenv (0.3.0) + net-http-persistent (2.9.4) + net-http-pipeline (1.0.1) + notiffany (0.1.3) + nenv (~> 0.1) + shellany (~> 0.0) + overcommit (0.59.1) + childprocess (>= 0.6.3, < 5) + iniparse (~> 1.4) + rexml (~> 3.2) + parallel (1.22.1) + parser (3.1.3.0) + ast (~> 2.4.1) + pry (0.14.1) + coderay (~> 1.1) + method_source (~> 1.0) + pry-byebug (3.10.1) + byebug (~> 11.0) + pry (>= 0.13, < 0.15) + public_suffix (5.0.1) + pusher-client (0.6.2) + json + websocket (~> 1.0) + rainbow (3.1.1) + rake (13.0.6) + rb-fsevent (0.11.2) + rb-inotify (0.10.1) + ffi (~> 1.0) + rchardet (1.8.0) + regexp_parser (2.6.1) + rexml (3.2.5) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.0) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-support (3.12.0) + rubocop (1.12.1) + parallel (~> 1.10) + parser (>= 3.0.0.0) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml + rubocop-ast (>= 1.2.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 1.4.0, < 3.0) + rubocop-ast (1.24.0) + parser (>= 3.1.1.0) + rubocop-rake (0.6.0) + rubocop (~> 1.0) + rubocop-rspec (2.2.0) + rubocop (~> 1.0) + rubocop-ast (>= 1.1.0) + ruby-progressbar (1.11.0) + ruby2_keywords (0.0.5) + ruby_dep (1.5.0) + shellany (0.0.1) + simplecov (0.16.1) + docile (~> 1.1) + json (>= 1.8, < 3) + simplecov-html (~> 0.10.0) + simplecov-html (0.10.2) + sync (0.5.0) + term-ansicolor (1.7.1) + tins (~> 1.0) + terminal-notifier-guard (1.7.0) + thor (1.2.1) + thread_safe (0.3.6) + tins (1.32.1) + sync + travis (1.11.1) + faraday (~> 1.0) + faraday_middleware (~> 1.0) + gh (~> 0.13) + highline (~> 2.0) + json_pure (~> 2.3) + launchy (~> 2.1, < 2.5.0) + pusher-client (~> 0.4) + tzinfo (1.2.10) + thread_safe (~> 0.1) + unicode-display_width (2.3.0) + webrick (1.7.0) + websocket (1.2.9) + yard (0.9.28) + webrick (~> 1.7.0) + +PLATFORMS + arm64-darwin-21 + arm64-darwin-22 + x86_64-linux + +DEPENDENCIES + activerecord (>= 4.2.5, < 6) + bump + byebug + codeclimate-test-reporter + coveralls + files + git + guard-rspec + mg + overcommit + pry + pry-byebug + rake (>= 13.0.6) + rspec + rubocop (~> 1.12.0) + rubocop-rake + rubocop-rspec (~> 2.2.0) + ruby_dep (= 1.5.0) + simplecov + terminal-notifier-guard + travis + yard + +RUBY VERSION + ruby 2.7.6p219 + +BUNDLED WITH + 2.4.1 diff --git a/annotate_models.iml b/annotate_models.iml new file mode 100644 index 000000000..7a2f51e5b --- /dev/null +++ b/annotate_models.iml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/devbox.json b/devbox.json new file mode 100644 index 000000000..14d2b499d --- /dev/null +++ b/devbox.json @@ -0,0 +1,12 @@ +{ + "packages": [ + "ruby", + "bundler" + ], + "shell": { + "init_hook": "bundle install" + }, + "nixpkgs": { + "commit": "52e3e80afff4b16ccb7c52e9f0f5220552f03d04" + } +} \ No newline at end of file diff --git a/spec/lib/annotate/annotate_models_spec.rb b/spec/lib/annotate/annotate_models_spec.rb index f712b1ad9..1efd4022e 100644 --- a/spec/lib/annotate/annotate_models_spec.rb +++ b/spec/lib/annotate/annotate_models_spec.rb @@ -2146,7 +2146,9 @@ class Foo < ActiveRecord::Base let :file_content_2 do <<-EOS - class Bar::Foo < ActiveRecord::Base + module Bar + class Foo < ActiveRecord::Base + end end EOS end