rails_app_generator 0.0.11 → 0.0.12

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41a84055790db563fd9b1ea21dc26deb01da792e5a9e120c5170a3aefaf8364b
4
- data.tar.gz: b2b0244b7b5cc66a0cfdc7b9719ba4846869a49cf57fac40cf94f4c3369cd844
3
+ metadata.gz: 0470af9a31da0f8b53b53c9fb7f4dbe832ecd8d778adea006047d933e17e056f
4
+ data.tar.gz: b4889acbaaaa9fb37af410fedd68a3368213e40efdf7af72d81d47b28a6ec7a2
5
5
  SHA512:
6
- metadata.gz: 92ee6c983495db38ba71ea1ef5c74d4185dff934d216fcd345bacec453349cfd45f355b188945ab348528c3a9181a4ceb5243896bd2655005e8bce708e96060d
7
- data.tar.gz: 83d283c3c0dbf92f0eb20f807a11e9ae6dda055a86e20be5a9466ce159262897cfe7bc98a273fad2139fe692de09e18d1ce313b077af58df6f61d5e61d622ee9
6
+ metadata.gz: d1de0b5079f06786e8872ee9302fb25a020c58d6c5b82b82759800c439c48627f32fd3db642a7fcc1b1df821fdc97385b951824248ca6da9d87cebc24d86deed
7
+ data.tar.gz: 7e885bdbf52d97ef963a45a57cca5f4ff557434ba0c93dd5699bfe69d60329257901bf07f22bd381ecb10ef8f50b45a2d9d1c0c5a40a8c0e2d1188a775f50c2f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [0.0.11](https://github.com/klueless-io/rails_app_generator/compare/v0.0.10...v0.0.11) (2022-07-25)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add support for FilePairs in diff tool ([e330e1c](https://github.com/klueless-io/rails_app_generator/commit/e330e1c3db06ac2710893a3909f36af290727b57))
7
+
1
8
  ## [0.0.10](https://github.com/klueless-io/rails_app_generator/compare/v0.0.9...v0.0.10) (2022-07-25)
2
9
 
3
10
 
@@ -1,44 +1,39 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # module RailsAppGenerator
4
- # module Diff
5
- # # Diff Report
6
- # class OpenInEditor
7
- # attr_reader :info
8
-
9
- # attr_reader :open_left_only
10
- # attr_reader :open_right_only
11
- # attr_reader :open_same
12
- # attr_reader :open_different
13
-
14
- # def initialize(compare_info, **opts)
15
- # @info = compare_info
16
-
17
- # @open_left_only = opts[:open_left_only].nil? ? false : opts[:open_left_only]
18
- # @open_right_only = opts[:open_right_only].nil? ? true : opts[:open_right_only]
19
- # @open_same = opts[:open_same].nil? ? false : opts[:open_same]
20
- # @open_different = opts[:open_different].nil? ? true : opts[:open_different]
21
- # end
22
-
23
- # def open
24
- # open_files('Files only in source folder' , info.lhs_only) if open_left_only
25
- # open_files('Files only in target folder' , info.rhs_only) if open_right_only
26
- # open_files('Files in both folders' , info.same_list) if open_same
27
- # open_files('Files that are different' , info.diff_list) if open_different
28
- # end
29
-
30
- # private
31
-
32
- # def open_files(heading, files)
33
- # puts files.any? ? files.map { |f| f } : 'NO FILES'
34
- # end
35
-
36
- # def vscode_compare_files
37
- # files_that_are_different.map do |file|
38
- # system("code --diff #{File.join(lhs_path, file)} #{File.join(rhs_path, file)}")
39
- # end
40
- # end
41
-
42
- # end
43
- # end
44
- # end
3
+ module RailsAppGenerator
4
+ module Diff
5
+ # Diff Report
6
+ class OpenInEditor
7
+ attr_reader :info
8
+
9
+ attr_reader :open_left_only
10
+ attr_reader :open_right_only
11
+ attr_reader :open_same
12
+ attr_reader :open_different
13
+
14
+ def initialize(compare_info, **opts)
15
+ @info = compare_info
16
+
17
+ @open_left_only = opts[:open_left_only].nil? ? false : opts[:open_left_only]
18
+ @open_right_only = opts[:open_right_only].nil? ? true : opts[:open_right_only]
19
+ @open_same = opts[:open_same].nil? ? false : opts[:open_same]
20
+ @open_different = opts[:open_different].nil? ? true : opts[:open_different]
21
+ end
22
+
23
+ def open
24
+ open_files(info.lhs_only) if open_left_only
25
+ open_files(info.rhs_only) if open_right_only
26
+ open_files(info.same) if open_same
27
+ open_files(info.diff) if open_different
28
+ end
29
+
30
+ private
31
+
32
+ def open_files(files)
33
+ files.map do |f|
34
+ system("code --diff #{f.lhs_absolute_file} #{f.rhs_absolute_file}")
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsAppGenerator
4
- VERSION = '0.0.11'
4
+ VERSION = '0.0.12'
5
5
  end
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "rails_app_generator",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "rails_app_generator",
9
- "version": "0.0.11",
9
+ "version": "0.0.12",
10
10
  "devDependencies": {
11
11
  "@klueless-js/semantic-release-rubygem": "github:klueless-js/semantic-release-rubygem",
12
12
  "@semantic-release/changelog": "^6.0.1",
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rails_app_generator",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "description": "Create new Rails Application with custom opinions",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_app_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys