next_rails 1.0.2 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a0b740bd739176590e5fb4ee4f38413740f341b25efc903da804685d0bff213f
4
- data.tar.gz: eb18d2673ce7f36bd1d92a7111e9628044346a9512d20a5e0e3cd22c40d81cfd
3
+ metadata.gz: 8b939f85a063cc87019deb0355769fd28ba31f4cb0b86e3f6d6108efab7c34a1
4
+ data.tar.gz: 5cee83e0ec770a5b01b7ce51c0efbcbc3ed9bdc1e70027a92cc6b8a3eee17dc9
5
5
  SHA512:
6
- metadata.gz: fcdcc8226812e09293c26906fd1be8c77760e874748963ee42fed43ccfb45ba954efe81e9d1ffa7ee8fdb78628f7027708343c6e1a2df15eba082489625e332a
7
- data.tar.gz: c44e7ff18b2f98c025ddea4cd1419963523c8ed9cd742b5c8c3e0d9863257c7646aaef320c1c8c7f63e885bd6bc9daf2039983a694487c9d6f4ce9691b910e7b
6
+ metadata.gz: dc3b4d1bd7b0fd4398c781b65f19f068af6ba01c5e6ff994ab77b832524094788fdd473ffea1bcf0ec3ffd4efd805a5c0a9906d0c10ae2169270bc07128d31b1
7
+ data.tar.gz: d5d5125673d14079de4cdd333c9414666962c9c5daa1873e964abd724f1ae75a45fe0df9336283e6d99e8d15abf97b8d91860b4d7c50733399ac57194f8edea7
data/.gitignore CHANGED
@@ -13,3 +13,4 @@
13
13
  .rspec_status
14
14
 
15
15
  .ruby-version
16
+ Gemfile.lock
data/.travis.yml CHANGED
@@ -1,6 +1,10 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.2.10
5
4
  - 2.3.3
5
+ - 2.4.10
6
+ - 2.5.8
7
+ - 2.6.6
8
+ - 2.7.2
9
+ - 3.0.2
6
10
  before_install: gem install bundler -v 1.16.1
data/CHANGELOG.md ADDED
@@ -0,0 +1,20 @@
1
+ # main [(unreleased)](https://github.com/fastruby/next_rails/compare/v1.0.4...main)
2
+
3
+ * [FEATURE: Initialize the Gemfile.next.lock to avoid major version jumps when used without an initial Gemfile.next.lock](https://github.com/fastruby/next_rails/pull/25)
4
+ * [FEATURE: Drop `actionview` dependency because it is not really used](https://github.com/fastruby/next_rails/pull/26)
5
+
6
+ # v1.0.4 / 2021-04-09 [(commits)](https://github.com/fastruby/next_rails/compare/v1.0.3...v1.0.4)
7
+
8
+ * [BUGFIX: Fixes issue with `bundle_report` and `actionview`](https://github.com/fastruby/next_rails/pull/22)
9
+
10
+ # v1.0.3 / 2021-04-05 [(commits)](https://github.com/fastruby/next_rails/compare/v1.0.2...v1.0.3)
11
+
12
+ * [BUGFIX: Update README.md to better document this `ten_years_rails` fork](https://github.com/fastruby/next_rails/pull/11)
13
+ * [BUGFIX: Make ActionView an optional dependency](https://github.com/fastruby/next_rails/pull/6)
14
+ # v1.0.2 / 2020-01-20
15
+
16
+ # v1.0.1 / 2019-07-26
17
+
18
+ # v1.0.0 / 2019-07-24
19
+
20
+ * Official Release
@@ -0,0 +1,76 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to make participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, sex characteristics, gender identity and expression,
9
+ level of experience, education, socio-economic status, nationality, personal
10
+ appearance, race, religion, or sexual identity and orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies within all project spaces, and it also applies when
49
+ an individual is representing the project or its community in public spaces.
50
+ Examples of representing a project or community include using an official
51
+ project e-mail address, posting via an official social media account, or acting
52
+ as an appointed representative at an online or offline event. Representation of
53
+ a project may be further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at oss@ombulabs.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72
+
73
+ [homepage]: https://www.contributor-covenant.org
74
+
75
+ For answers to common questions about this code of conduct, see
76
+ https://www.contributor-covenant.org/faq
data/README.md CHANGED
@@ -1,10 +1,24 @@
1
- # Ten Years of Rails Upgrades
1
+ # Next Rails
2
2
 
3
- This is a companion to the "Ten Years of Rails Upgrades" conference talk. You'll find various utilities that we use at Clio to help us prepare for and complete Rails upgrades.
3
+ This is a toolkit to upgrade your next Rails application. It will help you
4
+ set up dual booting, track deprecation warnings, and get a report on outdated
5
+ dependencies for any Rails application.
4
6
 
5
- These scripts are still early days and may not work in every environment or app.
7
+ This project is a fork of [`ten_years_rails`](https://github.com/clio/ten_years_rails)
6
8
 
7
- I wouldn't recommend adding this to your Gemfile long-term. Rather, try out the scripts and use them as a point of reference. Feel free to tweak them to better fit your environment.
9
+ ## History
10
+
11
+ This gem started as a companion to the "[Ten Years of Rails Upgrades](https://www.youtube.com/watch?v=6aCfc0DkSFo)"
12
+ conference talk by Jordan Raine.
13
+
14
+ > You'll find various utilities that we use at Clio to help us prepare for and
15
+ > complete Rails upgrades.
16
+
17
+ > These scripts are still early days and may not work in every environment or app.
18
+
19
+ > I wouldn't recommend adding this to your Gemfile long-term. Rather, try out
20
+ > the scripts and use them as a point of reference. Feel free to tweak them to
21
+ > better fit your environment.
8
22
 
9
23
  ## Usage
10
24
 
@@ -69,7 +83,7 @@ Right now, the path to the shitlist is hardcoded so make sure you store yours at
69
83
  This command helps you dual-boot your application.
70
84
 
71
85
  ```bash
72
- next --init # Create Gemfile.next
86
+ next --init # Create Gemfile.next and Gemfile.next.lock
73
87
  vim Gemfile # Tweak your dependencies conditionally using `next?`
74
88
  next bundle install # Install new gems
75
89
  next rails s # Start server using Gemfile.next
@@ -91,6 +105,17 @@ Or install it yourself as:
91
105
 
92
106
  $ gem install next_rails
93
107
 
108
+ ## Setup
109
+
110
+ Execute:
111
+
112
+ $ next --init
113
+
114
+ Init will create a Gemfile.next and an initialized Gemfile.next.lock.
115
+ The Gemfile.next.lock is initialized with the contents of your existing
116
+ Gemfile.lock lock file. We initialize the Gemfile.next.lock to prevent
117
+ major version jumps when running the next version of Rails.
118
+
94
119
  ## License
95
120
 
96
121
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/exe/bundle_report CHANGED
@@ -55,6 +55,3 @@ end
55
55
 
56
56
  # Needs to happen first
57
57
  require "bundler/setup"
58
-
59
- require "action_view"
60
- require "active_support/core_ext/object/acts_like"
data/exe/next.sh CHANGED
@@ -10,6 +10,13 @@ STRING
10
10
  mv Gemfile.tmp Gemfile
11
11
 
12
12
  ln -s Gemfile Gemfile.next
13
+
14
+ # Initialize the Gemfile.next.lock
15
+ # Prevents major version jumps when we start without a Gemfile.next.lock
16
+ if [ -f "Gemfile.lock" ] && [ ! -f "Gemfile.next.lock" ]; then
17
+ cp Gemfile.lock Gemfile.next.lock
18
+ fi
19
+
13
20
  echo <<-MESSAGE
14
21
  Created Gemfile.next (a symlink to your Gemfile). Your Gemfile has been modified to support dual-booting!
15
22
 
@@ -130,11 +130,19 @@ class DeprecationTracker
130
130
 
131
131
  def save
132
132
  new_shitlist = create_temp_shitlist
133
+ create_if_shitlist_path_does_not_exist
133
134
  FileUtils.cp(new_shitlist.path, shitlist_path)
134
135
  ensure
135
136
  new_shitlist.delete if new_shitlist
136
137
  end
137
138
 
139
+ def create_if_shitlist_path_does_not_exist
140
+ dirname = File.dirname(shitlist_path)
141
+ unless File.directory?(dirname)
142
+ FileUtils.mkdir_p(dirname)
143
+ end
144
+ end
145
+
138
146
  def create_temp_shitlist
139
147
  temp_file = Tempfile.new("temp-deprecation-tracker-shitlist")
140
148
  temp_file.write(JSON.pretty_generate(normalized_deprecation_messages))
@@ -1,15 +1,5 @@
1
- begin
2
- require "action_view"
3
- rescue LoadError
4
- puts "ActionView not available"
5
- end
6
-
7
1
  module NextRails
8
2
  class GemInfo
9
- if defined?(ActionView)
10
- include ActionView::Helpers::DateHelper
11
- end
12
-
13
3
  class NullGemInfo < GemInfo
14
4
  def initialize; end
15
5
 
@@ -52,11 +42,7 @@ module NextRails
52
42
  end
53
43
 
54
44
  def age
55
- if respond_to?(:time_ago_in_words)
56
- "#{time_ago_in_words(created_at)} ago"
57
- else
58
- created_at.strftime("%b %e, %Y")
59
- end
45
+ created_at.strftime("%b %e, %Y")
60
46
  end
61
47
 
62
48
  def sourced_from_git?
@@ -1,3 +1,3 @@
1
1
  module NextRails
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.5"
3
3
  end
data/next_rails.gemspec CHANGED
@@ -24,10 +24,9 @@ Gem::Specification.new do |spec|
24
24
  spec.require_paths = ["lib"]
25
25
 
26
26
  spec.add_dependency "colorize", ">= 0.8.1"
27
- spec.add_development_dependency "bundler", "~> 1.16"
27
+ spec.add_development_dependency "bundler", ">= 1.16", "< 3.0"
28
28
  spec.add_development_dependency "rake", "~> 10.0"
29
29
  spec.add_development_dependency "rspec", "~> 3.0"
30
30
  spec.add_development_dependency "simplecov", "~> 0.17.1"
31
31
  spec.add_development_dependency "timecop", "~> 0.9.1"
32
- spec.add_runtime_dependency "actionview"
33
32
  end
@@ -0,0 +1,9 @@
1
+ **IMPORTANT**: Please read the README before submitting pull requests for this project. Additionally, if your PR closes any open GitHub issues, make sure you include Closes #XXXX in your comment or use the option on the PR's sidebar to add related issues to auto-close the issue that your PR fixes.
2
+
3
+ - [ ] Add an entry to `CHANGELOG.md` that links to this PR under the "main (unreleased)" heading.
4
+
5
+ Description:
6
+
7
+ Please include a summary of the change and which issue is fixed or which feature is introduced. If changes to the behavior are made, clearly describe what changes.
8
+
9
+ I will abide by the [code of conduct](CODE_OF_CONDUCT.md).
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: next_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernesto Tagwerker
8
8
  - Luis Sagastume
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-01-20 00:00:00.000000000 Z
12
+ date: 2022-03-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colorize
@@ -29,16 +29,22 @@ dependencies:
29
29
  name: bundler
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - "~>"
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '1.16'
35
+ - - "<"
36
+ - !ruby/object:Gem::Version
37
+ version: '3.0'
35
38
  type: :development
36
39
  prerelease: false
37
40
  version_requirements: !ruby/object:Gem::Requirement
38
41
  requirements:
39
- - - "~>"
42
+ - - ">="
40
43
  - !ruby/object:Gem::Version
41
44
  version: '1.16'
45
+ - - "<"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
42
48
  - !ruby/object:Gem::Dependency
43
49
  name: rake
44
50
  requirement: !ruby/object:Gem::Requirement
@@ -95,20 +101,6 @@ dependencies:
95
101
  - - "~>"
96
102
  - !ruby/object:Gem::Version
97
103
  version: 0.9.1
98
- - !ruby/object:Gem::Dependency
99
- name: actionview
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- version: '0'
105
- type: :runtime
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - ">="
110
- - !ruby/object:Gem::Version
111
- version: '0'
112
104
  description: A set of handy tools to upgrade your Rails application and keep it up
113
105
  to date
114
106
  email:
@@ -126,8 +118,9 @@ files:
126
118
  - ".gitignore"
127
119
  - ".rspec"
128
120
  - ".travis.yml"
121
+ - CHANGELOG.md
122
+ - CODE_OF_CONDUCT.md
129
123
  - Gemfile
130
- - Gemfile.lock
131
124
  - LICENSE.txt
132
125
  - README.md
133
126
  - Rakefile
@@ -145,11 +138,12 @@ files:
145
138
  - lib/next_rails/gem_info.rb
146
139
  - lib/next_rails/version.rb
147
140
  - next_rails.gemspec
141
+ - pull_request_template.md
148
142
  homepage: https://github.com/fastruby/next_rails
149
143
  licenses:
150
144
  - MIT
151
145
  metadata: {}
152
- post_install_message:
146
+ post_install_message:
153
147
  rdoc_options: []
154
148
  require_paths:
155
149
  - lib
@@ -164,8 +158,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
158
  - !ruby/object:Gem::Version
165
159
  version: '0'
166
160
  requirements: []
167
- rubygems_version: 3.0.6
168
- signing_key:
161
+ rubygems_version: 3.1.3
162
+ signing_key:
169
163
  specification_version: 4
170
164
  summary: A toolkit to upgrade your next Rails application
171
165
  test_files: []
data/Gemfile.lock DELETED
@@ -1,82 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- next_rails (1.0.2)
5
- actionview
6
- colorize (>= 0.8.1)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- actionview (6.0.2.1)
12
- activesupport (= 6.0.2.1)
13
- builder (~> 3.1)
14
- erubi (~> 1.4)
15
- rails-dom-testing (~> 2.0)
16
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
17
- activesupport (6.0.2.1)
18
- concurrent-ruby (~> 1.0, >= 1.0.2)
19
- i18n (>= 0.7, < 2)
20
- minitest (~> 5.1)
21
- tzinfo (~> 1.1)
22
- zeitwerk (~> 2.2)
23
- builder (3.2.4)
24
- colorize (0.8.1)
25
- concurrent-ruby (1.1.5)
26
- crass (1.0.6)
27
- diff-lcs (1.3)
28
- docile (1.3.2)
29
- erubi (1.9.0)
30
- i18n (1.8.2)
31
- concurrent-ruby (~> 1.0)
32
- json (2.3.0)
33
- loofah (2.4.0)
34
- crass (~> 1.0.2)
35
- nokogiri (>= 1.5.9)
36
- mini_portile2 (2.4.0)
37
- minitest (5.14.0)
38
- nokogiri (1.10.7)
39
- mini_portile2 (~> 2.4.0)
40
- rails-dom-testing (2.0.3)
41
- activesupport (>= 4.2.0)
42
- nokogiri (>= 1.6)
43
- rails-html-sanitizer (1.3.0)
44
- loofah (~> 2.3)
45
- rake (10.5.0)
46
- rspec (3.8.0)
47
- rspec-core (~> 3.8.0)
48
- rspec-expectations (~> 3.8.0)
49
- rspec-mocks (~> 3.8.0)
50
- rspec-core (3.8.2)
51
- rspec-support (~> 3.8.0)
52
- rspec-expectations (3.8.4)
53
- diff-lcs (>= 1.2.0, < 2.0)
54
- rspec-support (~> 3.8.0)
55
- rspec-mocks (3.8.1)
56
- diff-lcs (>= 1.2.0, < 2.0)
57
- rspec-support (~> 3.8.0)
58
- rspec-support (3.8.2)
59
- simplecov (0.17.1)
60
- docile (~> 1.1)
61
- json (>= 1.8, < 3)
62
- simplecov-html (~> 0.10.0)
63
- simplecov-html (0.10.2)
64
- thread_safe (0.3.6)
65
- timecop (0.9.1)
66
- tzinfo (1.2.6)
67
- thread_safe (~> 0.1)
68
- zeitwerk (2.2.2)
69
-
70
- PLATFORMS
71
- ruby
72
-
73
- DEPENDENCIES
74
- bundler (~> 1.16)
75
- next_rails!
76
- rake (~> 10.0)
77
- rspec (~> 3.0)
78
- simplecov (~> 0.17.1)
79
- timecop (~> 0.9.1)
80
-
81
- BUNDLED WITH
82
- 1.17.3