feature_map 1.2.5 → 1.2.6
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/README.md +2 -2
- data/bin/bundle +115 -0
- data/bin/docs +4 -4
- data/bin/featuremap +3 -0
- data/bin/jekyll +27 -0
- data/bin/readme +1 -0
- data/bin/rspec +27 -0
- data/bin/rubocop +27 -0
- data/lib/feature_map/private/docs/index.html +52 -52
- data/lib/feature_map/private/test_pyramid/jest_mapper.rb +44 -0
- data/lib/feature_map/private/test_pyramid/mapper.rb +33 -0
- data/lib/feature_map/private/test_pyramid/rspec_mapper.rb +54 -0
- data/lib/feature_map/private/test_pyramid_file.rb +11 -56
- data/lib/feature_map/private.rb +11 -5
- metadata +9 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20d96ad4e61fb28fc9891cf32dd7e6102dbfb6d48d4a114973390cb5fc2fc805
|
4
|
+
data.tar.gz: 951a84a6a993a8b03b7899c51b5e55e3ab3fcf356f90e122574658a3696da5cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3256049f99d24a887bc0644cbb64a1c7bcd8a305b23b019a864d68f84c101b342e742d236dfe85d1739cbc88dc4a42130b7fc25e5fc4de744a939f2ea3a77934
|
7
|
+
data.tar.gz: 57f6b8091fa32823b5f199c0f0cad7fa8b0be3b15eabb9ecee7f16e2357be7234cd2931a8f2a6ecf984792b7a56103f9956a3241c2cae9130c0cfe48e9baf7da
|
data/README.md
CHANGED
@@ -31,8 +31,8 @@ Contributions are welcome and appreciated. Here's how to get started:
|
|
31
31
|
|
32
32
|
- clone repo: `$ git clone git@github.com:Beyond-Finance/feature_map.git`
|
33
33
|
- install dependencies: `$ bundle install`
|
34
|
-
- run tests: `$
|
35
|
-
- run Rubocop: `$
|
34
|
+
- run tests: `$ bin/rspec`
|
35
|
+
- run Rubocop: `$ bin/rubocop`
|
36
36
|
|
37
37
|
That's it! Assuming you can complete all of these steps without any error or issues, you should be good to go.
|
38
38
|
|
data/bin/bundle
ADDED
@@ -0,0 +1,115 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'bundle' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require 'rubygems'
|
12
|
+
|
13
|
+
m = Module.new do
|
14
|
+
module_function
|
15
|
+
|
16
|
+
def invoked_as_script?
|
17
|
+
File.expand_path($PROGRAM_NAME) == File.expand_path(__FILE__)
|
18
|
+
end
|
19
|
+
|
20
|
+
def env_var_version
|
21
|
+
ENV.fetch('BUNDLER_VERSION', nil)
|
22
|
+
end
|
23
|
+
|
24
|
+
def cli_arg_version
|
25
|
+
return unless invoked_as_script? # don't want to hijack other binstubs
|
26
|
+
return unless 'update'.start_with?(ARGV.first || ' ') # must be running `bundle update`
|
27
|
+
|
28
|
+
bundler_version = nil
|
29
|
+
update_index = nil
|
30
|
+
ARGV.each_with_index do |a, i|
|
31
|
+
if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
|
32
|
+
bundler_version = a
|
33
|
+
end
|
34
|
+
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
|
35
|
+
|
36
|
+
bundler_version = Regexp.last_match(1)
|
37
|
+
update_index = i
|
38
|
+
end
|
39
|
+
bundler_version
|
40
|
+
end
|
41
|
+
|
42
|
+
def gemfile
|
43
|
+
gemfile = ENV.fetch('BUNDLE_GEMFILE', nil)
|
44
|
+
return gemfile if gemfile && !gemfile.empty?
|
45
|
+
|
46
|
+
File.expand_path('../Gemfile', __dir__)
|
47
|
+
end
|
48
|
+
|
49
|
+
def lockfile
|
50
|
+
lockfile =
|
51
|
+
case File.basename(gemfile)
|
52
|
+
when 'gems.rb' then gemfile.sub(/\.rb$/, '.locked')
|
53
|
+
else "#{gemfile}.lock"
|
54
|
+
end
|
55
|
+
File.expand_path(lockfile)
|
56
|
+
end
|
57
|
+
|
58
|
+
def lockfile_version
|
59
|
+
return unless File.file?(lockfile)
|
60
|
+
|
61
|
+
lockfile_contents = File.read(lockfile)
|
62
|
+
return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
|
63
|
+
|
64
|
+
Regexp.last_match(1)
|
65
|
+
end
|
66
|
+
|
67
|
+
def bundler_requirement
|
68
|
+
@bundler_requirement ||=
|
69
|
+
env_var_version ||
|
70
|
+
cli_arg_version ||
|
71
|
+
bundler_requirement_for(lockfile_version)
|
72
|
+
end
|
73
|
+
|
74
|
+
def bundler_requirement_for(version)
|
75
|
+
return "#{Gem::Requirement.default}.a" unless version
|
76
|
+
|
77
|
+
bundler_gem_version = Gem::Version.new(version)
|
78
|
+
|
79
|
+
bundler_gem_version.approximate_recommendation
|
80
|
+
end
|
81
|
+
|
82
|
+
def load_bundler!
|
83
|
+
ENV['BUNDLE_GEMFILE'] ||= gemfile
|
84
|
+
|
85
|
+
activate_bundler
|
86
|
+
end
|
87
|
+
|
88
|
+
def activate_bundler
|
89
|
+
gem_error = activation_error_handling do
|
90
|
+
gem 'bundler', bundler_requirement
|
91
|
+
end
|
92
|
+
return if gem_error.nil?
|
93
|
+
|
94
|
+
require_error = activation_error_handling do
|
95
|
+
require 'bundler/version'
|
96
|
+
end
|
97
|
+
return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
|
98
|
+
|
99
|
+
warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
|
100
|
+
exit 42
|
101
|
+
end
|
102
|
+
|
103
|
+
def activation_error_handling
|
104
|
+
yield
|
105
|
+
nil
|
106
|
+
rescue StandardError, LoadError => e
|
107
|
+
e
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
m.load_bundler!
|
112
|
+
|
113
|
+
if m.invoked_as_script?
|
114
|
+
load Gem.bin_path('bundler', 'bundle')
|
115
|
+
end
|
data/bin/docs
CHANGED
@@ -12,8 +12,8 @@ if [ ! -f $COVERAGE_FILE ] || [ $(find $COVERAGE_FILE -mtime +7 -print 2>/dev/nu
|
|
12
12
|
echo "# No test coverage file found. Regenerating. #"
|
13
13
|
echo "###############################################"
|
14
14
|
|
15
|
-
|
16
|
-
|
15
|
+
bin/rspec
|
16
|
+
bin/featuremap test_coverage --use-simplecov --simplecov-path $COVERAGE_FILE
|
17
17
|
else
|
18
18
|
echo "#############################################################"
|
19
19
|
echo "# Using recent coverage file. If you'd like to regenerate: #"
|
@@ -21,7 +21,7 @@ else
|
|
21
21
|
echo "#############################################################"
|
22
22
|
fi
|
23
23
|
|
24
|
-
|
24
|
+
bin/featuremap docs
|
25
25
|
cat .feature_map/docs/feature-map-config.js | sed 's/window\.FEATURE_MAP_CONFIG = /export const sampleConfig = /' > docs/sample_config.js
|
26
|
-
cd docs && npm install && cd ..
|
26
|
+
cd docs && npm install && npm run lint:fix && cd ..
|
27
27
|
exec foreman start -f Procfile.docs "$@"
|
data/bin/featuremap
CHANGED
data/bin/jekyll
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'jekyll' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
12
|
+
|
13
|
+
bundle_binstub = File.expand_path('bundle', __dir__)
|
14
|
+
|
15
|
+
if File.file?(bundle_binstub)
|
16
|
+
if File.read(bundle_binstub, 300).include?('This file was generated by Bundler')
|
17
|
+
load(bundle_binstub)
|
18
|
+
else
|
19
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
20
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
require 'rubygems'
|
25
|
+
require 'bundler/setup'
|
26
|
+
|
27
|
+
load Gem.bin_path('jekyll', 'jekyll')
|
data/bin/readme
CHANGED
data/bin/rspec
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rspec' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
12
|
+
|
13
|
+
bundle_binstub = File.expand_path('bundle', __dir__)
|
14
|
+
|
15
|
+
if File.file?(bundle_binstub)
|
16
|
+
if File.read(bundle_binstub, 300).include?('This file was generated by Bundler')
|
17
|
+
load(bundle_binstub)
|
18
|
+
else
|
19
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
20
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
require 'rubygems'
|
25
|
+
require 'bundler/setup'
|
26
|
+
|
27
|
+
load Gem.bin_path('rspec-core', 'rspec')
|
data/bin/rubocop
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rubocop' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
12
|
+
|
13
|
+
bundle_binstub = File.expand_path('bundle', __dir__)
|
14
|
+
|
15
|
+
if File.file?(bundle_binstub)
|
16
|
+
if File.read(bundle_binstub, 300).include?('This file was generated by Bundler')
|
17
|
+
load(bundle_binstub)
|
18
|
+
else
|
19
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
20
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
require 'rubygems'
|
25
|
+
require 'bundler/setup'
|
26
|
+
|
27
|
+
load Gem.bin_path('rubocop', 'rubocop')
|