workarea-upgrade 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,285 @@
1
+ Workarea Upgrade 3.0.2 (2019-12-17)
2
+ --------------------------------------------------------------------------------
3
+
4
+ * Pass supplied options to Diff
5
+
6
+ Diffy formatting wasn't working due to a blunder in the way we were
7
+ supplying options to Diffy::Diff
8
+
9
+ UPGRADE-3
10
+ Curt Howard
11
+
12
+ * Fix invocation bug when running `workarea_upgrade prepare -l`
13
+
14
+ The `--latest` option breaks the `prepare` -> `report` invocation chain
15
+ in the CLI. This fix passes empty hashes around to all invocations used
16
+ in the CLI.
17
+
18
+ UPGRADE-5
19
+ Curt Howard
20
+
21
+ * Avoid Method Errors When Upgrading New Gems
22
+
23
+ When a new gem has been included in an upgrading gem's dependencies, an
24
+ error can be thrown when viewing the diff or report if the gem is not
25
+ already included in the app's Gemfile prior to running the upgrade
26
+ tools. Ensure that `Workarea::Upgrade::Diff#find_from_path!` returns
27
+ `nil` when this occurs, and the diff generator skips over gems that it
28
+ cannot produce a `Workarea::Upgrade::GemDiff` for.
29
+
30
+ UPGRADE-7
31
+ Tom Scott
32
+
33
+ * Add theme upgrade notes to README
34
+
35
+ Curt Howard
36
+
37
+
38
+
39
+ Workarea Upgrade 3.0.1 (2019-10-16)
40
+ --------------------------------------------------------------------------------
41
+
42
+ * Fix Error on Startup
43
+
44
+ Make sure ActiveSupport is required so that methods like `#present?`
45
+ will be defined on all objects.
46
+
47
+ UPGRADE-39
48
+ Tom Scott
49
+
50
+ * Remove workflow
51
+
52
+ Matt Duffy
53
+
54
+ * Migrate to Github
55
+
56
+ Matt Duffy
57
+
58
+
59
+
60
+ Workarea Upgrade 3.0.0 (2019-09-17)
61
+ --------------------------------------------------------------------------------
62
+
63
+ * Overhaul Upgrade Plugin
64
+
65
+ * Add version checking functionality
66
+ * Remove Migrations. Now they live in base.
67
+ * Remove references to `weblinc`. Only support v3+.
68
+ * Add Gemfile.next support
69
+ * Clean up API and plugin flow
70
+ * Consolodate Diff-based tasks
71
+ * Remove useless output from Breakdown report
72
+
73
+ UPGRADE-36
74
+ Curt Howard
75
+
76
+
77
+
78
+ Workarea Upgrade 2.0.9 (2019-04-30)
79
+ --------------------------------------------------------------------------------
80
+
81
+ * Update README
82
+
83
+ * General improvements
84
+ * Add a note about upgrading themes
85
+
86
+ UPGRADE-35
87
+ Curt Howard
88
+
89
+
90
+
91
+ Workarea Upgrade 2.0.8 (2019-04-30)
92
+ --------------------------------------------------------------------------------
93
+
94
+ * Update README
95
+
96
+ * General improvements
97
+ * Add a note about upgrading themes
98
+
99
+ UPGRADE-35
100
+ Curt Howard
101
+
102
+
103
+
104
+ Workarea Upgrade 2.0.8 (2019-01-08)
105
+ --------------------------------------------------------------------------------
106
+
107
+ * Update README
108
+
109
+ UPGRADE-34
110
+ Curt Howard
111
+
112
+
113
+
114
+ Workarea Upgrade 2.0.7 (2018-04-17)
115
+ --------------------------------------------------------------------------------
116
+
117
+ * Leverage Workarea Changelog task
118
+
119
+ ECOMMERCE-5355
120
+ Curt Howard
121
+
122
+ * Migrate dragonfly assets to v3.x cleanly
123
+
124
+ When v2.x clients use the v3 migration script, none of their content
125
+ assets can be found because the job ID has changed as we upgraded the
126
+ Dragonfly library. When upgrading Dragonfly assets, try to find an asset
127
+ match by the filename of the image rather than the entire asset URL.
128
+ This isn't 100% perfect because we don't validate uniqueness on content
129
+ asset filenames, but it should get us most of the way there.
130
+
131
+ UPGRADE-30
132
+ Tom Scott
133
+
134
+
135
+
136
+ Workarea Upgrade 2.0.6 (2018-02-06)
137
+ --------------------------------------------------------------------------------
138
+
139
+ * Rename term_facets to terms_facets
140
+
141
+ Fixes issue where v2.x filters are being migrated into the wrong place.
142
+
143
+ UPGRADE-25
144
+ Tom Scott
145
+
146
+
147
+ Workarea Upgrade 2.0.5 (2018-01-23)
148
+ --------------------------------------------------------------------------------
149
+
150
+ * Add logic to update content presets during v3 migration
151
+
152
+ UPGRADE-26
153
+ Matt Duffy
154
+
155
+
156
+ Workarea Upgrade 2.0.4 (2017-09-06)
157
+ --------------------------------------------------------------------------------
158
+
159
+ * Loosen version pattern to allow upgrading to beta releases
160
+
161
+ UPGRADE-24
162
+ Curt Howard
163
+
164
+
165
+ Workarea Upgrade 2.0.3 (2017-08-08)
166
+ --------------------------------------------------------------------------------
167
+
168
+ * Add additional changes to taxon fields
169
+
170
+ UPGRADE-23
171
+ Matt Duffy
172
+
173
+ * Fix facet field names for categories in v3 migration
174
+
175
+ UPGRADE-23
176
+ Matt Duffy
177
+
178
+ * Properly migrate order item product hashes from v2 to v3
179
+
180
+ UPGRADE-23
181
+ Matt Duffy
182
+
183
+
184
+ Workarea Upgrade 2.0.2 (2017-07-25)
185
+ --------------------------------------------------------------------------------
186
+
187
+ * Archive unneeded shipping items during v3 db migration
188
+
189
+ UPGRADE-22
190
+ Matt Duffy
191
+
192
+
193
+ Workarea Upgrade 2.0.1 (2017-06-20)
194
+ --------------------------------------------------------------------------------
195
+
196
+ * Fix issues with v3 migration script
197
+
198
+ - Handle Products without variants
199
+ - Handle Pricing::Sku without prices
200
+ - Handle indexing orders after changing IDs
201
+ - Remove purchase dates from variants
202
+ - Remove meta_keywords from products and content
203
+ - Check order number presence to prevent looping through new documents
204
+
205
+ UPGRADE-20
206
+ Matt Duffy
207
+
208
+ * Modify diffing logic to allow diff between v3 versions
209
+
210
+ UPGRADE-19
211
+ Matt Duffy
212
+
213
+ * Remove incorrect reference to Weblinc constant
214
+
215
+ UPGRADE-18
216
+ Matt Duffy
217
+
218
+
219
+ Workarea Upgrade 2.0.0 (2017-05-05)
220
+ --------------------------------------------------------------------------------
221
+
222
+ * Allow workarea gems to be diffed with weblinc gems
223
+
224
+ UPGRADE-16
225
+ Matt Duffy
226
+
227
+ * Create v3 database migration script
228
+
229
+ UPGRADE-15
230
+ Matt Duffy
231
+
232
+
233
+ WebLinc Upgrade 1.1.0 (2016-10-12)
234
+ --------------------------------------------------------------------------------
235
+
236
+ * Add support for .decorator files
237
+
238
+ UPGRADE-13
239
+ Ben Crouse
240
+
241
+
242
+ WebLinc Upgrade 1.0.2 (2016-08-30)
243
+ --------------------------------------------------------------------------------
244
+
245
+ * Require active_support delegation method for compatibility with weblinc v2.2.x
246
+
247
+ UPGRADE-9
248
+ Matt Duffy
249
+
250
+ * Fixing various issues found in data migration scripts
251
+
252
+ Running data migration on real life data revealed several issues with the
253
+ migration scripts that I addressed as they came up.
254
+
255
+ * Create a method to migrate fulfillment data
256
+ * Removal of 'packaged_product_ids' and 'categorizations' from
257
+ 'product_attributes' in 'order.items'
258
+ * Guard against users having no passwords because of sign in through facebook
259
+ or other third party
260
+ * 'cancelled_at' to 'canceled_at' on orders
261
+ * Guard against possibility of duplicate slugs from deleted Smart Categories
262
+ * Guard against non-existent categories in product.categorizations
263
+ * Added 'db:mongoid:remove_indexes' invocation
264
+ * Cleaning of possible malformed URLs in Email::Share
265
+
266
+ UPGRADE-8
267
+ Jesse McPherson
268
+
269
+ * UPGRADE-7: update documentation to ensure target versions are installed
270
+ prior to to running the diff or report
271
+ fgalarza
272
+
273
+
274
+ WebLinc Upgrade 1.0.1 (2016-04-05)
275
+ --------------------------------------------------------------------------------
276
+
277
+
278
+ Weblinc Upgrade 1.0.0 (February 18, 2016)
279
+ --------------------------------------------------------------------------------
280
+
281
+ * Add CLI tools for diffing weblinc versions
282
+
283
+ * Add a report to help a developer understand and begin an upgrade
284
+
285
+ * Add migration for migrating from v0.12 to v2.0
data/Gemfile ADDED
@@ -0,0 +1,17 @@
1
+ source 'https://rubygems.org'
2
+ git_source(:github) { |repo| "git@github.com:#{repo}.git" }
3
+
4
+ # Declare your gem's dependencies in upgrade.gemspec.
5
+ # Bundler will treat runtime dependencies like base dependencies, and
6
+ # development dependencies will be added by default to the :development group.
7
+ gemspec
8
+
9
+ # Declare any dependencies that are still in development here instead of in
10
+ # your gemspec. These might include edge Rails or gems from your path or
11
+ # Git. Remember to move these dependencies to your gemspec before releasing
12
+ # your gem to rubygems.org.
13
+
14
+ # To use a debugger
15
+ # gem 'byebug', group: [:development, :test]
16
+
17
+ gem 'workarea', '>= 3.2.0'
@@ -0,0 +1,210 @@
1
+ # Workarea Upgrade
2
+
3
+ A plugin for upgrading to newer versions of Workarea and its plugins.
4
+
5
+ ## Overview
6
+
7
+ * Used for upgrading to new patches, minors, or majors
8
+ * View a report of the complexity of the upgrade
9
+ * Diff code change between any two version of Workarea in the v3 series
10
+ * See results relevant to the overridden or decorated files in your application
11
+
12
+ ## Features
13
+
14
+ * __Command Line Interface__
15
+
16
+ The features of this plugin are accessibile by invoking the `workarea_upgrade`
17
+ command. After installing this plugin run `bundle exec workarea_upgrade help`
18
+ for an overview of which commands are available to you.
19
+
20
+ * __Upgrade Preparation__
21
+
22
+ The Upgrade plugin uses the differences found between your `Gemfile` and a
23
+ `Gemfile.next` file present in your application's root directory to generate
24
+ its reporting and diffing functionality. You can create and manage this
25
+ `Gemfile.next` yourself or use the `prepare` task to automate its creation.
26
+
27
+ * __Reporting__
28
+
29
+ To get an idea of how complex your upgrade will be the Upgrade gem provides
30
+ a `report` task which shows basic statistics about the amount of change the
31
+ Workarea platform has undergone between versions listed in your `Gemfile` and
32
+ `Gemfile.next`. These statistics should give you a general idea of how much
33
+ work may be required to perform the upgrade.
34
+
35
+ * __Diffing__
36
+
37
+ The Upgrade plugin will display a full diff of changes made to Workarea as they
38
+ pertain to your application. If you've overridden or decorated any core
39
+ Workarea file or a file from a Workarea plugin the Upgrade gem will show you
40
+ the change to that file between the versions specified in your `Gemfile` and
41
+ `Gemfile.next`. Use this information to upgrade your application accordingly.
42
+
43
+ ## Getting Started
44
+
45
+ ### Installation
46
+
47
+ Add the plugin to your application's `Gemfile`:
48
+
49
+ group :development do
50
+ gem 'workarea-upgrade', '>= 3.0.0', source: 'https://gems.workarea.com'
51
+ end
52
+
53
+ Update your bundle. Use `bundle update` to get the latest version:
54
+
55
+ cd path/to/your_app
56
+ bundle update workarea-upgrade
57
+
58
+ ### View Help
59
+
60
+ Run `workarea_upgrade help` for an overview of the commands and what they do:
61
+
62
+ bundle exec workarea_upgrade help
63
+
64
+ Run `workarea_upgrade help TASK` to get more information about a given task:
65
+
66
+ bundle exec workarea_upgrade help report
67
+
68
+ ### Create a Gemfile.next
69
+
70
+ The Upgrade plugin uses a `Gemfile.next` file in your application's root
71
+ directory to determine the versions you wish to upgrade to.
72
+
73
+ This file may be created manually, by copying and modifying your `Gemfile` as a
74
+ `Gemfile.next` file, or automatically, by running:
75
+
76
+ bundle exec workarea_upgrade
77
+
78
+ This will drop you into a wizard that will determine the newest versions of each
79
+ of your Workarea gems and iterate over them, allowing you to add, remove, or
80
+ modify the version of each gem found. These choices are used to generate the
81
+ `Gemfile.next` file for you automatically.
82
+
83
+ Once the process is complete the `Gemfile.next` will be tested for installation.
84
+ If it fails installation you will be given instructions on how to fix it
85
+ manually until it is in an installable state.
86
+
87
+ ### View Report
88
+
89
+ Once the `Gemfile.next` file is installable, you may get an idea of the
90
+ complexity of your upgrade by viewing the report:
91
+
92
+ bundle exec workarea_upgrade report
93
+
94
+ ### View Diffs
95
+
96
+ Finally, view the actual changes that have occurred to any Workarea gems you
97
+ have installed with:
98
+
99
+ bundle exec workarea_upgrade diff
100
+
101
+ The output of this command will be limited to the files that have been
102
+ overridden or decorated in your application only, as its these files that will
103
+ not automatically receive the updates from the core platform. Use this output
104
+ to make informed decisions about how your application will need to change to
105
+ stay up to date.
106
+
107
+ You may also view a list of all files added or removed between each version
108
+ by running either:
109
+
110
+ bundle exec workarea_upgrade diff --added # or
111
+ bundle exec workarea_upgrade diff --removed
112
+
113
+ View `bundle exec workarea_upgrade help diff` for more ways you can format these
114
+ results.
115
+
116
+ ### Copy Gemfile.next to Gemfile
117
+
118
+ Once all of the updates have been applied to your application, move the
119
+ `Gemfile.next` files over to replace your `Gemfile` files:
120
+
121
+ mv Gemfile.next Gemfile
122
+ mv Gemfile.next.lock Gemfile.lock
123
+
124
+ ### Test
125
+
126
+ Lastly you should run your test suite to ensure all of the tests pass:
127
+
128
+ bin/rails workarea:test
129
+
130
+ Once the tests pass, deploy your upgrade to your QA environment for real user
131
+ testing.
132
+
133
+ ### Upgrading Themes
134
+
135
+ Themes, by nature, are structured differently than host applications. The main
136
+ difference is that themes list their dependencies in a `gemspec` instead of a
137
+ `Gemfile`. Secondly, they are more permissive in their dependencies, since they
138
+ are intended to "just work" for all patches within a dependency's minor version
139
+ or, in some cases, all minors and patches within a dependency's major version.
140
+
141
+ ```rb
142
+ # snipped from the NVY Theme's gemspec
143
+
144
+ s.add_dependency 'workarea', '~> 3.4.x'
145
+ s.add_dependency 'workarea-theme', '~> 1.1.1'
146
+
147
+ s.add_dependency 'workarea-blog', '~> 3.x', '>= 3.3.0'
148
+ s.add_dependency 'workarea-gift_cards', '~> 3.x', '>= 3.4.0'
149
+ s.add_dependency 'workarea-product_quickview', '~> 2.0.2'
150
+ s.add_dependency 'workarea-reviews', '~> 3.x'
151
+ s.add_dependency 'workarea-share', '~> 1.x', '>= 1.2.0'
152
+ s.add_dependency 'workarea-swatches', '~> 1.x'
153
+ s.add_dependency 'workarea-styled_selects', '~> 1.x'
154
+ s.add_dependency 'workarea-slick_slider', '~> 1.x'
155
+ s.add_dependency 'workarea-wish_lists', '>= 2.1.0'
156
+ ```
157
+
158
+ ```rb
159
+ # snipped from the NVY theme's Gemfile
160
+
161
+ gem 'workarea', github: 'workarea-commerce/workarea'
162
+ ```
163
+
164
+ In order to use the `workarea_upgrade` command effectively within the context
165
+ of a theme you will need to _temporarily create entries in the theme's Gemfile_
166
+ effectively fixing the theme's dependencies to a known version before proceeding
167
+ with the upgrade.
168
+
169
+ Doing this is fairly straightforward. It's best to glean the fixed dependency
170
+ versions from the gemspec directly. Using the example above we can safely assume
171
+ the adjusted Gemfile should look something like this:
172
+
173
+ ```rb
174
+ gem 'workarea', '3.4.0'
175
+ gem 'workarea-blog', '3.3.0'
176
+ gem 'workarea-gift_cards', '3.4.0'
177
+ gem 'workarea-product_quickview', '2.0.2'
178
+ gem 'workarea-reviews', '3.0.0'
179
+ gem 'workarea-share', '1.2.0'
180
+ gem 'workarea-swatches', '1.0.0'
181
+ gem 'workarea-styled_selects', '1.0.0'
182
+ gem 'workarea-slick_slider', '1.0.0'
183
+ gem 'workarea-wish_lists', '2.1.0'
184
+
185
+ # Don't forget to include workarea-upgrade either
186
+ gem 'workarea-upgrade', source: 'https://gems.workarea.com'
187
+ ```
188
+
189
+ Running `bundle exec workarea_upgrade` at this point should work as expected.
190
+
191
+ Once you've finished going through the generated diff and applying all of the
192
+ changes, don't forget to
193
+
194
+ 1. revert the changes you made to your Gemfile
195
+ 1. update your gemspec to point to the new versions you've upgraded to
196
+ 1. delete your Gemfile.next and Gemfile.next.lock files
197
+ 1. run a bundle install to check that the dependencies are correct
198
+ 1. run your tests
199
+
200
+ ## More Information
201
+
202
+ Please visit
203
+ <https://developer.workarea.com/articles/upgrading-your-application.html> for a
204
+ more comprehensive overview of how to use this plugin.
205
+
206
+ # Copyright & Licensing
207
+
208
+ Copyright Weblinc 2017. All rights reserved.
209
+
210
+ For licensing, contact sales@workarea.com.