react_on_rails 6.1.1.rc.1 → 6.1.1

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
  SHA1:
3
- metadata.gz: 8c1a4b95d529e2b5d95bd5cd92822138f8a5017c
4
- data.tar.gz: c77aeda6b4a99c2be1b02719729be8e49fd53179
3
+ metadata.gz: e0c71a39501e0eb29676ebb4003e70f64b29a754
4
+ data.tar.gz: e1891e86f9f814cbf14493a0e36d6cab45309459
5
5
  SHA512:
6
- metadata.gz: 58c496affefbff52af047529ab85cea488f78bfd325cc2d12ee85fd0106340ff2ab174d82a9c92c8d0e8ceba007c987cd4047222546b9c867f038fefe6cef216
7
- data.tar.gz: 774fd6cf92855b04a79e6eea058212e7744677b10c492e083ff169746f4a432d4c38be0bc93d19b3530548450f6eb2d6b49ea465808767c120df14ee861baa38
6
+ metadata.gz: 10e3d05d3c8ebce907a8c29d337a31961b4e9f66d3b816de2881bdcd0c53bb42212f05f760e153d2c236bb076a4d58d03e7cf355a76cbe847165dc80d388c9da
7
+ data.tar.gz: 3898da0b35b3014e6294becd7b81853b24d73e84e43a220bb51dc9b5c9497450796d7907699a63aa1aa44b470e6952f72f2b765a2774701733ee026d8ba34615
@@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. Items under
3
3
 
4
4
  Contributors: please follow the recommendations outlined at [keepachangelog.com](http://keepachangelog.com/). Please use the existing headings and styling as a guide, and add a link for the version diff at the bottom of the file. Also, please update the `Unreleased` link to compare to the latest release version.
5
5
 
6
+ ## [6.1.1] 2016-09-09
7
+ ##### Fixed
8
+ - React on Rails was incorrectly failing to create symlinks when a file existed in the location for the new symlink. [#491](https://github.com/shakacode/react_on_rails/pull/541) by [robwise ](https://github.com/robwise) and [justin808](https://github.com/justin808).
9
+
6
10
  ## [6.1.0] 2016-08-21
7
11
 
8
12
  ##### Added
@@ -364,7 +368,8 @@ Best done with Object destructing:
364
368
  ##### Fixed
365
369
  - Fix several generator related issues.
366
370
 
367
- [Unreleased]: https://github.com/shakacode/react_on_rails/compare/6.1.0...master
371
+ [Unreleased]: https://github.com/shakacode/react_on_rails/compare/6.1.1...master
372
+ [6.1.1]: https://github.com/shakacode/react_on_rails/compare/6.1.0...6.1.1
368
373
  [6.1.0]: https://github.com/shakacode/react_on_rails/compare/6.0.5...6.1.0
369
374
  [6.0.5]: https://github.com/shakacode/react_on_rails/compare/6.0.4...6.0.5
370
375
  [6.0.4]: https://github.com/shakacode/react_on_rails/compare/6.0.3...6.0.4
@@ -26,18 +26,14 @@ module ReactOnRails
26
26
  target_exists = File.exist?(target_path)
27
27
  raise SymlinkTargetDoesNotExistException, "Target Path was: #{target_path}" unless target_exists
28
28
 
29
- # File.exist?(symlink_path) will check the file the sym is pointing to is existing
30
- # File.lstat(symlink_path).symlink? confirms that this is a symlink
31
- valid_symlink_already_exists = File.exist?(symlink_path) && File.lstat(symlink_path).symlink?
32
-
33
- if valid_symlink_already_exists
29
+ if symlink_and_points_to_existing_file?(symlink_path)
34
30
  puts "React On Rails: Digested version of #{symlink} already exists indicating #{target} did not change."
35
31
  return
36
32
  end
37
33
 
38
34
  if file_or_symlink_exists_at_path?(symlink_path)
39
35
  puts "React On Rails: Removing existing invalid symlink or file #{symlink_path}"
40
- `rm -f "#{symlink_path}"`
36
+ FileUtils.remove_file(symlink_path, true)
41
37
  end
42
38
 
43
39
  # Might be like:
@@ -120,7 +116,15 @@ module ReactOnRails
120
116
 
121
117
  private
122
118
 
119
+ def symlink_and_points_to_existing_file?(symlink_path)
120
+ # File.exist?(symlink_path) will check the file the sym is pointing to is existing
121
+ # File.lstat(symlink_path).symlink? confirms that this is a symlink
122
+ File.exist?(symlink_path) && File.lstat(symlink_path).symlink?
123
+ end
124
+
123
125
  def file_or_symlink_exists_at_path?(path)
126
+ # We use lstat and not stat, we we don't want to visit the file that the symlink maybe
127
+ # pointing to. We can't use File.exist?, as that would check the file pointed at by the symlink.
124
128
  File.lstat(path)
125
129
  true
126
130
  rescue
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ReactOnRails
3
- VERSION = "6.1.1.rc.1".freeze
3
+ VERSION = "6.1.1".freeze
4
4
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-on-rails",
3
- "version": "6.1.1-rc.1",
3
+ "version": "6.1.1",
4
4
  "description": "react-on-rails JavaScript for react_on_rails Ruby gem",
5
5
  "main": "node_package/lib/ReactOnRails.js",
6
6
  "directories": {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: react_on_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.1.rc.1
4
+ version: 6.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Gordon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-05 00:00:00.000000000 Z
11
+ date: 2016-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool
@@ -455,12 +455,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
455
455
  version: '0'
456
456
  required_rubygems_version: !ruby/object:Gem::Requirement
457
457
  requirements:
458
- - - ">"
458
+ - - ">="
459
459
  - !ruby/object:Gem::Version
460
- version: 1.3.1
460
+ version: '0'
461
461
  requirements: []
462
462
  rubyforge_project:
463
- rubygems_version: 2.5.1
463
+ rubygems_version: 2.6.1
464
464
  signing_key:
465
465
  specification_version: 4
466
466
  summary: Rails with react server rendering with webpack.