rails4_upgrade 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +2 -0
- data/README.md +14 -2
- data/lib/rails4_upgrade/formatters/incompatible_gems_formatter.rb +15 -9
- data/lib/rails4_upgrade/version.rb +1 -1
- data/rails4_upgrade.gemspec +1 -0
- metadata +24 -2
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -14,13 +14,25 @@ requires Ruby 1.9.3, and `rails4_upgrade` uses 1.9-only syntax and semantics.
|
|
14
14
|
|
15
15
|
Add to `Gemfile`:
|
16
16
|
|
17
|
-
|
17
|
+
```ruby
|
18
|
+
gem 'rails4_upgrade', github: 'alindeman/rails4_upgrade'
|
19
|
+
```
|
18
20
|
|
19
21
|
## Usage
|
20
22
|
|
21
23
|
List gems that would currently prevent you from upgrading to Rails 4:
|
22
24
|
|
23
|
-
|
25
|
+
```
|
26
|
+
$ rake rails4:check_gems
|
27
|
+
+--------------------+----------------------+
|
28
|
+
| Dependency Path | Rails Requirement |
|
29
|
+
+--------------------+----------------------+
|
30
|
+
| draper 0.18.0 | actionpack ~> 3.2 |
|
31
|
+
| draper 0.18.0 | activesupport ~> 3.2 |
|
32
|
+
| simple_form 2.0.4 | actionpack ~> 3.0 |
|
33
|
+
| simple_form 2.0.4 | activemodel ~> 3.0 |
|
34
|
+
+--------------------+----------------------+
|
35
|
+
```
|
24
36
|
|
25
37
|
## Contributing
|
26
38
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require "terminal-table"
|
2
|
+
|
1
3
|
module Rails4Upgrade
|
2
4
|
module Formatters
|
3
5
|
class IncompatibleGemsFormatter
|
@@ -8,11 +10,20 @@ module Rails4Upgrade
|
|
8
10
|
def output(stream = STDOUT)
|
9
11
|
incompatibilities = @incompatible_gems.incompatibilities
|
10
12
|
if incompatibilities.empty?
|
11
|
-
stream.puts
|
13
|
+
stream.puts "No gem incompatibilities found"
|
12
14
|
else
|
15
|
+
rows = []
|
13
16
|
incompatibilities.each do |incompatibility|
|
14
|
-
|
17
|
+
rows << [
|
18
|
+
human_readable_dependency_path(incompatibility.path),
|
19
|
+
human_readable_dependency(incompatibility.dependency)
|
20
|
+
]
|
15
21
|
end
|
22
|
+
|
23
|
+
stream.puts Terminal::Table.new(
|
24
|
+
headings: ["Dependency Path", "Rails Requirement"],
|
25
|
+
rows: rows
|
26
|
+
)
|
16
27
|
end
|
17
28
|
end
|
18
29
|
|
@@ -22,13 +33,8 @@ module Rails4Upgrade
|
|
22
33
|
path.map { |dependency| "#{dependency.name} #{dependency.version}" }.join(" -> ")
|
23
34
|
end
|
24
35
|
|
25
|
-
def
|
26
|
-
|
27
|
-
when :failure
|
28
|
-
"\e[31m#{string}\e[0m"
|
29
|
-
when :success
|
30
|
-
"\e[35m#{string}\e[0m"
|
31
|
-
end
|
36
|
+
def human_readable_dependency(dependency)
|
37
|
+
"#{dependency.name} #{dependency.requirement}"
|
32
38
|
end
|
33
39
|
end
|
34
40
|
end
|
data/rails4_upgrade.gemspec
CHANGED
@@ -18,6 +18,7 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.require_paths = ["lib"]
|
19
19
|
|
20
20
|
gem.add_dependency "bundler", ">=1.2.2"
|
21
|
+
gem.add_dependency "terminal-table", ">=1.4.5"
|
21
22
|
|
22
23
|
gem.add_development_dependency "rake", "~>10.0.0"
|
23
24
|
gem.add_development_dependency "rspec", "~>2.12.0"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails4_upgrade
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -27,6 +27,22 @@ dependencies:
|
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: 1.2.2
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: terminal-table
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 1.4.5
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.4.5
|
30
46
|
- !ruby/object:Gem::Dependency
|
31
47
|
name: rake
|
32
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -135,12 +151,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
135
151
|
- - ! '>='
|
136
152
|
- !ruby/object:Gem::Version
|
137
153
|
version: '0'
|
154
|
+
segments:
|
155
|
+
- 0
|
156
|
+
hash: 1652825073346797579
|
138
157
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
158
|
none: false
|
140
159
|
requirements:
|
141
160
|
- - ! '>='
|
142
161
|
- !ruby/object:Gem::Version
|
143
162
|
version: '0'
|
163
|
+
segments:
|
164
|
+
- 0
|
165
|
+
hash: 1652825073346797579
|
144
166
|
requirements: []
|
145
167
|
rubyforge_project:
|
146
168
|
rubygems_version: 1.8.24
|