rails_refactor 1.3 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. checksums.yaml +7 -0
  2. data/bin/rails_refactor.rb +7 -7
  3. metadata +18 -87
  4. data/CHANGELOG +0 -4
  5. data/Gemfile +0 -7
  6. data/Gemfile.lock +0 -82
  7. data/Manifest +0 -60
  8. data/README +0 -47
  9. data/Rakefile +0 -8
  10. data/dummy/Gemfile +0 -31
  11. data/dummy/Gemfile.lock +0 -86
  12. data/dummy/README +0 -256
  13. data/dummy/Rakefile +0 -7
  14. data/dummy/app/controllers/application_controller.rb +0 -3
  15. data/dummy/app/controllers/dummies_controller.rb +0 -5
  16. data/dummy/app/helpers/application_helper.rb +0 -2
  17. data/dummy/app/helpers/dummies_helper.rb +0 -2
  18. data/dummy/app/models/dummy_model.rb +0 -2
  19. data/dummy/app/views/dummies/index.html.erb +0 -2
  20. data/dummy/app/views/layouts/application.html.erb +0 -14
  21. data/dummy/autotest/discover.rb +0 -2
  22. data/dummy/config.ru +0 -4
  23. data/dummy/config/application.rb +0 -42
  24. data/dummy/config/boot.rb +0 -13
  25. data/dummy/config/database.yml +0 -22
  26. data/dummy/config/environment.rb +0 -5
  27. data/dummy/config/environments/development.rb +0 -26
  28. data/dummy/config/environments/production.rb +0 -49
  29. data/dummy/config/environments/test.rb +0 -35
  30. data/dummy/config/initializers/backtrace_silencers.rb +0 -7
  31. data/dummy/config/initializers/inflections.rb +0 -10
  32. data/dummy/config/initializers/mime_types.rb +0 -5
  33. data/dummy/config/initializers/secret_token.rb +0 -7
  34. data/dummy/config/initializers/session_store.rb +0 -8
  35. data/dummy/config/locales/en.yml +0 -5
  36. data/dummy/config/routes.rb +0 -60
  37. data/dummy/db/migrate/20101230081247_create_dummy_models.rb +0 -12
  38. data/dummy/db/seeds.rb +0 -7
  39. data/dummy/doc/README_FOR_APP +0 -2
  40. data/dummy/public/404.html +0 -26
  41. data/dummy/public/422.html +0 -26
  42. data/dummy/public/500.html +0 -26
  43. data/dummy/public/favicon.ico +0 -0
  44. data/dummy/public/images/rails.png +0 -0
  45. data/dummy/public/index.html +0 -239
  46. data/dummy/public/javascripts/application.js +0 -2
  47. data/dummy/public/javascripts/controls.js +0 -965
  48. data/dummy/public/javascripts/dragdrop.js +0 -974
  49. data/dummy/public/javascripts/effects.js +0 -1123
  50. data/dummy/public/javascripts/prototype.js +0 -6001
  51. data/dummy/public/javascripts/rails.js +0 -175
  52. data/dummy/public/robots.txt +0 -5
  53. data/dummy/script/rails +0 -6
  54. data/dummy/spec/controllers/dummies_controller_spec.rb +0 -5
  55. data/dummy/spec/helpers/dummies_helper_spec.rb +0 -15
  56. data/dummy/spec/models/dummy_model_spec.rb +0 -5
  57. data/dummy/spec/spec_helper.rb +0 -27
  58. data/dummy/test/functional/dummies_controller_test.rb +0 -9
  59. data/dummy/test/performance/browsing_test.rb +0 -9
  60. data/dummy/test/test_helper.rb +0 -13
  61. data/dummy/test/unit/helpers/dummies_helper_test.rb +0 -4
  62. data/rails_refactor.gemspec +0 -30
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1c86f677fa8496f0868cddeb76bc36be8cf2d48e
4
+ data.tar.gz: cc4f0241b7215f98cac97056e1ae6146457a39dd
5
+ SHA512:
6
+ metadata.gz: eea6e5a4d4968bc3359ef7827583fe46ab6f825ca2a6cd5de9a1a31f6e219bf20198438f2263f44e2c805d32988df3dd9f9bdcf1c19c726689f53ce1b562e1c5
7
+ data.tar.gz: 85c0c0292133614928a947df50d669cc7b8e8f2f989eefc904c387ce7cb087ef985b7c54959390a4358e15e988e39a5ceea23827bf9da8ced8474ec95ee95a75
@@ -105,8 +105,8 @@ if ARGV.length == 3
105
105
  end
106
106
  end
107
107
  elsif ARGV[0] == "test"
108
- require 'test/unit'
109
- class RailsRefactorTest < Test::Unit::TestCase
108
+ require "minitest/autorun"
109
+ class RailsRefactorTest < Minitest::Test
110
110
 
111
111
  def setup
112
112
  raise "Run tests in 'dummy' rails project" if !Dir.pwd.end_with? "dummy"
@@ -141,11 +141,11 @@ elsif ARGV[0] == "test"
141
141
  assert_file_changed("spec/models/new_model_spec.rb",
142
142
  "DummyModel", "NewModel")
143
143
 
144
- assert File.exist?("db/migrate/20101230081247_create_new_models.rb")
145
- assert !File.exist?("db/migrate/20101230081247_create_dummy_models.rb")
146
- assert_file_changed("db/migrate/20101230081247_create_new_models.rb",
147
- "CreateDummyModels", "CreateNewModels")
148
- assert_file_changed("db/migrate/20101230081247_create_new_models.rb",
144
+ assert File.exist?("db/migrate/20170214234158_create_new_models.rb")
145
+ assert !File.exist?("db/migrate/20170214234158_create_dummy_models.rb")
146
+ assert_file_changed("db/migrate/20170214234158_create_new_models.rb",
147
+ "CreateDummies", "CreateNewModels")
148
+ assert_file_changed("db/migrate/20170214234158_create_new_models.rb",
149
149
  ":dummy_models", ":new_models")
150
150
  end
151
151
 
metadata CHANGED
@@ -1,117 +1,48 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_refactor
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.3'
5
- prerelease:
4
+ version: 1.4.0
6
5
  platform: ruby
7
6
  authors:
8
- - James Crisp & Ryan Bigg
7
+ - James Crisp
8
+ - Ryan Bigg
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-23 00:00:00.000000000 Z
12
+ date: 2017-02-21 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: Simple refactoring like rename class for Rails projects
14
+ description: Supports simple refactors like rename model and controller for Rails
15
+ projects
15
16
  email: james@crispdesign.net
16
17
  executables:
17
18
  - rails_refactor
18
- - rails_refactor.rb
19
19
  extensions: []
20
- extra_rdoc_files:
21
- - CHANGELOG
22
- - README
23
- - bin/rails_refactor
24
- - bin/rails_refactor.rb
20
+ extra_rdoc_files: []
25
21
  files:
26
- - CHANGELOG
27
- - Gemfile
28
- - Gemfile.lock
29
- - Manifest
30
- - README
31
- - Rakefile
32
22
  - bin/rails_refactor
33
- - dummy/Gemfile
34
- - dummy/Gemfile.lock
35
- - dummy/README
36
- - dummy/Rakefile
37
- - dummy/app/controllers/application_controller.rb
38
- - dummy/app/controllers/dummies_controller.rb
39
- - dummy/app/helpers/application_helper.rb
40
- - dummy/app/helpers/dummies_helper.rb
41
- - dummy/app/models/dummy_model.rb
42
- - dummy/app/views/dummies/index.html.erb
43
- - dummy/app/views/layouts/application.html.erb
44
- - dummy/autotest/discover.rb
45
- - dummy/config.ru
46
- - dummy/config/application.rb
47
- - dummy/config/boot.rb
48
- - dummy/config/database.yml
49
- - dummy/config/environment.rb
50
- - dummy/config/environments/development.rb
51
- - dummy/config/environments/production.rb
52
- - dummy/config/environments/test.rb
53
- - dummy/config/initializers/backtrace_silencers.rb
54
- - dummy/config/initializers/inflections.rb
55
- - dummy/config/initializers/mime_types.rb
56
- - dummy/config/initializers/secret_token.rb
57
- - dummy/config/initializers/session_store.rb
58
- - dummy/config/locales/en.yml
59
- - dummy/config/routes.rb
60
- - dummy/db/migrate/20101230081247_create_dummy_models.rb
61
- - dummy/db/seeds.rb
62
- - dummy/doc/README_FOR_APP
63
- - dummy/public/404.html
64
- - dummy/public/422.html
65
- - dummy/public/500.html
66
- - dummy/public/favicon.ico
67
- - dummy/public/images/rails.png
68
- - dummy/public/index.html
69
- - dummy/public/javascripts/application.js
70
- - dummy/public/javascripts/controls.js
71
- - dummy/public/javascripts/dragdrop.js
72
- - dummy/public/javascripts/effects.js
73
- - dummy/public/javascripts/prototype.js
74
- - dummy/public/javascripts/rails.js
75
- - dummy/public/robots.txt
76
- - dummy/script/rails
77
- - dummy/spec/controllers/dummies_controller_spec.rb
78
- - dummy/spec/helpers/dummies_helper_spec.rb
79
- - dummy/spec/models/dummy_model_spec.rb
80
- - dummy/spec/spec_helper.rb
81
- - dummy/test/functional/dummies_controller_test.rb
82
- - dummy/test/performance/browsing_test.rb
83
- - dummy/test/test_helper.rb
84
- - dummy/test/unit/helpers/dummies_helper_test.rb
85
23
  - bin/rails_refactor.rb
86
- - rails_refactor.gemspec
87
24
  homepage: https://github.com/jcrisp/rails_refactor
88
- licenses: []
25
+ licenses:
26
+ - MIT
27
+ metadata: {}
89
28
  post_install_message:
90
- rdoc_options:
91
- - --line-numbers
92
- - --inline-source
93
- - --title
94
- - Rails_refactor
95
- - --main
96
- - README
29
+ rdoc_options: []
97
30
  require_paths:
98
31
  - lib
99
32
  required_ruby_version: !ruby/object:Gem::Requirement
100
- none: false
101
33
  requirements:
102
- - - ! '>='
34
+ - - ">="
103
35
  - !ruby/object:Gem::Version
104
36
  version: '0'
105
37
  required_rubygems_version: !ruby/object:Gem::Requirement
106
- none: false
107
38
  requirements:
108
- - - ! '>='
39
+ - - ">="
109
40
  - !ruby/object:Gem::Version
110
- version: '1.2'
41
+ version: '0'
111
42
  requirements: []
112
- rubyforge_project: rails_refactor
113
- rubygems_version: 1.8.24
43
+ rubyforge_project:
44
+ rubygems_version: 2.4.8
114
45
  signing_key:
115
- specification_version: 3
116
- summary: Simple refactoring like rename class for Rails projects
46
+ specification_version: 4
47
+ summary: Command line refactoring tool for Rails projects
117
48
  test_files: []
data/CHANGELOG DELETED
@@ -1,4 +0,0 @@
1
- v1.3. Support for rails_refactor to be put in your Gemfile
2
- v1.2. Speed improvements and more robust with missing files (thanks Tricon)
3
- v1.1. Updating README and usage information
4
- v1.0. first version as a gem, thanks Andys!
data/Gemfile DELETED
@@ -1,7 +0,0 @@
1
- source 'http://rubygems.org'
2
-
3
- gem 'rails', '3.0.1'
4
- gem 'echoe'
5
-
6
- group :development, :test do
7
- end
data/Gemfile.lock DELETED
@@ -1,82 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- abstract (1.0.0)
5
- actionmailer (3.0.1)
6
- actionpack (= 3.0.1)
7
- mail (~> 2.2.5)
8
- actionpack (3.0.1)
9
- activemodel (= 3.0.1)
10
- activesupport (= 3.0.1)
11
- builder (~> 2.1.2)
12
- erubis (~> 2.6.6)
13
- i18n (~> 0.4.1)
14
- rack (~> 1.2.1)
15
- rack-mount (~> 0.6.12)
16
- rack-test (~> 0.5.4)
17
- tzinfo (~> 0.3.23)
18
- activemodel (3.0.1)
19
- activesupport (= 3.0.1)
20
- builder (~> 2.1.2)
21
- i18n (~> 0.4.1)
22
- activerecord (3.0.1)
23
- activemodel (= 3.0.1)
24
- activesupport (= 3.0.1)
25
- arel (~> 1.0.0)
26
- tzinfo (~> 0.3.23)
27
- activeresource (3.0.1)
28
- activemodel (= 3.0.1)
29
- activesupport (= 3.0.1)
30
- activesupport (3.0.1)
31
- allison (2.0.3)
32
- arel (1.0.1)
33
- activesupport (~> 3.0.0)
34
- builder (2.1.2)
35
- echoe (4.5.6)
36
- allison
37
- gemcutter
38
- rubyforge
39
- erubis (2.6.6)
40
- abstract (>= 1.0.0)
41
- gemcutter (0.7.0)
42
- i18n (0.4.2)
43
- json_pure (1.5.1)
44
- mail (2.2.19)
45
- activesupport (>= 2.3.6)
46
- i18n (>= 0.4.0)
47
- mime-types (~> 1.16)
48
- treetop (~> 1.4.8)
49
- mime-types (1.16)
50
- polyglot (0.3.1)
51
- rack (1.2.2)
52
- rack-mount (0.6.14)
53
- rack (>= 1.0.0)
54
- rack-test (0.5.7)
55
- rack (>= 1.0)
56
- rails (3.0.1)
57
- actionmailer (= 3.0.1)
58
- actionpack (= 3.0.1)
59
- activerecord (= 3.0.1)
60
- activeresource (= 3.0.1)
61
- activesupport (= 3.0.1)
62
- bundler (~> 1.0.0)
63
- railties (= 3.0.1)
64
- railties (3.0.1)
65
- actionpack (= 3.0.1)
66
- activesupport (= 3.0.1)
67
- rake (>= 0.8.4)
68
- thor (~> 0.14.0)
69
- rake (0.8.7)
70
- rubyforge (2.0.4)
71
- json_pure (>= 1.1.7)
72
- thor (0.14.6)
73
- treetop (1.4.9)
74
- polyglot (>= 0.3.1)
75
- tzinfo (0.3.27)
76
-
77
- PLATFORMS
78
- ruby
79
-
80
- DEPENDENCIES
81
- echoe
82
- rails (= 3.0.1)
data/Manifest DELETED
@@ -1,60 +0,0 @@
1
- CHANGELOG
2
- Gemfile
3
- Gemfile.lock
4
- Manifest
5
- README
6
- Rakefile
7
- bin/rails_refactor
8
- dummy/Gemfile
9
- dummy/Gemfile.lock
10
- dummy/README
11
- dummy/Rakefile
12
- dummy/app/controllers/application_controller.rb
13
- dummy/app/controllers/dummies_controller.rb
14
- dummy/app/helpers/application_helper.rb
15
- dummy/app/helpers/dummies_helper.rb
16
- dummy/app/models/dummy_model.rb
17
- dummy/app/views/dummies/index.html.erb
18
- dummy/app/views/layouts/application.html.erb
19
- dummy/autotest/discover.rb
20
- dummy/config.ru
21
- dummy/config/application.rb
22
- dummy/config/boot.rb
23
- dummy/config/database.yml
24
- dummy/config/environment.rb
25
- dummy/config/environments/development.rb
26
- dummy/config/environments/production.rb
27
- dummy/config/environments/test.rb
28
- dummy/config/initializers/backtrace_silencers.rb
29
- dummy/config/initializers/inflections.rb
30
- dummy/config/initializers/mime_types.rb
31
- dummy/config/initializers/secret_token.rb
32
- dummy/config/initializers/session_store.rb
33
- dummy/config/locales/en.yml
34
- dummy/config/routes.rb
35
- dummy/db/migrate/20101230081247_create_dummy_models.rb
36
- dummy/db/seeds.rb
37
- dummy/doc/README_FOR_APP
38
- dummy/public/404.html
39
- dummy/public/422.html
40
- dummy/public/500.html
41
- dummy/public/favicon.ico
42
- dummy/public/images/rails.png
43
- dummy/public/index.html
44
- dummy/public/javascripts/application.js
45
- dummy/public/javascripts/controls.js
46
- dummy/public/javascripts/dragdrop.js
47
- dummy/public/javascripts/effects.js
48
- dummy/public/javascripts/prototype.js
49
- dummy/public/javascripts/rails.js
50
- dummy/public/robots.txt
51
- dummy/script/rails
52
- dummy/spec/controllers/dummies_controller_spec.rb
53
- dummy/spec/helpers/dummies_helper_spec.rb
54
- dummy/spec/models/dummy_model_spec.rb
55
- dummy/spec/spec_helper.rb
56
- dummy/test/functional/dummies_controller_test.rb
57
- dummy/test/performance/browsing_test.rb
58
- dummy/test/test_helper.rb
59
- dummy/test/unit/helpers/dummies_helper_test.rb
60
- bin/rails_refactor.rb
data/README DELETED
@@ -1,47 +0,0 @@
1
- RAILS REFACTOR
2
- --------------
3
- Basic renames and refactorings for rails projects.
4
- Although these are not perfect, they'll do a lot of the work for you
5
- and save you time.
6
-
7
- Before using, recommend that you start from a clean repository state so
8
- you can easily review changes.
9
-
10
- To install:
11
- gem install rails_refactor
12
-
13
- Before use, make sure you cd to the root of your rails project.
14
-
15
- To rename a controller:
16
- $ rails_refactor rename OldController NewController
17
-
18
- * renames controller file & class name in file
19
- * renames controller spec file & class name in file
20
- * renames view directory
21
- * renames helper file & module name in file
22
- * updates routes
23
-
24
- To rename a controller action:
25
- $ rails_refactor rename DummyController.old_action new_action
26
-
27
- * renames controller action in controller class file
28
- * renames view files for all formats
29
-
30
- To rename a model:
31
- $ rails_refactor rename OldModel NewModel
32
-
33
- * renames model file & class name in file
34
- * renames spec file & class name in file
35
- * renames migration & class name & table names in file
36
-
37
- Please note that if you want to run the tests, clone the repo from github, rather than using the gem (tests rely on git). Next cd to the 'dummy' rails project directory.
38
- $ ../lib/rails_refactor.rb test
39
-
40
- More refactorings coming soon... Please fork and contribute :-)
41
-
42
- Started by James Crisp & Ryan Bigg pairing at RORO hack night 24 Nov 2010.
43
- Thanks to Andrew Snow for help with Gemification.
44
-
45
- Thanks to Tricon for some improvements and start on TextMate Bundle:
46
- https://github.com/Tricon/rails-refactor.tmbundle
47
-
data/Rakefile DELETED
@@ -1,8 +0,0 @@
1
- require 'echoe'
2
-
3
- Echoe.new("rails_refactor") do |p|
4
- p.author = "James Crisp & Ryan Bigg"
5
- p.email = 'james@crispdesign.net'
6
- p.summary = "Simple refactoring like rename class for Rails projects"
7
- p.url = "https://github.com/jcrisp/rails_refactor"
8
- end
data/dummy/Gemfile DELETED
@@ -1,31 +0,0 @@
1
- source 'http://rubygems.org'
2
-
3
- gem 'rails', '3.0.1'
4
-
5
- # Bundle edge Rails instead:
6
- # gem 'rails', :git => 'git://github.com/rails/rails.git'
7
-
8
- #gem 'sqlite3-ruby', :require => 'sqlite3'
9
-
10
- # Use unicorn as the web server
11
- # gem 'unicorn'
12
-
13
- # Deploy with Capistrano
14
- # gem 'capistrano'
15
-
16
- # To use debugger
17
- # gem 'ruby-debug'
18
-
19
- # Bundle the extra gems:
20
- # gem 'bj'
21
- # gem 'nokogiri'
22
- # gem 'sqlite3-ruby', :require => 'sqlite3'
23
- # gem 'aws-s3', :require => 'aws/s3'
24
-
25
- # Bundle gems for the local environment. Make sure to
26
- # put test-only gems in this group so their generators
27
- # and rake tasks are available in development mode:
28
- group :development, :test do
29
- gem 'rspec'
30
- gem 'rspec-rails'
31
- end
data/dummy/Gemfile.lock DELETED
@@ -1,86 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- abstract (1.0.0)
5
- actionmailer (3.0.1)
6
- actionpack (= 3.0.1)
7
- mail (~> 2.2.5)
8
- actionpack (3.0.1)
9
- activemodel (= 3.0.1)
10
- activesupport (= 3.0.1)
11
- builder (~> 2.1.2)
12
- erubis (~> 2.6.6)
13
- i18n (~> 0.4.1)
14
- rack (~> 1.2.1)
15
- rack-mount (~> 0.6.12)
16
- rack-test (~> 0.5.4)
17
- tzinfo (~> 0.3.23)
18
- activemodel (3.0.1)
19
- activesupport (= 3.0.1)
20
- builder (~> 2.1.2)
21
- i18n (~> 0.4.1)
22
- activerecord (3.0.1)
23
- activemodel (= 3.0.1)
24
- activesupport (= 3.0.1)
25
- arel (~> 1.0.0)
26
- tzinfo (~> 0.3.23)
27
- activeresource (3.0.1)
28
- activemodel (= 3.0.1)
29
- activesupport (= 3.0.1)
30
- activesupport (3.0.1)
31
- arel (1.0.1)
32
- activesupport (~> 3.0.0)
33
- builder (2.1.2)
34
- diff-lcs (1.1.2)
35
- erubis (2.6.6)
36
- abstract (>= 1.0.0)
37
- i18n (0.4.2)
38
- mail (2.2.10)
39
- activesupport (>= 2.3.6)
40
- i18n (~> 0.4.1)
41
- mime-types (~> 1.16)
42
- treetop (~> 1.4.8)
43
- mime-types (1.16)
44
- polyglot (0.3.1)
45
- rack (1.2.1)
46
- rack-mount (0.6.13)
47
- rack (>= 1.0.0)
48
- rack-test (0.5.6)
49
- rack (>= 1.0)
50
- rails (3.0.1)
51
- actionmailer (= 3.0.1)
52
- actionpack (= 3.0.1)
53
- activerecord (= 3.0.1)
54
- activeresource (= 3.0.1)
55
- activesupport (= 3.0.1)
56
- bundler (~> 1.0.0)
57
- railties (= 3.0.1)
58
- railties (3.0.1)
59
- actionpack (= 3.0.1)
60
- activesupport (= 3.0.1)
61
- rake (>= 0.8.4)
62
- thor (~> 0.14.0)
63
- rake (0.8.7)
64
- rspec (2.2.0)
65
- rspec-core (~> 2.2)
66
- rspec-expectations (~> 2.2)
67
- rspec-mocks (~> 2.2)
68
- rspec-core (2.2.1)
69
- rspec-expectations (2.2.0)
70
- diff-lcs (~> 1.1.2)
71
- rspec-mocks (2.2.0)
72
- rspec-rails (2.2.0)
73
- rails (~> 3.0.0)
74
- rspec (~> 2.2)
75
- thor (0.14.6)
76
- treetop (1.4.9)
77
- polyglot (>= 0.3.1)
78
- tzinfo (0.3.23)
79
-
80
- PLATFORMS
81
- ruby
82
-
83
- DEPENDENCIES
84
- rails (= 3.0.1)
85
- rspec
86
- rspec-rails