rails_edge_test 0.6.0 → 0.7.0
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +7 -2
- data/exe/generate_edges +18 -2
- data/lib/rails_edge_test/runner.rb +7 -2
- data/lib/rails_edge_test/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4fefbd744936eb26a15aeb82c6e8699f07dbd20
|
4
|
+
data.tar.gz: d359ef87f86c089387e30be212c3ab97201945fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9fee2b82450ddbd6eab5fcf70fd522b216c3bb1295488fe369fb4fec924e09dd45fa8a9a9331808e4e0f452037edd63e5b75357a4b298868c91f2ac8ecfb05c6
|
7
|
+
data.tar.gz: 4c3f8dc2910f74bb48f7d72ea7e0c9436014c37146b7ae144bd725e56b6d3e7684ea33e0fd2dc632c7570d0ef7b812066e76068bd2e4d742ebf6973359297652
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -69,11 +69,16 @@ Edge specifications, like the above, should be put in subfolders of `/edge` and
|
|
69
69
|
|
70
70
|
## Generating files
|
71
71
|
|
72
|
-
When you want to generate your edge json files, run this:
|
72
|
+
When you want to generate all your edge json files, run this:
|
73
73
|
|
74
74
|
`bundle exec generate_edges`
|
75
75
|
|
76
|
-
|
76
|
+
When you can also specify a specific file:
|
77
|
+
|
78
|
+
`bundle exec generate_edges spec/edge/rails_controller_edge.rb`
|
79
|
+
|
80
|
+
You can also pass in a file path relative to the edge root path (usually `spec/edge`):
|
81
|
+
|
77
82
|
`bundle exec generate_edges rails_controller_edge.rb`
|
78
83
|
|
79
84
|
## Some helpful setup
|
data/exe/generate_edges
CHANGED
@@ -3,7 +3,23 @@
|
|
3
3
|
require 'open3'
|
4
4
|
require 'rails_edge_test'
|
5
5
|
|
6
|
-
|
6
|
+
# Walk up recursively the filesystem until we can find a folder
|
7
|
+
# containing the Gemfile. Then we can use that folder as the starting
|
8
|
+
# point to look for the rails files that we need.
|
9
|
+
def find_gemfile_dir(path)
|
10
|
+
if File.file?(File.join(path, 'Gemfile'))
|
11
|
+
path
|
12
|
+
else
|
13
|
+
new_path = File.expand_path('..', path)
|
7
14
|
|
8
|
-
|
15
|
+
if path == new_path
|
16
|
+
raise 'Could not find directory with Gemfile'
|
17
|
+
else
|
18
|
+
find_gemfile_dir(new_path)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
gemfile_dir = find_gemfile_dir(Dir.pwd)
|
24
|
+
RailsEdgeTest::Runner.load_rails_environment!(gemfile_dir)
|
9
25
|
RailsEdgeTest::Runner.go!(ARGV)
|
@@ -15,12 +15,17 @@ module RailsEdgeTest
|
|
15
15
|
glob_path = args.shift
|
16
16
|
end
|
17
17
|
|
18
|
-
|
18
|
+
glob_with_root_path = File.join(
|
19
19
|
RailsEdgeTest.configuration.edge_root_path,
|
20
20
|
glob_path
|
21
21
|
)
|
22
22
|
|
23
|
-
|
23
|
+
# load files both at the root path and edge_root_path
|
24
|
+
Dir.glob(glob_path).each do |file|
|
25
|
+
load file
|
26
|
+
end
|
27
|
+
|
28
|
+
Dir.glob(glob_with_root_path).each do |file|
|
24
29
|
load file
|
25
30
|
end
|
26
31
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_edge_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Leven
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
150
|
version: '0'
|
151
151
|
requirements: []
|
152
152
|
rubyforge_project:
|
153
|
-
rubygems_version: 2.
|
153
|
+
rubygems_version: 2.5.2.3
|
154
154
|
signing_key:
|
155
155
|
specification_version: 4
|
156
156
|
summary: Generate json for front-end testing using your rails backend.
|